Skip to content

Commit 3577fe4

Browse files
committed
Merge branch 'master' into language-options
2 parents 3f1a2c2 + 20fd8d1 commit 3577fe4

File tree

407 files changed

+21399
-18720
lines changed

Some content is hidden

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

407 files changed

+21399
-18720
lines changed

.github/workflows/build-development.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,30 @@ on:
33
push:
44
branches:
55
- master
6+
workflow_dispatch:
7+
inputs:
8+
ref:
9+
description: Branch/Tag/SHA to checkout
10+
required: true
11+
default: master
612

713
jobs:
814
deploy:
915
name: Build and deploy sourceacademy.org
1016
runs-on: ubuntu-latest
1117
steps:
1218
- name: Checkout repository
13-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
20+
with:
21+
ref: ${{ github.event.inputs.ref }}
1422
# Has to be run before actions/setup-node.
1523
# See: https://github.com/actions/setup-node/issues/480
1624
- name: Enable corepack for Yarn
1725
run: corepack enable
1826
- name: Setup node
19-
uses: actions/setup-node@v4
27+
uses: actions/setup-node@v6
2028
with:
21-
node-version: 20
29+
node-version: 22
2230
cache: yarn
2331
- name: Setup Sentry CLI
2432
run: |

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ env:
1515
concurrency:
1616
group: ${{ github.workflow }}-${{ github.ref }}
1717
cancel-in-progress: true
18-
18+
1919
jobs:
2020
lint:
2121
if: github.event.pull_request.draft == false
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
commands: [tsc, 'format:ci', eslint, build, test, test-coveralls]
25+
commands: [tsc, 'format:ci', eslint, build, 'test --bail=1', test-coveralls]
2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
# Has to be run before actions/setup-node.
3030
# See: https://github.com/actions/setup-node/issues/480
3131
- name: Enable corepack for Yarn
3232
run: corepack enable
3333
- name: Setup node
34-
uses: actions/setup-node@v4
34+
uses: actions/setup-node@v6
3535
with:
36-
node-version: 20
36+
node-version: 22
3737
cache: yarn
3838
- name: Install dependencies
3939
run: yarn install --immutable
@@ -43,5 +43,5 @@ jobs:
4343
if: matrix.commands == 'test-coveralls'
4444
uses: coverallsapp/github-action@master
4545
with:
46-
path-to-lcov: lcov.info
46+
path-to-lcov: coverage/lcov.info
4747
github-token: ${{ secrets.GITHUB_TOKEN }}

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.9.0
1+
22.17.0

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"singleQuote": true,
44
"printWidth": 100,
55
"arrowParens": "avoid",
6-
"trailingComma": "none"
6+
"trailingComma": "none",
7+
"endOfLine": "auto"
78
}

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ To start contributing, create a fork from our repo and send a PR. Refer to [this
1616

1717
The frontend comes with an extensive test suite. To run the tests after you made your modifications, run
1818
`yarn test`. Regression tests are run automatically when you want to push changes to this repository.
19-
The regression tests are generated using `jest` and stored as snapshots in `src/\_\_tests\_\_`. After modifying the frontend, carefully inspect any failing regression tests reported in red in the command line. If you are convinced that the regression tests and not your changes are at fault, you can update the regression tests by running:
19+
The regression tests are generated using `vitest` and stored as snapshots in `src/\_\_tests\_\_`. After modifying the frontend, carefully inspect any failing regression tests reported in red in the command line. If you are convinced that the regression tests and not your changes are at fault, you can update the regression tests by running:
2020

2121
```bash
22-
yarn test --updateSnapshot
22+
yarn test --update
2323
```
2424

2525
## Manually testing the frontend

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The Source Academy (<https://sourceacademy.org/>) is an immersive online experie
2424

2525
1. Clone this repository and navigate to it using your command line
2626

27-
1. Install the version of `yarn` as specified in `package.json`, `packageManager`.
27+
1. Install the version of `yarn` as specified in `package.json`, `packageManager`.
2828

2929
> We recommend using `corepack` to manage the version of `yarn`, you may simply run `corepack enable` to complete this step.
3030

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
theme: jekyll-theme-cayman
1+
theme: jekyll-theme-cayman

craco.config.js

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

eslint.config.mjs

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
// @ts-check
22

3-
// import eslint from '@eslint/js';
4-
import { config, configs } from 'typescript-eslint';
3+
import eslint from '@eslint/js';
54
import reactPlugin from 'eslint-plugin-react';
65
import reactHooksPlugin from 'eslint-plugin-react-hooks';
7-
import simpleImportSort from 'eslint-plugin-simple-import-sort'
8-
// import reactRefresh from 'eslint-plugin-react-refresh';
6+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
7+
import tseslint from 'typescript-eslint';
8+
import reactRefresh from 'eslint-plugin-react-refresh';
99

10-
export default config(
11-
{ ignores: ['eslint.config.mjs'] },
12-
// eslint.configs.recommended,
13-
...configs.recommended,
10+
export default tseslint.config(
11+
{ ignores: ['eslint.config.mjs', '**/*.snap'] },
12+
eslint.configs.recommended,
13+
tseslint.configs.recommended,
1414
// TODO: Enable when ready
15-
// {
16-
// plugins: {
17-
// 'react-refresh': reactRefresh
18-
// },
19-
// rules: {
20-
// 'react-refresh/only-export-components': 'warn'
21-
// }
22-
// },
15+
{
16+
plugins: {
17+
'react-refresh': reactRefresh
18+
},
19+
rules: {
20+
'react-refresh/only-export-components': 'warn'
21+
}
22+
},
2323
{
2424
files: ['**/*.ts*'],
2525
plugins: {
2626
'react-hooks': reactHooksPlugin,
27-
'react': reactPlugin,
27+
react: reactPlugin,
2828
'simple-import-sort': simpleImportSort
2929
},
3030
rules: {
3131
...reactHooksPlugin.configs['recommended-latest'].rules,
32+
'no-empty': 'warn',
3233
'no-restricted-imports': [
3334
'error',
3435
{

0 commit comments

Comments
 (0)