Skip to content

Commit 2f73dbe

Browse files
author
Nikos Vasileiou
authored
Merge pull request #135 from transifex/webpack5
Update webpack and deps
2 parents 4a4c465 + c0a03b3 commit 2f73dbe

17 files changed

Lines changed: 80 additions & 139 deletions

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
node-version: [12.x, 14.x, 16.x]
17+
node-version: [14.x, 16.x, 18.x]
1818

1919
steps:
2020
- uses: actions/checkout@v2

packages/api/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@
2525
"publish-npm": "npm publish"
2626
},
2727
"dependencies": {
28-
"core-js": "^3.17.2"
28+
"core-js": "^3.22.4"
2929
},
3030
"devDependencies": {
31-
"@babel/cli": "^7.15.4",
32-
"@babel/core": "^7.17.8",
33-
"@babel/preset-env": "^7.15.0",
31+
"@babel/cli": "^7.17.10",
32+
"@babel/core": "^7.17.10",
33+
"@babel/preset-env": "^7.17.10",
3434
"@transifex/jsonapi": "^3.2.2",
3535
"babel-eslint": "^10.1.0",
36-
"babel-loader": "^8.2.2",
36+
"babel-loader": "^8.2.5",
3737
"eslint": "^7.32.0",
3838
"eslint-config-airbnb-base": "^14.2.1",
39-
"eslint-plugin-import": "^2.24.2",
40-
"webpack": "^5.51.1",
39+
"eslint-plugin-import": "^2.26.0",
40+
"webpack": "^5.72.0",
4141
"webpack-cli": "^4.8.0"
4242
},
4343
"engines": {
44-
"node": ">=12.0.0"
44+
"node": ">=14.0.0"
4545
},
4646
"publishConfig": {
4747
"access": "public"

packages/cli/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@
2424
"access": "public"
2525
},
2626
"dependencies": {
27-
"@babel/parser": "^7.17.8",
28-
"@babel/traverse": "^7.13.0",
27+
"@babel/parser": "^7.17.10",
28+
"@babel/traverse": "^7.17.10",
2929
"@colors/colors": "^1.5.0",
3030
"@oclif/command": "^1.8.0",
3131
"@oclif/config": "^1.17.0",
3232
"@oclif/errors": "^1.3.4",
3333
"@oclif/plugin-help": "^5.1.12",
3434
"@transifex/native": "^3.2.2",
3535
"angular-html-parser": "^1.7.1",
36-
"axios": "^0.26.1",
36+
"axios": "^0.27.2",
3737
"cli-ux": "^6.0.9",
38-
"ejs": "^3.1.6",
39-
"glob": "^7.1.6",
38+
"ejs": "^3.1.7",
39+
"glob": "^8.0.1",
4040
"lodash": "^4.17.21",
4141
"pug": "^3.0.2",
4242
"shelljs": "^0.8.4",
@@ -48,14 +48,14 @@
4848
"chai": "^4.3.3",
4949
"eslint": "^7.21.0",
5050
"eslint-config-airbnb-base": "^14.2.1",
51-
"eslint-plugin-import": "^2.22.1",
52-
"globby": "^11.0.1",
53-
"mocha": "^9.1.3",
51+
"eslint-plugin-import": "^2.26.0",
52+
"globby": "^11.1.0",
53+
"mocha": "^10.0.0",
5454
"nock": "^13.0.11",
5555
"nyc": "^15.1.0"
5656
},
5757
"engines": {
58-
"node": ">=12.0.0"
58+
"node": ">=14.0.0"
5959
},
6060
"files": [
6161
"/bin",

packages/dom/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ txdom.attachDOM(jsdom.window.document);
212212
await tx.setCurrentLocale('fr');
213213

214214
// Translate DOM
215-
txdom.toLanguage(tx.getCurrentLocale(), tx.t);
215+
txdom.toLanguage(tx.getCurrentLocale(), (key) => {
216+
return tx.cache.get(key, tx.getCurrentLocale());
217+
});
216218

217219
// Get back translated HTML
218220
const translatedHTML = jsdom.serialize();

packages/dom/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"url": "https://github.com/transifex/transifex-javascript/issues"
3232
},
3333
"engines": {
34-
"node": ">=12.0.0"
34+
"node": ">=14.0.0"
3535
},
3636
"devDependencies": {
3737
"@babel/core": "^7.17.8",
@@ -43,14 +43,13 @@
4343
"chai": "^4.3.4",
4444
"eslint": "^7.28.0",
4545
"eslint-config-airbnb-base": "^14.2.0",
46-
"eslint-loader": "^4.0.2",
4746
"eslint-plugin-import": "^2.23.4",
48-
"glob": "^7.1.7",
47+
"glob": "^8.0.1",
4948
"linkedom": "^0.14.5",
50-
"mocha": "^9.1.3",
49+
"mocha": "^10.0.0",
5150
"nyc": "^15.1.0",
5251
"source-map-support": "^0.5.19",
53-
"webpack": "^4.46.0",
54-
"webpack-cli": "^3.3.12"
52+
"webpack": "^5.72.0",
53+
"webpack-cli": "^4.9.2"
5554
}
5655
}

packages/dom/webpack.browser.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,6 @@ module.exports = {
2121
],
2222
module: {
2323
rules: [
24-
{
25-
test: /\.(js|jsx)$/,
26-
enforce: 'pre',
27-
use: [
28-
{
29-
options: {
30-
cache: true,
31-
configFile: '.eslintrc.json',
32-
formatter: 'eslint-formatter-pretty',
33-
emitWarning: true,
34-
failOnError: true,
35-
},
36-
loader: 'eslint-loader',
37-
},
38-
],
39-
},
4024
{
4125
test: /\.(js|jsx)$/,
4226
exclude: /(node_modules)/,

packages/dom/webpack.node.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,6 @@ module.exports = {
2020
}),
2121
],
2222
module: {
23-
rules: [
24-
{
25-
test: /\.(js|jsx)$/,
26-
enforce: 'pre',
27-
use: [
28-
{
29-
options: {
30-
cache: true,
31-
configFile: '.eslintrc.json',
32-
formatter: 'eslint-formatter-pretty',
33-
emitWarning: true,
34-
failOnError: true,
35-
},
36-
loader: 'eslint-loader',
37-
},
38-
],
39-
},
40-
],
23+
rules: [],
4124
},
4225
};

packages/dom/webpack.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ module.exports = {
1717
__VERSION__: JSON.stringify(version),
1818
__PLATFORM__: JSON.stringify('test'),
1919
}),
20-
new IgnorePlugin(/canvas/, /commonjs$/),
20+
new IgnorePlugin({
21+
resourceRegExp: /canvas/,
22+
contextRegExp: /commonjs$/,
23+
}),
2124
],
2225
};

packages/express/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
"url": "https://github.com/transifex/transifex-javascript/issues"
3131
},
3232
"engines": {
33-
"node": ">=12.0.0"
33+
"node": ">=14.0.0"
3434
},
3535
"devDependencies": {
3636
"@transifex/native": "^3.2.2",
3737
"eslint": "^8.10.0",
3838
"eslint-config-airbnb-base": "^15.0.0",
3939
"eslint-plugin-import": "^2.25.4",
40-
"jest": "^27.5.1"
40+
"jest": "^28.0.3"
4141
},
4242
"dependencies": {
4343
"type-is": "^1.6.18"

packages/jsonapi/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@
2727
"url": "https://github.com/transifex/transifex-javascript/issues"
2828
},
2929
"engines": {
30-
"node": ">=12.0.0"
30+
"node": ">=14.0.0"
3131
},
3232
"devDependencies": {
33-
"@babel/cli": "^7.15.4",
34-
"@babel/preset-env": "^7.15.0",
33+
"@babel/cli": "^7.17.10",
34+
"@babel/preset-env": "^7.17.10",
3535
"babel-eslint": "^10.1.0",
36-
"babel-jest": "^27.0.6",
37-
"babel-loader": "^8.2.2",
36+
"babel-jest": "^28.0.3",
37+
"babel-loader": "^8.2.5",
3838
"eslint": "^7.32.0",
3939
"eslint-config-airbnb-base": "^14.2.1",
40-
"eslint-plugin-import": "^2.24.2",
41-
"jest": "^27.0.6",
42-
"webpack": "^5.51.1",
40+
"eslint-plugin-import": "^2.26.0",
41+
"jest": "^28.0.3",
42+
"webpack": "^5.72.0",
4343
"webpack-cli": "^4.8.0"
4444
},
4545
"dependencies": {
46-
"axios": "^0.26.1",
47-
"core-js": "^3.17.2",
46+
"axios": "^0.27.2",
47+
"core-js": "^3.22.4",
4848
"lodash": "^4.17.21",
4949
"regenerator-runtime": "^0.13.9"
5050
}

0 commit comments

Comments
 (0)