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:
46
node_modules/webpack/lib/css/walkCssTokens.js
generated
vendored
46
node_modules/webpack/lib/css/walkCssTokens.js
generated
vendored
@@ -10,16 +10,18 @@
|
||||
* @property {((input: string, start: number, end: number, innerStart: number, innerEnd: number) => number)=} url
|
||||
* @property {((input: string, start: number, end: number) => number)=} comment
|
||||
* @property {((input: string, start: number, end: number) => number)=} string
|
||||
* @property {((input: string, start: number, end: number) => number)=} leftCurlyBracket
|
||||
* @property {((input: string, start: number, end: number) => number)=} rightCurlyBracket
|
||||
* @property {((input: string, start: number, end: number) => number)=} leftParenthesis
|
||||
* @property {((input: string, start: number, end: number) => number)=} rightParenthesis
|
||||
* @property {((input: string, start: number, end: number) => number)=} leftSquareBracket
|
||||
* @property {((input: string, start: number, end: number) => number)=} rightSquareBracket
|
||||
* @property {((input: string, start: number, end: number) => number)=} function
|
||||
* @property {((input: string, start: number, end: number) => number)=} colon
|
||||
* @property {((input: string, start: number, end: number) => number)=} atKeyword
|
||||
* @property {((input: string, start: number, end: number) => number)=} delim
|
||||
* @property {((input: string, start: number, end: number) => number)=} identifier
|
||||
* @property {((input: string, start: number, end: number, isId: boolean) => number)=} hash
|
||||
* @property {((input: string, start: number, end: number) => number)=} leftCurlyBracket
|
||||
* @property {((input: string, start: number, end: number) => number)=} rightCurlyBracket
|
||||
* @property {((input: string, start: number, end: number) => number)=} semicolon
|
||||
* @property {((input: string, start: number, end: number) => number)=} comma
|
||||
* @property {(() => boolean)=} needTerminate
|
||||
@@ -717,14 +719,22 @@ const consumeRightParenthesis = (input, pos, callbacks) => {
|
||||
};
|
||||
|
||||
/** @type {CharHandler} */
|
||||
const consumeLeftSquareBracket = (input, pos, _callbacks) =>
|
||||
const consumeLeftSquareBracket = (input, pos, callbacks) => {
|
||||
// Return a <]-token>.
|
||||
pos;
|
||||
if (callbacks.leftSquareBracket !== undefined) {
|
||||
return callbacks.leftSquareBracket(input, pos - 1, pos);
|
||||
}
|
||||
return pos;
|
||||
};
|
||||
|
||||
/** @type {CharHandler} */
|
||||
const consumeRightSquareBracket = (input, pos, _callbacks) =>
|
||||
const consumeRightSquareBracket = (input, pos, callbacks) => {
|
||||
// Return a <]-token>.
|
||||
pos;
|
||||
if (callbacks.rightSquareBracket !== undefined) {
|
||||
return callbacks.rightSquareBracket(input, pos - 1, pos);
|
||||
}
|
||||
return pos;
|
||||
};
|
||||
|
||||
/** @type {CharHandler} */
|
||||
const consumeLeftCurlyBracket = (input, pos, callbacks) => {
|
||||
@@ -1201,7 +1211,7 @@ module.exports = (input, pos = 0, callbacks = {}) => {
|
||||
* @param {string} input input css
|
||||
* @param {number} pos pos
|
||||
* @param {CssTokenCallbacks} callbacks callbacks
|
||||
* @param {CssTokenCallbacks} additional additional callbacks
|
||||
* @param {CssTokenCallbacks=} additional additional callbacks
|
||||
* @param {{ onlyTopLevel?: boolean, declarationValue?: boolean, atRulePrelude?: boolean, functionValue?: boolean }=} options options
|
||||
* @returns {number} pos
|
||||
*/
|
||||
@@ -1221,7 +1231,7 @@ const consumeUntil = (input, pos, callbacks, additional, options = {}) => {
|
||||
needHandle = false;
|
||||
}
|
||||
|
||||
if (additional.function !== undefined) {
|
||||
if (additional && additional.function !== undefined) {
|
||||
return additional.function(input, start, end);
|
||||
}
|
||||
|
||||
@@ -1265,6 +1275,10 @@ const consumeUntil = (input, pos, callbacks, additional, options = {}) => {
|
||||
needTerminate = true;
|
||||
return end;
|
||||
};
|
||||
servicedCallbacks.semicolon = (_input, _start, end) => {
|
||||
needTerminate = true;
|
||||
return end;
|
||||
};
|
||||
}
|
||||
|
||||
while (pos < input.length) {
|
||||
@@ -1326,13 +1340,18 @@ const eatWhitespace = (input, pos) => {
|
||||
/**
|
||||
* @param {string} input input
|
||||
* @param {number} pos position
|
||||
* @returns {number} position after whitespace and comments
|
||||
* @returns {[number, boolean]} position after whitespace and comments
|
||||
*/
|
||||
const eatWhitespaceAndComments = (input, pos) => {
|
||||
let foundWhitespace = false;
|
||||
|
||||
for (;;) {
|
||||
const originalPos = pos;
|
||||
pos = consumeComments(input, pos, {});
|
||||
while (_isWhiteSpace(input.charCodeAt(pos))) {
|
||||
if (!foundWhitespace) {
|
||||
foundWhitespace = true;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
if (originalPos === pos) {
|
||||
@@ -1340,7 +1359,7 @@ const eatWhitespaceAndComments = (input, pos) => {
|
||||
}
|
||||
}
|
||||
|
||||
return pos;
|
||||
return [pos, foundWhitespace];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1394,7 +1413,7 @@ const skipCommentsAndEatIdentSequence = (input, pos) => {
|
||||
* @returns {[number, number] | undefined} positions of ident sequence
|
||||
*/
|
||||
const eatString = (input, pos) => {
|
||||
pos = eatWhitespaceAndComments(input, pos);
|
||||
pos = eatWhitespaceAndComments(input, pos)[0];
|
||||
|
||||
const start = pos;
|
||||
|
||||
@@ -1627,7 +1646,7 @@ const eatImportTokens = (input, pos, cbs) => {
|
||||
* @returns {[number, number] | undefined} positions of ident sequence
|
||||
*/
|
||||
const eatIdentSequence = (input, pos) => {
|
||||
pos = eatWhitespaceAndComments(input, pos);
|
||||
pos = eatWhitespaceAndComments(input, pos)[0];
|
||||
|
||||
const start = pos;
|
||||
|
||||
@@ -1652,7 +1671,7 @@ const eatIdentSequence = (input, pos) => {
|
||||
* @returns {[number, number, boolean] | undefined} positions of ident sequence or string
|
||||
*/
|
||||
const eatIdentSequenceOrString = (input, pos) => {
|
||||
pos = eatWhitespaceAndComments(input, pos);
|
||||
pos = eatWhitespaceAndComments(input, pos)[0];
|
||||
|
||||
const start = pos;
|
||||
|
||||
@@ -1716,5 +1735,6 @@ module.exports.eatWhiteLine = eatWhiteLine;
|
||||
module.exports.eatWhitespace = eatWhitespace;
|
||||
module.exports.eatWhitespaceAndComments = eatWhitespaceAndComments;
|
||||
module.exports.isIdentStartCodePoint = isIdentStartCodePoint;
|
||||
module.exports.isWhiteSpace = _isWhiteSpace;
|
||||
module.exports.skipCommentsAndEatIdentSequence =
|
||||
skipCommentsAndEatIdentSequence;
|
||||
|
||||
Reference in New Issue
Block a user