Skip to content

Commit 9f35761

Browse files
authored
Merge branch 'exercism:main' into main
2 parents c45f0ff + 95ee3a4 commit 9f35761

File tree

486 files changed

+4866
-3401
lines changed

Some content is hidden

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

486 files changed

+4866
-3401
lines changed

.github/workflows/action-format.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ 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@d556feaca394842dc55e4734bf3bb9f685482fa0
15+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
1616
with:
1717
github-token: ${{ secrets.GITHUB_TOKEN }}
1818
script: |
19-
github.issues.createComment({
19+
github.rest.issues.createComment({
2020
issue_number: context.issue.number,
2121
owner: context.repo.owner,
2222
repo: context.repo.repo,
@@ -34,7 +34,7 @@ jobs:
3434
id: fork_status
3535
run: |
3636
IS_FORK="$(jq '.head.repo.fork' "/tmp/pr.json")"
37-
echo "::set-output name=fork::$IS_FORK"
37+
echo "fork=$IS_FORK" >> "$GITHUB_OUTPUT"
3838
3939
- name: 'Setup SSH deploy key'
4040
if: steps.fork_status.outputs.fork == 'false'
@@ -60,10 +60,10 @@ jobs:
6060
git clone $HEAD_REPO .
6161
git checkout -b "$HEAD_REF" "origin/$HEAD_REF"
6262
63-
- name: Use Node.js LTS (16.x)
64-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
63+
- name: Use Node.js LTS (18.x)
64+
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
6565
with:
66-
node-version: '16'
66+
node-version: '18'
6767
- name: Install project development dependencies
6868
run: npm install --no-save
6969
- name: 'Format code'
@@ -88,11 +88,11 @@ jobs:
8888
8989
- name: 'Post acknowledgement that it has formatted the code'
9090
continue-on-error: true # Never fail the build if this fails
91-
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
91+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
9292
with:
9393
github-token: ${{ secrets.GITHUB_TOKEN }}
9494
script: |
95-
github.issues.createComment({
95+
github.rest.issues.createComment({
9696
issue_number: context.issue.number,
9797
owner: context.repo.owner,
9898
repo: context.repo.repo,
@@ -102,11 +102,11 @@ jobs:
102102
- name: 'Post reminder to trigger build manually'
103103
continue-on-error: true # Never fail the build if this fails
104104
if: steps.fork_status.outputs.fork == 'true'
105-
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
105+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
106106
with:
107107
github-token: ${{ secrets.GITHUB_TOKEN }}
108108
script: |
109-
github.issues.createComment({
109+
github.rest.issues.createComment({
110110
issue_number: context.issue.number,
111111
owner: context.repo.owner,
112112
repo: context.repo.repo,

.github/workflows/action-sync.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ 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@d556feaca394842dc55e4734bf3bb9f685482fa0
15+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
1616
with:
1717
github-token: ${{ secrets.GITHUB_TOKEN }}
1818
script: |
19-
github.issues.createComment({
19+
github.rest.issues.createComment({
2020
issue_number: context.issue.number,
2121
owner: context.repo.owner,
2222
repo: context.repo.repo,
@@ -34,7 +34,7 @@ jobs:
3434
id: fork_status
3535
run: |
3636
IS_FORK="$(jq '.head.repo.fork' "/tmp/pr.json")"
37-
echo "::set-output name=fork::$IS_FORK"
37+
echo "fork=$IS_FORK" >> "$GITHUB_OUTPUT"
3838
3939
- name: 'Setup SSH deploy key'
4040
if: steps.fork_status.outputs.fork == 'false'
@@ -84,11 +84,11 @@ jobs:
8484
8585
- name: 'Post acknowledgement that it has synced the code'
8686
continue-on-error: true # Never fail the build if this fails
87-
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
87+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
8888
with:
8989
github-token: ${{ secrets.GITHUB_TOKEN }}
9090
script: |
91-
github.issues.createComment({
91+
github.rest.issues.createComment({
9292
issue_number: context.issue.number,
9393
owner: context.repo.owner,
9494
repo: context.repo.repo,
@@ -98,11 +98,11 @@ jobs:
9898
- name: 'Post reminder to trigger build manually'
9999
continue-on-error: true # Never fail the build if this fails
100100
if: steps.fork_status.outputs.fork == 'true'
101-
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
101+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
102102
with:
103103
github-token: ${{ secrets.GITHUB_TOKEN }}
104104
script: |
105-
github.issues.createComment({
105+
github.rest.issues.createComment({
106106
issue_number: context.issue.number,
107107
owner: context.repo.owner,
108108
repo: context.repo.repo,

.github/workflows/ci.js.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
16-
- name: Use Node.js LTS (16.x)
17-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
15+
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
16+
- name: Use Node.js LTS (18.x)
17+
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
1818
with:
19-
node-version: '16'
19+
node-version: '18'
2020

2121
- name: Install project dependencies
2222
run: npm ci
@@ -29,12 +29,12 @@ jobs:
2929

3030
strategy:
3131
matrix:
32-
node-version: ['16', '17', '18']
32+
node-version: ['18', '20']
3333

3434
steps:
35-
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
35+
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
3636
- name: Use Node.js ${{ matrix.node-version }}
37-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
37+
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
3838
with:
3939
node-version: ${{ matrix.node-version }}
4040

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
32+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111

1212
steps:
1313
- name: Checkout PR
14-
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
14+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
1515

16-
- name: Use Node.js LTS (16.x)
17-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
16+
- name: Use Node.js LTS (18.x)
17+
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
1818
with:
19-
node-version: '16'
19+
node-version: '18'
2020

2121
- name: Install project dependencies
2222
run: npm ci
@@ -33,14 +33,14 @@ jobs:
3333

3434
strategy:
3535
matrix:
36-
node-version: ['16', '17', '18']
36+
node-version: ['18', '20']
3737

3838
steps:
3939
- name: Checkout PR
40-
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
40+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
4141

4242
- name: Use Node.js ${{ matrix.node-version }}
43-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
43+
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
4444
with:
4545
node-version: ${{ matrix.node-version }}
4646

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: 'Checkout code'
13-
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
14-
- name: Use Node.js LTS (16.x)
15-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
13+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
14+
- name: Use Node.js LTS (18.x)
15+
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
1616
with:
17-
node-version: '16'
17+
node-version: '18'
1818
- name: Install project development dependencies
1919
run: npm i
2020
- name: 'Verify formatting of all files'

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ LICENSE
99

1010
# These are formatted via configlet and will not match prettier
1111
exercises/**/.meta/config.json
12+
exercises/**/.approaches/config.json

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
[![configlet](https://github.com/exercism/javascript/workflows/configlet/badge.svg)](https://github.com/exercism/javascript/actions?query=workflow%3Aconfiglet) [![javascript / main](https://github.com/exercism/javascript/workflows/javascript%20/%20main/badge.svg)](https://github.com/exercism/javascript/actions?query=workflow%3A%22javascript+%2F+main%22)
44

5+
⚠️ We 💙 our community but **this repository does not accept community contributions at this time**.
6+
There are no active maintainers to review PRs.
7+
Please read this [community blog post][freeing-maintainers] for details. ⚠️
8+
59
**Exercism exercises in JavaScript**
610

711
This is the JavaScript track, one of the many tracks on [Exercism][web-exercism].
@@ -93,3 +97,4 @@ A lot of the improvements made to this track and tooling are also made to the Ty
9397
[git-typescript-representer]: https://github.com/exercism/typescript-representer
9498
[git-typescript-test-runner]: https://github.com/exercism/typescript-test-runner
9599
[git-website-copy]: https://github.com/exercism/website-copy
100+
[freeing-maintainers]: https://exercism.org/blog/freeing-our-maintainers

concepts/array-transformations/about.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ arr.reduce(
6161

6262
return accumulator;
6363
},
64-
{ even: [], odd: [] }
64+
{ even: [], odd: [] },
6565
);
6666
// => { even: [2, 4], odd: [1, 3] }
6767
```
@@ -81,7 +81,7 @@ This method modifies the array it is called on.
8181

8282
### slice (pure)
8383

84-
Given a start and an end index, creates a sub-array from the array passed as a parameter.
84+
Given a start and an end index, creates a sub-array from the array it is called on.
8585

8686
The element at the end index will not be included.
8787
Also, all parameters are optional:

concepts/array-transformations/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ arr.reduce(
6161

6262
return accumulator;
6363
},
64-
{ even: [], odd: [] }
64+
{ even: [], odd: [] },
6565
);
6666
// => { even: [2, 4], odd: [1, 3] }
6767
```
@@ -81,7 +81,7 @@ This method modifies the array it is called on.
8181

8282
### slice (pure)
8383

84-
Given a start and an end index, creates a sub-array from the array passed as a parameter.
84+
Given a start and an end index, creates a sub-array from the array it is called on.
8585

8686
The element at the end index will not be included.
8787
Also, all parameters are optional:

0 commit comments

Comments
 (0)