Skip to content

Commit 2ba936d

Browse files
Merge branch 'master' into joverbye-dedupe-optimisation
2 parents 08a853a + 60b83ac commit 2ba936d

File tree

26 files changed

+1022
-851
lines changed

26 files changed

+1022
-851
lines changed

.github/actions/prepare/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
node-version:
77
description: 'The version of Node.js to use'
88
required: false
9-
default: '22'
9+
default: 'current'
1010

1111
runs:
1212
using: composite

.github/workflows/integration-workflow.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,28 @@ jobs:
209209
name: vscode-zipfs
210210
path: ./packages/vscode-zipfs/vscode-zipfs-*.vsix
211211

212+
node-versions:
213+
name: 'Acceptance test node versions'
214+
outputs:
215+
versions: ${{ steps.versions.outputs.versions }}
216+
runs-on: ubuntu-latest
217+
steps:
218+
- id: versions
219+
shell: bash
220+
run: >
221+
echo -n 'versions='
222+
>> $GITHUB_OUTPUT
223+
224+
curl https://nodejs.org/dist/index.json |
225+
jq -c '[.[0:1] + map(select(.lts)) | .[].version | capture("^v(?<major>\\d+)") | .major | tonumber] | unique | map(select(. >= 18))'
226+
>> $GITHUB_OUTPUT
227+
212228
acceptance:
213229
strategy:
214230
fail-fast: false
215231
matrix:
216232
# We run the ubuntu tests on multiple Node versions with 2 shards since they're the fastest.
217-
node: [18, 19, 20, 21, 22]
233+
node: ${{ fromJson(needs.node-versions.outputs.versions) }}
218234
platform: [[ubuntu, 22.04]]
219235
shard: ['1/2', '2/2']
220236
include:
@@ -239,7 +255,7 @@ jobs:
239255

240256
name: '${{matrix.platform[0]}}-latest w/ Node.js ${{matrix.node}}.x (${{matrix.shard}})'
241257
runs-on: ${{matrix.platform[0]}}-${{matrix.platform[1]}}
242-
needs: build
258+
needs: [build, node-versions]
243259

244260
# Permission required to produce a valid provenance statement during the tests
245261
# Only run inside the main repository; this may fail in master since it doesn't run in PRs from forks
@@ -249,10 +265,10 @@ jobs:
249265
steps:
250266
- uses: actions/checkout@v4
251267

252-
- name: 'Use Node.js ${{matrix.node}}.x'
268+
- name: 'Use Node.js ${{matrix.node}}'
253269
uses: actions/setup-node@v4
254270
with:
255-
node-version: ${{matrix.node}}.x
271+
node-version: ${{matrix.node}}
256272

257273
- uses: actions/download-artifact@v4
258274
with:

.pnp.cjs

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.yarn/versions/78344001.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
releases:
2+
"@yarnpkg/fslib": patch
3+
4+
declined:
5+
- "@yarnpkg/plugin-catalog"
6+
- "@yarnpkg/plugin-compat"
7+
- "@yarnpkg/plugin-constraints"
8+
- "@yarnpkg/plugin-dlx"
9+
- "@yarnpkg/plugin-essentials"
10+
- "@yarnpkg/plugin-exec"
11+
- "@yarnpkg/plugin-file"
12+
- "@yarnpkg/plugin-git"
13+
- "@yarnpkg/plugin-github"
14+
- "@yarnpkg/plugin-init"
15+
- "@yarnpkg/plugin-jsr"
16+
- "@yarnpkg/plugin-link"
17+
- "@yarnpkg/plugin-nm"
18+
- "@yarnpkg/plugin-npm"
19+
- "@yarnpkg/plugin-npm-cli"
20+
- "@yarnpkg/plugin-pack"
21+
- "@yarnpkg/plugin-patch"
22+
- "@yarnpkg/plugin-pnp"
23+
- "@yarnpkg/plugin-pnpm"
24+
- "@yarnpkg/plugin-stage"
25+
- "@yarnpkg/plugin-typescript"
26+
- "@yarnpkg/plugin-version"
27+
- "@yarnpkg/plugin-workspace-tools"
28+
- vscode-zipfs
29+
- "@yarnpkg/builder"
30+
- "@yarnpkg/cli"
31+
- "@yarnpkg/core"
32+
- "@yarnpkg/doctor"
33+
- "@yarnpkg/libzip"
34+
- "@yarnpkg/nm"
35+
- "@yarnpkg/pnp"
36+
- "@yarnpkg/pnpify"
37+
- "@yarnpkg/sdks"
38+
- "@yarnpkg/shell"

.yarn/versions/d07cb1af.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
releases:
2+
"@yarnpkg/cli": patch
3+
"@yarnpkg/plugin-workspace-tools": patch
4+
5+
declined:
6+
- "@yarnpkg/plugin-compat"
7+
- "@yarnpkg/plugin-constraints"
8+
- "@yarnpkg/plugin-dlx"
9+
- "@yarnpkg/plugin-essentials"
10+
- "@yarnpkg/plugin-init"
11+
- "@yarnpkg/plugin-interactive-tools"
12+
- "@yarnpkg/plugin-nm"
13+
- "@yarnpkg/plugin-npm-cli"
14+
- "@yarnpkg/plugin-pack"
15+
- "@yarnpkg/plugin-patch"
16+
- "@yarnpkg/plugin-pnp"
17+
- "@yarnpkg/plugin-pnpm"
18+
- "@yarnpkg/plugin-stage"
19+
- "@yarnpkg/plugin-typescript"
20+
- "@yarnpkg/plugin-version"
21+
- "@yarnpkg/builder"
22+
- "@yarnpkg/core"
23+
- "@yarnpkg/doctor"

packages/acceptance-tests/pkg-tests-core/sources/utils/tests.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,18 @@ const staticServer = serveStatic(npath.fromPortablePath(require(`pkg-tests-fixtu
2929

3030
const TEST_MAJOR = process.env.TEST_MAJOR
3131
? parseInt(process.env.TEST_MAJOR, 10)
32-
: null;
32+
: 4;
3333

34-
function isAtLeastMajor(major: number) {
35-
return TEST_MAJOR !== null && TEST_MAJOR >= major;
34+
function majorCheck(test: (major: number) => boolean) {
35+
return TEST_MAJOR === null || test(TEST_MAJOR);
3636
}
3737

3838
export const FEATURE_CHECKS = {
39-
jsonLockfile: isAtLeastMajor(5),
40-
prologConstraints: !isAtLeastMajor(5),
41-
mergeConflictTheirs: isAtLeastMajor(5),
39+
forEachWorktree: majorCheck(major => major <= 4),
40+
forEachVerboseDone: majorCheck(major => major >= 5),
41+
jsonLockfile: majorCheck(major => major >= 5),
42+
prologConstraints: majorCheck(major => major <= 4),
43+
mergeConflictTheirs: majorCheck(major => major >= 5),
4244
} as const;
4345

4446
// Testing things inside a big-endian container takes forever
@@ -479,16 +481,14 @@ export const startPackageServer = ({type}: {type: keyof typeof packageServerUrls
479481
const packageVersionEntry = packageEntry.get(version);
480482
invariant(packageVersionEntry, `This can only exist`);
481483

482-
const data = JSON.stringify({
483-
[version as string]: Object.assign({}, packageVersionEntry!.packageJson, {
484-
dist: {
485-
shasum: await getPackageArchiveHash(name, version),
486-
tarball: (localName === `unconventional-tarball` || localName === `private-unconventional-tarball`)
487-
? (await getPackageHttpArchivePath(name, version)).replace(`/-/`, `/tralala/`)
488-
: await getPackageHttpArchivePath(name, version),
489-
},
490-
}),
491-
});
484+
const data = JSON.stringify(Object.assign({}, packageVersionEntry!.packageJson, {
485+
dist: {
486+
shasum: await getPackageArchiveHash(name, version),
487+
tarball: (localName === `unconventional-tarball` || localName === `private-unconventional-tarball`)
488+
? (await getPackageHttpArchivePath(name, version)).replace(`/-/`, `/tralala/`)
489+
: await getPackageHttpArchivePath(name, version),
490+
},
491+
}));
492492

493493
response.writeHead(200, {[`Content-Type`]: `application/json`});
494494
response.end(data);

0 commit comments

Comments
 (0)