Conversation
TypeScript 6 changes several compiler defaults and turns deprecated options into errors. To keep the current behavior, restore the previous defaults instead of adapting the code: - `strict: false` where a config doesn't enable it explicitly - `types: ["*"]` to keep including all `@types` packages - `noUncheckedSideEffectImports: false` for CSS side-effect imports - `ignoreDeprecations: "6.0"` for `baseUrl`, `target: ES5` and `moduleResolution: node10` `rootDir` is no longer inferred from the input files, so set it explicitly wherever the output layout depends on it. As a result the default `.tsbuildinfo` location moves out of the output directory, which the clean scripts delete. Pin `tsBuildInfoFile` into the output directory so that a clean build still emits. Allow TypeScript 6 as a peer dependency of the unmaintained `tsconfck`, which only uses it optionally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013zxFti9SLHtiSFEDzZy1L3
The deprecated options it silenced stop working in TypeScript 7, so replace them now instead of carrying the escape hatch: - Remove `baseUrl`, which was only needed to resolve `paths` and a few bare `src/...` and `helpers/...` imports. Convert these imports to relative ones: they leaked into the published declaration files of `@dextinity/admin` and `@dextinity/cms-api`, where consumers can't resolve them. brevo-api keeps its `src/...` imports through an equivalent `paths` entry, as resolving them surfaces type errors in its scope-dependent config callbacks. - Raise `target: ES5` in demo/site and storybook, which don't emit with TypeScript anyway. - Replace `moduleResolution: node` in the docs ts-node config with `bundler`, which TypeScript 6 supports together with CommonJS. - Update tsconfig-paths in demo/api to v4, as v3 ignores `paths` without `baseUrl`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013zxFti9SLHtiSFEDzZy1L3
ts-node compiles with an implicit outDir, so TypeScript 6 requires an explicit rootDir and otherwise fails with TS5011 when generating the component docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013zxFti9SLHtiSFEDzZy1L3
knip reads each `types` entry of a tsconfig as a package import and doesn't know TypeScript 6's `"*"` wildcard yet, so it reported the configs using it as unresolved imports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013zxFti9SLHtiSFEDzZy1L3
This branch has not been deployed
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.
TypeScript 6 is the last release before the native TypeScript 7 compiler. It changes several compiler defaults and turns options that stop working in TypeScript 7 into errors. Upgrading now keeps us current and lets us deal with the deprecations one step at a time, instead of all at once with TypeScript 7. We stay on 6.0.x because typescript-eslint doesn't support anything newer yet.
To keep the upgrade itself low risk, the configs switch the new defaults back to the previous behavior instead of changing code:
strictstays off where it wasn't enabled explicitly,types: ["*"]keeps including all@typespackages, andnoUncheckedSideEffectImportsstays disabled for CSS imports. The only exception is one story, where TypeScript now infers a narrower type argument, so it uses an explicit type argument, like the tests and Demo already do.TypeScript no longer infers
rootDirfrom the input files, so the packages whose output layout depends on it set it explicitly. This also moves the default.tsbuildinfolocation out of the output directory, where the clean scripts no longer delete it and incremental builds would skip emitting. Therefore,tsBuildInfoFileis pinned back into the output directory.Instead of silencing the deprecations with
ignoreDeprecations, the deprecated options are removed. DroppingbaseUrlshowed that a few imports only resolved through it, and that they leaked into the published declaration files of@dextinity/adminand@dextinity/cms-api, where consumers can't resolve them and getanyinstead. These imports are now relative. brevo-api has the same issue, but resolving its imports surfaces type errors in its scope-dependent config callbacks, so it keeps them through an equivalentpathsentry for now.Session: https://claude.ai/code/session_013zxFti9SLHtiSFEDzZy1L3