@r_masseater/vite-plus-adopt 0.22.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/README.md +1 -1
- 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-ijEo-ufB.mjs → vpa-C8WOY6iR.mjs} +26 -5
- package/dist/vpa-C8WOY6iR.mjs.map +1 -0
- package/package.json +5 -5
- package/dist/vpa-ijEo-ufB.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ The Renovate preset updates `version` of each GitHub key and of `dotnet`. A new
|
|
|
123
123
|
|
|
124
124
|
## GitHub Actions caches
|
|
125
125
|
|
|
126
|
-
`vpa ci` puts the shared `setup` action of [typescript-template](https://github.com/masseater/typescript-template) into every job that runs `vp`, and removes what that action replaces: hand-written `actions/cache` steps for the pnpm store, the pnpm metadata, the vpa tools and msch, the `voidzero-dev/setup-vp` step and the `vp install --frozen-lockfile` step. Comments and formatting around the edited steps stay. It pins every template action and workflow to one commit, and calls `maintain-caches.yml` from `.github/workflows/cache.yml`, which saves the pnpm store on the default branch and deletes cache entries that it no longer needs. A local action in `.github/actions/` that wraps the shared one keeps its extra steps, and `vpa ci` forwards the inputs `cache`, `save` and `session-path` that it declares. In a repository that uses the shared `setup` action, it also writes `up-to-date.yml` and `update-branches.yml` as the template has them, with their triggers and jobs such as the
|
|
126
|
+
`vpa ci` puts the shared `setup` action of [typescript-template](https://github.com/masseater/typescript-template) into every job that runs `vp`, and removes what that action replaces: hand-written `actions/cache` steps for the pnpm store, the pnpm metadata, the vpa tools and msch, the `voidzero-dev/setup-vp` step and the `vp install --frozen-lockfile` step. Comments and formatting around the edited steps stay. It pins every template action and workflow to one commit, and calls `maintain-caches.yml` from `.github/workflows/cache.yml`, which saves the pnpm store on the default branch and deletes cache entries that it no longer needs. A local action in `.github/actions/` that wraps the shared one keeps its extra steps, and `vpa ci` forwards the inputs `cache`, `save` and `session-path` that it declares. In a repository that uses the shared `setup` action, it also writes `up-to-date.yml` and `update-branches.yml` as the template has them, with their triggers and jobs such as the `wake` job that starts the merge queue, and keeps the `up-to-date` job that the repository owns. Renovate only moves the pinned commits, so without this the rest of those workflows stays at what the template had when they were copied. Run it again after a new `vpa` version to move the pins. The library entry exports `findCiDrift(root)`, which lists the files `vpa ci` would change, the queue workflows that differ from the template and the files whose template pins differ.
|
|
127
127
|
|
|
128
128
|
## Replacement for @arethetypeswrong/core
|
|
129
129
|
|
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;
|