Repository navigation
Fix unshipped relative imports in @tailwindcss/node type declarations
#20632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
RobinMalfait
merged 8 commits into
tailwindlabs:main
from
wook10:fix/node-dts-unshipped-imports
Nov 5, 2026
+64
−1
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b374d51
Fix unshipped relative imports in `@tailwindcss/node` type declarations
wook10 224caac
Update CHANGELOG.md
wook10 e321406
Add integration test for `@tailwindcss/node` type declarations
wook10 f1a00a1
Run `node` integration tests in CI
wook10 b2fa39e
Merge remote-tracking branch 'origin/main' into merge-main
wook10 473f8f5
Add changelog entry
wook10 522dab9
Show the `tsc` errors when the `@tailwindcss/node` types test fails
RobinMalfait 20636e6
Merge branch 'main' into fix/node-dts-unshipped-imports
wook10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ### Fixed | ||
|
|
||
| - Remove imports of unshipped modules from `@tailwindcss/node` type declarations, which caused type errors with `skipLibCheck: false` |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import { json, test, ts } from '../utils' | ||
|
|
||
| // https://github.com/tailwindlabs/tailwindcss/issues/20631 | ||
| test( | ||
| 'type declarations only import modules that are shipped', | ||
| { | ||
| fs: { | ||
| 'package.json': json` | ||
| { | ||
| "type": "module", | ||
| "dependencies": { | ||
| "tailwindcss": "workspace:^", | ||
| "@tailwindcss/node": "workspace:^" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "^5.9.3" | ||
| } | ||
| } | ||
| `, | ||
| 'tsconfig.json': json` | ||
| { | ||
| "compilerOptions": { | ||
| "target": "ESNext", | ||
| "module": "NodeNext", | ||
| "moduleResolution": "NodeNext", | ||
| "strict": true, | ||
| "noEmit": true, | ||
| "skipLibCheck": false | ||
| }, | ||
| "include": ["index.ts"] | ||
| } | ||
| `, | ||
| 'index.ts': ts` | ||
| import { __unstable__loadDesignSystem, compile } from '@tailwindcss/node' | ||
|
|
||
| let compiler = await compile('@import "tailwindcss";', { | ||
| base: '.', | ||
| onDependency() {}, | ||
| }) | ||
| compiler.build(['flex']) | ||
|
|
||
| let designSystem = await __unstable__loadDesignSystem('@import "tailwindcss";', { | ||
| base: '.', | ||
| }) | ||
| designSystem.candidatesToCss(['flex']) | ||
| `, | ||
| }, | ||
| }, | ||
| async ({ exec, expect }) => { | ||
| let { stdout, exitCode } = await exec('pnpm tsc --pretty false', {}, { streams: true }) | ||
|
|
||
| // `tsc` prints its errors to stdout, so check it first to see them on failure | ||
| expect(stdout.trim()).toBe('') | ||
| expect(exitCode).toBe(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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.