Skip to content

Commit 9a4050b

Browse files
Switch to pnpm, ESLint 9, and helpful output (#852)
* Switch to pnpm, ESLint 9, and helpful output * Replace references of yarn with pnpm * Use published packages * Bump version of docker/build-push-action * Attempt to enable pnpm to read prettier version * Fix test * Try lts/* for .nvmrc * Fix tests * Fix unbound variable issue * Use pnpm list instead of why * Correctly clear cache using store prune * Attempt to fix formatting actions * Disable store prune for now * Prune dev dependencies * Make binaries executable hopefully * Log the .bin folder * idk? * Chown it then I guess? * Don't symlink executables * Attempt to own and execute as appuser * Okay later then * Remove all changes to ownership for now * Print executability * Log more things * Debug promise * Hopefully fix the slug issue * Try alternatives * Other alternatives * Don't cd into output * Correctly cd into directory when needed * Hopefully detect the docker run issue * Maybe chown will fix it? * With full path * Different ls options * Print ls in case of not executable * Fix typo * idk * Show whoami * Show whomai for real * Separate tests for jest bin file * Woops, fix that remnant * Ignore appuser for now * Show me that env * Re-enable appuser * Debug etc/passwd * Debug mounts * Make tmp executable for now * Also make this one executable temporarily * Collate layers * Try jest without corepack root * Ensure no tmpfs for tests if running in docker without exec * Woops, typo * Fix empty continuation * Probably fix issue with path? * Remove :exec flag * Make executable again * Print mount before tests * Always use bash please * Remove option :exec not supported by --mount * Hopefully make the tests work * Remove color from expected results (docker only) * Fix expected results for clock * Add npm test
1 parent 93f6cba commit 9a4050b

61 files changed

Lines changed: 7357 additions & 9626 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 18 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/action-format.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ jobs:
6060
git clone $HEAD_REPO .
6161
git checkout -b "$HEAD_REF" "origin/$HEAD_REF"
6262
63-
- name: Use Node.js LTS (18.x)
64-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
63+
- name: Use Node.js LTS (20.x)
64+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
6565
with:
66-
node-version: '18'
67-
- name: Install project development dependencies
68-
run: npm install --no-save
66+
node-version: 20.x
67+
- name: Enable pnpm
68+
run: |
69+
corepack enable pnpm
70+
corepack pnpm -v
6971
- name: 'Format code'
7072
run: ./bin/format.sh
7173

.github/workflows/ci.js.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ jobs:
1212
runs-on: ubuntu-22.04
1313

1414
steps:
15-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
16-
- name: Use Node.js LTS (18.x)
17-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
15+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
16+
- name: Use Node.js LTS
17+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
1818
with:
19-
node-version: 18.x
19+
node-version-file: .nvmrc
2020

2121
- name: Install project dependencies
22-
run: yarn install --immutable
22+
run: |
23+
corepack enable pnpm
24+
corepack pnpm -v
25+
corepack pnpm install --frozen-lockfile
2326
2427
- name: Run exercism/javascript-test-runner ci precheck (lint code)
2528
run: bin/lint.sh
@@ -29,23 +32,26 @@ jobs:
2932

3033
strategy:
3134
matrix:
32-
node-version: [18.x]
35+
node-version: [20.x]
3336

3437
steps:
35-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
38+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
3639
- name: Use Node.js ${{ matrix.node-version }}
37-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
40+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
3841
with:
3942
node-version: ${{ matrix.node-version }}
4043

4144
- name: Install project dependencies
42-
run: yarn install --immutable
45+
run: |
46+
corepack enable pnpm
47+
corepack pnpm -v
48+
corepack pnpm install --frozen-lockfile
4349
4450
- name: Build the test-runner (using Node ${{ matrix.node-version }})
4551
run: bin/test.sh
4652

4753
- name: Set up Docker Buildx
48-
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db
54+
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1
4955
with:
5056
install: true
5157

.github/workflows/pr.ci.js.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ jobs:
1313
- name: Checkout PR
1414
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
1515

16-
- name: Use Node.js LTS (18.x)
17-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
16+
- name: Use Node.js LTS
17+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
1818
with:
19-
node-version: 18.x
19+
node-version-file: .nvmrc
2020

2121
- name: Install project dependencies
22-
run: yarn install --immutable
22+
run: |
23+
corepack enable pnpm
24+
corepack pnpm -v
25+
corepack pnpm install --frozen-lockfile
2326
2427
- name: Run exercism/javascript ci precheck (lint code)
2528
run: bin/lint.sh
@@ -29,25 +32,28 @@ jobs:
2932

3033
strategy:
3134
matrix:
32-
node-version: [18.x]
35+
node-version: [20.x]
3336

3437
steps:
3538
- name: Checkout PR
36-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
39+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
3740

3841
- name: Use Node.js ${{ matrix.node-version }}
39-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
42+
uses: actions/setup-node@v3
4043
with:
4144
node-version: ${{ matrix.node-version }}
4245

4346
- name: Install project dependencies
44-
run: yarn install --immutable
47+
run: |
48+
corepack enable pnpm
49+
corepack pnpm -v
50+
corepack pnpm install --frozen-lockfile
4551
4652
- name: Build the test-runner (using Node ${{ matrix.node-version }})
4753
run: bin/test.sh
4854

4955
- name: Set up Docker Buildx
50-
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db
56+
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1
5157
with:
5258
install: true
5359

.github/workflows/verify-code-formatting.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,15 @@ jobs:
1212
- name: 'Checkout code'
1313
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
1414

15+
- name: Use Node.js LTS (20.x)
16+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
17+
with:
18+
node-version: 20.x
19+
20+
- name: Enable pnpm
21+
run: |
22+
corepack enable pnpm
23+
corepack pnpm -v
24+
1525
- name: 'Verify formatting of all files'
1626
run: ./bin/check-formatting.sh

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node-linker=hoisted
2+
symlink=false
3+
prefer-symlinked-executables=false

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/*

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 0 additions & 28 deletions
This file was deleted.

.yarn/releases/yarn-3.6.0.cjs

Lines changed: 0 additions & 874 deletions
This file was deleted.

0 commit comments

Comments
 (0)