Repository navigation
fix(upgrade): bring an extension's TypeScript to the 5.9 Flarum builds with - #69
Merged
Merged
Conversation
…s with Flarum now builds and checks typings with TypeScript 5.9, which flarum-webpack-config 3.1 supplies, so the upgrade and a new extension use ^5.9.3 instead of bringing TypeScript down to 4.9: - a TypeScript 6 or newer comes down to 5.9, as flarum-tsconfig resolves modules the way TypeScript 6 refuses, unless the extension's tsconfig already resolves them another way and sets no baseUrl - tsconfig options are checked against what TypeScript 5.9 accepts, generated from typescript@5.9.3 without the options 5.5 removed - TypeScript 5 syntax and a list of configs to extend are no longer flagged - flarum-webpack-config ^3.1.0 and @flarum/jest-config ^2.1.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #0000 (follows flarum/framework#5120: Flarum builds with TypeScript 5.9 from 2.1, and flarum-webpack-config 3.1.0 supplies it to extensions)
Changes proposed in this pull request:
fl upgrade 2.0brought every extension's TypeScript down to ^4.9.5, andfl initscaffolded it, which now puts extensions back into the @types/node parse errors of flarum/framework#5120. Both now use ^5.9.3, with flarum-webpack-config ^3.1.0 and @flarum/jest-config ^2.1.0. A TypeScript 6 or newer still comes down to 5.9, because flarum-tsconfig'smoduleResolution: "Node"fails under it, unless the extension's tsconfig already resolves modules another way and sets nobaseUrl. tsconfig options are now checked against what TypeScript 5.9 accepts (generated from typescript@5.9.3, minus the options 5.5 removed), and TypeScript 5 syntax is no longer flagged.Reviewers should focus on:
"types": []the upgrade adds is unchanged; only its comment, which blamed TypeScript 4.9, is corrected.Screenshot
N/A
Necessity
Confirmed
yarn testinjs/). (N/A, CLI.)composer test). (yarn test: 421 tests, Prettier, ESLint and tsc.)