chore: Convert newIDE to npm workspaces monorepo#8272
chore: Convert newIDE to npm workspaces monorepo#8272malec-palec wants to merge 10 commits into4ian:masterfrom
Conversation
…t scripts, make single script to start electron app
…repo # Conflicts: # newIDE/app/package-lock.json # newIDE/app/package.json
4ian
left a comment
There was a problem hiding this comment.
Added a few comments/questions.
In addition, could you also regenerate then commit the package-lock.json? As we will want to have them in.
We might need a bit of trial and error then to make sure the CIs are passing.
| @@ -117,12 +111,11 @@ | |||
| } | |||
| }, | |||
| "scripts": { | |||
There was a problem hiding this comment.
Would you be able to look at .semaphore/semaphore.yml as well as .circleci/config.yml and .travis.yml and adapt the npm install(s)?
I will need to push then your commit to a special branch name to trigger experimental builds so all the CIs are run, but having at least the updates according to what you think is needed in these files would help.
There was a problem hiding this comment.
I updated all CI configs to use cd newIDE && npm install instead of cd newIDE/app && npm install:
- .semaphore/semaphore.yml - updated cache keys (v2 → v3), cache paths (
newIDE/app/node_modules→newIDE/node_modules), install commands, and removed redundantnpm run postinstallcalls (it runs automatically now). - .circleci/config.yml - updated all 3 build jobs (macOS, Linux, Windows): cache keys, paths, and install commands. Removed the per-package Remove-Item package-lock.json workaround in the Windows build.
- .travis.yml - updated install step to
cd newIDE && npm install.
newIDE/electron-app/scripts/build.js
Outdated
| if (!shell.test('-f', './node_modules/.bin/electron-builder')) { | ||
| shell.echo('⚠️ Please run npm install in electron-app folder'); | ||
| const electronBuilderBin = path.join( | ||
| __dirname, |
There was a problem hiding this comment.
I'm a bit surprised about why we run electron-builder from '../..' (i.e: newIDE), despite "electron-builder" being in the package.json of newIDE/electron-app (as it should be - it's of no use for the web-app).
There was a problem hiding this comment.
I fixed electron-builder resolution in build.js and app-build.js - replaced hardcoded ../../node_modules/.bin/electron-builder path with npx electron-builder, which resolves correctly regardless of hoisting.
…ve Quick Install section
Sure, I’ve committed the updated |
|
I'm getting these issues @malec-palec when I do Same if I start from "newIDE/app" only: (create-react-app is a bit of a pain, and we could probably migrate one day to Vite to have faster development builds, but that's for another day :)) I've removed node_modules in electron-app and app to be sure I started from a good state, but it seems not to help. Any idea, did I miss something? |
|
Well, I expected this to be painful 🙂 I'll find a way to check on macOS, meanwhile - did you do anything specific with the translations? |
It was going too smoothly to be true :)
Not launched anything related to them. I got the error also on other files like OptionalRequire and others, so I think it's fairly generic and not translation related. I will launch experimental builds to get the CI to build a full version using this branch. |
|
Done, I just pushed the latest commit of this branch to branch |
|
@4ian, please, recheck - all issues should be solved now. |



Restructure
newIDEinto a pure npm workspaces monorepo with three packages:@gdevelop/app@gdevelop/electron-app@gdevelop/web-appChanges
newIDE/package.jsonwith workspaces config and shared scriptsnode_modulesaxiosto1.13.5in all packageshuskyandlint-stagedto the monorepo root and update pre-commit hookpostinstallto the root (usenpm run import-resources -w app)startscript usingconcurrently+wait-on(Electron waits for
http://localhost:3000)"engines": { "yarn": "please-use-npm" }package-lock.json)