Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
49
node_modules/webpack/lib/sharing/ProvideSharedPlugin.js
generated
vendored
49
node_modules/webpack/lib/sharing/ProvideSharedPlugin.js
generated
vendored
@@ -45,29 +45,28 @@ class ProvideSharedPlugin {
|
||||
constructor(options) {
|
||||
validate(options);
|
||||
|
||||
this._provides = /** @type {[string, ProvideOptions][]} */ (
|
||||
parseOptions(
|
||||
options.provides,
|
||||
(item) => {
|
||||
if (Array.isArray(item)) {
|
||||
throw new Error("Unexpected array of provides");
|
||||
}
|
||||
/** @type {ProvideOptions} */
|
||||
const result = {
|
||||
shareKey: item,
|
||||
version: undefined,
|
||||
shareScope: options.shareScope || "default",
|
||||
eager: false
|
||||
};
|
||||
return result;
|
||||
},
|
||||
(item) => ({
|
||||
shareKey: item.shareKey,
|
||||
version: item.version,
|
||||
shareScope: item.shareScope || options.shareScope || "default",
|
||||
eager: Boolean(item.eager)
|
||||
})
|
||||
)
|
||||
/** @type {[string, ProvideOptions][]} */
|
||||
this._provides = parseOptions(
|
||||
options.provides,
|
||||
(item) => {
|
||||
if (Array.isArray(item)) {
|
||||
throw new Error("Unexpected array of provides");
|
||||
}
|
||||
/** @type {ProvideOptions} */
|
||||
const result = {
|
||||
shareKey: item,
|
||||
version: undefined,
|
||||
shareScope: options.shareScope || "default",
|
||||
eager: false
|
||||
};
|
||||
return result;
|
||||
},
|
||||
(item) => ({
|
||||
shareKey: /** @type {string} */ (item.shareKey),
|
||||
version: item.version,
|
||||
shareScope: item.shareScope || options.shareScope || "default",
|
||||
eager: Boolean(item.eager)
|
||||
})
|
||||
);
|
||||
this._provides.sort(([a], [b]) => {
|
||||
if (a < b) return -1;
|
||||
@@ -95,13 +94,13 @@ class ProvideSharedPlugin {
|
||||
/** @type {Map<string, ProvideOptions>} */
|
||||
const prefixMatchProvides = new Map();
|
||||
for (const [request, config] of this._provides) {
|
||||
if (/^(\/|[A-Za-z]:\\|\\\\|\.\.?(\/|$))/.test(request)) {
|
||||
if (/^(?:\/|[A-Z]:\\|\\\\|\.\.?(?:\/|$))/i.test(request)) {
|
||||
// relative request
|
||||
resolvedProvideMap.set(request, {
|
||||
config,
|
||||
version: config.version
|
||||
});
|
||||
} else if (/^(\/|[A-Za-z]:\\|\\\\)/.test(request)) {
|
||||
} else if (/^(?:\/|[A-Z]:\\|\\\\)/i.test(request)) {
|
||||
// absolute path
|
||||
resolvedProvideMap.set(request, {
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user