Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency ember-intl to v7 #2572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 10, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ember-intl (source) 4.4.1 -> 7.0.7 age adoption passing confidence

Release Notes

ember-intl/ember-intl (ember-intl)

v7.0.7: Updated dependencies and documentations

Compare Source

Thanks to @​MichalBryxi, @​balinterdi, and @​amk221 for their help with improving the docs.

v7.0.6: Listed @​ember/test-helpers as a peer dependency. Made pnpm settings stricter.

Compare Source

[!IMPORTANT]

For ember-intl@v7 users:

Before updating @ember/test-helpers to v4, please update ember-intl to 7.0.6 or higher. Otherwise, you will encounter the following error message in tests:

ember-intl tried to import "@​ember/test-helpers" in "ember-intl/test-support/..." from addon code, but "@​ember/test-helpers" is a devDependency. You may need to move it into dependencies.

Thanks to @​wozny1989 for reporting the issue, and @​NullVoxPopuli for helping me fix the failing ember-try scenarios.

v7.0.5: Updated dependencies. Used pnpm@9 to manage dependencies.

Compare Source

v7.0.4: Silenced logs during build by default

Compare Source

Due to an incorrect code cleanup in v5 or v6, ember-intl had always logged messages (e.g. ICU argument mismatch, missing translation).

❯ ember serve

[ember-intl] "account.intro" ICU argument mismatch: "de-de": "address", "dob"
[ember-intl] "account.button" was not found in "de-de"
...

For the time being, ember-intl@v7 will not log these messages by default. If you need these logs, you may set verbose: true (consider this a private API) in config/ember-intl.js until the addon provides a better solution:

/* config/ember-intl.js (remaining keys omitted for brevity) */

module.exports = function (/* environment */) {
  return {
+     verbose: true,
  };
};

Thanks to @​Techn1x for the bug fix.

v7.0.3: Refactored intl service

Compare Source

What changed?

  • ~Updated blueprints to set inputPath correctly for v1 addons~ (doesn't work yet; tests/dummy/config/ember-intl.js should show inputPath: 'tests/dummy/translations')
  • Refactored exists() and types in the intl service
  • Wrote additional tests and added ember-lts-5.8 to ember-try scenarios

v7.0.2: Made getTranslation() public and fixed a bug in setOnFormatjsError()

Compare Source

The intl service's getTranslation() is now a public method, so that you may keep extracting a translation message's arguments as you might have done with lookup() in v6. I went with a patch release (instead of a minor), since changing lookup() to be a private method in v7.0.0-beta.6 could be considered a regression.

The documentations for {{t}} helper and intl service have been updated so that end-developers may know what to do when a translation has arguments with missing values.

v7.0.1: Reintroduced extend to handle deeply nested translation folders

Compare Source

7.0.1 patches a regression introduced in 7.0.0-beta.4 (affects Ember apps that set wrapTranslationsWithNamespace: true; see #​1895).

Thanks to @​pulien for discovering the issue and providing a reproduction project.

v7.0.0: Beginning of the 7.x series

Compare Source

Highlights
  • Minimized API (improved onboarding and project maintainability)
  • Rewrote intl service to provide native types (improved TS and Glint support)
  • Reduced package size from 133 kB to 79.5 kB (by ~40%)
  • Rewrote documentation (see Getting Started, Helpers, Services, and Test Helpers)
  • Created additional docs-apps to test ember-intl
Migration guide

To do an incremental update from 6.5.5, you may install these versions in sequence:

  1. 7.0.0-beta.2
  2. 7.0.0-beta.5
  3. 7.0.0-beta.6
  4. 7.0.0

To learn breaking changes, please check https://ember-intl.github.io/ember-intl/docs/migration/v7 and the release notes for each beta version.

v6.5.6: Listed @​ember/test-helpers as a peer dependency. Made pnpm settings stricter.

Compare Source

[!IMPORTANT]

For ember-intl@v6 users:

Before updating @ember/test-helpers to v4, please update ember-intl to 6.5.6 or higher. Otherwise, you will encounter the following error message in tests:

ember-intl tried to import "@​ember/test-helpers" in "ember-intl/test-support/..." from addon code, but "@​ember/test-helpers" is a devDependency. You may need to move it into dependencies.

Thanks to @​wozny1989 for reporting the issue, and @​NullVoxPopuli for helping me fix the failing ember-try scenarios.

v6.5.5: Added @​babel/core as a dependency (required by ember-cli-babel@v8)

Compare Source

Thanks to @​mkszepp. (The patch can also be found in v7.0.0-beta.5.)

v6.5.4: Removed broccoli-merge-files (security patch)

Compare Source

Thanks to @​LucasHill for removing the dependency. (The patch can also be found in v7.0.0-beta.3.)

v6.5.3: Fixed a memory leak introduced in v6.3.0. Ensured that registerDestructor is called when helpers are destroyed.

Compare Source

[!IMPORTANT]
If your ember-intl is currently between versions 6.3.0 and 6.5.2, please update it to 6.5.3 or higher.

Thanks to @​johanrd for investigating the issue and providing the fix quickly.

v6.5.2: Updated ember-cli-typescript to v5.3.0. Deprecated ember g translation.

Compare Source

Updating ember-cli-typescript will help remove warnings that ember-intl (along with other addons) might have produced.

WARNING: ember-cli-typescript requires ember-cli-babel ^7.17.0, but you have version 8.0.0 installed; your TypeScript files may not be transpiled correctly

[!IMPORTANT]
The blueprint files, which make ember g translation <locale> currently possible, will be removed in v7.0.0. You can manually create the translation file (more accurately).

v6.5.1: Documented how to provide translations in apps, v1 addons, and v2 addons

Compare Source

In the docs folder, I created 3 additional projects so that there's a living documentation (tested in CI) of how apps, v1 addons, and v2 addons can provide translations.

I also updated the documentation site. You will find new content in:

  • Getting Started > Overview
  • Getting Started > Quickstart (Apps)
  • Getting Started > Quickstart (Addons)

v6.5.0: Refactored intl service and private utilities

Compare Source

[!WARNING]
To lower the maintenance cost, I removed code that should be unused, and refactored code that should be private.

While existing tests continued to pass, it's possible that one of the refactors is a soft breaking change for your project (e.g. because you overwrote a method from the intl service). To be safe, I went with a minor release.

If you find a regression, please open an issue and provide me context, so that we can see if a revert is needed.

Thanks to @​bertdeblock for fixing a URL typo in the blueprints.

v6.4.1: Updated dependencies. Added ember-lts-5.4 to ember-try scenarios.

Compare Source

The dependencies of ember-intl (in particular, @types/ember__runloop and @types/ember__template) have been updated to the latest version. This may fix the error messages shown below:

[lint:types] node_modules/ember-intl/-private/formatters/-base.d.ts:1:33 - error TS2307: Cannot find module '@&#8203;ember/template/-private/handlebars' or its corresponding type declarations.
[lint:types] 
[lint:types] 1 import type { SafeString } from '@&#8203;ember/template/-private/handlebars';
[lint:types]                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[lint:types] 
[lint:types] node_modules/ember-intl/-private/formatters/format-message.d.ts:1:33 - error TS2307: Cannot find module '@&#8203;ember/template/-private/handlebars' or its corresponding type declarations.
[lint:types] 
[lint:types] 1 import type { SafeString } from '@&#8203;ember/template/-private/handlebars';
[lint:types]                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[lint:types] 
[lint:types] node_modules/ember-intl/services/intl.d.ts:1:36 - error TS2307: Cannot find module '@&#8203;ember/runloop/types' or its corresponding type declarations.
[lint:types] 
[lint:types] 1 import type { EmberRunTimer } from '@&#8203;ember/runloop/types';
[lint:types]                                      ~~~~~~~~~~~~~~~~~~~~~~
[lint:types] 
[lint:types] node_modules/ember-intl/services/intl.d.ts:3:33 - error TS2307: Cannot find module '@&#8203;ember/template/-private/handlebars' or its corresponding type declarations.
[lint:types] 
[lint:types] 3 import type { SafeString } from '@&#8203;ember/template/-private/handlebars';
[lint:types]                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks to @​jelhan.

v6.4.0: Improved DX and deprecated macros

Compare Source

What changed?
  • Allowed test helpers setLocale() and addTranslation() to call settled()
  • Updated documentation for testing
  • Fixed type errors caused by macros
  • Deprecated macros (to be removed in v7.0.0)
  • Improved <template>-tag support (allowed importing helpers from index)
Migration guide
Test helpers

Before v6.4.0, calling setLocale() and addTranslations() wouldn't have an effect on the application in tests. You might have had to call await settled() or use something from @ember/runloop to trigger an update.

Now, the test helpers handle the update and mean the following in tests:

  • setLocale() - update the locale as if the user had somehow changed their preferred language
  • addTranslations() - update the translations as if you had somehow added them (e.g. via lazy loading)

You will want to search your test files for setLocale(, addTranslations(, and ember-intl/test-support, then migrate code as follows:

Example: setLocale()
- import { render, settled } from '@&#8203;ember/test-helpers';
+ import { render } from '@&#8203;ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import { setLocale, setupIntl } from 'ember-intl/test-support';
import { setupRenderingTest } from 'ember-qunit';
import { module, test } from 'qunit';

module('Integration | Component | hello', function (hooks) {
  setupRenderingTest(hooks);
  setupIntl(hooks);

  test('it renders', async function (assert) {
    await render(hbs`
      <Hello @&#8203;name="Zoey" />
    `);

    assert.dom('[data-test-message]').hasText('Hello, Zoey!');

-     setLocale('de-de');
-     await settled();
+     await setLocale('de-de');

    assert.dom('[data-test-message]').hasText('Hallo, Zoey!');
  });
});
Example: addTranslations()
- import { render, settled } from '@&#8203;ember/test-helpers';
+ import { render } from '@&#8203;ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import { addTranslations, setupIntl, t } from 'ember-intl/test-support';
import { setupRenderingTest } from 'ember-qunit';
import { module, test } from 'qunit';

module('Integration | Component | lazy-hello', function (hooks) {
  setupRenderingTest(hooks);
  setupIntl(hooks);

  test('it renders', async function (assert) {
    await render(hbs`
      <LazyHello @&#8203;name="Zoey" />
    `);

    assert
      .dom('[data-test-message]')
      .doesNotIncludeText(
        'Hello, Zoey!',
        'Before translations are loaded, we cannot write assertions against a string.',
      )
      .hasText(
        't:lazy-hello.message:("name":"Zoey")',
        'Before translations are loaded, we should see the missing-message string.',
      )
      .hasText(
        t('lazy-hello.message', { name: 'Zoey' }),
        'Before translations are loaded, we can write assertions against the test helper t().',
      );

-     addTranslations({
-       'lazy-hello': {
-         message: 'Hello, {name}!',
-       },
-     });
-     await settled();
+     await addTranslations({
+       'lazy-hello': {
+         message: 'Hello, {name}!',
+       },
+     });

    assert
      .dom('[data-test-message]')
      .hasText(
        'Hello, Zoey!',
        'After translations are loaded, we can write assertions against a string.',
      )
      .doesNotIncludeText(
        't:lazy-hello.message:("name":"Zoey")',
        'After translations are loaded, we should not see the missing-message string.',
      )
      .hasText(
        t('lazy-hello.message', { name: 'Zoey' }),
        'After translations are loaded, we can write assertions against the test helper t().',
      );
  });
});
Macros

[!IMPORTANT]
The macros, which are a remnant of classic components and ember-i18n, will be removed in v7.0.0. I updated the documentation for macros to warn developers.

[!IMPORTANT]
You can no longer import the macros from the index file, because the t() macro would conflict with the t() helper.

Until the macros are removed in v7.0.0, you can name-import them from 'ember-intl/macros' or refer to the full path (e.g. import t from 'ember-intl/macros/t';).

In classic and Glimmer components, inject the intl service to access its methods. If you want to create a value that depends on other things, you can use the @computed decorator (i.e. create a computed property) in classic and the native getter in Glimmer components. Alternatively, you can use ember-intl's helpers in the template.

Before: A classic component with macros
/* eslint-disable @&#8203;typescript-eslint/no-unsafe-declaration-merging, ember/no-classic-classes, ember/no-classic-components, ember/no-computed-properties-in-native-classes, import/export */
import Component from '@&#8203;ember/component';
import type { Registry as Services } from '@&#8203;ember/service';
import { intl, raw, t } from 'ember-intl/macros';

export default class MyComponent extends Component {
  tagName = '';

  @&#8203;intl('fruits', function (_intl: Services['intl']) {
    // @&#8203;ts-expect-error: 'this' implicitly has type 'any' because it does not have a type annotation.
    return _intl.formatList(this.fruits);
  })
  declare outputForIntl: string;

  @&#8203;t('hello.message', {
    name: 'name',
  })
  declare outputForT: string;

  @&#8203;t('hello.message', {
    name: raw('name'),
  })
  declare outputForTWithRaw: string;
}
After: A Glimmer component with getters
import { inject as service, type Registry as Services } from '@&#8203;ember/service';
import Component from '@&#8203;glimmer/component';

export default class MyComponent extends Component {
  @&#8203;service declare intl: Services['intl'];

  get outputForIntl(): string {
    return this.intl.formatList(this.args.fruits);
  }

  get outputForT(): string {
    return this.intl.t('hello.message', {
      name: this.args.name,
    });
  }

  get outputForTWithRaw(): string {
    return this.intl.t('hello.message', {
      name: 'name',
    });
  }
}
Helpers in <template>-tag components

Before v6.4.0, you had to remember and write the full path to use one of ember-intl's helpers in a <template>-tag component. Now, you can import all helpers from the index file.

Example: t()
import type { TOC } from '@&#8203;ember/component/template-only';
- import t from 'ember-intl/helpers/t';
+ import { t } from 'ember-intl';

interface HelloSignature {
  Args: {
    name: string;
  };
}

const HelloComponent: TOC<HelloSignature> =
  <template>
    <div data-test-message>
      {{t "hello.message" name=@&#8203;name}}
    </div>
  </template>

export default HelloComponent;

v6.3.2: Fixed two regressions introduced in v6.3.0

Compare Source

What changed?
Reverted the removal of the class property allowEmpty

If you happened to overwrite an ember-intl's helper so that, in your app, the helper allows "empty" values by default, then you may continue to use the following syntax:

/* my-addon/addon/helpers/t.ts */
import THelper from 'ember-intl/helpers/t';

export default class extends THelper {
  allowEmpty = true;
}

However, this (overwriting the addon, especially through inheritance) is not recommended, as implementation details can change in the future.

[!NOTE]
Going forward, I'd like to see if all helpers can return an empty string when value is either undefined or null. You can visit https://github.com/ember-intl/ember-intl/issues/1813 and Discord thread to provide your feedback.

Allowed the intl service to handle removing event listeners

In addition to separating concerns better, the pull request fixes an error that you might have seen in your tests after installing [email protected] or 6.3.1.

actual: >
  null
stack: >
  Error: Can not call `.lookup` after the owner has been destroyed
    at Container.lookup
    at Class.lookup
    at THelper.getInjection
    at untrack
    at ComputedProperty.get
    at THelper.getter [as intl]

v6.3.1: Updated helper signatures. Rewrote tests for helpers.

Compare Source

I fixed the type issues introduced in 6.3.0. All helpers have a return type of string once again.

[!IMPORTANT]
To resolve long-existing type issues, I had to change an implementation detail: In certain error cases, the helpers now return an empty string '' instead of undefined.

Since both values are considered falsy in *.hbs as well as *.{js,ts}, I'm hoping that changing the return value will be non-breaking in most cases.

Going forward, we'll try to limit the API and be more strict about types.

v6.3.0: Remove inheritance among helpers

Compare Source

I removed the base helper -format-base.js so that the code for each helper is easier to understand and maintain.

[!IMPORTANT]
If you happened to create a helper that extends -format-base.js (private implementation), please extend the Helper class from @ember/component/helper and inject the intl service instead. For reference, please check the {{t}} helper.

Example of a migration
/* addon/helpers/legacy-format-money.ts */
import BaseHelper from 'ember-intl/helpers/-format-base';

import { legacyFormatMoney } from '../utils/index';

// eslint-disable-next-line @&#8203;typescript-eslint/ban-ts-comment
// @&#8203;ts-ignore: Type 'typeof AbstractHelper' is not a constructor function type.
export default class LegacyFormatMoneyHelper extends BaseHelper {
  format(money, options): string {
    // eslint-disable-next-line @&#8203;typescript-eslint/ban-ts-comment
    // @&#8203;ts-ignore: Property 'intl' does not exist on type 'LegacyFormatMoneyHelper'
    return legacyFormatMoney(this.intl, money, options);
  }
}
/* addon/helpers/legacy-format-money.ts */
import Helper from '@&#8203;ember/component/helper';
import { inject as service } from '@&#8203;ember/service';
import type { IntlService } from 'ember-intl';

import { legacyFormatMoney } from '../utils/index';

export default class LegacyFormatMoneyHelper extends Helper {
  @&#8203;service declare intl: IntlService;

  constructor() {
    // eslint-disable-next-line prefer-rest-params
    super(...arguments);

    // @&#8203;ts-expect-error: Property 'onLocaleChanged' is private and only accessible within class 'IntlService'.
    this.intl.onLocaleChanged(this.recompute, this);
  }

  compute([money], options): string {
    return legacyFormatMoney(this.intl, money, options);
  }
}

Compared to v6.2.2, the unpacked size may be slightly larger (~2 kB). On the plus side, a few type errors and hidden bugs (runtime errors) should be fixed now. Since the code change is large, I went with a minor release to be on the safe side.

[!WARNING]
There is a known issue for Glint users, caused by the {{t}} helper returning SafeString and undefined as possible types. This will be addressed soon.

app/templates/form.hbs:1:14 - error TS2345: Argument of type 'string | SafeString | undefined' is not assignable to parameter of type 'string'.
  Type 'undefined' is not assignable to type 'string'.

1 {{page-title (t "routes.form.title")}}
               ~~~~~~~~~~~~~~~~~~~~~~~

app/templates/form.hbs:6:6 - error TS2322: Type 'string | SafeString | undefined' is not assignable to type 'string | undefined'.
  Type 'SafeString' is not assignable to type 'string'.

6     @&#8203;instructions={{t
       ~~~~~~~~~~~~

v6.2.2: Fixed a type regression

Compare Source

If you encountered TypeScript errors of the following form after installing 6.2.0 or 6.2.1,

tests/integration/components/my-component.ts:59:23 - error TS2345: Argument of type 'string | SafeString' is not assignable to parameter of type 'string'.
  Type 'SafeString' is not assignable to type 'string'.

59   .hasText(t('some.key'));

please try installing 6.2.2 instead. As a temporary fix, I cast the return type of the test helper t() to be string.

v6.2.1: Enabled embroider-safe and embroider-optimized scenarios. Updated dependencies.

Compare Source

In CI (continuous integration), we can now show that ember-intl (still a v1 addon) passes embroider-safe and embroider-optimized scenarios.

To ease maintenance, I removed 3 dependencies (lodash.omit, has-unicode, and locale-emoji) that affect the private implementation. The removal shouldn't affect the public API, so I believe we can do with a patch release.

v6.2.0: Introduced workspaces. Updated @​glint/* to v1.2.1.

Compare Source

I changed the project structure to resemble that of a v2 addon. Workspaces should also help us understand the dependencies of each package and the origin of an error. The latter is demonstrated by the ability to update @glint/* packages from 0.9.7 to the latest.

[!NOTE]
To refactor code in increments, I replaced default exports with named exports, for paths that begin with ember-intl/test-support/.

If you made use of ember-intl's test helpers but didn't import them from the index file, i.e. import { ... } from 'ember-intl/test-support', I recommend doing so after installing [email protected].

/* Before */
import t from 'ember-intl/test-support/t';

/* After (Option 1) */
import { t } from 'ember-intl/test-support/t';

/* After (Option 2, recommended) */
import { t } from 'ember-intl/test-support';

v6.1.2: Updated dependencies and addressed vulnerabilities

Compare Source

[!NOTE]
If you had to patch [email protected] due to TS errors resulting from unnecessary @ts-expect-error, you may not have to in v6.1.2.

Sample patch file for [email protected]
diff --git a/addon/-private/formatters/format-message.ts b/addon/-private/formatters/format-message.ts
--- a/addon/-private/formatters/format-message.ts
+++ b/addon/-private/formatters/format-message.ts
@&#8203;@&#8203; -12,7 +12,7 @&#8203;@&#8203; import type { PrimitiveType } from 'intl-messageformat';
 import Formatter from './-base';
 const {
   Handlebars: {
-    // @&#8203;ts-expect-error Upstream types are incomplete.
+    // @&#8203;ts-ignore: Upstream types are incomplete.
     Utils: { escapeExpression },
   },
 } = Ember;
@&#8203;@&#8203; -35,12 +35,13 @&#8203;@&#8203; function escapeOptions<T extends Record<string, unknown>>(object?: T) {
       // formatter won't know what to do with it. Instead, we cast
       // the SafeString to a regular string using `toHTML`.
       // Since it was already marked as safe we should *not* escape it.
-      // @&#8203;ts-expect-error: see comment above
+      // @&#8203;ts-ignore: see comment above
       escapedOpts[key] = val.toHTML();
     } else if (typeof val === 'string') {
+      // @&#8203;ts-ignore: see comment above
       escapedOpts[key] = escapeExpression(val);
     } else {
-      // @&#8203;ts-expect-error: see comment above
+      // @&#8203;ts-ignore: see comment above
       escapedOpts[key] = val; // copy as-is
     }
   });

v6.1.1: Failed attempt to address a vulnerability

Compare Source

[!NOTE]
Update:

I tried installing [email protected] and realized there's no change to fast-glob. Will need to investigate other possible solutions again.

[!IMPORTANT]
~[email protected] should resolve a high-severity report from Dependabot. A regression is possible, because the patch for broccoli-merge-files involved a major-version update of fast-glob.~

Title: glob-parent before 5.1.2 vulnerable to Regular Expression Denial of Service in enclosure regex

Description: This affects the package glob-parent before 5.1.2. The enclosure regex used to check for strings ending in enclosure containing path separator.

v6.1.0: Beginning of the 6.x series

Almost 2 years passed since 5.7.2 had been released. Many thanks to those who have continued to use ember-intl and even tried out 6.0.0-beta.x.

[!IMPORTANT]
As you may know, 6.0.0 had been released by accident and isn't a stable version. So 6.1.0 marks the beginning of the 6.x series.

Going forward, I think that we'll do a better job with documenting code changes and will continue to improve DX (e.g. simplify API, provide types that work with @tsconfig/ember and Glint).

If you run into a breaking change that hasn't been documented, please let us know by opening an issue and/or creating a pull request.

https://ember-intl.github.io/ember-intl/docs/guide/migration-5-0-to-6-1

v6.0.0

Compare Source

v5.7.2

Compare Source

v5.7.1

Compare Source

v5.7.0

Compare Source

v5.6.2

Compare Source

  • fix(types): default export for intl service 72d2194

v5.6.1

Compare Source

v5.6.0

Compare Source

v5.5.1

Compare Source

v5.5.0: The One With TypeScript Support

Compare Source

  • TypeScript support #​1412 (and many more)
  • Re-enable legacy translation escaping format #​1420 #​1444
  • chore: removes use of deprecated getWithDefault #​1435
  • chore: Document changes to lookup() #​1409

v5.4.2

Compare Source

🗞 What’s Changed

v5.4.1

Compare Source

  • fix(formatter): options take precedence over named format (#​1401) ee94dce

v5.4.0

Compare Source

v5.3.1

Compare Source

v5.3.0

Compare Source

v5.2.2

Compare Source

v5.2.1

Compare Source

v5.2.0

Compare Source

Notable Changes

v5.1.1

Compare Source

v5.1.0

Compare Source

v5.0.9

Compare Source

v5.0.8

Compare Source

v5.0.7

Compare Source

v5.0.6

Compare Source

v5.0.5

Compare Source

v5.0.4

Compare Source

v5.0.3

Compare Source

v5.0.2

Compare Source

v5.0.1

Compare Source

v5.0.0

Compare Source

Notable Changes

  • Polyfills have been removed entirely and with it the need to bundle the pluralization rules as they now come from the native Intl.PluralRules API
  • Intl.MessageFormat parser and compiler updated which changes how text and tags are escaped

Breaking Changes

  • Node 8 support dropped
  • Intl.RelativeTime polyfill has been replaced with the native API which behaves entirely different than the previous older spec implementation. Read more in the Migration Document
  • Escaping text has changed and HTML tags now need to be escaped. Read how in the Migration Document
  • Removes shortNumber formatting in favor of newly added native implementation using the "notation": "compact" parameter for Intl.NumberFormat i.e.,
this.intl.formatNumber(1000, {
  notation: "compact" ,
  compactDisplay: "short"
}); // -> 1k

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

0 participants