All checks pass:
- npm run flow: No errors
- npm run build: Success
- npm run format: No changes
FlowFixMe summary: 3,297 total
- Reduced method-unbinding by converting push.apply to spread syntax
- Converted I18n imports to import type where possible
- Remaining FlowFixMe are due to:
- prettier 1.15 cannot parse generic type params (Set<>, Map<>, etc.)
- Deep semantic type mismatches (incompatible-type, prop-missing)
- Missing local annotations (missing-local-annot)
- Library type issues (value-as-type, cannot-resolve-name)
Co-authored-by: Florian Rival <4ian@users.noreply.github.com>
Integrate `npm run format` into the Flow codemod script and fix
resulting Flow errors to ensure clean `npm run flow` and `npm run
format` runs.
Running `npm run format` after the Flow codemod introduced Flow errors
due to `$FlowFixMe` comments being displaced by reformatting, Prettier
1.15 failing to parse certain type syntaxes (indexed access types,
multi-line arrow function return types), and a persistent untyped
object. This PR updates the script to run formatting at appropriate
stages, adds specific fixes for Prettier parsing issues, and types a
problematic object to ensure `npm run flow` and `npm run format` pass
cleanly.
This updates the translations by downloading them from Crowdin and
compiling them for usage by the app.
Please double check the values in
`newIDE/app/src/locales/LocalesMetadata.js` to ensure the changes are
sensible.
Co-authored-by: 4ian <1280130+4ian@users.noreply.github.com>
- Fixed eslint-disable-next-line ordering with $FlowFixMe comments
When both are needed, convert eslint-disable-next-line to
eslint-disable-line (inline) so $FlowFixMe stays directly above code
- Updated fix-flow-errors.sh with the smart ordering fix
- Script is fully idempotent: running it on already-fixed code makes no changes
- Both 'npm run flow' (No errors) and 'npm run build' (success) pass
Co-authored-by: Florian Rival <4ian@users.noreply.github.com>
The flow codemod annotate-exports introduced component() syntax and
'as Type' casts that Babel cannot parse, causing build failures.
New approach:
- Reverted all src/ files to pre-migration state
- Removed the flow codemod annotate-exports step entirely
- Instead suppress all Flow errors with $FlowFixMe[code] comments
- This ensures Babel compatibility while fixing all Flow errors
Changes:
- Restored original src/ code, then applied only safe syntax fixes
- Fixed deprecated syntax: existential *, %checks, React$X, $PropertyType
- Added $FlowFixMe[code] for all remaining type errors
- Fixed eslint-disable-next-line ordering with $FlowFixMe comments
- Both 'npm run flow' and 'npm run build' pass with zero errors
Co-authored-by: Florian Rival <4ian@users.noreply.github.com>
This updates the translations by downloading them from Crowdin and
compiling them for usage by the app.
Please double check the values in
`newIDE/app/src/locales/LocalesMetadata.js` to ensure the changes are
sensible.
Co-authored-by: D8H <2611977+D8H@users.noreply.github.com>
* For now, this is limited to instances inside custom objects. This will be made available in the future for all instances in scenes if this works well.
- Add [code] comments for type errors that can't be auto-fixed
- Convert old and to include error codes
- Remove duplicate comments
- Add fbjs to declarations in .flowconfig
- Add [lints] section to .flowconfig
Co-authored-by: Florian Rival <4ian@users.noreply.github.com>
- Upgrade flow-bin from 0.131.0 to 0.299.0
- Add flow-libs directory with old DOM/BOM/CSSOM type definitions
- Update .flowconfig with declarations for flow-typed and GDevelop.js types
- Fix existential type * -> any in src/ files
- Fix %checks predicate syntax removal
- Fix React$ type names to React. namespace
- Fix $PropertyType to indexed access types
- Fix renders any/React.Node/Fragment patterns from codemod
- Add fix-flow-errors.sh and add-flow-fixme.py scripts
Co-authored-by: Florian Rival <4ian@users.noreply.github.com>
* This is not finished yet:
- Documentation needs to be written.
- Menu item (and shortcut?) to quickly toggle between a standard event and a else event must be added so it's easy to switch from one to the other.
- Design must be adapted to make it clearer that the else event is "linked" to the previous one and is not run if the previous event is run.
This updates the translations by downloading them from Crowdin and
compiling them for usage by the app.
Please double check the values in
`newIDE/app/src/locales/LocalesMetadata.js` to ensure the changes are
sensible.
Co-authored-by: ClementPasteau <4895034+ClementPasteau@users.noreply.github.com>
* This adds support for configurable toolbar buttons in the GDevelop desktop editor that execute npm scripts from the project's package.json in external terminal windows. Buttons are defined in the `gdevelop-settings.yaml` file in the project directory.
For example, create a `gdevelop-settings.yaml` in your project root:
```
toolbarButtons:
- name: "Build"
icon: "🔨"
npmScript: "build"
- name: "Test"
icon: "🧪"
npmScript: "test"
```
* This was previously causing issues of GDevelop being stuck trying to log in, opening a new window should now open a completely different GDevelop that can be autonomous. (useful to open multiple projects at the same time for instance)