Add JS-CATCH-FALLBACK-01 rule and update npm packages
Add PHP-ALIAS-01 rule: prohibit field aliasing in serialization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
15
node_modules/webpack/lib/wasm-sync/WebAssemblyGenerator.js
generated
vendored
Executable file → Normal file
15
node_modules/webpack/lib/wasm-sync/WebAssemblyGenerator.js
generated
vendored
Executable file → Normal file
@@ -11,13 +11,14 @@ const { addWithAST, editWithAST } = require("@webassemblyjs/wasm-edit");
|
||||
const { decode } = require("@webassemblyjs/wasm-parser");
|
||||
const { RawSource } = require("webpack-sources");
|
||||
const Generator = require("../Generator");
|
||||
const { WEBASSEMBLY_TYPES } = require("../ModuleSourceTypesConstants");
|
||||
const { WEBASSEMBLY_TYPES } = require("../ModuleSourceTypeConstants");
|
||||
const WebAssemblyExportImportedDependency = require("../dependencies/WebAssemblyExportImportedDependency");
|
||||
const WebAssemblyUtils = require("./WebAssemblyUtils");
|
||||
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("../Generator").GenerateContext} GenerateContext */
|
||||
/** @typedef {import("../Module")} Module */
|
||||
/** @typedef {import("../Module").SourceType} SourceType */
|
||||
/** @typedef {import("../Module").SourceTypes} SourceTypes */
|
||||
/** @typedef {import("../ModuleGraph")} ModuleGraph */
|
||||
/** @typedef {import("../NormalModule")} NormalModule */
|
||||
@@ -270,11 +271,13 @@ const rewriteExportNames =
|
||||
}
|
||||
});
|
||||
|
||||
/** @typedef {Map<string, UsedWasmDependency>} Mapping */
|
||||
|
||||
/**
|
||||
* Mangle import names and modules
|
||||
* @param {object} state state
|
||||
* @param {AST} state.ast Module's ast
|
||||
* @param {Map<string, UsedWasmDependency>} state.usedDependencyMap mappings to mangle names
|
||||
* @param {Mapping} state.usedDependencyMap mappings to mangle names
|
||||
* @returns {ArrayBufferTransform} transform
|
||||
*/
|
||||
const rewriteImports =
|
||||
@@ -383,11 +386,11 @@ const addInitFunction =
|
||||
* Extract mangle mappings from module
|
||||
* @param {ModuleGraph} moduleGraph module graph
|
||||
* @param {Module} module current module
|
||||
* @param {boolean | undefined} mangle mangle imports
|
||||
* @returns {Map<string, UsedWasmDependency>} mappings to mangled names
|
||||
* @param {boolean=} mangle mangle imports
|
||||
* @returns {Mapping} mappings to mangled names
|
||||
*/
|
||||
const getUsedDependencyMap = (moduleGraph, module, mangle) => {
|
||||
/** @type {Map<string, UsedWasmDependency>} */
|
||||
/** @type {Mapping} */
|
||||
const map = new Map();
|
||||
for (const usedDep of WebAssemblyUtils.getUsedDependencies(
|
||||
moduleGraph,
|
||||
@@ -426,7 +429,7 @@ class WebAssemblyGenerator extends Generator {
|
||||
|
||||
/**
|
||||
* @param {NormalModule} module the module
|
||||
* @param {string=} type source type
|
||||
* @param {SourceType=} type source type
|
||||
* @returns {number} estimate size of the module
|
||||
*/
|
||||
getSize(module, type) {
|
||||
|
||||
Reference in New Issue
Block a user