Skip to content

Commit d4a30cb

Browse files
committed
Merge branch 'master' into sa-vscode
2 parents dbc04b9 + 407cebd commit d4a30cb

Some content is hidden

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

55 files changed

+20766
-14751
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ REACT_APP_DEPLOYMENT_NAME=Source Academy
22

33
REACT_APP_BACKEND_URL=http://localhost:4000
44
REACT_APP_USE_BACKEND=TRUE
5+
REACT_APP_USE_EMPTY_ASSET_PREFIX=FALSE
56
REACT_APP_PLAYGROUND_ONLY=FALSE
67
REACT_APP_SHOW_RESEARCH_PROMPT=FALSE
78

.github/workflows/build-development.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: echo "time=$(date -Iseconds)" >> $GITHUB_OUTPUT
2828
- name: yarn install and build
2929
run: |
30-
yarn install --frozen-lockfile
30+
yarn install --immutable
3131
yarn run build
3232
env:
3333
REACT_APP_URL_SHORTENER_SIGNATURE: ${{ secrets.REACT_APP_URL_SHORTENER_SIGNATURE }}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
node-version: 20
3737
cache: yarn
3838
- name: Install dependencies
39-
run: yarn install --frozen-lockfile
39+
run: yarn install --immutable
4040
- name: Run command
4141
run: yarn run ${{ matrix.commands }}
4242
- name: Coveralls - Upload test coverage report

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,19 @@ yarn-error.log
3434
# emacs backup files
3535

3636
*~
37+
38+
# yarn files
39+
40+
.yarn/*
41+
!.yarn/patches
42+
!.yarn/plugins
43+
!.yarn/releases
44+
!.yarn/sdks
45+
!.yarn/versions
46+
47+
# Swap the comments on the following lines if you wish to use zero-installs
48+
# In that case, don't forget to run `yarn config set enableGlobalCache false`!
49+
# Documentation here: https://yarnpkg.com/features/caching#zero-installs
50+
51+
#!.yarn/cache
52+
.pnp.*

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs v20.18.1

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The Source Academy (<https://sourceacademy.org/>) is an immersive online experie
2626

2727
1. Clone this repository and navigate to it using your command line
2828

29+
1. Install the version of `yarn` as specified in `package.json`, `packageManager`. On macos, you may need to run `corepack enable`.
30+
2931
1. Run `yarn install` to install dependencies.
3032

3133
- If you are on Ubuntu and encounter the error message: `No such file or directory: 'install'`, you might be running the incorrect "yarn" from the cmdtest testing suite instead of the JavaScript package manager of the same name. Refer to this [StackOverflow post](https://stackoverflow.com/questions/46013544/yarn-install-command-error-no-such-file-or-directory-install).

craco.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ const cracoConfig = {
139139
'split-on-first',
140140
'filter-obj',
141141
'@sourceacademy/c-slang',
142-
'java-parser'
142+
'java-parser',
143+
'conductor'
143144
),
144145
'^.+\\.module\\.(css|sass|scss)$'
145146
];

eslint.config.js renamed to eslint.config.mjs

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
// @ts-check
22

3-
// Todo: Use ES module
4-
const eslint = require('@eslint/js');
5-
const tseslint = require('typescript-eslint');
6-
const reactRefresh = require('eslint-plugin-react-refresh');
3+
// import eslint from '@eslint/js';
4+
import { config, configs } from 'typescript-eslint';
5+
import reactPlugin from 'eslint-plugin-react';
6+
import reactHooksPlugin from 'eslint-plugin-react-hooks';
7+
import simpleImportSort from 'eslint-plugin-simple-import-sort'
8+
// import reactRefresh from 'eslint-plugin-react-refresh';
79

8-
const FlatCompat = require('@eslint/eslintrc').FlatCompat;
9-
const compat = new FlatCompat({
10-
baseDirectory: `${__dirname}`
11-
});
12-
13-
module.exports = tseslint.config(
14-
{ ignores: ['eslint.config.js'] },
10+
export default config(
11+
{ ignores: ['eslint.config.mjs'] },
1512
// eslint.configs.recommended,
16-
...tseslint.configs.recommended,
13+
...configs.recommended,
1714
// TODO: Enable when ready
1815
// {
1916
// plugins: {
@@ -23,14 +20,15 @@ module.exports = tseslint.config(
2320
// 'react-refresh/only-export-components': 'warn'
2421
// }
2522
// },
26-
...compat.config({
27-
extends: [
28-
'plugin:react-hooks/recommended'
29-
// "plugin:react/recommended",
30-
// "plugin:react/jsx-runtime"
31-
],
32-
plugins: ['simple-import-sort'],
23+
{
24+
files: ['**/*.ts*'],
25+
plugins: {
26+
'react-hooks': reactHooksPlugin,
27+
'react': reactPlugin,
28+
'simple-import-sort': simpleImportSort
29+
},
3330
rules: {
31+
...reactHooksPlugin.configs['recommended-latest'].rules,
3432
'no-restricted-imports': [
3533
'error',
3634
{
@@ -73,5 +71,5 @@ module.exports = tseslint.config(
7371
],
7472
'simple-import-sort/imports': 'error'
7573
}
76-
})
74+
}
7775
);

package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"private": true,
33
"name": "frontend",
4+
"packageManager": "[email protected]",
45
"version": "1.4.3",
56
"scripts-info": {
67
"analyze": "Analyze bundle size breakdown",
@@ -47,6 +48,7 @@
4748
"array-move": "^4.0.0",
4849
"browserfs": "^1.4.3",
4950
"classnames": "^2.3.2",
51+
"conductor": "https://github.com/source-academy/conductor.git#0.2.0",
5052
"dayjs": "^1.11.13",
5153
"dompurify": "^3.2.4",
5254
"flexboxgrid": "^6.3.1",
@@ -56,15 +58,16 @@
5658
"i18next-browser-languagedetector": "^8.0.0",
5759
"java-slang": "^1.0.13",
5860
"js-cookie": "^3.0.5",
59-
"js-slang": "^1.0.79",
61+
"js-slang": "^1.0.80",
6062
"js-yaml": "^4.1.0",
6163
"konva": "^9.2.0",
64+
"language-directory": "https://github.com/source-academy/language-directory.git",
6265
"lodash": "^4.17.21",
6366
"lz-string": "^1.4.4",
6467
"mdast-util-from-markdown": "^2.0.0",
6568
"mdast-util-to-hast": "^13.0.0",
6669
"normalize.css": "^8.0.1",
67-
"phaser": "^3.55.2",
70+
"phaser": "~3.87.0",
6871
"query-string": "^9.0.0",
6972
"re-resizable": "^6.9.9",
7073
"react": "^18.3.1",
@@ -138,15 +141,16 @@
138141
"cross-env": "^7.0.3",
139142
"eslint": "^9.9.0",
140143
"eslint-plugin-react": "^7.35.0",
141-
"//": "See: https://github.com/facebook/react/issues/28313#issuecomment-2076798972, https://github.com/t3-oss/create-t3-turbo/issues/984#issuecomment-2076413457",
142-
"eslint-plugin-react-hooks": "5.1.0-canary-cb151849e1-20240424",
144+
"eslint-plugin-react-hooks": "^5.2.0",
143145
"eslint-plugin-react-refresh": "^0.4.9",
144146
"eslint-plugin-simple-import-sort": "^12.1.1",
145147
"https-browserify": "^1.0.0",
146148
"husky": "^9.0.0",
147149
"npm-run-all2": "^7.0.0",
148150
"os-browserify": "^0.3.0",
151+
"path": "^0.12.7",
149152
"path-browserify": "^1.0.1",
153+
"phaser3spectorjs": "^0.0.8",
150154
"prettier": "^3.3.3",
151155
"process": "^0.11.10",
152156
"react-error-overlay": "^6.0.11",
@@ -164,7 +168,7 @@
164168
"webpack-bundle-analyzer": "^4.9.0"
165169
},
166170
"resolutions": {
167-
"**/gl": "^8.0.2"
171+
"gl": "^8.0.2"
168172
},
169173
"browserslist": {
170174
"production": [

0 commit comments

Comments
 (0)