Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
[webpack-config-terra][terra-aggregate-translations] MVB updates (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdadn authored May 1, 2024
1 parent 120c2a5 commit 54e92e1
Show file tree
Hide file tree
Showing 7 changed files with 3,397 additions and 876 deletions.
4,217 changes: 3,370 additions & 847 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 12 additions & 6 deletions packages/terra-aggregate-translations/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@

## Unreleased

* Breaking Changes
* Dropped support for overriding supported locales list with a custom list due to breaking changes in `react-intl@5` & webpack limitations. Terra will now only support a fixed list of locales.
* Dropped suport for Node 10 & 12. Node 14 is now the minimum required version required.

## 3.3.0 - (September 26, 2023)

* Changed
* Minor dependency version bump
* Minor dependency version bump.

## 3.2.0 - (August 31, 2023)

* Changed
* Minor dependency version bump
* Minor dependency version bump.

## 3.1.2 - (August 30, 2023)

* Changed
* Minor dependency version bump
* Minor dependency version bump.

## 3.1.1 - (August 25, 2023)

Expand All @@ -26,12 +30,14 @@
## 3.1.0 - (August 24, 2023)

* Changed
* Minor dependency version bump
* Minor dependency version bump.

## 3.0.0 - (May 12, 2022)

* Breaking
* Removed intl v3 and v4 support.
* Breaking Changes
* Removed react-intl v3 and v4 support.

---

## 2.4.0 - (February 11, 2022)

Expand Down
2 changes: 1 addition & 1 deletion packages/terra-aggregate-translations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"access": "public"
},
"engines": {
"node": "10|| 12 || 14",
"node": "14",
"npm": "6 || 9"
},
"main": "lib/aggregate-translations.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const defaults = (options = {}) => {
baseDir: options.baseDir || config.baseDir || process.cwd(),
directories: options.directories || config.directories || [],
fileSystem: options.outputFileSystem || config.outputFileSystem || fse,
locales: options.locales || config.locales || supportedLocales,
locales: supportedLocales,
outputDir: options.outputDir || './aggregated-translations',
excludes: options.excludes || config.excludes || [],
format: options.format || 'es5',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,7 @@ describe('aggregate-translations', () => {
expect(writtenFilePaths.length).toEqual(numSupportedLocales);
});

it('aggregates on the specified locales', () => {
const translationsFiles = [
expect.stringContaining(`aggregated-translations${path.sep}en.js`),
];

const supportedLocales = aggregateTranslations({ locales: ['en'] });

expect(writtenFilePaths).toEqual(expect.arrayContaining(translationsFiles));
expect(writtenFilePaths.length).toEqual(1);
expect(supportedLocales).toEqual(['en']);
});

it('always aggregates on en locale even if not specified', () => {
it('always aggregates on all locales even if a list is specified', () => {
const translationsFiles = [
`${process.cwd()}${path.sep}aggregated-translations${path.sep}en.js`,
`${process.cwd()}${path.sep}aggregated-translations${path.sep}es.js`,
Expand All @@ -127,8 +115,8 @@ describe('aggregate-translations', () => {
const supportedLocales = aggregateTranslations({ locales: ['es'] });

expect(writtenFilePaths).toEqual(expect.arrayContaining(translationsFiles));
expect(writtenFilePaths.length).toEqual(2);
expect(supportedLocales).toEqual(['es', 'en']);
expect(writtenFilePaths.length).toEqual(i18nSupportedLocales.length);
expect(supportedLocales).toEqual(i18nSupportedLocales);
});

it('writes to the default output directory', () => {
Expand Down
5 changes: 5 additions & 0 deletions packages/webpack-config-terra/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

* Breaking Changes
* Upgraded to `terra-aggregate-translations@3`. `terra-aggregate-translations@3` now requires `react-intl@5` as a peerDependency.
* Dropped support for `webpack@4` and `webpack-cli@3`.
* Dropped suport for Node 10 & 12. Node 14 is now the minimum required version required.

## 3.4.0 - (February 27, 2024)

* Added
Expand Down
11 changes: 5 additions & 6 deletions packages/webpack-config-terra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"access": "public"
},
"engines": {
"node": "^10.13.0 || 12 || 14",
"node": "14",
"npm": "6 || 9"
},
"main": "lib/webpack.config.js",
"dependencies": {
"@cerner/duplicate-package-checker-webpack-plugin": "^2.6.0",
"@cerner/terra-aggregate-translations": "^2.0.0",
"@cerner/terra-aggregate-translations": "^3.0.0",
"@mjhenkes/postcss-rtl": "^2.0.0",
"autoprefixer": "^10.0.0",
"babel-loader": "^8.0.5",
Expand All @@ -55,13 +55,12 @@
"@babel/core": "7",
"fibers": "5",
"postcss": "8",
"webpack": "4 || 5",
"webpack-cli": "3 || 4"
"webpack": "5",
"webpack-cli": "4"
},
"devDependencies": {
"@cerner/eslint-config-terra": "^5.6.0",
"@cerner/jest-config-terra": "^2.0.0",
"eslint": "^7.32.0"
"@cerner/jest-config-terra": "^2.0.0"
},
"scripts": {
"clean": "npm run clean:node_modules && npm run clean:lib",
Expand Down

0 comments on commit 54e92e1

Please sign in to comment.