@r_masseater/vite-plus-adopt 0.23.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/attw.mjs +8 -18
- package/dist/attw.mjs.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{vpa-CTEUbof9.mjs → vpa-C8WOY6iR.mjs} +5 -4
- package/dist/vpa-C8WOY6iR.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/vpa-CTEUbof9.mjs.map +0 -1
package/dist/attw.mjs
CHANGED
|
@@ -200,6 +200,11 @@ const DEFINE_PROPERTY_ARGUMENTS = 3;
|
|
|
200
200
|
const ZERO_TEXT = "0";
|
|
201
201
|
const isStringOrNumericLiteralLike = (node) => isStringLiteralLikeNode(node) || isNumericLiteral(node);
|
|
202
202
|
const isAccessExpression = (node) => isPropertyAccessExpression(node) || isElementAccessExpression(node);
|
|
203
|
+
const leftmostRoot = (node) => {
|
|
204
|
+
let current = node;
|
|
205
|
+
while (isAccessExpression(current)) current = current.expression;
|
|
206
|
+
return current;
|
|
207
|
+
};
|
|
203
208
|
const isThisKeyword = (node) => node.kind === SyntaxKind.ThisKeyword;
|
|
204
209
|
const skipParentheses = (node) => {
|
|
205
210
|
let current = node;
|
|
@@ -339,13 +344,13 @@ const syntacticModifierFlags = (node) => {
|
|
|
339
344
|
return 0;
|
|
340
345
|
};
|
|
341
346
|
const hasSyntacticModifier = Function.dual(DATA_FIRST_ARITY$31, (node, flag) => hasFlag(syntacticModifierFlags(node), flag));
|
|
342
|
-
const declarationOfBinding
|
|
347
|
+
const declarationOfBinding = (node) => {
|
|
343
348
|
let current = node;
|
|
344
349
|
while (isBindingElement(current)) current = current.parent.parent;
|
|
345
350
|
return current;
|
|
346
351
|
};
|
|
347
352
|
const combinedModifierFlags = (node) => {
|
|
348
|
-
const declaration = declarationOfBinding
|
|
353
|
+
const declaration = declarationOfBinding(node);
|
|
349
354
|
const own = syntacticModifierFlags(declaration);
|
|
350
355
|
if (!isVariableDeclaration(declaration)) return own;
|
|
351
356
|
const list = declaration.parent;
|
|
@@ -1192,11 +1197,6 @@ const namespaceFor = (binding, target, isTopLevel) => {
|
|
|
1192
1197
|
if (isTopLevel && !isAliasSymbol(found)) return bindMissingNamespaces(binding, target);
|
|
1193
1198
|
return found;
|
|
1194
1199
|
};
|
|
1195
|
-
const leftmostRoot = (node) => {
|
|
1196
|
-
let current = node;
|
|
1197
|
-
while (isAccessExpression(current)) current = current.expression;
|
|
1198
|
-
return current;
|
|
1199
|
-
};
|
|
1200
1200
|
const skipsPropertyAssignment = (binding, left) => !binding.isJs && !isFunctionSymbol(lookupSymbolForPropertyAccess(binding, left.expression)) || isAliasSymbol(lookupIdentifier(binding, leftmostRoot(left)));
|
|
1201
1201
|
const bindPropertyOfNamespace = (binding, left) => {
|
|
1202
1202
|
const namespace = namespaceFor(binding, left.expression, isTopLevelNamespaceAssignment(left));
|
|
@@ -1482,23 +1482,13 @@ const FUNCTION_VARIABLE = {
|
|
|
1482
1482
|
};
|
|
1483
1483
|
const isBindingPattern = (node) => Predicate.isNotUndefined(node) && (isObjectBindingPattern(node) || isArrayBindingPattern(node));
|
|
1484
1484
|
const isReparsed = (node) => hasFlag(node.flags, NodeFlags.Reparsed);
|
|
1485
|
-
const declarationOfBinding = (node) => {
|
|
1486
|
-
let current = node;
|
|
1487
|
-
while (isBindingElement(current)) current = current.parent.parent;
|
|
1488
|
-
return current;
|
|
1489
|
-
};
|
|
1490
1485
|
const isBlockOrCatchScoped = (node) => {
|
|
1491
1486
|
const declaration = declarationOfBinding(node);
|
|
1492
1487
|
return isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isVariableDeclarationList(declaration.parent) && hasFlag(declaration.parent.flags, NodeFlags.BlockScoped));
|
|
1493
1488
|
};
|
|
1494
1489
|
const isParameterBinding = (node) => isParameterDeclaration(declarationOfBinding(node));
|
|
1495
1490
|
const hasJSDocTypeTag = (node) => isVariableDeclaration(node) && Option.exists(Option.fromNullishOr(node.type), isReparsed);
|
|
1496
|
-
const
|
|
1497
|
-
let current = node;
|
|
1498
|
-
while (isAccessExpression(current)) current = current.expression;
|
|
1499
|
-
return current;
|
|
1500
|
-
};
|
|
1501
|
-
const isRequireInitialized = (node) => isVariableDeclaration(node) && Option.exists(Option.fromNullishOr(node.initializer), (initializer) => isRequireCall$1(leftmostAccessTarget(initializer), true));
|
|
1491
|
+
const isRequireInitialized = (node) => isVariableDeclaration(node) && Option.exists(Option.fromNullishOr(node.initializer), (initializer) => isRequireCall$1(leftmostRoot(initializer), true));
|
|
1502
1492
|
const possibleDeclarationOf = (node) => {
|
|
1503
1493
|
if (isVariableDeclaration(node)) return node;
|
|
1504
1494
|
return node.parent.parent;
|