diff --git a/package-lock.json b/package-lock.json index 5149c8673e..0fdaec00ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -163,7 +163,7 @@ "webpack-cli": "^4.9.2", "webpack-dev-middleware": "^5.3.1", "webpack-dev-server": "^4.8.1", - "webpack-extract-translation-keys-plugin": "^6.0.0" + "webpack-extract-translation-keys-plugin": "^6.1.0" }, "engines": { "node": "16.15.0", @@ -28124,9 +28124,9 @@ } }, "node_modules/webpack-extract-translation-keys-plugin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/webpack-extract-translation-keys-plugin/-/webpack-extract-translation-keys-plugin-6.0.0.tgz", - "integrity": "sha512-QjW1wrXkplsGZP5hysOYPL7CsjhXBUMQ7O1i73nQkMft0uWfggdeH79JKWvTN66VZYZuM4CS80dGwl2E+BpoLw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webpack-extract-translation-keys-plugin/-/webpack-extract-translation-keys-plugin-6.1.0.tgz", + "integrity": "sha512-W6F/VAPqFG05Iloy2t2UTa84nkJQC/IuPmMQNYXe0ic85Xeu01WpUOkrpnb4kGRcsKxHAVC95VCsL8uvH94oRQ==", "dev": true, "peerDependencies": { "webpack": "^5.0.0" @@ -48279,9 +48279,9 @@ } }, "webpack-extract-translation-keys-plugin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/webpack-extract-translation-keys-plugin/-/webpack-extract-translation-keys-plugin-6.0.0.tgz", - "integrity": "sha512-QjW1wrXkplsGZP5hysOYPL7CsjhXBUMQ7O1i73nQkMft0uWfggdeH79JKWvTN66VZYZuM4CS80dGwl2E+BpoLw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webpack-extract-translation-keys-plugin/-/webpack-extract-translation-keys-plugin-6.1.0.tgz", + "integrity": "sha512-W6F/VAPqFG05Iloy2t2UTa84nkJQC/IuPmMQNYXe0ic85Xeu01WpUOkrpnb4kGRcsKxHAVC95VCsL8uvH94oRQ==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index dca9c12207..c1954f726c 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "webpack-cli": "^4.9.2", "webpack-dev-middleware": "^5.3.1", "webpack-dev-server": "^4.8.1", - "webpack-extract-translation-keys-plugin": "^6.0.0" + "webpack-extract-translation-keys-plugin": "^6.1.0" }, "overrides": { "reflux": { diff --git a/patches/webpack-extract-translation-keys-plugin+6.0.0.patch b/patches/webpack-extract-translation-keys-plugin+6.0.0.patch deleted file mode 100644 index 7b04937a54..0000000000 --- a/patches/webpack-extract-translation-keys-plugin+6.0.0.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/node_modules/webpack-extract-translation-keys-plugin/index.js b/node_modules/webpack-extract-translation-keys-plugin/index.js -index 7dba8ea..d066e7e 100644 ---- a/node_modules/webpack-extract-translation-keys-plugin/index.js -+++ b/node_modules/webpack-extract-translation-keys-plugin/index.js -@@ -25,12 +25,12 @@ const KeyGenerator = require('./key-generator'); - - // resolve entry for given module, we try to exit early with rawRequest in case of multiple modules issuing request - function resolveEntry(module, reverseEntryPoints) { -+ const moduleGraph = module.parser.state.compilation.moduleGraph; - let issuer = module; - if (reverseEntryPoints[issuer.rawRequest]) { - return issuer.rawRequest; - } -- while (issuer.issuer) { -- issuer = issuer.issuer; -+ while (issuer = moduleGraph.getIssuer(issuer)) { - if (reverseEntryPoints[issuer.rawRequest]) { - return issuer.rawRequest; - } diff --git a/patches/webpack-extract-translation-keys-plugin+6.1.0.patch b/patches/webpack-extract-translation-keys-plugin+6.1.0.patch new file mode 100644 index 0000000000..1431420747 --- /dev/null +++ b/patches/webpack-extract-translation-keys-plugin+6.1.0.patch @@ -0,0 +1,22 @@ +diff --git a/node_modules/webpack-extract-translation-keys-plugin/index.js b/node_modules/webpack-extract-translation-keys-plugin/index.js +index 50da46c..962c104 100644 +--- a/node_modules/webpack-extract-translation-keys-plugin/index.js ++++ b/node_modules/webpack-extract-translation-keys-plugin/index.js +@@ -115,7 +115,7 @@ ExtractTranslationPlugin.prototype.apply = function(compiler) { + } + + key = parser.evaluateExpression(expr.arguments[0]); +- if (!key.isString()) { ++ if (key.string === undefined) { + parser.state.module.errors.push( + new DynamicTranslationKeyError( + parser.state.module, +@@ -127,7 +127,7 @@ ExtractTranslationPlugin.prototype.apply = function(compiler) { + + key = key.string; + +- let value = expr.arguments[0].value; ++ let value = key; + + const entry = + reverseEntryPoints[