Fix code quality violations and enhance ROUTE-EXISTS-01 rule
Implement JQHTML function cache ID system and fix bundle compilation Implement underscore prefix for system tables Fix JS syntax linter to support decorators and grant exception to Task system SPA: Update planning docs and wishlists with remaining features SPA: Document Navigation API abandonment and future enhancements Implement SPA browser integration with History API (Phase 1) Convert contacts view page to SPA action Convert clients pages to SPA actions and document conversion procedure SPA: Merge GET parameters and update documentation Implement SPA route URL generation in JavaScript and PHP Implement SPA bootstrap controller architecture Add SPA routing manual page (rsx:man spa) Add SPA routing documentation to CLAUDE.md Phase 4 Complete: Client-side SPA routing implementation Update get_routes() consumers for unified route structure Complete SPA Phase 3: PHP-side route type detection and is_spa flag Restore unified routes structure and Manifest_Query class Refactor route indexing and add SPA infrastructure Phase 3 Complete: SPA route registration in manifest Implement SPA Phase 2: Extract router code and test decorators Rename Jqhtml_Component to Component and complete SPA foundation setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
53
node_modules/webpack/lib/dependencies/HarmonyExportDependencyParserPlugin.js
generated
vendored
Executable file → Normal file
53
node_modules/webpack/lib/dependencies/HarmonyExportDependencyParserPlugin.js
generated
vendored
Executable file → Normal file
@@ -5,6 +5,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const CompatibilityPlugin = require("../CompatibilityPlugin");
|
||||
const WebpackError = require("../WebpackError");
|
||||
const { getImportAttributes } = require("../javascript/JavascriptParser");
|
||||
const InnerGraph = require("../optimize/InnerGraph");
|
||||
@@ -15,10 +16,10 @@ const HarmonyExportImportedSpecifierDependency = require("./HarmonyExportImporte
|
||||
const HarmonyExportSpecifierDependency = require("./HarmonyExportSpecifierDependency");
|
||||
const { ExportPresenceModes } = require("./HarmonyImportDependency");
|
||||
const {
|
||||
getImportMode,
|
||||
harmonySpecifierTag
|
||||
} = require("./HarmonyImportDependencyParserPlugin");
|
||||
const HarmonyImportSideEffectDependency = require("./HarmonyImportSideEffectDependency");
|
||||
const { ImportPhaseUtils, createGetImportPhase } = require("./ImportPhase");
|
||||
|
||||
/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */
|
||||
/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */
|
||||
@@ -26,6 +27,7 @@ const HarmonyImportSideEffectDependency = require("./HarmonyImportSideEffectDepe
|
||||
/** @typedef {import("../javascript/JavascriptParser").FunctionDeclaration} FunctionDeclaration */
|
||||
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
|
||||
/** @typedef {import("./HarmonyImportDependencyParserPlugin").HarmonySettings} HarmonySettings */
|
||||
/** @typedef {import("../CompatibilityPlugin").CompatibilitySettings} CompatibilitySettings */
|
||||
|
||||
const { HarmonyStarExportsList } = HarmonyExportImportedSpecifierDependency;
|
||||
|
||||
@@ -36,6 +38,7 @@ module.exports = class HarmonyExportDependencyParserPlugin {
|
||||
* @param {import("../../declarations/WebpackOptions").JavascriptParserOptions} options options
|
||||
*/
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
this.exportPresenceMode =
|
||||
options.reexportExportsPresence !== undefined
|
||||
? ExportPresenceModes.fromUserOption(options.reexportExportsPresence)
|
||||
@@ -44,7 +47,6 @@ module.exports = class HarmonyExportDependencyParserPlugin {
|
||||
: options.strictExportPresence
|
||||
? ExportPresenceModes.ERROR
|
||||
: ExportPresenceModes.AUTO;
|
||||
this.deferImport = options.deferImport;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,6 +55,8 @@ module.exports = class HarmonyExportDependencyParserPlugin {
|
||||
*/
|
||||
apply(parser) {
|
||||
const { exportPresenceMode } = this;
|
||||
const getImportPhase = createGetImportPhase(this.options.deferImport);
|
||||
|
||||
parser.hooks.export.tap(PLUGIN_NAME, (statement) => {
|
||||
const dep = new HarmonyExportHeaderDependency(
|
||||
/** @type {Range | false} */ (
|
||||
@@ -77,22 +81,20 @@ module.exports = class HarmonyExportDependencyParserPlugin {
|
||||
clearDep.loc = /** @type {DependencyLocation} */ (statement.loc);
|
||||
clearDep.loc.index = -1;
|
||||
parser.state.module.addPresentationalDependency(clearDep);
|
||||
let defer = false;
|
||||
if (this.deferImport) {
|
||||
({ defer } = getImportMode(parser, statement));
|
||||
if (defer) {
|
||||
const error = new WebpackError(
|
||||
"Deferred re-export (`export defer * as namespace from '...'`) is not a part of the Import Defer proposal.\nUse the following code instead:\n import defer * as namespace from '...';\n export { namespace };"
|
||||
);
|
||||
error.loc = statement.loc || undefined;
|
||||
parser.state.current.addError(error);
|
||||
}
|
||||
|
||||
const phase = getImportPhase(parser, statement);
|
||||
if (phase && ImportPhaseUtils.isDefer(phase)) {
|
||||
const error = new WebpackError(
|
||||
"Deferred re-export (`export defer * as namespace from '...'`) is not a part of the Import Defer proposal.\nUse the following code instead:\n import defer * as namespace from '...';\n export { namespace };"
|
||||
);
|
||||
error.loc = statement.loc || undefined;
|
||||
parser.state.current.addError(error);
|
||||
}
|
||||
const sideEffectDep = new HarmonyImportSideEffectDependency(
|
||||
/** @type {string} */ (source),
|
||||
parser.state.lastHarmonyImportOrder,
|
||||
getImportAttributes(statement),
|
||||
defer
|
||||
phase,
|
||||
getImportAttributes(statement)
|
||||
);
|
||||
sideEffectDep.loc = Object.create(
|
||||
/** @type {DependencyLocation} */ (statement.loc)
|
||||
@@ -157,6 +159,18 @@ module.exports = class HarmonyExportDependencyParserPlugin {
|
||||
parser.hooks.exportSpecifier.tap(
|
||||
PLUGIN_NAME,
|
||||
(statement, id, name, idx) => {
|
||||
// CompatibilityPlugin may change exports name
|
||||
// not handle re-export or import then export situation as current CompatibilityPlugin only
|
||||
// rename symbol in declaration module, not change exported symbol
|
||||
const variable = parser.getTagData(
|
||||
id,
|
||||
CompatibilityPlugin.nestedWebpackIdentifierTag
|
||||
);
|
||||
if (variable && /** @type {CompatibilitySettings} */ (variable).name) {
|
||||
// CompatibilityPlugin changes exports to a new name, should updates exports name
|
||||
id = /** @type {CompatibilitySettings} */ (variable).name;
|
||||
}
|
||||
|
||||
const settings =
|
||||
/** @type {HarmonySettings} */
|
||||
(parser.getTagData(id, harmonySpecifierTag));
|
||||
@@ -174,8 +188,8 @@ module.exports = class HarmonyExportDependencyParserPlugin {
|
||||
null,
|
||||
exportPresenceMode,
|
||||
null,
|
||||
settings.attributes,
|
||||
settings.defer
|
||||
settings.phase,
|
||||
settings.attributes
|
||||
)
|
||||
: new HarmonyExportSpecifierDependency(id, name);
|
||||
dep.loc = Object.create(
|
||||
@@ -207,9 +221,6 @@ module.exports = class HarmonyExportDependencyParserPlugin {
|
||||
parser.state.harmonyStarExports || new HarmonyStarExportsList();
|
||||
}
|
||||
const attributes = getImportAttributes(statement);
|
||||
const defer = this.deferImport
|
||||
? getImportMode(parser, statement).defer
|
||||
: false;
|
||||
const dep = new HarmonyExportImportedSpecifierDependency(
|
||||
/** @type {string} */
|
||||
(source),
|
||||
@@ -221,8 +232,8 @@ module.exports = class HarmonyExportDependencyParserPlugin {
|
||||
harmonyStarExports && harmonyStarExports.slice(),
|
||||
exportPresenceMode,
|
||||
harmonyStarExports,
|
||||
attributes,
|
||||
defer
|
||||
getImportPhase(parser, statement),
|
||||
attributes
|
||||
);
|
||||
if (harmonyStarExports) {
|
||||
harmonyStarExports.push(dep);
|
||||
|
||||
Reference in New Issue
Block a user