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

Commit 54e92e1

Browse files
authored
[webpack-config-terra][terra-aggregate-translations] MVB updates (#860)
1 parent 120c2a5 commit 54e92e1

File tree

7 files changed

+3397
-876
lines changed

7 files changed

+3397
-876
lines changed

package-lock.json

+3,370-847
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/terra-aggregate-translations/CHANGELOG.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22

33
## Unreleased
44

5+
* Breaking Changes
6+
* 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.
7+
* Dropped suport for Node 10 & 12. Node 14 is now the minimum required version required.
8+
59
## 3.3.0 - (September 26, 2023)
610

711
* Changed
8-
* Minor dependency version bump
12+
* Minor dependency version bump.
913

1014
## 3.2.0 - (August 31, 2023)
1115

1216
* Changed
13-
* Minor dependency version bump
17+
* Minor dependency version bump.
1418

1519
## 3.1.2 - (August 30, 2023)
1620

1721
* Changed
18-
* Minor dependency version bump
22+
* Minor dependency version bump.
1923

2024
## 3.1.1 - (August 25, 2023)
2125

@@ -26,12 +30,14 @@
2630
## 3.1.0 - (August 24, 2023)
2731

2832
* Changed
29-
* Minor dependency version bump
33+
* Minor dependency version bump.
3034

3135
## 3.0.0 - (May 12, 2022)
3236

33-
* Breaking
34-
* Removed intl v3 and v4 support.
37+
* Breaking Changes
38+
* Removed react-intl v3 and v4 support.
39+
40+
---
3541

3642
## 2.4.0 - (February 11, 2022)
3743

packages/terra-aggregate-translations/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"access": "public"
2828
},
2929
"engines": {
30-
"node": "10|| 12 || 14",
30+
"node": "14",
3131
"npm": "6 || 9"
3232
},
3333
"main": "lib/aggregate-translations.js",

packages/terra-aggregate-translations/src/aggregate-translations.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const defaults = (options = {}) => {
3131
baseDir: options.baseDir || config.baseDir || process.cwd(),
3232
directories: options.directories || config.directories || [],
3333
fileSystem: options.outputFileSystem || config.outputFileSystem || fse,
34-
locales: options.locales || config.locales || supportedLocales,
34+
locales: supportedLocales,
3535
outputDir: options.outputDir || './aggregated-translations',
3636
excludes: options.excludes || config.excludes || [],
3737
format: options.format || 'es5',

packages/terra-aggregate-translations/tests/jest/aggregate-translations.test.js

+3-15
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,7 @@ describe('aggregate-translations', () => {
106106
expect(writtenFilePaths.length).toEqual(numSupportedLocales);
107107
});
108108

109-
it('aggregates on the specified locales', () => {
110-
const translationsFiles = [
111-
expect.stringContaining(`aggregated-translations${path.sep}en.js`),
112-
];
113-
114-
const supportedLocales = aggregateTranslations({ locales: ['en'] });
115-
116-
expect(writtenFilePaths).toEqual(expect.arrayContaining(translationsFiles));
117-
expect(writtenFilePaths.length).toEqual(1);
118-
expect(supportedLocales).toEqual(['en']);
119-
});
120-
121-
it('always aggregates on en locale even if not specified', () => {
109+
it('always aggregates on all locales even if a list is specified', () => {
122110
const translationsFiles = [
123111
`${process.cwd()}${path.sep}aggregated-translations${path.sep}en.js`,
124112
`${process.cwd()}${path.sep}aggregated-translations${path.sep}es.js`,
@@ -127,8 +115,8 @@ describe('aggregate-translations', () => {
127115
const supportedLocales = aggregateTranslations({ locales: ['es'] });
128116

129117
expect(writtenFilePaths).toEqual(expect.arrayContaining(translationsFiles));
130-
expect(writtenFilePaths.length).toEqual(2);
131-
expect(supportedLocales).toEqual(['es', 'en']);
118+
expect(writtenFilePaths.length).toEqual(i18nSupportedLocales.length);
119+
expect(supportedLocales).toEqual(i18nSupportedLocales);
132120
});
133121

134122
it('writes to the default output directory', () => {

packages/webpack-config-terra/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Unreleased
44

5+
* Breaking Changes
6+
* Upgraded to `terra-aggregate-translations@3`. `terra-aggregate-translations@3` now requires `react-intl@5` as a peerDependency.
7+
* Dropped support for `webpack@4` and `webpack-cli@3`.
8+
* Dropped suport for Node 10 & 12. Node 14 is now the minimum required version required.
9+
510
## 3.4.0 - (February 27, 2024)
611

712
* Added

packages/webpack-config-terra/package.json

+5-6
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
"access": "public"
2424
},
2525
"engines": {
26-
"node": "^10.13.0 || 12 || 14",
26+
"node": "14",
2727
"npm": "6 || 9"
2828
},
2929
"main": "lib/webpack.config.js",
3030
"dependencies": {
3131
"@cerner/duplicate-package-checker-webpack-plugin": "^2.6.0",
32-
"@cerner/terra-aggregate-translations": "^2.0.0",
32+
"@cerner/terra-aggregate-translations": "^3.0.0",
3333
"@mjhenkes/postcss-rtl": "^2.0.0",
3434
"autoprefixer": "^10.0.0",
3535
"babel-loader": "^8.0.5",
@@ -55,13 +55,12 @@
5555
"@babel/core": "7",
5656
"fibers": "5",
5757
"postcss": "8",
58-
"webpack": "4 || 5",
59-
"webpack-cli": "3 || 4"
58+
"webpack": "5",
59+
"webpack-cli": "4"
6060
},
6161
"devDependencies": {
6262
"@cerner/eslint-config-terra": "^5.6.0",
63-
"@cerner/jest-config-terra": "^2.0.0",
64-
"eslint": "^7.32.0"
63+
"@cerner/jest-config-terra": "^2.0.0"
6564
},
6665
"scripts": {
6766
"clean": "npm run clean:node_modules && npm run clean:lib",

0 commit comments

Comments
 (0)