Commit a335b89
authored
build: drop redundant npx prefixes (#334)
* build: drop redundant npx prefixes
- package.json scripts: eslint, tsc, prettier are all devDependencies,
npm/yarn already resolve them from node_modules/.bin
- mocha-cli.ts: spawn yarn tsx instead of npx tsx (tsx is a devDep)
* test: use npx --no instead of yarn for tsx spawn
CI uses npm and installs different electron versions per matrix
entry, which modifies package.json and leaves yarn.lock stale.
yarn tsx then fails its workspace consistency check.
npx --no achieves the same thing (no registry fallback, tsx is a
devDep) without yarn's lockfile check.
* ci: use --no-save for matrix electron install
npm install defaults to --save, which rewrites package.json with
the matrix electron version. That leaves yarn.lock stale, and
yarn 4 checks lockfile consistency on every invocation —
including yarn tsx in the spec runner.
--no-save installs to node_modules without touching package.json.
Reverts the previous npx --no workaround.
* ci: pin matrix electron versions via npm: aliases
Replaces the CI-time npm install electron@X with lockfile-pinned
aliases (electron36 through electron40 as npm:electron@^XX). The
spec runner selects which one to use via ELECTRON_PKG env var,
defaulting to the base electron devDep for local runs.
This reverts the --no-save workaround from the previous commit —
the real fix is not fetching electron from the registry at CI
time at all.
Each alias has a dependenciesMeta.built: true entry so the
postinstall binary download runs despite enableScripts: false.
The npmPreapprovedPackages entry for 'electron' already covers
the aliases (yarn checks the resolved name, not the alias).
Also switches setup-node cache from 'npm' to 'yarn'.1 parent 1997cf1 commit a335b89
File tree
5 files changed
+126
-9
lines changed- .github/workflows
- spec-electron-setup/scripts
5 files changed
+126
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
119 | 139 | | |
120 | 140 | | |
121 | 141 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
631 | 636 | | |
632 | 637 | | |
633 | 638 | | |
| |||
657 | 662 | | |
658 | 663 | | |
659 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
660 | 675 | | |
661 | 676 | | |
662 | 677 | | |
| |||
1560 | 1575 | | |
1561 | 1576 | | |
1562 | 1577 | | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
1563 | 1587 | | |
1564 | 1588 | | |
1565 | 1589 | | |
| |||
3480 | 3504 | | |
3481 | 3505 | | |
3482 | 3506 | | |
| 3507 | + | |
| 3508 | + | |
| 3509 | + | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
| 3564 | + | |
| 3565 | + | |
| 3566 | + | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
3483 | 3572 | | |
3484 | 3573 | | |
3485 | 3574 | | |
| |||
8729 | 8818 | | |
8730 | 8819 | | |
8731 | 8820 | | |
| 8821 | + | |
| 8822 | + | |
| 8823 | + | |
| 8824 | + | |
| 8825 | + | |
| 8826 | + | |
| 8827 | + | |
8732 | 8828 | | |
8733 | 8829 | | |
8734 | 8830 | | |
| |||
0 commit comments