@rushstack/webpack4-localization-plugin 0.18.108 → 0.18.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/webpack4-localization-plugin",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.18.109",
|
|
6
|
+
"tag": "@rushstack/webpack4-localization-plugin_v0.18.109",
|
|
7
|
+
"date": "Fri, 01 Aug 2025 00:12:48 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Upgrades the minimatch dependency from ~3.0.3 to 10.0.3 across the entire Rush monorepo to address a Regular Expression Denial of Service (ReDoS) vulnerability in the underlying brace-expansion dependency."
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"dependency": [
|
|
15
|
+
{
|
|
16
|
+
"comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.13.18`"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"comment": "Updating dependency \"@rushstack/heft\" to `0.74.2`"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
4
24
|
{
|
|
5
25
|
"version": "0.18.108",
|
|
6
26
|
"tag": "@rushstack/webpack4-localization-plugin_v0.18.108",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Change Log - @rushstack/webpack4-localization-plugin
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 01 Aug 2025 00:12:48 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.18.109
|
|
6
|
+
Fri, 01 Aug 2025 00:12:48 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- Upgrades the minimatch dependency from ~3.0.3 to 10.0.3 across the entire Rush monorepo to address a Regular Expression Denial of Service (ReDoS) vulnerability in the underlying brace-expansion dependency.
|
|
4
11
|
|
|
5
12
|
## 0.18.108
|
|
6
13
|
Wed, 23 Jul 2025 20:55:57 GMT
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -34,12 +34,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
36
|
})();
|
|
37
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
-
};
|
|
40
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
38
|
exports.WebpackConfigurationUpdater = void 0;
|
|
42
|
-
const minimatch_1 =
|
|
39
|
+
const minimatch_1 = require("minimatch");
|
|
43
40
|
const path = __importStar(require("path"));
|
|
44
41
|
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
45
42
|
const Constants_1 = require("./utilities/Constants");
|
|
@@ -105,7 +102,7 @@ class WebpackConfigurationUpdater {
|
|
|
105
102
|
const rules = globsToIgnore && globsToIgnore.length > 0
|
|
106
103
|
? {
|
|
107
104
|
include: Constants_1.Constants.RESOURCE_FILE_NAME_REGEXP,
|
|
108
|
-
exclude: (filePath) => globsToIgnore.some((glob) => (0, minimatch_1.
|
|
105
|
+
exclude: (filePath) => globsToIgnore.some((glob) => (0, minimatch_1.minimatch)(filePath, glob))
|
|
109
106
|
}
|
|
110
107
|
: Constants_1.Constants.RESOURCE_FILE_NAME_REGEXP;
|
|
111
108
|
WebpackConfigurationUpdater._addRulesToConfiguration(configuration, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebpackConfigurationUpdater.js","sourceRoot":"","sources":["../src/WebpackConfigurationUpdater.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D
|
|
1
|
+
{"version":3,"file":"WebpackConfigurationUpdater.js","sourceRoot":"","sources":["../src/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;QACJ,CAAC;IACH,CAAC;CACF;AAhID,kEAgIC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { minimatch } from 'minimatch';\nimport * as path from 'path';\nimport type * as Webpack from 'webpack';\nimport type * as SetPublicPathPluginPackageType from '@rushstack/set-webpack-public-path-plugin';\nimport { type NewlineKind, Text } from '@rushstack/node-core-library';\nimport type { IgnoreStringFunction } from '@rushstack/localization-utilities';\n\nimport { Constants } from './utilities/Constants';\nimport type { LocalizationPlugin } from './LocalizationPlugin';\nimport type { ILocLoaderOptions } from './loaders/LocLoader';\nimport type { IBaseLoaderOptions } from './loaders/LoaderFactory';\n\nexport interface IWebpackConfigurationUpdaterOptions {\n pluginInstance: LocalizationPlugin;\n configuration: Webpack.Configuration;\n globsToIgnore: string[] | undefined;\n localeNameOrPlaceholder: string;\n resxNewlineNormalization: NewlineKind | undefined;\n ignoreMissingResxComments: boolean | undefined;\n ignoreString: IgnoreStringFunction | undefined;\n}\n\nconst FILE_TOKEN_REGEX: RegExp = new RegExp(Text.escapeRegExp('[file]'));\n\nexport class WebpackConfigurationUpdater {\n public static amendWebpackConfigurationForMultiLocale(options: IWebpackConfigurationUpdaterOptions): void {\n const loader: string = path.resolve(__dirname, 'loaders', 'LocLoader.js');\n const loaderOptions: ILocLoaderOptions = {\n pluginInstance: options.pluginInstance,\n resxNewlineNormalization: options.resxNewlineNormalization,\n ignoreMissingResxComments: options.ignoreMissingResxComments,\n ignoreString: options.ignoreString\n };\n\n WebpackConfigurationUpdater._addLoadersForLocFiles(options, loader, loaderOptions);\n\n WebpackConfigurationUpdater._tryUpdateLocaleTokenInPublicPathPlugin(options);\n\n WebpackConfigurationUpdater._tryUpdateSourceMapFilename(options.configuration);\n }\n\n public static amendWebpackConfigurationForInPlaceLocFiles(\n options: IWebpackConfigurationUpdaterOptions\n ): void {\n const loader: string = path.resolve(__dirname, 'loaders', 'InPlaceLocFileLoader.js');\n const loaderOptions: IBaseLoaderOptions = {\n resxNewlineNormalization: options.resxNewlineNormalization,\n ignoreMissingResxComments: options.ignoreMissingResxComments,\n ignoreString: options.ignoreString\n };\n\n WebpackConfigurationUpdater._addRulesToConfiguration(options.configuration, [\n {\n test: Constants.RESOURCE_FILE_NAME_REGEXP,\n use: [\n {\n loader: loader,\n options: loaderOptions\n }\n ],\n type: 'json',\n sideEffects: false\n }\n ]);\n }\n\n private static _tryUpdateLocaleTokenInPublicPathPlugin(options: IWebpackConfigurationUpdaterOptions): void {\n let setPublicPathPlugin: typeof SetPublicPathPluginPackageType.SetPublicPathPlugin | undefined;\n try {\n const pluginPackage: typeof SetPublicPathPluginPackageType = require('@rushstack/set-webpack-public-path-plugin');\n setPublicPathPlugin = pluginPackage.SetPublicPathPlugin;\n } catch (e) {\n // public path plugin isn't present - ignore\n }\n\n if (setPublicPathPlugin && options.configuration.plugins) {\n for (const plugin of options.configuration.plugins) {\n if (plugin instanceof setPublicPathPlugin) {\n if (\n plugin.options &&\n plugin.options.scriptName &&\n plugin.options.scriptName.isTokenized &&\n plugin.options.scriptName.name\n ) {\n plugin.options.scriptName.name = plugin.options.scriptName.name.replace(\n /\\[locale\\]/g,\n options.localeNameOrPlaceholder\n );\n }\n }\n }\n }\n }\n\n private static _addLoadersForLocFiles(\n options: IWebpackConfigurationUpdaterOptions,\n loader: string,\n loaderOptions: IBaseLoaderOptions\n ): void {\n const { globsToIgnore, configuration } = options;\n const rules: Webpack.RuleSetCondition =\n globsToIgnore && globsToIgnore.length > 0\n ? {\n include: Constants.RESOURCE_FILE_NAME_REGEXP,\n exclude: (filePath: string): boolean =>\n globsToIgnore.some((glob: string): boolean => minimatch(filePath, glob))\n }\n : Constants.RESOURCE_FILE_NAME_REGEXP;\n WebpackConfigurationUpdater._addRulesToConfiguration(configuration, [\n {\n test: rules,\n use: [\n {\n loader: loader,\n options: loaderOptions\n }\n ],\n type: 'json',\n sideEffects: false\n }\n ]);\n }\n\n private static _addRulesToConfiguration(\n configuration: Webpack.Configuration,\n rules: Webpack.RuleSetRule[]\n ): void {\n if (!configuration.module) {\n configuration.module = {\n rules: []\n };\n }\n\n if (!configuration.module.rules) {\n configuration.module.rules = [];\n }\n\n configuration.module.rules.push(...rules);\n }\n\n private static _tryUpdateSourceMapFilename(configuration: Webpack.Configuration): void {\n if (!configuration.output) {\n configuration.output = {}; // This should never happen\n }\n\n if (configuration.output.sourceMapFilename !== undefined) {\n configuration.output.sourceMapFilename = configuration.output.sourceMapFilename.replace(\n FILE_TOKEN_REGEX,\n Constants.NO_LOCALE_SOURCE_MAP_FILENAME_TOKEN\n );\n }\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/webpack4-localization-plugin",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.109",
|
|
4
4
|
"description": "This plugin facilitates localization with Webpack.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "dist/webpack4-localization-plugin.d.ts",
|
|
@@ -30,21 +30,20 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@types/tapable": "1.0.6",
|
|
32
32
|
"loader-utils": "1.4.2",
|
|
33
|
-
"minimatch": "
|
|
34
|
-
"@rushstack/localization-utilities": "0.13.
|
|
35
|
-
"@rushstack/
|
|
36
|
-
"@rushstack/
|
|
33
|
+
"minimatch": "10.0.3",
|
|
34
|
+
"@rushstack/localization-utilities": "0.13.18",
|
|
35
|
+
"@rushstack/terminal": "0.15.4",
|
|
36
|
+
"@rushstack/node-core-library": "5.14.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@rushstack/set-webpack-public-path-plugin": "^4.1.16",
|
|
40
40
|
"@types/loader-utils": "1.1.3",
|
|
41
|
-
"@types/minimatch": "3.0.5",
|
|
42
41
|
"@types/node": "20.17.19",
|
|
43
42
|
"@types/webpack": "4.41.32",
|
|
44
43
|
"eslint": "~9.25.1",
|
|
45
44
|
"webpack": "~4.47.0",
|
|
46
45
|
"local-node-rig": "1.0.0",
|
|
47
|
-
"@rushstack/heft": "0.74.
|
|
46
|
+
"@rushstack/heft": "0.74.2"
|
|
48
47
|
},
|
|
49
48
|
"scripts": {
|
|
50
49
|
"build": "heft build --clean",
|