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:
9
node_modules/webpack/lib/json/JsonGenerator.js
generated
vendored
Executable file → Normal file
9
node_modules/webpack/lib/json/JsonGenerator.js
generated
vendored
Executable file → Normal file
@@ -9,7 +9,7 @@ const { RawSource } = require("webpack-sources");
|
||||
const ConcatenationScope = require("../ConcatenationScope");
|
||||
const { UsageState } = require("../ExportsInfo");
|
||||
const Generator = require("../Generator");
|
||||
const { JS_TYPES } = require("../ModuleSourceTypesConstants");
|
||||
const { JAVASCRIPT_TYPES } = require("../ModuleSourceTypeConstants");
|
||||
const RuntimeGlobals = require("../RuntimeGlobals");
|
||||
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
@@ -17,6 +17,7 @@ const RuntimeGlobals = require("../RuntimeGlobals");
|
||||
/** @typedef {import("../ExportsInfo")} ExportsInfo */
|
||||
/** @typedef {import("../Generator").GenerateContext} GenerateContext */
|
||||
/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */
|
||||
/** @typedef {import("../Module").SourceType} SourceType */
|
||||
/** @typedef {import("../Module").SourceTypes} SourceTypes */
|
||||
/** @typedef {import("../NormalModule")} NormalModule */
|
||||
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
|
||||
@@ -26,7 +27,7 @@ const RuntimeGlobals = require("../RuntimeGlobals");
|
||||
|
||||
/**
|
||||
* @param {JsonValue} data Raw JSON data
|
||||
* @returns {undefined|string} stringified data
|
||||
* @returns {undefined | string} stringified data
|
||||
*/
|
||||
const stringifySafe = (data) => {
|
||||
const stringified = JSON.stringify(data);
|
||||
@@ -132,12 +133,12 @@ class JsonGenerator extends Generator {
|
||||
* @returns {SourceTypes} available types (do not mutate)
|
||||
*/
|
||||
getTypes(module) {
|
||||
return JS_TYPES;
|
||||
return JAVASCRIPT_TYPES;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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