chore: simplify build with npm workspaces
Description
- simplified build process with npm workspaces
- updated GH workflows to use new npm scripts
- simplified caching in GH workflows
Notes:
- I suggest that we move the packages into packages/* to fit monorepo convention, however this is a large change, so I have not made it here.
- I notice other utility packages in the packages folder were not being built as a part of the install script, or GH workflow, so have not added them to monorepo, I think they should probably be in there - code owners to clarify.
Checklist
- [x] The base branch of this PR is
dev, rather thanmain - [x] The relevant docs, if any, have been updated or created
Testing
GH workflows were tested with act, however not end-to-end on GH. Please pay particular attention to reviewing these files.
@refactorthis this is really great. I made a couple of updates to get the build working, but am still running into this:
~/D/continue => npm run prepackage -w extensions/vscode
> [email protected] prepackage
> node scripts/prepackage.js
[info] Using target: darwin-arm64
[info] Packaging extension for target darwin-arm64
npm ERR! Cannot read properties of null (reading 'package')
npm ERR! A complete log of this run can be found in: /Users/natesesti/.npm/_logs/2024-09-29T03_29_06_580Z-debug-0.log
Error executing command 'npm install -w extensions/vscode': ,,npm ERR! Cannot read properties of null (reading 'package')
npm ERR! A complete log of this run can be found in: /Users/natesesti/.npm/_logs/2024-09-29T03_29_06_580Z-debug-0.log
npm ERR! Lifecycle script `prepackage` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: [email protected]
npm ERR! at location: /Users/natesesti/Desktop/continue/extensions/vscode
If you could help double check the prepackage.js + prepackage-cross-platform.js files, it's the only remaining blocker to merging
@sestinj - I've made changes to the build scripts. ran as much as I could to verify, can you check if I've missed anything? I haven't run the gradle build - worth double checking that one.
Getting really close! Everything looks fine for me except a few odd type errors that are coming up upon npx tsc inside of extensions/vscode (and so also when starting the debugger). May get to these soon, but as usual if you have the interest that could speed things up