Skip to content

Transition to Yarn Workspaces #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 94 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
2d223dc
Rearrange everything into its own git workspace
leeyi45 May 7, 2025
fe8853b
Some more tidying up
leeyi45 May 9, 2025
8ad4331
Refactor all bundles and tabs
leeyi45 May 12, 2025
e6cfbfa
Add moduleslib
leeyi45 May 12, 2025
159790b
Add lint plugin
leeyi45 May 12, 2025
b59f345
modules
leeyi45 May 13, 2025
5275cc0
Added working commands
leeyi45 May 13, 2025
aa889e6
Added templates
leeyi45 May 13, 2025
754a1de
Add more buildtools
leeyi45 May 14, 2025
fad4626
Further work on buildtools
leeyi45 May 14, 2025
0274c12
Working typedoc building
leeyi45 May 15, 2025
58abebd
More work
leeyi45 May 15, 2025
ea46cb7
A working set of commands
leeyi45 May 19, 2025
36958df
Add new commands for tabs and potentially jsdoc for bundles
leeyi45 May 19, 2025
be9c95a
Add manifests
leeyi45 May 19, 2025
ff1941c
Move stuff to a separate lib folder
leeyi45 May 20, 2025
0c23c29
fix lintplugin things
leeyi45 May 22, 2025
4de476e
Some working tests
leeyi45 May 22, 2025
5c6db3d
Use defineTab
leeyi45 May 22, 2025
e2b1043
Add package json to devserver
leeyi45 May 22, 2025
f66eeaf
Migrate to vitest
leeyi45 May 22, 2025
32b4c5f
Migrate to vitest
leeyi45 May 24, 2025
765b4e6
Relocate things
leeyi45 Jun 2, 2025
0ce0e8e
Update test files and add csg patch
leeyi45 Jun 2, 2025
c6d3970
Update root repository items
leeyi45 Jun 2, 2025
1f18c3d
Update eslint config to include configuration names
leeyi45 Jun 11, 2025
96904f7
Update lintplugin
leeyi45 Jun 11, 2025
2fbf028
Update devserver vite configs
leeyi45 Jun 11, 2025
1793e9b
Update tab test configuration
leeyi45 Jun 11, 2025
a3a2c52
Finish creating output formatters and tests
leeyi45 Jun 13, 2025
54a43c5
Add typedoc option to tsconfigs
leeyi45 Jun 13, 2025
a75236e
Misc changes to root repo
leeyi45 Jun 13, 2025
bd91c5e
Remove commented out code that was used only for testing
leeyi45 Jun 13, 2025
d6c722f
Change devserver to resemble a properly installed package
leeyi45 Jun 13, 2025
35674d5
Update modules-lib and lintplugin packages
leeyi45 Jun 13, 2025
f345516
Update testing scripts and github workflow
leeyi45 Jun 14, 2025
4c1832e
Fix incorrect js-slang resolution
leeyi45 Jun 14, 2025
bbfccd4
Update incorrect package export fields
leeyi45 Jun 15, 2025
f63c9b4
Finish implementing build all command and tests
leeyi45 Jun 16, 2025
1b647bb
Move vitest config to JS files so that tsc and eslint stop complaining
leeyi45 Jun 16, 2025
0890958
Update bundle and tab vitest configurations
leeyi45 Jun 16, 2025
5f520ee
Fix testing configurations and update scripts
leeyi45 Jun 18, 2025
d06d11b
Update auxillary repo stuff
leeyi45 Jun 18, 2025
23655ff
Update dependencies to use versions from master branch
leeyi45 Jun 18, 2025
88d2a17
Merge commit '73beb14a7475300e90b06de599b9311d01228fce' into yarn-wor…
leeyi45 Jun 18, 2025
f530275
Add missing newlines
leeyi45 Jun 19, 2025
afc0f81
Fix broken manifest schema not working with VSCode
leeyi45 Jun 19, 2025
bb73309
Add json files to ESLint configuration to enforce eol-last
leeyi45 Jun 19, 2025
fea8adb
Remove yarn constraints check from CI
leeyi45 Jun 19, 2025
3c47ca0
Add skipLibCheck to ignore a type error in js-slang
leeyi45 Jun 19, 2025
064db71
Also add skipLibCheck to libraries
leeyi45 Jun 19, 2025
2b8f05f
Fix broken test commands
leeyi45 Jun 19, 2025
e3aa9b3
Fix tests that were erroring in the CI environment
leeyi45 Jun 19, 2025
c2a1c05
Increase timeout for build:all test
leeyi45 Jun 19, 2025
f2374e4
Circumvent the out of memory error for eslint
leeyi45 Jun 19, 2025
e680c3e
Fix the test command
leeyi45 Jun 19, 2025
aa9632f
Make github action workflows conditional
leeyi45 Jun 19, 2025
a09ebf6
Fix tsc not properly outputting javascript files
leeyi45 Jun 19, 2025
e8ab993
Add new tsc command that automatically filters tests
leeyi45 Jun 20, 2025
284d0a4
Fix missing parameter for runTsc
leeyi45 Jun 20, 2025
7ba95d7
Update test that's timing out
leeyi45 Jun 20, 2025
122c289
Update git hooks
leeyi45 Jun 20, 2025
6617ed7
Add prebuild all command
leeyi45 Jun 20, 2025
5bbe91b
Update husky git hook to use prebuild command
leeyi45 Jun 20, 2025
fa45c91
Fix broken scrabble tests
leeyi45 Jun 20, 2025
81d8a5c
Fix broken CI workflow
leeyi45 Jun 20, 2025
3e02635
Fix the still broken workflow
leeyi45 Jun 20, 2025
6dd3104
Re-add missing preinstall script
leeyi45 Jun 20, 2025
bdd1737
Make workflow build manifest if devserver is required
leeyi45 Jun 20, 2025
5e962c8
Update workflows
leeyi45 Jun 21, 2025
d4bc685
Add a vitepress documentation server for the repository
leeyi45 Jun 21, 2025
0c9152e
Add more documentation
leeyi45 Jun 21, 2025
1e832f4
Change vitepress docs to use vitepress-sidebar
leeyi45 Jun 22, 2025
0a5558a
Begin work on second docs section
leeyi45 Jun 22, 2025
4a6cfc2
Add markdown rules to linting
leeyi45 Jun 22, 2025
3ea31c4
Fix the sidebar ordering
leeyi45 Jun 23, 2025
13f19ae
Fix documentation not being correctly generated for modules-lib
leeyi45 Jun 23, 2025
a373b09
Fix broken tests and installs
leeyi45 Jun 23, 2025
312c0fe
Fix broken tsc test
leeyi45 Jun 23, 2025
25bc826
Change document configurations
leeyi45 Jun 24, 2025
7ea67db
Try to fix devserver tests failing
leeyi45 Jun 24, 2025
412b6b4
Continue to fix broken tests
leeyi45 Jun 24, 2025
6d15145
Add modules-lib as a dependency for devserver
leeyi45 Jun 24, 2025
ec6c043
Continue fixing broken references
leeyi45 Jun 24, 2025
a3cec8e
Fix a broken file name
leeyi45 Jun 24, 2025
621dfc1
Fix more broken tests and add documentation for repo tools
leeyi45 Jun 24, 2025
06cc233
Fix broken test
leeyi45 Jun 25, 2025
def7151
Change the defineTab import
leeyi45 Jun 25, 2025
b113ce3
Fix incorrect snapshots
leeyi45 Jun 25, 2025
d94bca0
Fix weirdness with WebGLCanvas import path name
leeyi45 Jun 25, 2025
20a475b
Please finally fix the issues with the tab exports
leeyi45 Jun 25, 2025
889b31b
guess it was still broken
leeyi45 Jun 25, 2025
9c6fea1
Trying to fix devserver tests this time
leeyi45 Jun 25, 2025
4ff050c
Update configuration for docserver
leeyi45 Jun 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
- name: Use Node.js 💻
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: yarn

- name: Install Dependencies 📦
run: yarn install --immutable

- name: Build Modules 🔧
run: yarn build --tsc --lint
run: yarn workspaces foreach -j 5 -ptW --from "./src/{bundles,tsc}/*" run build --tsc --lint

- name: include java json
run: cp -r src/java build
Expand Down
80 changes: 71 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,44 @@
- master

jobs:
paths-filter:
name: Determine which files have changed
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Filter paths
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
workflows:
- .github/workflows/**
devserver:
- 'devserver/**'
libraries:
- 'lib/**'
modules:
- src/{bundles,tabs}/**
docs:
- docs/**
outputs:
# if the workflow file was modified, then we rerun the entire job
devserver: ${{ steps.filter.outputs.devserver || steps.filter.outputs.workflows }}
# if the devserver needs to be tested bundles and tabs need to bre rebuilt
modules: ${{ steps.filter.outputs.modules || steps.filter.outputs.workflows || steps.filter.outputs.devserver }}
libraries: ${{ steps.filter.outputs.libraries || steps.filter.outputs.workflows }}
docs: ${{ steps.filter.outputs.docs || steps.filter.outputs.workflows }}

test:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Verify all tests pass and build success
runs-on: ubuntu-latest

# execute after the paths-filter job is done
needs: paths-filter
steps:
- name: Check out source code
uses: actions/checkout@v4
Expand All @@ -20,21 +55,48 @@
- name: Use Node.js 💻
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: yarn

- name: Install dependencies
run: yarn install --immutable

- name: Build bundles and tabs
run: yarn build --tsc --lint
- name: Run tsc for libraries
if: needs.paths-filter.outputs.libraries == 'true'
run: yarn workspaces foreach -ptW --from "./lib/*" run tsc

- name: Run lint for libraries
if: needs.paths-filter.outputs.libraries == 'true'
run: yarn eslint lib

- name: Run test for libraries
if: needs.paths-filter.outputs.libraries == 'true'
run: yarn test:libs

- name: Build, lint and run tsc for bundles and tabs
if: needs.paths-filter.outputs.devserver == 'true'
run: yarn workspaces foreach -j 5 -ptW --from "./src/{bundles,tsc}/*" run build --tsc --lint

- name: Test bundles and tabs
run: yarn test --color
if: needs.paths-filter.outputs.modules == 'true'
run: yarn test:modules

- name: Build manifest
if: needs.paths-filter.outputs.devserver == 'true'
run: yarn buildtools build manifest

- name: Build Docs Server
if: needs.paths-filter.outputs.docs == 'true'
run: yarn workspaces foreach -A --include "@sourceacademy/mdoules-docserver" run build

- name: Run tsc for Dev Server
if: needs.paths-filter.outputs.devserver == 'true'
run: yarn tsc:devserver

- name: Test and lint scripts
run: yarn scripts:tsc && yarn scripts:lint && yarn scripts:test --color
- name: Run Lint for Dev Server
if: needs.paths-filter.outputs.devserver == 'true'
run: yarn eslint devserver

- name: Check and Lint Devserver
run: yarn devserver:tsc && yarn devserver:lint

- name: Test Dev Server
if: needs.paths-filter.outputs.devserver == 'true'
run: yarn test:devserver
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
node_modules/
devserver/node_modules
build/*
**/dist/**
coverage/

scripts/dist
.yarn/*
!.yarn/
!.yarn/patches

# Compiled source #
###################
Expand Down
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

7 changes: 6 additions & 1 deletion .husky/pre-push
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
yarn build --lint --tsc
yarn constraints
yarn workspaces foreach -ptR -j 5 --since --include "./src/{bundles,tabs}/*" run buildtools prebuild
yarn workspaces foreach -ptR -j 5 --since --include "./src/{bundles,tabs}/*" run test
yarn workspaces foreach -ptW --since --include "./{lib,devserver}/*" run lint
yarn workspaces foreach -ptW --since --include "./{lib,devserver}/*" run tsc
yarn workspaces foreach -ptW --since --include "./{lib,devserver}/*" run test
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11.1
22.16.0
17 changes: 0 additions & 17 deletions .vscode/launch.json

This file was deleted.

20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"files.insertFinalNewline": true,
"json.schemas": [
{
"fileMatch": ["src/bundles/**/manifest.json"],
"url": "./lib/buildtools/src/build/modules/manifest.schema.json"
},
{
"fileMatch": ["tsconfig.json", "tsconfig.*.json"],
"schema": {
"allOf": [{ "$ref": "http://json.schemastore.org/tsconfig" }],
"properties": {
"typedocOptions": {
"allOf": [{ "$ref": "https://typedoc.org/schema.json" }]
}
}
}
}
]
}
Loading
Loading