Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 16 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
# GDevelop.js dependencies
- restore_cache:
keys:
- gd-macos-nodejs-dependencies-v2-{{ checksum "newIDE/app/package.json" }}-{{ checksum "newIDE/electron-app/package.json" }}-{{ checksum "GDevelop.js/package.json" }}-{{ checksum "GDJS/package-lock.json" }}
- gd-macos-nodejs-dependencies-v3-{{ checksum "newIDE/package-lock.json" }}-{{ checksum "GDevelop.js/package.json" }}-{{ checksum "GDJS/package-lock.json" }}
# fallback to using the latest cache if no exact match is found
- gd-macos-nodejs-dependencies-v2-
- gd-macos-nodejs-dependencies-v3-

- run:
name: Install GDevelop.js dependencies
Expand All @@ -63,15 +63,14 @@ jobs:
# GDevelop IDE dependencies (after building GDevelop.js to avoid downloading a pre-built version)
- run:
name: Install GDevelop IDE dependencies
command: cd newIDE/app && npm install && cd ../electron-app && npm install
command: cd newIDE && npm install

- save_cache:
paths:
- newIDE/electron-app/node_modules
- newIDE/app/node_modules
- newIDE/node_modules
- GDevelop.js/node_modules
- GDJS/node_modules
key: gd-macos-nodejs-dependencies-v2-{{ checksum "newIDE/app/package.json" }}-{{ checksum "newIDE/electron-app/package.json" }}-{{ checksum "GDevelop.js/package.json" }}-{{ checksum "GDJS/package-lock.json" }}
key: gd-macos-nodejs-dependencies-v3-{{ checksum "newIDE/package-lock.json" }}-{{ checksum "GDevelop.js/package.json" }}-{{ checksum "GDJS/package-lock.json" }}

# Build GDevelop IDE (seems like we need to allow Node.js to use more space than usual)
# Note: Code signing is done using CSC_LINK (see https://www.electron.build/code-signing).
Expand Down Expand Up @@ -141,22 +140,21 @@ jobs:

- restore_cache:
keys:
- gd-linux-nodejs-dependencies-v2-{{ checksum "newIDE/app/package.json" }}-{{ checksum "newIDE/electron-app/package.json" }}-{{ checksum "GDevelop.js/package.json" }}-{{ checksum "GDJS/package-lock.json" }}
- gd-linux-nodejs-dependencies-v3-{{ checksum "newIDE/package-lock.json" }}-{{ checksum "GDevelop.js/package.json" }}-{{ checksum "GDJS/package-lock.json" }}
# fallback to using the latest cache if no exact match is found
- gd-linux-nodejs-dependencies-v2-
- gd-linux-nodejs-dependencies-v3-

# GDevelop IDE dependencies (using an exact version of GDevelop.js, built previously)
- run:
name: Install GDevelop IDE dependencies
command: export REQUIRES_EXACT_LIBGD_JS_VERSION=true && cd newIDE/app && npm install && cd ../electron-app && npm install
command: export REQUIRES_EXACT_LIBGD_JS_VERSION=true && cd newIDE && npm install

- save_cache:
paths:
- newIDE/electron-app/node_modules
- newIDE/app/node_modules
- newIDE/node_modules
- GDevelop.js/node_modules
- GDJS/node_modules
key: gd-linux-nodejs-dependencies-v2-{{ checksum "newIDE/app/package.json" }}-{{ checksum "newIDE/electron-app/package.json" }}-{{ checksum "GDevelop.js/package.json" }}-{{ checksum "GDJS/package-lock.json" }}
key: gd-linux-nodejs-dependencies-v3-{{ checksum "newIDE/package-lock.json" }}-{{ checksum "GDevelop.js/package.json" }}-{{ checksum "GDJS/package-lock.json" }}

# Build GDevelop IDE (seems like we need to allow Node.js to use more space than usual)
- run:
Expand Down Expand Up @@ -364,42 +362,32 @@ jobs:
- restore_cache:
name: Restore node_modules cache
keys:
- v2-win-node-{{ checksum "newIDE/app/package-lock.json" }}-{{ checksum "newIDE/electron-app/package-lock.json" }}-{{ checksum "GDJS/package-lock.json" }}
- v2-win-node-
- v3-win-node-{{ checksum "newIDE/package-lock.json" }}-{{ checksum "GDJS/package-lock.json" }}
- v3-win-node-

- run:
name: Install dependencies
no_output_timeout: 25m
# Remove package-lock.json because they seems to cause the npm install to be stuck. We should try again after re-generating them.
# Also install setuptools as something requires distutils in electron-app, and it was removed in Python 3.12.
# setuptools will make distutils available again (but we should migrate our packages probably).
command: |
pip install setuptools

cd newIDE\app
cd newIDE

npm -v

Remove-Item package-lock.json

$Env:REQUIRES_EXACT_LIBGD_JS_VERSION = "true"

npm install

cd ..\electron-app

Remove-Item package-lock.json

npm install

cd ..\..
cd ..

- save_cache:
name: Save node_modules cache
key: v2-win-node-{{ checksum "newIDE/app/package-lock.json" }}-{{ checksum "newIDE/electron-app/package-lock.json" }}-{{ checksum "GDJS/package-lock.json" }}
key: v3-win-node-{{ checksum "newIDE/package-lock.json" }}-{{ checksum "GDJS/package-lock.json" }}
paths:
- newIDE/app/node_modules
- newIDE/electron-app/node_modules
- newIDE/node_modules
- GDJS/node_modules

- run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: "npm"
cache-dependency-path: "newIDE/app/package-lock.json"
cache-dependency-path: "newIDE/package-lock.json"

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/extract-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: "npm"
cache-dependency-path: "newIDE/app/package-lock.json"
cache-dependency-path: "newIDE/package-lock.json"

- name: Install gettext
run: sudo apt update && sudo apt install gettext -y
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
node-version: 20
cache: "npm"
cache-dependency-path: "newIDE/app/package-lock.json"
cache-dependency-path: "newIDE/package-lock.json"

- name: Install gettext
run: sudo apt update && sudo apt install gettext -y
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cd newIDE/app
cd newIDE
npx lint-staged
30 changes: 13 additions & 17 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ blocks:
[ "${SEMAPHORE_GIT_PR_SLUG}" = "${SEMAPHORE_GIT_REPO_SLUG}" ]
}

NEWIDE_KEY="newIDE-app-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/app/package-lock.json)"
NEWIDE_KEY="newIDE-node_modules-v3-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/package-lock.json)"
if can_use_cache && cache has_key "${NEWIDE_KEY}"; then
echo "Cache hit: ${NEWIDE_KEY}"
else
if can_use_cache; then
cd newIDE/app
cd newIDE
npm i
cd ../..
cache store "${NEWIDE_KEY}" newIDE/app/node_modules
cd ..
cache store "${NEWIDE_KEY}" newIDE/node_modules
else
echo "Fork PR: skipping cache store for ${NEWIDE_KEY}"
fi
Expand Down Expand Up @@ -90,7 +90,7 @@ blocks:
[ "${SEMAPHORE_GIT_PR_SLUG}" = "${SEMAPHORE_GIT_REPO_SLUG}" ]
}

NEWIDE_KEY="newIDE-app-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/app/package-lock.json)"
NEWIDE_KEY="newIDE-node_modules-v3-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/package-lock.json)"
GDJS_KEY="GDJS-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/package-lock.json)"

if can_use_cache; then
Expand All @@ -101,10 +101,9 @@ blocks:
echo "Fork PR: skipping cache restore"
fi

(cd newIDE/app && npm i)
(cd newIDE && npm i)
(cd GDJS && git checkout package-lock.json && npm i)
- cd newIDE/app
- npm run postinstall
- npm run flow
- npm run check-script-types

Expand All @@ -117,7 +116,7 @@ blocks:
[ "${SEMAPHORE_GIT_PR_SLUG}" = "${SEMAPHORE_GIT_REPO_SLUG}" ]
}

NEWIDE_KEY="newIDE-app-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/app/package-lock.json)"
NEWIDE_KEY="newIDE-node_modules-v3-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/package-lock.json)"
GDJS_KEY="GDJS-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/package-lock.json)"
GDJS_TESTS_KEY="GDJS-tests-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/tests/package-lock.json)"

Expand All @@ -130,7 +129,7 @@ blocks:
echo "Fork PR: skipping cache restore"
fi

(cd newIDE/app && npm i)
(cd newIDE && npm i)
(cd GDJS && git checkout package-lock.json && npm i)
(cd GDJS/tests && npm i)
- cd GDJS
Expand All @@ -151,7 +150,7 @@ blocks:
[ "${SEMAPHORE_GIT_PR_SLUG}" = "${SEMAPHORE_GIT_REPO_SLUG}" ]
}

NEWIDE_KEY="newIDE-app-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/app/package-lock.json)"
NEWIDE_KEY="newIDE-node_modules-v3-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/package-lock.json)"
GDJS_KEY="GDJS-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/package-lock.json)"

if can_use_cache; then
Expand All @@ -162,10 +161,9 @@ blocks:
echo "Fork PR: skipping cache restore"
fi

(cd newIDE/app && npm i)
(cd newIDE && npm i)
(cd GDJS && git checkout package-lock.json && npm i)
- cd newIDE/app
- npm run postinstall
- npm run check-format

- name: GDJS auto-formatting
Expand Down Expand Up @@ -215,10 +213,9 @@ blocks:
echo "Fork PR: skipping cache restore"
fi

(cd newIDE/app && npm i)
(cd newIDE && npm i)
(cd GDJS && git checkout package-lock.json && npm i)
- cd newIDE/app
- npm run postinstall
- npm run lint

- name: Tests
Expand All @@ -235,7 +232,7 @@ blocks:
[ "${SEMAPHORE_GIT_PR_SLUG}" = "${SEMAPHORE_GIT_REPO_SLUG}" ]
}

NEWIDE_KEY="newIDE-app-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/app/package-lock.json)"
NEWIDE_KEY="newIDE-node_modules-v3-$SEMAPHORE_GIT_BRANCH-revision-$(checksum newIDE/package-lock.json)"
GDJS_KEY="GDJS-node_modules-v2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum GDJS/package-lock.json)"

if can_use_cache; then
Expand All @@ -246,10 +243,9 @@ blocks:
echo "Fork PR: skipping cache restore"
fi

(cd newIDE/app && npm i)
(cd newIDE && npm i)
(cd GDJS && git checkout package-lock.json && npm i)
- cd newIDE/app
- npm run postinstall
- npm run analyze-test-coverage

- name: GDJS tests
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ install:
# Build GDevelop.js
# (in a subshell to avoid Emscripten polluting the Node.js and npm version for the rest of the build)
- (set -e; cd GDevelop.js && source ../emsdk/emsdk_env.sh && npm run build && cd ..)
# Install newIDE tests dependencies
# Install newIDE dependencies (monorepo root)
- npm -v
- cd newIDE/app && npm install
- cd ../..
- cd newIDE && npm install
- cd ..
# Install GDJS tests dependencies
- cd GDJS && npm install && cd tests && npm install
- cd ../..
Expand Down
20 changes: 13 additions & 7 deletions newIDE/app/.flowconfig → newIDE/.flowconfig
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
[ignore]
<PROJECT_ROOT>/resources/.*
<PROJECT_ROOT>/app/resources/.*
<PROJECT_ROOT>/node_modules/protobufjs/src/bower.json
<PROJECT_ROOT>/node_modules/resolve/test/resolver/malformed_package_json/.*
<PROJECT_ROOT>/node_modules/eslint-plugin-react/node_modules/resolve/test/resolver/malformed_package_json/.*
<PROJECT_ROOT>/node_modules/.cache/.*
<PROJECT_ROOT>/app/node_modules/.cache/.*
# Don't type check the GDJS runtime and extensions copied into node_modules (only used for the web-app),
# as this would be redundant for JsExtension.js files (see [include] section) of Extensions, and the
# game engine and extensions are annotated with TypeScript annotations, not Flow.
# It would also force Flow to restart every single time GDJS-for-web-app-only is updated, which is
# almost always during development (any change in GDJS/extensions, or any restart of the app).
<PROJECT_ROOT>/node_modules/GDJS-for-web-app-only/.*
<PROJECT_ROOT>/app/node_modules/GDJS-for-web-app-only/.*
# Don't type check other workspace packages
<PROJECT_ROOT>/electron-app/.*
<PROJECT_ROOT>/web-app/.*

[untyped]
# react-window has some errors
<PROJECT_ROOT>/node_modules/react-window/*

[declarations]
<PROJECT_ROOT>/node_modules/fbjs/.*
<PROJECT_ROOT>/flow-libs/.*
<PROJECT_ROOT>/../../GDevelop.js/types/.*
<PROJECT_ROOT>/flow-typed/.*
<PROJECT_ROOT>/node_modules/.*/node_modules/fbjs/.*
<PROJECT_ROOT>/app/flow-libs/.*
<PROJECT_ROOT>/../GDevelop.js/types/.*
<PROJECT_ROOT>/app/flow-typed/.*
# lingui-js triggers some Flow errors
<PROJECT_ROOT>/node_modules/@lingui/core/.*
# JSS triggers a Flow error
<PROJECT_ROOT>/node_modules/jss/src/index.js

[libs]
flow-libs
../../GDevelop.js/types
app/flow-libs
app/flow-typed
../GDevelop.js/types

[options]
module.ignore_non_literal_requires=true
Expand Down
8 changes: 4 additions & 4 deletions newIDE/README-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ are provided by _extensions_. These extensions are composed of two parts:

## 1) Installation 💻

To modify extensions, you need to have the development version of GDevelop running. Make sure to have [Git](https://git-scm.com/) and [Node.js](https://nodejs.org) installed. [Yarn](https://yarnpkg.com) is optional.
To modify extensions, you need to have the development version of GDevelop running. Make sure to have [Git](https://git-scm.com/) and [Node.js](https://nodejs.org) installed.

```bash
git clone https://github.com/4ian/GD.git
cd GD/newIDE/app
npm install #or yarn
git clone https://github.com/4ian/GDevelop.git
cd GDevelop/newIDE
npm install
```

Refer to the [GDevelop IDE Readme](./README.md) for more information about the installation.
Expand Down
Loading
Loading