Repository navigation
chore(deps): update typescript to 5.9.3 and run the type tests with tstyche - #1524
Merged
Anber merged 2 commits intoOct 23, 2026
Merged
Conversation
Raise typescript from ^5.2.2 to ^5.9.3 in the root and @linaria/testkit manifests. The lockfile locks typescript 5.9.3 in place of 5.2.2; the other entries only change their typescript peer suffix. 5.9.3 is the newest 5.x release: TypeScript 6 deprecates the baseUrl and moduleResolution node options that the root tsconfig still uses. The declaration files that build:declarations writes were compared before and after the raise. They differ in two packages, so a patch changeset covers them: the atomize helper of @linaria/atomic now declares `className?: string` instead of `className?: string | undefined`, and @linaria/postcss-linaria names the postcss Document and Root types through the postcss entry point instead of postcss/lib/*. The other published packages emit the same declarations.
Replace @definitelytyped/dtslint 0.0.176 with TSTyche 7.2.5 as the runner of the type tests. dtslint 0.2 was not taken: 0.2.47 only runs inside a DefinitelyTyped checkout, with each test folder under types/<name> next to a DefinitelyTyped package.json, and its tsconfig checks reject the baseUrl, noPropertyAccessFromIndexSignature and React 17 stub paths options that these tests rely on. The test:dts scripts of @linaria/core and @linaria/react now call tstyche, and a tstyche.json in each package selects the existing test folders, so the turbo task and the CI step stay as they are. Each test folder keeps its own tsconfig.json. The $ExpectType comments become expect(...).type.toBe<...>() assertions with the same expected types. The @ts-expect-error lines stay as they are: checkSuppressedErrors is off, since TSTyche would otherwise read their explanations as fragments of the expected error message, and TypeScript still fails the run on an unused directive. The React 17 test now asserts that a styled button is callable without children, next to the JSX it already compiled. tslint.json, the TSLint directive in styled.ts and the index.d.ts files that only dtslint needed are removed. The lockfile drops the dtslint closure, request 2.88.2, form-data 2.3.3 and tar 6.2.0 among it, and adds tstyche 7.2.5, which has no dependencies.
🦋 Changeset detectedLatest commit: 94b3c7d The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Summary
The type tests run on
@definitelytyped/dtslint0.0.176, whose dependencies keeprequest,tar6,form-data2,qs6.5.5,tough-cookie2 anduuid3 in the lockfile. Two commits: TypeScript^5.2.2to^5.9.3, then TSTyche 7.2.5 in place of dtslint. Thetest:dtsscript names, the turbo task and the CI step stay.$ExpectTypecomments becomeexpect(...).type.toBe<...>()with the same types; atstyche.jsonper package selects the existing folders.@ts-expect-errorlines stay;checkSuppressedErrors: falseinpackages/react/tstyche.jsonstops TSTyche reading the text after the directive as an expected message (dtslint did not either).expect(Button).type.toBeCallableWith({})instead of callingButton({}); the stub is unchanged.tslint.jsonand three placeholderindex.d.tsfiles go. dtslint 0.2.x was not an option: 0.2.47 only works inside a DefinitelyTyped checkout layout.baseUrlandmoduleResolution: nodeoptions of the root tsconfig. Built declarations differ in@linaria/atomicand@linaria/postcss-linaria, which get a patch changeset; the others are identical.Evidence
masterto "23 vulnerable packages in 28 instances"; those six entries are gone and none is new.pnpm turbo run test:dtsexits 0: 3 assertions in@linaria/core, 9 in@linaria/react.styled.ts, an unused@ts-expect-errorinstyled.tsand instyled-jsx.tsx, andButton('ok')in the React 17 test. That test also fails when a scratch copy ofpackages/react/src/styled.tsrequireschildren.With pnpm 9.15.9 and Node 24.4.1 these exit 0 (the install,
typecheckandsp:checkalso on the first commit;pnpm lintneeds a built checkout):Left out
__dtslint__folders and the CI step name.Not verified
test:dtson the first commit alone.pnpm-lock.yaml, which would need the lockfile regenerated.