Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"dedent": "1.7.1",
"dedent": "catalog:",
"fast-glob": "^3.3.3",
"source-map-js": "^1.2.1"
}
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@
},
"license": "MIT",
"devDependencies": {
"@playwright/test": "^1.59.1",
"@playwright/test": "^1.60.0",
"@types/node": "catalog:",
"postcss": "8.5.14",
"postcss": "catalog:",
"postcss-import": "^16.1.1",
"prettier": "catalog:",
"prettier-plugin-embed": "^0.5.1",
"prettier-plugin-organize-imports": "^4.3.0",
"tsup": "^8.5.1",
"turbo": "^2.9.6",
"turbo": "^2.9.14",
"typescript": "^5.9.3",
"vitest": "^4.1.5"
"vitest": "^4.1.7"
},
"packageManager": "pnpm@9.6.0",
"pnpm": {
Expand Down
11 changes: 6 additions & 5 deletions packages/@tailwindcss-browser/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: [['html', { open: 'never' }]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand All @@ -30,10 +30,11 @@ export default defineConfig({
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
// Playwright 1.60's Windows WebKit worker hangs on shutdown after all tests
// pass, causing CI to fail with a worker force-kill error.
...(process.platform === 'win32'
? []
: [{ name: 'webkit', use: { ...devices['Desktop Safari'] } }]),
{
name: 'firefox',
use: {
Expand Down
5 changes: 5 additions & 0 deletions packages/@tailwindcss-browser/tests/ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ test.beforeAll(async ({}, info) => {
server = await createServer()
})

test.afterAll(async () => {
await server.close()
})
Comment on lines +12 to +14
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Add defensive check for server cleanup.

If beforeAll fails to create the server, afterAll will still execute and attempt to call server.close() on an undefined value, causing a runtime error. Add a guard to handle this case.

🛡️ Proposed fix to add defensive check
 test.afterAll(async () => {
-  await server.close()
+  if (server) {
+    await server.close()
+  }
 })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
test.afterAll(async () => {
await server.close()
})
test.afterAll(async () => {
if (server) {
await server.close()
}
})
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/`@tailwindcss-browser/tests/ui.spec.ts around lines 12 - 14, The
afterAll hook unconditionally calls server.close(), which will throw if the
server failed to be created; update test.afterAll to defensively check that the
server exists and has a close method before awaiting it (e.g., guard using a
null/undefined check or typeof/instance check) so test.afterAll only calls
server.close() when server is initialized and closable; reference the
test.afterAll hook and server.close invocation when making the change.


test('basic', async ({ page }) => {
await server.render({
page,
Expand Down Expand Up @@ -166,6 +170,7 @@ async function createServer() {
return {
app,
url: listener.url,
close: listener.close,
render,
}
}
2 changes: 1 addition & 1 deletion packages/@tailwindcss-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@parcel/watcher": "^2.5.1",
"@tailwindcss/node": "workspace:*",
"@tailwindcss/oxide": "workspace:*",
"enhanced-resolve": "^5.21.0",
"enhanced-resolve": "catalog:",
"mri": "^1.2.0",
"picocolors": "^1.1.1",
"tailwindcss": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/@tailwindcss-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"dependencies": {
"@jridgewell/remapping": "^2.3.5",
"enhanced-resolve": "^5.21.0",
"enhanced-resolve": "catalog:",
"jiti": "^2.7.0",
"lightningcss": "catalog:",
"magic-string": "^0.30.21",
Expand Down
4 changes: 2 additions & 2 deletions packages/@tailwindcss-postcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
"@alloc/quick-lru": "^5.2.0",
"@tailwindcss/node": "workspace:*",
"@tailwindcss/oxide": "workspace:*",
"postcss": "^8.5.10",
"postcss": "catalog:",
"tailwindcss": "workspace:*"
},
"devDependencies": {
"@types/node": "catalog:",
"@types/postcss-import": "14.0.3",
"dedent": "1.7.2",
"dedent": "catalog:",
"internal-example-plugin": "workspace:*",
"postcss-import": "^16.1.1"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/@tailwindcss-standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@tailwindcss/forms": "^0.5.11",
"@tailwindcss/typography": "^0.5.19",
"detect-libc": "1.0.3",
"enhanced-resolve": "^5.21.0",
"enhanced-resolve": "catalog:",
"tailwindcss": "workspace:*"
},
"__notes": "These binary packages must be included so Bun can build the CLI for all supported platforms. We also rely on Lightning CSS and Parcel being patched so Bun can statically analyze the executables.",
Expand All @@ -42,8 +42,8 @@
"@parcel/watcher-linux-x64-glibc": "^2.5.6",
"@parcel/watcher-linux-x64-musl": "^2.5.6",
"@parcel/watcher-win32-x64": "^2.5.6",
"@types/bun": "^1.3.13",
"bun": "^1.3.13",
"@types/bun": "^1.3.14",
"bun": "^1.3.14",
"lightningcss-darwin-arm64": "catalog:",
"lightningcss-darwin-x64": "catalog:",
"lightningcss-linux-arm64-gnu": "catalog:",
Expand Down
8 changes: 4 additions & 4 deletions packages/@tailwindcss-upgrade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
"dependencies": {
"@tailwindcss/node": "workspace:*",
"@tailwindcss/oxide": "workspace:*",
"dedent": "1.7.2",
"enhanced-resolve": "^5.21.0",
"dedent": "catalog:",
"enhanced-resolve": "catalog:",
"globby": "^16.2.0",
"jiti": "^2.7.0",
"mri": "^1.2.0",
"picocolors": "^1.1.1",
"postcss": "^8.5.10",
"postcss": "catalog:",
"postcss-import": "^16.1.1",
"postcss-selector-parser": "^7.1.1",
"prettier": "catalog:",
"semver": "^7.7.4",
"semver": "^7.8.0",
"tailwindcss": "workspace:*",
"tree-sitter": "^0.22.4",
"tree-sitter-typescript": "^0.23.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"@jridgewell/remapping": "^2.3.5",
"@tailwindcss/oxide": "workspace:^",
"@types/node": "catalog:",
"dedent": "1.7.2",
"dedent": "catalog:",
"lightningcss": "catalog:",
"magic-string": "^0.30.21",
"source-map-js": "^1.2.1"
Expand Down
11 changes: 6 additions & 5 deletions packages/tailwindcss/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: [['html', { open: 'never' }]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand All @@ -36,10 +36,11 @@ export default defineConfig({
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
// Playwright 1.60's Windows WebKit worker hangs on shutdown after all tests
// pass, causing CI to fail with a worker force-kill error.
...(process.platform === 'win32'
? []
: [{ name: 'webkit', use: { ...devices['Desktop Safari'] } }]),
{
name: 'firefox',
use: {
Expand Down
4 changes: 2 additions & 2 deletions playgrounds/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
},
"devDependencies": {
"@types/node": "catalog:",
"@types/react": "19.2.14",
"@types/react": "19.2.15",
"@types/react-dom": "19.2.3",
"typescript": "^6.0.3"
},
"pnpm": {
"overrides": {
"@types/react": "19.2.14",
"@types/react": "19.2.15",
"@types/react-dom": "19.2.3"
}
}
Expand Down
4 changes: 2 additions & 2 deletions playgrounds/v3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
},
"devDependencies": {
"@types/node": "catalog:",
"@types/react": "19.2.14",
"@types/react": "19.2.15",
"@types/react-dom": "19.2.3",
"autoprefixer": "^10.5.0",
"typescript": "^6.0.3"
},
"pnpm": {
"overrides": {
"@types/react": "19.2.14",
"@types/react": "19.2.15",
"@types/react-dom": "19.2.3"
}
}
Expand Down
10 changes: 5 additions & 5 deletions playgrounds/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
},
"dependencies": {
"@tailwindcss/vite": "workspace:^",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"@vitejs/plugin-react": "^6.0.2",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"tailwindcss": "workspace:^"
},
"devDependencies": {
"@types/react": "^19.2.14",
"@types/react": "^19.2.15",
"@types/react-dom": "^19.2.3",
"bun": "^1.3.13",
"bun": "^1.3.14",
"vite": "catalog:"
}
}
Loading
Loading