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:
20
node_modules/webpack/lib/dependencies/HarmonyExportInitFragment.js
generated
vendored
20
node_modules/webpack/lib/dependencies/HarmonyExportInitFragment.js
generated
vendored
@@ -12,6 +12,7 @@ const { propertyName } = require("../util/propertyName");
|
||||
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("../Generator").GenerateContext} GenerateContext */
|
||||
/** @typedef {import("../ExportsInfo").UsedName} UsedName */
|
||||
|
||||
/**
|
||||
* @param {Iterable<string>} iterable iterable strings
|
||||
@@ -33,7 +34,12 @@ const joinIterableWithComma = (iterable) => {
|
||||
return str;
|
||||
};
|
||||
|
||||
/** @typedef {Map<UsedName, string>} ExportMap */
|
||||
/** @typedef {Set<string>} UnusedExports */
|
||||
|
||||
/** @type {ExportMap} */
|
||||
const EMPTY_MAP = new Map();
|
||||
/** @type {UnusedExports} */
|
||||
const EMPTY_SET = new Set();
|
||||
|
||||
/**
|
||||
@@ -42,8 +48,8 @@ const EMPTY_SET = new Set();
|
||||
class HarmonyExportInitFragment extends InitFragment {
|
||||
/**
|
||||
* @param {string} exportsArgument the exports identifier
|
||||
* @param {Map<string, string>} exportMap mapping from used name to exposed variable name
|
||||
* @param {Set<string>} unusedExports list of unused export names
|
||||
* @param {ExportMap} exportMap mapping from used name to exposed variable name
|
||||
* @param {UnusedExports} unusedExports list of unused export names
|
||||
*/
|
||||
constructor(
|
||||
exportsArgument,
|
||||
@@ -51,8 +57,11 @@ class HarmonyExportInitFragment extends InitFragment {
|
||||
unusedExports = EMPTY_SET
|
||||
) {
|
||||
super(undefined, InitFragment.STAGE_HARMONY_EXPORTS, 1, "harmony-exports");
|
||||
/** @type {string} */
|
||||
this.exportsArgument = exportsArgument;
|
||||
/** @type {ExportMap} */
|
||||
this.exportMap = exportMap;
|
||||
/** @type {UnusedExports} */
|
||||
this.unusedExports = unusedExports;
|
||||
}
|
||||
|
||||
@@ -61,8 +70,10 @@ class HarmonyExportInitFragment extends InitFragment {
|
||||
* @returns {HarmonyExportInitFragment} merged fragment
|
||||
*/
|
||||
mergeAll(fragments) {
|
||||
/** @type {undefined | ExportMap} */
|
||||
let exportMap;
|
||||
let exportMapOwned = false;
|
||||
/** @type {undefined | UnusedExports} */
|
||||
let unusedExports;
|
||||
let unusedExportsOwned = false;
|
||||
|
||||
@@ -108,6 +119,7 @@ class HarmonyExportInitFragment extends InitFragment {
|
||||
* @returns {HarmonyExportInitFragment} merged result
|
||||
*/
|
||||
merge(other) {
|
||||
/** @type {ExportMap} */
|
||||
let exportMap;
|
||||
if (this.exportMap.size === 0) {
|
||||
exportMap = other.exportMap;
|
||||
@@ -119,6 +131,7 @@ class HarmonyExportInitFragment extends InitFragment {
|
||||
if (!exportMap.has(key)) exportMap.set(key, value);
|
||||
}
|
||||
}
|
||||
/** @type {UnusedExports} */
|
||||
let unusedExports;
|
||||
if (this.unusedExports.size === 0) {
|
||||
unusedExports = other.unusedExports;
|
||||
@@ -153,6 +166,7 @@ class HarmonyExportInitFragment extends InitFragment {
|
||||
: this.unusedExports.size > 0
|
||||
? `/* unused harmony export ${first(this.unusedExports)} */\n`
|
||||
: "";
|
||||
/** @type {string[]} */
|
||||
const definitions = [];
|
||||
const orderedExportMap = [...this.exportMap].sort(([a], [b]) =>
|
||||
a < b ? -1 : 1
|
||||
@@ -160,7 +174,7 @@ class HarmonyExportInitFragment extends InitFragment {
|
||||
for (const [key, value] of orderedExportMap) {
|
||||
definitions.push(
|
||||
`\n/* harmony export */ ${propertyName(
|
||||
key
|
||||
/** @type {string} */ (key)
|
||||
)}: ${runtimeTemplate.returningFunction(value)}`
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user