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:
66
node_modules/webpack/lib/APIPlugin.js
generated
vendored
66
node_modules/webpack/lib/APIPlugin.js
generated
vendored
@@ -5,7 +5,9 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const InitFragment = require("./InitFragment");
|
||||
const {
|
||||
getExternalModuleNodeCommonjsInitFragment
|
||||
} = require("./ExternalModule");
|
||||
const {
|
||||
JAVASCRIPT_MODULE_TYPE_AUTO,
|
||||
JAVASCRIPT_MODULE_TYPE_DYNAMIC,
|
||||
@@ -30,11 +32,9 @@ const GetFullHashRuntimeModule = require("./runtime/GetFullHashRuntimeModule");
|
||||
/** @typedef {import("./javascript/JavascriptParser").Range} Range */
|
||||
|
||||
/**
|
||||
* @param {boolean | undefined} module true if ES module
|
||||
* @param {string} importMetaName `import.meta` name
|
||||
* @returns {Record<string, {expr: string, req: string[] | null, type?: string, assign: boolean}>} replacements
|
||||
*/
|
||||
function getReplacements(module, importMetaName) {
|
||||
function getReplacements() {
|
||||
return {
|
||||
__webpack_require__: {
|
||||
expr: RuntimeGlobals.require,
|
||||
@@ -67,9 +67,7 @@ function getReplacements(module, importMetaName) {
|
||||
assign: true
|
||||
},
|
||||
__non_webpack_require__: {
|
||||
expr: module
|
||||
? `__WEBPACK_EXTERNAL_createRequire(${importMetaName}.url)`
|
||||
: "require",
|
||||
expr: "require",
|
||||
req: null,
|
||||
type: undefined, // type is not known, depends on environment
|
||||
assign: true
|
||||
@@ -132,19 +130,7 @@ function getReplacements(module, importMetaName) {
|
||||
|
||||
const PLUGIN_NAME = "APIPlugin";
|
||||
|
||||
/**
|
||||
* @typedef {object} APIPluginOptions
|
||||
* @property {boolean=} module the output filename
|
||||
*/
|
||||
|
||||
class APIPlugin {
|
||||
/**
|
||||
* @param {APIPluginOptions=} options options
|
||||
*/
|
||||
constructor(options = {}) {
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply the plugin
|
||||
* @param {Compiler} compiler the compiler instance
|
||||
@@ -154,13 +140,15 @@ class APIPlugin {
|
||||
compiler.hooks.compilation.tap(
|
||||
PLUGIN_NAME,
|
||||
(compilation, { normalModuleFactory }) => {
|
||||
const importMetaName = /** @type {string} */ (
|
||||
compilation.outputOptions.importMetaName
|
||||
);
|
||||
const REPLACEMENTS = getReplacements(
|
||||
this.options.module,
|
||||
importMetaName
|
||||
);
|
||||
const moduleOutput = compilation.options.output.module;
|
||||
const nodeTarget = compiler.platform.node;
|
||||
const nodeEsm = moduleOutput && nodeTarget;
|
||||
|
||||
const REPLACEMENTS = getReplacements();
|
||||
if (nodeEsm) {
|
||||
REPLACEMENTS.__non_webpack_require__.expr =
|
||||
"__WEBPACK_EXTERNAL_createRequire_require";
|
||||
}
|
||||
|
||||
compilation.dependencyTemplates.set(
|
||||
ConstDependency,
|
||||
@@ -191,13 +179,8 @@ class APIPlugin {
|
||||
(source, module, renderContext) => {
|
||||
if (/** @type {BuildInfo} */ (module.buildInfo).needCreateRequire) {
|
||||
const chunkInitFragments = [
|
||||
new InitFragment(
|
||||
`import { createRequire as __WEBPACK_EXTERNAL_createRequire } from ${renderContext.runtimeTemplate.renderNodePrefixForCoreModule(
|
||||
"module"
|
||||
)};\n`,
|
||||
InitFragment.STAGE_HARMONY_IMPORTS,
|
||||
0,
|
||||
"external module node-commonjs"
|
||||
getExternalModuleNodeCommonjsInitFragment(
|
||||
renderContext.runtimeTemplate
|
||||
)
|
||||
];
|
||||
|
||||
@@ -217,9 +200,20 @@ class APIPlugin {
|
||||
parser.hooks.expression.for(key).tap(PLUGIN_NAME, (expression) => {
|
||||
const dep = toConstantDependency(parser, info.expr, info.req);
|
||||
|
||||
if (key === "__non_webpack_require__" && this.options.module) {
|
||||
/** @type {BuildInfo} */
|
||||
(parser.state.module.buildInfo).needCreateRequire = true;
|
||||
if (key === "__non_webpack_require__" && moduleOutput) {
|
||||
if (nodeTarget) {
|
||||
/** @type {BuildInfo} */
|
||||
(parser.state.module.buildInfo).needCreateRequire = true;
|
||||
} else {
|
||||
const warning = new WebpackError(
|
||||
`${PLUGIN_NAME}\n__non_webpack_require__ is only allowed in target node`
|
||||
);
|
||||
warning.loc = /** @type {DependencyLocation} */ (
|
||||
expression.loc
|
||||
);
|
||||
warning.module = parser.state.module;
|
||||
compilation.warnings.push(warning);
|
||||
}
|
||||
}
|
||||
|
||||
return dep(expression);
|
||||
|
||||
Reference in New Issue
Block a user