Prepare v4.0.1 release (#16018)

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
This commit is contained in:
Philipp Spiess 2025-01-29 20:14:35 +01:00 committed by GitHub
parent a4761ea967
commit 06552092bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 140 additions and 132 deletions

View File

@ -7,21 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
- Nothing yet!
## [4.0.1] - 2025-01-29
### Added
- Target `:open` in existing `open` variant ([#15349](https://github.com/tailwindlabs/tailwindcss/pull/15349))
- Include `:open` pseudo-class in existing `open` variant ([#15349](https://github.com/tailwindlabs/tailwindcss/pull/15349))
### Fixed
- Remove invalid `min-w/h-none` utilities ([#15845](https://github.com/tailwindlabs/tailwindcss/pull/15845))
- Ensure CSS variable shorthand uses valid CSS variables ([#15738](https://github.com/tailwindlabs/tailwindcss/pull/15738))
- Ensure font-size utilities with `none` modifier have a line-height set e.g.: `text-sm/none` ([#15921](https://github.com/tailwindlabs/tailwindcss/pull/15921))
- Discard CSS variable shorthand utilities that don't use valid CSS variables ([#15738](https://github.com/tailwindlabs/tailwindcss/pull/15738))
- Ensure font-size utilities with `none` modifier have a line-height set e.g. `text-sm/none` ([#15921](https://github.com/tailwindlabs/tailwindcss/pull/15921))
- Ensure font-size utilities with unknown modifier don't generate CSS ([#15921](https://github.com/tailwindlabs/tailwindcss/pull/15921))
- Dont suggest font weight utilities more than once ([#15857](https://github.com/tailwindlabs/tailwindcss/pull/15857))
- Suggest container query variants ([#15857](https://github.com/tailwindlabs/tailwindcss/pull/15857))
- Disable bare value suggestions when not using the `--spacing` variable ([#15857](https://github.com/tailwindlabs/tailwindcss/pull/15857))
- Ensure suggested classes are properly sorted ([#15857](https://github.com/tailwindlabs/tailwindcss/pull/15857))
- Dont look at ignore files outside initialized repos ([#15941](https://github.com/tailwindlabs/tailwindcss/pull/15941))
- Dont look at .gitignore files outside initialized repos ([#15941](https://github.com/tailwindlabs/tailwindcss/pull/15941))
- Find utilities when using the Svelte class shorthand syntax across multiple lines ([#15974](https://github.com/tailwindlabs/tailwindcss/pull/15974))
- Find utilities when using the Angular class shorthand syntax ([#15974](https://github.com/tailwindlabs/tailwindcss/pull/15974))
- Find utilities when using functions inside arrays ([#15974](https://github.com/tailwindlabs/tailwindcss/pull/15974))
@ -29,10 +33,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Ensure that `tailwind-merge` is not scanned when using the Vite plugin ([#16005](https://github.com/tailwindlabs/tailwindcss/pull/16005))
- Ensure CSS theme variables are available within shadow roots ([#15975](https://github.com/tailwindlabs/tailwindcss/pull/15975))
- Fix crash when project lives in the `/` directory ([#15988](https://github.com/tailwindlabs/tailwindcss/pull/15988))
- Ensure `@custom-variant` has a non-empty selector list ([#16009](https://github.com/tailwindlabs/tailwindcss/pull/16009))
- Ensure custom variants have a non-empty selector list ([#16009](https://github.com/tailwindlabs/tailwindcss/pull/16009))
- _Upgrade_: Ensure JavaScript config files on different drives are correctly migrated ([#15927](https://github.com/tailwindlabs/tailwindcss/pull/15927))
- _Upgrade_: Migrate `leading-[1]` to `leading-none` ([#16004](https://github.com/tailwindlabs/tailwindcss/pull/16004))
- _Upgrade_: Do not migrate arbitrary leading utilities to bare utilities ([#16004](https://github.com/tailwindlabs/tailwindcss/pull/16004))
- _Upgrade_: Do not migrate arbitrary leading utilities to bare values ([#16004](https://github.com/tailwindlabs/tailwindcss/pull/16004))
## [4.0.0] - 2025-01-21
@ -3347,7 +3351,8 @@ No release notes
- Everything!
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v4.0.0...HEAD
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v4.0.1...HEAD
[4.0.1]: https://github.com/tailwindlabs/tailwindcss/compare/v4.0.0...v4.0.1
[4.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v4.0.0-beta.10...v4.0.0
[4.0.0-beta.10]: https://github.com/tailwindlabs/tailwindcss/compare/v4.0.0-beta.9...v4.0.0-beta.10
[4.0.0-beta.9]: https://github.com/tailwindlabs/tailwindcss/compare/v4.0.0-beta.8...v4.0.0-beta.9

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-android-arm-eabi",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-android-arm64",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-darwin-arm64",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-darwin-x64",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-freebsd-x64",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-linux-arm-gnueabihf",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-linux-arm64-gnu",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-linux-arm64-musl",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-linux-x64-gnu",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-linux-x64-musl",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-win32-arm64-msvc",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide-win32-x64-msvc",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/oxide",
"version": "4.0.0",
"version": "4.0.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/browser",
"version": "4.0.0",
"version": "4.0.1",
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"main": "./dist/index.global.js",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/cli",
"version": "4.0.0",
"version": "4.0.1",
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"repository": {

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/node",
"version": "4.0.0",
"version": "4.0.1",
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"repository": {

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/postcss",
"version": "4.0.0",
"version": "4.0.1",
"description": "PostCSS plugin for Tailwind CSS, a utility-first CSS framework for rapidly building custom user interfaces",
"license": "MIT",
"repository": {

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/standalone",
"version": "4.0.0",
"version": "4.0.1",
"private": true,
"description": "Standalone CLI for Tailwind CSS",
"license": "MIT",

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/upgrade",
"version": "4.0.0",
"version": "4.0.1",
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"repository": {

View File

@ -1,6 +1,6 @@
{
"name": "@tailwindcss/vite",
"version": "4.0.0",
"version": "4.0.1",
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"repository": {

View File

@ -1,6 +1,6 @@
{
"name": "tailwindcss",
"version": "4.0.0",
"version": "4.0.1",
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"repository": {

View File

@ -47,108 +47,19 @@ for (let [name, paths] of syncedWorkspaces) {
}
}
exec('pnpm --silent --filter=!./playgrounds/* -r exec pwd', async (err, stdout) => {
if (err) {
console.error(err)
process.exit(1)
}
if (version !== null) {
for (let pkgPath of stdout
.trim()
.split('\n')
.map((x) => path.resolve(x, 'package.json'))) {
let pkg = await fs.readFile(pkgPath, 'utf8').then(JSON.parse)
let name = pkg.name
if (version !== '') {
// Ensure the version is set after the name and before everything else
delete pkg.name
delete pkg.version
// This allows us to keep the order of the keys in the package.json
pkg = { name, version, ...pkg }
}
await fs.writeFile(
pkgPath,
await prettier
.format(JSON.stringify(pkg, null, 2), { filepath: pkgPath })
.then((x) => `${x.trim()}\n`),
)
exec(
"pnpm --silent --filter='!./playgrounds/*' --filter='!./integrations' --filter='!./packages/internal-example-plugin' -r exec pwd",
async (err, stdout) => {
if (err) {
console.error(err)
process.exit(1)
}
console.log('Done.')
return
}
let paths = stdout
.trim()
.split('\n')
.map((x) => path.resolve(x, 'package.json'))
// Workspaces that are in sync with another workspace should not be updated
// manually, they should be updated by updating the main workspace.
.filter((x) => !inverseSyncedWorkspaces.has(x))
let workspaces = new Map()
// Track all the workspaces
for (let path of paths) {
let pkg = await fs.readFile(path, 'utf8').then(JSON.parse)
if (pkg.private) continue
workspaces.set(pkg.name, { version: pkg.version ?? '', path })
}
// Build the editable output
let lines = ['# Update the versions of the packages you want to change', '']
for (let [name, info] of workspaces) {
lines.push(`${name}: ${info.version}`)
}
let output = lines.join('\n')
// Edit the file
{
// Figure out which editor to use.
//
// In this case we still split on whitespace, because it can happen that the
// EDITOR env variable is configured as `code --wait`. This means that we
// want `code` as the editor, but `--wait` is one of the arguments.
let args = process.env.EDITOR.split(' ')
let editor = args.shift()
// Create a temporary file which will be edited
let filepath = path.resolve(tmpdir(), `version-${randomUUID()}.txt`)
await fs.writeFile(filepath, output)
// Edit the file, once the editor is closed, the file will be saved and we
// can read the changes
spawnSync(editor, [...args, filepath], {
stdio: 'inherit',
})
let newOutput = await fs.readFile(filepath, 'utf8').then((x) => x.trim().split('\n'))
// Cleanup temporary file
await fs.unlink(filepath)
// Update the package.json files
for (let line of newOutput) {
if (line[0] === '#') continue // Skip comment lines
if (line.trim() === '') continue // Skip empty lines
let [name, version = ''] = line.split(':').map((x) => x.trim())
// Figure out all the paths to the package.json files that need to be
// updated with the new version
let paths = [
// The package.json file of the main workspace
workspaces.get(name).path,
// The package.json files of the workspaces that are in sync with the
// main workspace
...(syncedWorkspaces.get(name) ?? []),
]
for (let pkgPath of paths) {
if (version !== null) {
for (let pkgPath of stdout
.trim()
.split('\n')
.map((x) => path.resolve(x, 'package.json'))) {
let pkg = await fs.readFile(pkgPath, 'utf8').then(JSON.parse)
let name = pkg.name
if (version !== '') {
@ -167,8 +78,100 @@ exec('pnpm --silent --filter=!./playgrounds/* -r exec pwd', async (err, stdout)
.then((x) => `${x.trim()}\n`),
)
}
}
}
console.log('Done.')
})
console.log('Done.')
return
}
let paths = stdout
.trim()
.split('\n')
.map((x) => path.resolve(x, 'package.json'))
// Workspaces that are in sync with another workspace should not be updated
// manually, they should be updated by updating the main workspace.
.filter((x) => !inverseSyncedWorkspaces.has(x))
let workspaces = new Map()
// Track all the workspaces
for (let path of paths) {
let pkg = await fs.readFile(path, 'utf8').then(JSON.parse)
if (pkg.private) continue
workspaces.set(pkg.name, { version: pkg.version ?? '', path })
}
// Build the editable output
let lines = ['# Update the versions of the packages you want to change', '']
for (let [name, info] of workspaces) {
lines.push(`${name}: ${info.version}`)
}
let output = lines.join('\n')
// Edit the file
{
// Figure out which editor to use.
//
// In this case we still split on whitespace, because it can happen that the
// EDITOR env variable is configured as `code --wait`. This means that we
// want `code` as the editor, but `--wait` is one of the arguments.
let args = process.env.EDITOR.split(' ')
let editor = args.shift()
// Create a temporary file which will be edited
let filepath = path.resolve(tmpdir(), `version-${randomUUID()}.txt`)
await fs.writeFile(filepath, output)
// Edit the file, once the editor is closed, the file will be saved and we
// can read the changes
spawnSync(editor, [...args, filepath], {
stdio: 'inherit',
})
let newOutput = await fs.readFile(filepath, 'utf8').then((x) => x.trim().split('\n'))
// Cleanup temporary file
await fs.unlink(filepath)
// Update the package.json files
for (let line of newOutput) {
if (line[0] === '#') continue // Skip comment lines
if (line.trim() === '') continue // Skip empty lines
let [name, version = ''] = line.split(':').map((x) => x.trim())
// Figure out all the paths to the package.json files that need to be
// updated with the new version
let paths = [
// The package.json file of the main workspace
workspaces.get(name).path,
// The package.json files of the workspaces that are in sync with the
// main workspace
...(syncedWorkspaces.get(name) ?? []),
]
for (let pkgPath of paths) {
let pkg = await fs.readFile(pkgPath, 'utf8').then(JSON.parse)
let name = pkg.name
if (version !== '') {
// Ensure the version is set after the name and before everything else
delete pkg.name
delete pkg.version
// This allows us to keep the order of the keys in the package.json
pkg = { name, version, ...pkg }
}
await fs.writeFile(
pkgPath,
await prettier
.format(JSON.stringify(pkg, null, 2), { filepath: pkgPath })
.then((x) => `${x.trim()}\n`),
)
}
}
}
console.log('Done.')
},
)