svelte-vitals 0.31.0 → 0.31.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/bin.js +15 -6
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -341,6 +341,12 @@ function isConfigTargetId(id) {
|
|
|
341
341
|
return CONFIG_TARGETS.some((t) => t.id === id);
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
+
// src/ci/action-pin-comment.ts
|
|
345
|
+
function actionPinComment(version) {
|
|
346
|
+
return `action-v${version}`;
|
|
347
|
+
}
|
|
348
|
+
var ACTION_PIN_COMMENT_RE = /#\s*(?:action-v|@svelte-vitals\/action@)(\S+)/;
|
|
349
|
+
|
|
344
350
|
// src/ci/workflow.ts
|
|
345
351
|
var WORKFLOW_PATH = ".github/workflows/svelte-vitals.yml";
|
|
346
352
|
var CHECKOUT_SHA = "9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0";
|
|
@@ -371,7 +377,7 @@ function buildWorkflowYaml(opts) {
|
|
|
371
377
|
` - uses: actions/checkout@${CHECKOUT_SHA} # ${CHECKOUT_VERSION}`,
|
|
372
378
|
" with:",
|
|
373
379
|
" fetch-depth: 0",
|
|
374
|
-
` - uses: oekazuma/svelte-vitals/packages/action@${actionSha} #
|
|
380
|
+
` - uses: oekazuma/svelte-vitals/packages/action@${actionSha} # ${actionPinComment(actionVersion)}`,
|
|
375
381
|
" with:",
|
|
376
382
|
" diff: origin/${{ github.base_ref }}",
|
|
377
383
|
" baseline: origin/${{ github.base_ref }}",
|
|
@@ -998,8 +1004,8 @@ function readInstalledViteVersion(io) {
|
|
|
998
1004
|
}
|
|
999
1005
|
|
|
1000
1006
|
// src/ci/action-pin.generated.ts
|
|
1001
|
-
var ACTION_SHA = "
|
|
1002
|
-
var ACTION_VERSION = "0.3.
|
|
1007
|
+
var ACTION_SHA = "7ae39edda8bfbaba16ddb6c24871619a9ebe0a5d";
|
|
1008
|
+
var ACTION_VERSION = "0.3.7";
|
|
1003
1009
|
|
|
1004
1010
|
// src/install/index.ts
|
|
1005
1011
|
function detectPackageManagerNear(io, appDir) {
|
|
@@ -1572,6 +1578,7 @@ import mri2 from "mri";
|
|
|
1572
1578
|
|
|
1573
1579
|
// src/ci/upgrade.ts
|
|
1574
1580
|
var ACTION_USES_LINE = /^(?<indent>\s*-\s*uses:\s*(?:&\S+\s+)?oekazuma\/svelte-vitals\/packages\/action@)(?<ref>[^\s#]+)(?<comment>\s*#.*)?$/;
|
|
1581
|
+
var LEGACY_COMMENT = /#\s*@svelte-vitals\/action@/;
|
|
1575
1582
|
function upgradeActionPin(content, sha, version) {
|
|
1576
1583
|
const lines = content.split("\n");
|
|
1577
1584
|
let replaced = 0;
|
|
@@ -1583,13 +1590,15 @@ function upgradeActionPin(content, sha, version) {
|
|
|
1583
1590
|
if (!match || !match.groups) return line;
|
|
1584
1591
|
const { indent: indent2, ref } = match.groups;
|
|
1585
1592
|
if (indent2 === void 0 || ref === void 0) return line;
|
|
1586
|
-
|
|
1593
|
+
const comment = match.groups.comment ?? "";
|
|
1594
|
+
const commentMatch = ACTION_PIN_COMMENT_RE.exec(comment);
|
|
1595
|
+
const isCanonicalComment = commentMatch !== null && !LEGACY_COMMENT.test(comment);
|
|
1596
|
+
if (ref === sha && isCanonicalComment) return line;
|
|
1587
1597
|
if (from === void 0) {
|
|
1588
|
-
const commentMatch = /#\s*@svelte-vitals\/action@(\S+)/.exec(match.groups.comment ?? "");
|
|
1589
1598
|
from = commentMatch ? commentMatch[1] : ref.slice(0, 7);
|
|
1590
1599
|
}
|
|
1591
1600
|
replaced += 1;
|
|
1592
|
-
return `${indent2}${sha} #
|
|
1601
|
+
return `${indent2}${sha} # ${actionPinComment(version)}${eol}`;
|
|
1593
1602
|
});
|
|
1594
1603
|
if (replaced === 0) {
|
|
1595
1604
|
const hasAnyReference = lines.some((line) => ACTION_USES_LINE.test(line.endsWith("\r") ? line.slice(0, -1) : line));
|
package/package.json
CHANGED