Skip to content

Commit 7497a8c

Browse files
committed
Renew dockerfile, pnpm, and dependencies
1 parent 0171198 commit 7497a8c

5 files changed

Lines changed: 1317 additions & 935 deletions

File tree

Dockerfile

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,15 @@ RUN set -ex; \
99
# curl is required to fetch our webhook from github
1010
# unzip is required for unzipping payloads in development
1111
apt-get install curl unzip jq -y; \
12-
rm -rf /var/lib/apt/lists/*
12+
rm -rf /var/lib/apt/lists/*; \
1313

14-
# add a non-root user to run our code as
15-
RUN adduser --disabled-password --gecos "" appuser
14+
# add a non-root user to run our code as
15+
adduser --disabled-password --gecos "" appuser;
1616

1717
# install our test runner to /opt
1818
WORKDIR /opt/test-runner
1919
COPY . .
2020

21-
# Install pnpm so it will be available read-only
22-
# https://github.com/nodejs/corepack/issues/183#issue-1379672431
23-
# https://github.com/nodejs/corepack/blob/bc13d40037d0b1bfd386e260ae741f55505b5c7c/tests/main.test.ts#L483
24-
RUN mkdir -p /idk/corepack
25-
ENV COREPACK_HOME=/idk/corepack
26-
2721
RUN set -ex; \
2822
corepack enable pnpm; \
2923
# corepack pack -o ./corepack.tgz; \
@@ -35,23 +29,23 @@ RUN set -ex; \
3529
#
3630
# https://github.com/nodejs/corepack/issues/414#issuecomment-2096218732
3731
# https://github.com/nodejs/corepack/blob/bc13d40037d0b1bfd386e260ae741f55505b5c7c/sources/folderUtils.ts#L26-L31
38-
chmod 444 /idk/corepack/lastKnownGood.json; \
39-
chmod 555 /idk/corepack;
32+
chmod 444 /root/.cache/node/corepack/lastKnownGood.json; \
33+
chmod 555 /root/.cache/node/corepack/corepack; \
4034

41-
# Build the test runner
42-
RUN set -ex; \
35+
# Build the test runner
36+
# RUN set -ex; \
4337
# install all the development modules (used for building)
4438
# corepack pnpm store prune; \
4539
corepack pnpm install; \
4640
corepack pnpm build; \
4741
corepack pnpm prune --prod;
4842

4943
# Disable network for corepack
50-
ENV COREPACK_ENABLE_NETWORK=0
51-
ENV COREPACK_ENABLE_STRICT=0
44+
ENV COREPACK_ENABLE_NETWORK=0 \
45+
COREPACK_ENABLE_STRICT=0 \
5246

53-
# Mark this as a docker run so we don't try to execute things in /tmp
54-
ENV TMP_MAY_BE_NON_EXEC=1
47+
# Mark this as a docker run so we don't try to execute things in /tmp
48+
TMP_MAY_BE_NON_EXEC=1;
5549

5650
# Execute everything as the appuser
5751
USER appuser

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is only used by jest.runner.config.js, when running the
22
// test-runner. The tool itself uses typescript's compilation instead.
33
module.exports = {
4-
presets: [['@exercism/babel-preset-javascript', { corejs: '3.38' }]],
4+
presets: [['@exercism/babel-preset-javascript', { corejs: '3.44' }]],
55
plugins: [],
66
}

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@exercism/javascript-test-runner",
33
"description": "Automated Test runner for exercism solutions in Javascript.",
44
"author": "Derk-Jan Karrenbeld <derk-jan+github@karrenbeld.info>",
5-
"version": "5.0.0",
5+
"version": "5.1.0",
66
"license": "AGPL-3.0-or-later",
77
"repository": {
88
"type": "git",
@@ -27,30 +27,30 @@
2727
"test:bare": "corepack pnpm node test/smoke.test.mjs && corepack pnpm node test/skip.test.mjs && corepack pnpm node test/log.test.mjs && corepack pnpm node test/taskid.test.mjs"
2828
},
2929
"dependencies": {
30-
"@exercism/babel-preset-javascript": "^0.5.0",
30+
"@exercism/babel-preset-javascript": "^0.6.0",
3131
"@exercism/static-analysis": "^0.14.0",
3232
"@jest/console": "^29.7.0",
3333
"@jest/reporters": "^29.7.0",
3434
"@jest/test-result": "^29.7.0",
3535
"@jest/types": "^29.6.3",
36-
"@typescript-eslint/typescript-estree": "^8.0.1",
37-
"@typescript-eslint/visitor-keys": "^8.0.1",
36+
"@typescript-eslint/typescript-estree": "^8.37.0",
37+
"@typescript-eslint/visitor-keys": "^8.37.0",
3838
"babel-jest": "^29.7.0",
39-
"chalk": "^5.3.0",
40-
"core-js": "^3.38.0",
39+
"chalk": "^5.4.1",
40+
"core-js": "^3.44.0",
4141
"jest": "^29.7.0",
4242
"shelljs": "^0.10.0"
4343
},
4444
"devDependencies": {
45-
"@exercism/eslint-config-tooling": "^0.6.0",
45+
"@exercism/eslint-config-tooling": "^0.9.0",
4646
"@jest/globals": "^29.7.0",
47-
"@tsconfig/node20": "^20.1.4",
48-
"@types/node": "^22.1.0",
49-
"@types/shelljs": "^0.8.15",
50-
"eslint": "^9.8.0",
51-
"prettier": "^3.3.3",
47+
"@tsconfig/node22": "^22.0.2",
48+
"@types/node": "^22.16.5",
49+
"@types/shelljs": "^0.8.17",
50+
"eslint": "^9.31.0",
51+
"prettier": "^3.6.2",
5252
"rimraf": "^6.0.1",
53-
"typescript": "~5.8.3"
53+
"typescript": "~5.7.3"
5454
},
55-
"packageManager": "pnpm@9.7.0+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf"
55+
"packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
5656
}

0 commit comments

Comments
 (0)