-
Couldn't load subscription status.
- Fork 4
chore(deps): update dependency ember-intl to v7 #847
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
base: staging
Are you sure you want to change the base?
Conversation
|
6c47d70 to
416edbb
Compare
416edbb to
aa9fdff
Compare
aa9fdff to
923b971
Compare
923b971 to
46c4cc8
Compare
46c4cc8 to
2baec2d
Compare
2baec2d to
bb48750
Compare
295d5ff to
db662bb
Compare
db662bb to
f8b31ef
Compare
f8b31ef to
aece396
Compare
7f5a1b0 to
f04e694
Compare
f04e694 to
13d64d3
Compare
13d64d3 to
83b3e36
Compare
83b3e36 to
971cd96
Compare
971cd96 to
b5cbb7c
Compare
a374116 to
e87c1e3
Compare
e87c1e3 to
b5e8d0d
Compare
a318c5b to
1e66b6f
Compare
1e66b6f to
d0a677d
Compare
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
d0a677d to
dedb427
Compare
dedb427 to
4c096d8
Compare
This PR contains the following updates:
^5.7.2->^7.4.1Release Notes
ember-intl/ember-intl (ember-intl)
v7.4.1: Removed typescript as a peer dependencyCompare Source
Thanks to @aklkv and @mansona.
v7.4.0: Updated dependenciesCompare Source
v7.3.1: Update documentations. Passed the correct locales to _onMissingTranslation().Compare Source
7.3.1includes a bug fix and a couple of documentation updates:docs/my-v2-app-with-lazy-loaded-translationsfor an example (thanks to @mkszepp, @johanrd, and @Techn1x).v7.3.0: Created setFormats() and deprecated defining formats in app/formats.jsCompare Source
Please see #1972 for additional information.
v7.2.0: Created formatRelativeTime() and deprecated formatRelative()Compare Source
Please see #1969 for additional information.
v7.1.8: Updated dependenciesCompare Source
v7.1.7: Warned instead of erroring for MISSING_DATACompare Source
Thanks to @lfloyd117.
v7.1.6: Addressedinject as servicedeprecations. Updated dependencies.Compare Source
Thanks to @mkszepp.
v7.1.5: Created a Vite app for documentation. Updated dependencies.Compare Source
You can check
docs/my-v2-appto learn how to useember-intlin a Vite app.v7.1.4: Enabled recommendedTypeChecked and removed DefinitelyTyped packagesCompare Source
I updated the shared configurations (in the
configsfolder) so thatrecommendedTypeCheckedfromtypescript-eslintis enabled.As a part of the update, I needed to update the source code in the addon, so that I could either fix or ignore lint (type) errors. Please let me know if you encounter an issue with
v7.1.4.v7.1.3: Updated dependenciesCompare Source
v7.1.2: Allowed @ember/[email protected]Compare Source
Thanks to @mkszepp.
v7.1.1: Updated @formatjs/intl to allow passing ISO strings to {{format-date-range}} helperCompare Source
Thanks to @miguelcobain.
v7.1.0: Created {{format-date-range}} helperCompare Source
The
intlservice has a new method calledformatDateRange(). Under the hood, it usesIntl.DateTimeFormat#formatRange()to help you render a text that users can read as "between<fromDate>and<toDate>" or "from<fromDate>to<toDate>."Example 1: Use
{{format-date-range}}helperExample 2: Inject the
intlserviceDocumentations:
Thanks to @miguelcobain for the feature.
v7.0.9: Re-released v7.0.8 (removes the accidentally published files from a development branch)Compare Source
See https://github.com/ember-intl/ember-intl/releases/tag/v7.0.8 for release notes.
v7.0.8: Removed the usages of Ember Helper's recompute and eventemitter3 as a dependency. Updated dependencies.Compare Source
Internal changes:
intl's service's private methodonLocaleChanged()has been removed.ember-intlis now tested againstember-lts-5.12(instead ofember-lts-5.4andember-lts-5.8).Thanks to @bertdeblock.
v7.0.7: Updated dependencies and documentationsCompare 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
Thanks to @wozny1989 for reporting the issue, and @NullVoxPopuli for helping me fix the failing
ember-tryscenarios.v7.0.5: Updated dependencies. Used pnpm@9 to manage dependencies.Compare Source
v7.0.4: Silenced logs during build by defaultCompare Source
Due to an incorrect code cleanup in
v5orv6,ember-intlhad always logged messages (e.g. ICU argument mismatch, missing translation).For the time being,
ember-intl@v7will not log these messages by default. If you need these logs, you may setverbose: true(consider this a private API) inconfig/ember-intl.jsuntil 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 serviceCompare Source
What changed?
Updated blueprints to set(doesn't work yet;inputPathcorrectly for v1 addonstests/dummy/config/ember-intl.jsshould showinputPath: 'tests/dummy/translations')exists()and types in theintlserviceember-lts-5.8toember-tryscenariosv7.0.2: Made getTranslation() public and fixed a bug in setOnFormatjsError()Compare Source
The
intlservice'sgetTranslation()is now a public method, so that you may keep extracting a translation message's arguments as you might have done withlookup()inv6. I went with a patch release (instead of a minor), since changinglookup()to be a private method inv7.0.0-beta.6could be considered a regression.The documentations for
{{t}}helper andintlservice 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 foldersCompare Source
7.0.1patches a regression introduced in7.0.0-beta.4(affects Ember apps that setwrapTranslationsWithNamespace: true; see #1895).Thanks to @pulien for discovering the issue and providing a reproduction project.
v7.0.0: Beginning of the 7.x seriesCompare Source
Highlights
intlservice to provide native types (improved TS and Glint support)ember-intlMigration guide
To do an incremental update from
6.5.5, you may install these versions in sequence:7.0.0-beta.27.0.0-beta.57.0.0-beta.67.0.0To 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
Thanks to @wozny1989 for reporting the issue, and @NullVoxPopuli for helping me fix the failing
ember-tryscenarios.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
Thanks to @johanrd for investigating the issue and providing the fix quickly.
v6.5.2: Updated ember-cli-typescript to v5.3.0. Deprecatedember g translation.Compare Source
Updating
ember-cli-typescriptwill help remove warnings thatember-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 correctlyv6.5.1: Documented how to provide translations in apps, v1 addons, and v2 addonsCompare Source
In the
docsfolder, 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 > OverviewGetting Started > Quickstart (Apps)Getting Started > Quickstart (Addons)v6.5.0: Refactored intl service and private utilitiesCompare Source
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__runloopand@types/ember__template) have been updated to the latest version. This may fix the error messages shown below:Thanks to @jelhan.
v6.4.0: Improved DX and deprecated macrosCompare Source
What changed?
setLocale()andaddTranslation()to callsettled()v7.0.0)<template>-tag support (allowed importing helpers fromindex)Migration guide
Test helpers
Before
v6.4.0, callingsetLocale()andaddTranslations()wouldn't have an effect on the application in tests. You might have had to callawait settled()or use something from@ember/runloopto 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 languageaddTranslations()- 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(, andember-intl/test-support, then migrate code as follows:Example:
setLocale()Example:
addTranslations()Macros
In classic and Glimmer components, inject the
intlservice to access its methods. If you want to create a value that depends on other things, you can use the@computeddecorator (i.e. create a computed property) in classic and the native getter in Glimmer components. Alternatively, you can useember-intl's helpers in the template.Before: A classic component with macros
After: A Glimmer component with getters
Helpers in
<template>-tag componentsBefore
v6.4.0, you had to remember and write the full path to use one ofember-intl's helpers in a<template>-tag component. Now, you can import all helpers from theindexfile.Example:
t()import type { TOC } from '@​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=@​name}} </div> </template> export default HelloComponent;v6.3.2: Fixed two regressions introduced in v6.3.0Compare Source
What changed?
Reverted the removal of the class property
allowEmptyIf 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:However, this (overwriting the addon, especially through inheritance) is not recommended, as implementation details can change in the future.
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]or6.3.1.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 ofstringonce again.v6.3.0: Remove inheritance among helpersCompare Source
I removed the base helper
-format-base.jsso that the code for each helper is easier to understand and maintain.Example of a migration
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.v6.2.2: Fixed a type regressionCompare Source
If you encountered TypeScript errors of the following form after installing
6.2.0or6.2.1,please try installing
6.2.2instead. As a temporary fix, I cast the return type of the test helpert()to bestring.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) passesembroider-safeandembroider-optimizedscenarios.To ease maintenance, I removed 3 dependencies (
lodash.omit,has-unicode, andlocale-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 from0.9.7to the latest.v6.1.2: Updated dependencies and addressed vulnerabilitiesCompare Source
Sample patch file for
[email protected]v6.1.1: Failed attempt to address a vulnerabilityCompare Source
v6.1.0: Beginning of the 6.x seriesAlmost 2 years passed since
5.7.2had been released. Many thanks to those who have continued to useember-intland even tried out6.0.0-beta.x.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/versions/v6.5.5/docs/guide/migration-5-0-to-6-1
v6.0.0Compare Source
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.
This PR was generated by Mend Renovate. View the repository job log.