Skip to content

Commit f3ea9ee

Browse files
Merge branch 'main' into main
2 parents edf2e6c + 63b3d60 commit f3ea9ee

File tree

1,454 files changed

+41875
-18495
lines changed

Some content is hidden

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

1,454 files changed

+41875
-18495
lines changed

.eslintignore

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

.eslintrc

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

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ updates:
55
- package-ecosystem: 'github-actions'
66
directory: '/'
77
schedule:
8-
interval: 'daily'
8+
interval: 'monthly'
99
labels:
1010
- 'dependencies :arrow_up_small:'
1111
- 'github_actions'
@@ -17,7 +17,7 @@ updates:
1717
directory: '/'
1818
# Check the npm registry for updates every day (weekdays)
1919
schedule:
20-
interval: 'daily'
20+
interval: 'monthly'
2121
labels:
2222
- 'dependencies :arrow_up_small:'
2323
- 'javascript'

.github/workflows/action-format.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- name: 'Post acknowledgement that it will format code'
1414
continue-on-error: true # Never fail the build if this fails
15-
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
15+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
1616
with:
1717
github-token: ${{ secrets.GITHUB_TOKEN }}
1818
script: |
@@ -60,12 +60,18 @@ 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@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
63+
- name: Enable corepack to fix https://github.com/actions/setup-node/pull/901
64+
run: corepack enable pnpm
65+
66+
- name: Use Node.js LTS (22.x)
67+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
6568
with:
66-
node-version: '18'
69+
node-version: 22.x
70+
cache: 'pnpm'
71+
6772
- name: Install project development dependencies
68-
run: npm install --no-save
73+
run: corepack pnpm install --no-save
74+
6975
- name: 'Format code'
7076
run: ./bin/format.sh
7177

@@ -88,7 +94,7 @@ jobs:
8894
8995
- name: 'Post acknowledgement that it has formatted the code'
9096
continue-on-error: true # Never fail the build if this fails
91-
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
97+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
9298
with:
9399
github-token: ${{ secrets.GITHUB_TOKEN }}
94100
script: |
@@ -102,7 +108,7 @@ jobs:
102108
- name: 'Post reminder to trigger build manually'
103109
continue-on-error: true # Never fail the build if this fails
104110
if: steps.fork_status.outputs.fork == 'true'
105-
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
111+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
106112
with:
107113
github-token: ${{ secrets.GITHUB_TOKEN }}
108114
script: |

.github/workflows/action-sync.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- name: 'Post acknowledgement that it will sync exercises'
1414
continue-on-error: true # Never fail the build if this fails
15-
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
15+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
1616
with:
1717
github-token: ${{ secrets.GITHUB_TOKEN }}
1818
script: |
@@ -61,9 +61,11 @@ jobs:
6161
git checkout -b "$HEAD_REF" "origin/$HEAD_REF"
6262
6363
- name: 'Install dependencies'
64-
run: yarn install
64+
run: |
65+
corepack enable pnpm
66+
corepack pnpm install
6567
- name: 'Sync exercises'
66-
run: npx babel-node scripts/sync
68+
run: corepack pnpm node scripts/sync.mjs
6769

6870
- name: 'Commit changes'
6971
run: |
@@ -84,7 +86,7 @@ jobs:
8486
8587
- name: 'Post acknowledgement that it has synced the code'
8688
continue-on-error: true # Never fail the build if this fails
87-
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
89+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
8890
with:
8991
github-token: ${{ secrets.GITHUB_TOKEN }}
9092
script: |
@@ -98,7 +100,7 @@ jobs:
98100
- name: 'Post reminder to trigger build manually'
99101
continue-on-error: true # Never fail the build if this fails
100102
if: steps.fork_status.outputs.fork == 'true'
101-
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
103+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
102104
with:
103105
github-token: ${{ secrets.GITHUB_TOKEN }}
104106
script: |

.github/workflows/ci.js.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,42 @@ jobs:
1212
runs-on: ubuntu-22.04
1313

1414
steps:
15-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
16-
- name: Use Node.js LTS (18.x)
17-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
16+
- name: Enable corepack to fix https://github.com/actions/setup-node/pull/901
17+
run: corepack enable pnpm
18+
19+
- name: Use Node.js LTS (22.x)
20+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
1821
with:
19-
node-version: '18'
22+
node-version: 22.x
23+
cache: 'pnpm'
2024

2125
- name: Install project dependencies
22-
run: npm ci
26+
run: corepack pnpm install --frozen-lockfile
2327

2428
- name: Run exercism/javascript ci precheck (checks config, lint code, and runs tests) for all exercises
25-
run: npx babel-node scripts/ci-check
29+
run: corepack pnpm node scripts/ci-check.mjs
2630

2731
ci:
2832
runs-on: ubuntu-22.04
2933

3034
strategy:
3135
matrix:
32-
node-version: ['18', '20']
36+
node-version: [22.x]
3337

3438
steps:
35-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
39+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
40+
- name: Enable corepack to fix https://github.com/actions/setup-node/pull/901
41+
run: corepack enable pnpm
42+
3643
- name: Use Node.js ${{ matrix.node-version }}
37-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
44+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
3845
with:
3946
node-version: ${{ matrix.node-version }}
47+
cache: 'pnpm'
4048

4149
- name: Install project dependencies
42-
run: npm ci
50+
run: corepack pnpm install --frozen-lockfile
4351

4452
- name: Run exercism/javascript ci (checks config, lint code, and runs tests) for all exercises
45-
run: npx babel-node scripts/ci
53+
run: corepack pnpm node scripts/ci.mjs

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
32+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@v2
36+
uses: github/codeql-action/init@v3
3737
with:
3838
languages: ${{ matrix.language }}
3939
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
4444
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4545
# If this step fails, then you should remove it and run the build manually (see below)
4646
- name: Autobuild
47-
uses: github/codeql-action/autobuild@v2
47+
uses: github/codeql-action/autobuild@v3
4848

4949
# ℹ️ Command-line programs to run using the OS shell.
5050
# 📚 https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
5858
# make release
5959

6060
- name: Perform CodeQL Analysis
61-
uses: github/codeql-action/analyze@v2
61+
uses: github/codeql-action/analyze@v3
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: No important files changed
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
branches: [main]
7+
paths:
8+
- "exercises/concept/**"
9+
- "exercises/practice/**"
10+
- "!exercises/*/*/.approaches/**"
11+
- "!exercises/*/*/.articles/**"
12+
- "!exercises/*/*/.docs/**"
13+
- "!exercises/*/*/.meta/**"
14+
15+
permissions:
16+
pull-requests: write
17+
18+
jobs:
19+
check:
20+
uses: exercism/github-actions/.github/workflows/check-no-important-files-changed.yml@main
21+
with:
22+
repository: ${{ github.event.pull_request.head.repo.owner.login }}/${{ github.event.pull_request.head.repo.name }}
23+
ref: ${{ github.head_ref }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Ping cross-track maintainers team
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
8+
permissions:
9+
pull-requests: write
10+
11+
jobs:
12+
ping:
13+
if: github.repository_owner == 'exercism' # Stops this job from running on forks
14+
uses: exercism/github-actions/.github/workflows/ping-cross-track-maintainers-team.yml@main
15+
secrets:
16+
github_membership_token: ${{ secrets.COMMUNITY_CONTRIBUTIONS_WORKFLOW_TOKEN }}

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

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,67 @@ jobs:
1111

1212
steps:
1313
- name: Checkout PR
14-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
15+
with:
16+
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
17+
18+
- name: Get changed files
19+
id: changed-files
20+
run: |
21+
if ${{ github.event_name == 'pull_request' }}; then
22+
echo "changed_files=$(git diff --name-only --diff-filter=ACM -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
23+
else
24+
echo "changed_files=$(git diff --name-only --diff-filter=ACM ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
25+
fi
1526
16-
- name: Use Node.js LTS (18.x)
17-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
27+
- name: Enable corepack to fix https://github.com/actions/setup-node/pull/901
28+
run: corepack enable pnpm
29+
30+
- name: Use Node.js LTS (22.x)
31+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
1832
with:
19-
node-version: '18'
33+
node-version: 22.x
34+
cache: 'pnpm'
2035

2136
- name: Install project dependencies
22-
run: npm ci
37+
run: corepack pnpm install --frozen-lockfile
2338

2439
- name: Run exercism/javascript ci precheck (stub files, config integrity) for changed exercises
25-
run: |
26-
PULL_REQUEST_URL=$(jq -r ".pull_request.url" "$GITHUB_EVENT_PATH")
27-
curl --url $"${PULL_REQUEST_URL}/files?per_page=100" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | \
28-
jq -c '.[] | select(.status == "added" or .status == "modified") | select(.filename | match("\\.(js|jsx|md|json)$")) | .filename' | \
29-
xargs -r npx babel-node scripts/pr-check
40+
run: corepack pnpm node scripts/pr.mjs ${{ steps.changed-files.outputs.changed_files }}
3041

3142
ci:
3243
runs-on: ubuntu-22.04
3344

3445
strategy:
3546
matrix:
36-
node-version: ['18', '20']
47+
node-version: [22.x]
3748

3849
steps:
3950
- name: Checkout PR
40-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
51+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
52+
with:
53+
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
54+
55+
- name: Get changed files
56+
id: changed-files
57+
run: |
58+
if ${{ github.event_name == 'pull_request' }}; then
59+
echo "changed_files=$(git diff --name-only --diff-filter=ACM -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
60+
else
61+
echo "changed_files=$(git diff --name-only --diff-filter=ACM ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
62+
fi
63+
64+
- name: Enable corepack to fix https://github.com/actions/setup-node/pull/901
65+
run: corepack enable pnpm
4166

4267
- name: Use Node.js ${{ matrix.node-version }}
43-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
68+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
4469
with:
4570
node-version: ${{ matrix.node-version }}
71+
cache: 'pnpm'
4672

4773
- name: Install project dependencies
48-
run: npm ci
74+
run: corepack pnpm install --frozen-lockfile
4975

5076
- name: Run exercism/javascript ci (runs tests) for changed/added exercises
51-
run: |
52-
PULL_REQUEST_URL=$(jq -r ".pull_request.url" "$GITHUB_EVENT_PATH")
53-
curl --url $"${PULL_REQUEST_URL}/files?per_page=100" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | \
54-
jq -c '.[] | select(.status == "added" or .status == "modified") | select(.filename | match("\\.(js|jsx|md|json)$")) | .filename' | \
55-
xargs -r npx babel-node scripts/pr
77+
run: corepack pnpm node scripts/pr.mjs ${{ steps.changed-files.outputs.changed_files }}

0 commit comments

Comments
 (0)