Enhance refactor commands with controller-aware Route() updates and fix code quality violations
Add semantic token highlighting for 'that' variable and comment file references in VS Code extension Add Phone_Text_Input and Currency_Input components with formatting utilities Implement client widgets, form standardization, and soft delete functionality Add modal scroll lock and update documentation Implement comprehensive modal system with form integration and validation Fix modal component instantiation using jQuery plugin API Implement modal system with responsive sizing, queuing, and validation support Implement form submission with validation, error handling, and loading states Implement country/state selectors with dynamic data loading and Bootstrap styling Revert Rsx::Route() highlighting in Blade/PHP files Target specific PHP scopes for Rsx::Route() highlighting in Blade Expand injection selector for Rsx::Route() highlighting Add custom syntax highlighting for Rsx::Route() and Rsx.Route() calls Update jqhtml packages to v2.2.165 Add bundle path validation for common mistakes (development mode only) Create Ajax_Select_Input widget and Rsx_Reference_Data controller Create Country_Select_Input widget with default country support Initialize Tom Select on Select_Input widgets Add Tom Select bundle for enhanced select dropdowns Implement ISO 3166 geographic data system for country/region selection Implement widget-based form system with disabled state support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
131
node_modules/webpack/lib/library/ModuleLibraryPlugin.js
generated
vendored
131
node_modules/webpack/lib/library/ModuleLibraryPlugin.js
generated
vendored
@@ -6,24 +6,24 @@
|
||||
"use strict";
|
||||
|
||||
const { ConcatSource } = require("webpack-sources");
|
||||
const { UsageState } = require("../ExportsInfo");
|
||||
const RuntimeGlobals = require("../RuntimeGlobals");
|
||||
const Template = require("../Template");
|
||||
const CommonJsSelfReferenceDependency = require("../dependencies/CommonJsSelfReferenceDependency");
|
||||
const ConcatenatedModule = require("../optimize/ConcatenatedModule");
|
||||
const propertyAccess = require("../util/propertyAccess");
|
||||
const { getEntryRuntime } = require("../util/runtime");
|
||||
const AbstractLibraryPlugin = require("./AbstractLibraryPlugin");
|
||||
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").LibraryExport} LibraryExport */
|
||||
/** @typedef {import("../Chunk")} Chunk */
|
||||
/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */
|
||||
/** @typedef {import("../Compiler")} Compiler */
|
||||
/** @typedef {import("../Module")} Module */
|
||||
/** @typedef {import("../Module").BuildMeta} BuildMeta */
|
||||
/** @typedef {import("../Module").RuntimeRequirements} RuntimeRequirements */
|
||||
/** @typedef {import("../javascript/JavascriptModulesPlugin").StartupRenderContext} StartupRenderContext */
|
||||
/** @typedef {import("../javascript/JavascriptModulesPlugin").ModuleRenderContext} ModuleRenderContext */
|
||||
/** @typedef {import("../util/Hash")} Hash */
|
||||
|
||||
/**
|
||||
* @template T
|
||||
@@ -38,7 +38,7 @@ const AbstractLibraryPlugin = require("./AbstractLibraryPlugin");
|
||||
/**
|
||||
* @typedef {object} ModuleLibraryPluginParsed
|
||||
* @property {string} name
|
||||
* @property {string | string[]=} export
|
||||
* @property {LibraryExport=} export
|
||||
*/
|
||||
|
||||
const PLUGIN_NAME = "ModuleLibraryPlugin";
|
||||
@@ -73,6 +73,47 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Module} module the exporting entry module
|
||||
* @param {string} entryName the name of the entrypoint
|
||||
* @param {LibraryContext<T>} libraryContext context
|
||||
* @returns {void}
|
||||
*/
|
||||
finishEntryModule(
|
||||
module,
|
||||
entryName,
|
||||
{ options, compilation, compilation: { moduleGraph } }
|
||||
) {
|
||||
const runtime = getEntryRuntime(compilation, entryName);
|
||||
if (options.export) {
|
||||
const exportsInfo = moduleGraph.getExportInfo(
|
||||
module,
|
||||
Array.isArray(options.export) ? options.export[0] : options.export
|
||||
);
|
||||
exportsInfo.setUsed(UsageState.Used, runtime);
|
||||
exportsInfo.canMangleUse = false;
|
||||
} else {
|
||||
const exportsInfo = moduleGraph.getExportsInfo(module);
|
||||
// If the entry module is commonjs, its exports cannot be mangled
|
||||
if (module.buildMeta && module.buildMeta.treatAsCommonJs) {
|
||||
exportsInfo.setUsedInUnknownWay(runtime);
|
||||
} else {
|
||||
exportsInfo.setAllKnownExportsUsed(runtime);
|
||||
}
|
||||
}
|
||||
moduleGraph.addExtraReason(module, "used as library export");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Chunk} chunk the chunk
|
||||
* @param {RuntimeRequirements} set runtime requirements
|
||||
* @param {LibraryContext<T>} libraryContext context
|
||||
* @returns {void}
|
||||
*/
|
||||
runtimeRequirements(chunk, set, libraryContext) {
|
||||
set.add(RuntimeGlobals.exports);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {LibraryOptions} library normalized library option
|
||||
* @returns {T | false} preprocess as needed by overriding
|
||||
@@ -101,21 +142,18 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
|
||||
renderStartup(
|
||||
source,
|
||||
module,
|
||||
{ moduleGraph, chunk, codeGenerationResults, inlined, inlinedInIIFE },
|
||||
{
|
||||
moduleGraph,
|
||||
chunk,
|
||||
codeGenerationResults,
|
||||
inlined,
|
||||
inlinedInIIFE,
|
||||
runtimeTemplate
|
||||
},
|
||||
{ options, compilation }
|
||||
) {
|
||||
const result = new ConcatSource(source);
|
||||
|
||||
if (!module.buildMeta || !module.buildMeta.exportsType) {
|
||||
for (const dependency of module.dependencies) {
|
||||
if (dependency instanceof CommonJsSelfReferenceDependency) {
|
||||
result.add(`export { ${RuntimeGlobals.exports} as default }`);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
const exportsInfo = options.export
|
||||
? [
|
||||
moduleGraph.getExportInfo(
|
||||
@@ -126,9 +164,7 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
|
||||
: moduleGraph.getExportsInfo(module).orderedExports;
|
||||
const definitions =
|
||||
inlined && !inlinedInIIFE
|
||||
? (module.buildMeta &&
|
||||
/** @type {GenerationMeta} */ module.buildMeta.exportsFinalName) ||
|
||||
{}
|
||||
? (module.buildMeta && module.buildMeta.exportsFinalName) || {}
|
||||
: {};
|
||||
/** @type {string[]} */
|
||||
const shortHandedExports = [];
|
||||
@@ -136,54 +172,55 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
|
||||
const exports = [];
|
||||
const isAsync = moduleGraph.isAsync(module);
|
||||
|
||||
const treatAsCommonJs =
|
||||
module.buildMeta && module.buildMeta.treatAsCommonJs;
|
||||
const skipRenderDefaultExport = Boolean(treatAsCommonJs);
|
||||
|
||||
if (isAsync) {
|
||||
result.add(
|
||||
`${RuntimeGlobals.exports} = await ${RuntimeGlobals.exports};\n`
|
||||
);
|
||||
}
|
||||
|
||||
const varType = compilation.outputOptions.environment.const
|
||||
? "const"
|
||||
: "var";
|
||||
|
||||
for (const exportInfo of exportsInfo) {
|
||||
outer: for (const exportInfo of exportsInfo) {
|
||||
if (!exportInfo.provided) continue;
|
||||
|
||||
let shouldContinue = false;
|
||||
const originalName = exportInfo.name;
|
||||
|
||||
const reexport = exportInfo.findTarget(moduleGraph, (_m) => true);
|
||||
if (skipRenderDefaultExport && originalName === "default") continue;
|
||||
|
||||
if (reexport) {
|
||||
const exp = moduleGraph.getExportsInfo(reexport.module);
|
||||
const target = exportInfo.findTarget(moduleGraph, (_m) => true);
|
||||
if (target) {
|
||||
const reexportsInfo = moduleGraph.getExportsInfo(target.module);
|
||||
|
||||
for (const reexportInfo of exp.orderedExports) {
|
||||
for (const reexportInfo of reexportsInfo.orderedExports) {
|
||||
if (
|
||||
reexportInfo.provided === false &&
|
||||
reexportInfo.name !== "default" &&
|
||||
reexportInfo.name === /** @type {string[]} */ (reexport.export)[0]
|
||||
reexportInfo.name === /** @type {string[]} */ (target.export)[0]
|
||||
) {
|
||||
shouldContinue = true;
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldContinue) continue;
|
||||
|
||||
const originalName = exportInfo.name;
|
||||
const usedName =
|
||||
/** @type {string} */
|
||||
(exportInfo.getUsedName(originalName, chunk.runtime));
|
||||
/** @type {string | undefined} */
|
||||
const definition = definitions[usedName];
|
||||
const finalName =
|
||||
definition ||
|
||||
`${RuntimeGlobals.exports}${Template.toIdentifier(originalName)}`;
|
||||
|
||||
if (!definition) {
|
||||
/** @type {string | undefined} */
|
||||
let finalName;
|
||||
|
||||
if (definition) {
|
||||
finalName = definition;
|
||||
} else {
|
||||
finalName = `${RuntimeGlobals.exports}${Template.toIdentifier(originalName)}`;
|
||||
result.add(
|
||||
`${varType} ${finalName} = ${RuntimeGlobals.exports}${propertyAccess([
|
||||
usedName
|
||||
])};\n`
|
||||
`${runtimeTemplate.renderConst()} ${finalName} = ${RuntimeGlobals.exports}${propertyAccess(
|
||||
[usedName]
|
||||
)};\n`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -201,7 +238,9 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
|
||||
|
||||
if (topLevelDeclarations && topLevelDeclarations.has(originalName)) {
|
||||
const name = `${RuntimeGlobals.exports}${Template.toIdentifier(originalName)}`;
|
||||
result.add(`${varType} ${name} = ${finalName};\n`);
|
||||
result.add(
|
||||
`${runtimeTemplate.renderConst()} ${name} = ${finalName};\n`
|
||||
);
|
||||
shortHandedExports.push(`${name} as ${originalName}`);
|
||||
} else {
|
||||
exports.push([originalName, finalName]);
|
||||
@@ -218,12 +257,18 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
if (treatAsCommonJs) {
|
||||
shortHandedExports.push(`${RuntimeGlobals.exports} as default`);
|
||||
}
|
||||
|
||||
if (shortHandedExports.length > 0) {
|
||||
result.add(`export { ${shortHandedExports.join(", ")} };\n`);
|
||||
}
|
||||
|
||||
for (const [exportName, final] of exports) {
|
||||
result.add(`export ${varType} ${exportName} = ${final};\n`);
|
||||
result.add(
|
||||
`export ${runtimeTemplate.renderConst()} ${exportName} = ${final};\n`
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user