diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcce7418d..6c689200d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: node-version: [20] - runner: [ubuntu-latest, windows-latest] + runner: [ubuntu-latest, windows-latest, macos-14] runs-on: ${{ matrix.runner }} timeout-minutes: 15 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12022c737..9db46a335 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -188,9 +188,6 @@ jobs: - name: Install dependencies run: pnpm --filter=!./playgrounds/* install --ignore-scripts - - name: Build Tailwind CSS - run: pnpm run build - - name: Download artifacts uses: actions/download-artifact@v4 with: @@ -210,6 +207,9 @@ jobs: cp bindings-x86_64-unknown-linux-gnu/* ./npm/linux-x64-gnu/ cp bindings-x86_64-unknown-linux-musl/* ./npm/linux-x64-musl/ + - name: Build Tailwind CSS + run: pnpm run build + - name: Run pre-publish optimizations scripts run: node ./scripts/pre-publish-optimizations.mjs @@ -220,3 +220,9 @@ jobs: run: pnpm --recursive publish --tag ${{ inputs.release_channel }} --no-git-checks env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Upload Standalone Artifacts + uses: actions/upload-artifact@v4 + with: + name: tailwindcss-standalone + path: packages/@tailwindcss-standalone/dist/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 19f107a6b..6573eddbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add new standalone builds of Tailwind CSS v4 ([#14270](https://github.com/tailwindlabs/tailwindcss/pull/14270)) + ### Fixed -- Bring back type exports for the cjs build of `@tailwindcss/postcss`. ([#14256](https://github.com/tailwindlabs/tailwindcss/pull/14256)) +- Bring back type exports for the cjs build of `@tailwindcss/postcss` ([#14256](https://github.com/tailwindlabs/tailwindcss/pull/14256)) - Correctly merge tuple values when using the plugin API ([#14260](https://github.com/tailwindlabs/tailwindcss/pull/14260)) - Handle arrays in the CSS `theme()` function when using plugins ([#14262](https://github.com/tailwindlabs/tailwindcss/pull/14262)) - Fix fallback values when using the CSS `theme()` function ([#14262](https://github.com/tailwindlabs/tailwindcss/pull/14262)) diff --git a/integrations/cli/index.test.ts b/integrations/cli/index.test.ts index 7ee7ea689..d561ec673 100644 --- a/integrations/cli/index.test.ts +++ b/integrations/cli/index.test.ts @@ -1,142 +1,165 @@ +import os from 'node:os' import path from 'node:path' +import { describe } from 'vitest' import { candidate, css, html, js, json, test, yaml } from '../utils' -test( - 'production build', - { - fs: { - 'package.json': json`{}`, - 'pnpm-workspace.yaml': yaml` - # - packages: - - project-a - `, - 'project-a/package.json': json` - { - "dependencies": { - "tailwindcss": "workspace:^", - "@tailwindcss/cli": "workspace:^" +const STANDALONE_BINARY = (() => { + switch (os.platform()) { + case 'win32': + return 'tailwindcss-windows-x64.exe' + case 'darwin': + return os.arch() === 'x64' ? 'tailwindcss-macos-x64' : 'tailwindcss-macos-arm64' + case 'linux': + return os.arch() === 'x64' ? 'tailwindcss-linux-x64' : 'tailwindcss-linux-arm64' + default: + throw new Error(`Unsupported platform: ${os.platform()} ${os.arch()}`) + } +})() + +describe.each([ + ['CLI', 'pnpm tailwindcss'], + [ + 'Standalone CLI', + path.resolve(__dirname, `../../packages/@tailwindcss-standalone/dist/${STANDALONE_BINARY}`), + ], +])('%s', (_, command) => { + test( + 'production build', + { + fs: { + 'package.json': json`{}`, + 'pnpm-workspace.yaml': yaml` + # + packages: + - project-a + `, + 'project-a/package.json': json` + { + "dependencies": { + "tailwindcss": "workspace:^", + "@tailwindcss/cli": "workspace:^" + } } - } - `, - 'project-a/index.html': html` -
- `, - 'project-a/plugin.js': js` - module.exports = function ({ addVariant }) { - addVariant('inverted', '@media (inverted-colors: inverted)') - addVariant('hocus', ['&:focus', '&:hover']) - } - `, - 'project-a/src/index.css': css` - @import 'tailwindcss/utilities'; - @source '../../project-b/src/**/*.js'; - @plugin '../plugin.js'; - `, - 'project-a/src/index.js': js` - const className = "content-['project-a/src/index.js']" - module.exports = { className } - `, - 'project-b/src/index.js': js` - const className = "content-['project-b/src/index.js']" - module.exports = { className } - `, - }, - }, - async ({ root, fs, exec }) => { - await exec('pnpm tailwindcss --input src/index.css --output dist/out.css', { - cwd: path.join(root, 'project-a'), - }) - - await fs.expectFileToContain('project-a/dist/out.css', [ - candidate`underline`, - candidate`content-['project-a/src/index.js']`, - candidate`content-['project-b/src/index.js']`, - candidate`inverted:flex`, - candidate`hocus:underline`, - ]) - }, -) - -test( - 'watch mode', - { - fs: { - 'package.json': json`{}`, - 'pnpm-workspace.yaml': yaml` - # - packages: - - project-a - `, - 'project-a/package.json': json` - { - "dependencies": { - "tailwindcss": "workspace:^", - "@tailwindcss/cli": "workspace:^" + `, + 'project-a/index.html': html` +
+ `, + 'project-a/plugin.js': js` + module.exports = function ({ addVariant }) { + addVariant('inverted', '@media (inverted-colors: inverted)') + addVariant('hocus', ['&:focus', '&:hover']) } - } - `, - 'project-a/index.html': html` -
- `, - 'project-a/plugin.js': js` - module.exports = function ({ addVariant }) { - addVariant('inverted', '@media (inverted-colors: inverted)') - addVariant('hocus', ['&:focus', '&:hover']) - } - `, - 'project-a/src/index.css': css` - @import 'tailwindcss/utilities'; - @source '../../project-b/src/**/*.js'; - @plugin '../plugin.js'; - `, - 'project-a/src/index.js': js` - const className = "content-['project-a/src/index.js']" - module.exports = { className } - `, - 'project-b/src/index.js': js` - const className = "content-['project-b/src/index.js']" - module.exports = { className } - `, + `, + 'project-a/src/index.css': css` + @import 'tailwindcss/utilities'; + @source '../../project-b/src/**/*.js'; + @plugin '../plugin.js'; + `, + 'project-a/src/index.js': js` + const className = "content-['project-a/src/index.js']" + module.exports = { className } + `, + 'project-b/src/index.js': js` + const className = "content-['project-b/src/index.js']" + module.exports = { className } + `, + }, }, - }, - async ({ root, fs, spawn }) => { - await spawn('pnpm tailwindcss --input src/index.css --output dist/out.css --watch', { - cwd: path.join(root, 'project-a'), - }) + async ({ root, fs, exec }) => { + await exec(`${command} --input src/index.css --output dist/out.css`, { + cwd: path.join(root, 'project-a'), + }) - await fs.expectFileToContain('project-a/dist/out.css', [ - candidate`underline`, - candidate`content-['project-a/src/index.js']`, - candidate`content-['project-b/src/index.js']`, - candidate`inverted:flex`, - candidate`hocus:underline`, - ]) + await fs.expectFileToContain('project-a/dist/out.css', [ + candidate`underline`, + candidate`content-['project-a/src/index.js']`, + candidate`content-['project-b/src/index.js']`, + candidate`inverted:flex`, + candidate`hocus:underline`, + ]) + }, + ) - await fs.write( - 'project-a/src/index.js', - js` - const className = "[.changed_&]:content-['project-a/src/index.js']" - module.exports = { className } - `, - ) - await fs.expectFileToContain('project-a/dist/out.css', [ - candidate`[.changed_&]:content-['project-a/src/index.js']`, - ]) + test( + 'watch mode', + { + fs: { + 'package.json': json`{}`, + 'pnpm-workspace.yaml': yaml` + # + packages: + - project-a + `, + 'project-a/package.json': json` + { + "dependencies": { + "tailwindcss": "workspace:^", + "@tailwindcss/cli": "workspace:^" + } + } + `, + 'project-a/index.html': html` +
+ `, + 'project-a/plugin.js': js` + module.exports = function ({ addVariant }) { + addVariant('inverted', '@media (inverted-colors: inverted)') + addVariant('hocus', ['&:focus', '&:hover']) + } + `, + 'project-a/src/index.css': css` + @import 'tailwindcss/utilities'; + @source '../../project-b/src/**/*.js'; + @plugin '../plugin.js'; + `, + 'project-a/src/index.js': js` + const className = "content-['project-a/src/index.js']" + module.exports = { className } + `, + 'project-b/src/index.js': js` + const className = "content-['project-b/src/index.js']" + module.exports = { className } + `, + }, + }, + async ({ root, fs, spawn }) => { + await spawn(`${command} --input src/index.css --output dist/out.css --watch`, { + cwd: path.join(root, 'project-a'), + }) - await fs.write( - 'project-b/src/index.js', - js` - const className = "[.changed_&]:content-['project-b/src/index.js']" - module.exports = { className } - `, - ) - await fs.expectFileToContain('project-a/dist/out.css', [ - candidate`[.changed_&]:content-['project-b/src/index.js']`, - ]) - }, -) + await fs.expectFileToContain('project-a/dist/out.css', [ + candidate`underline`, + candidate`content-['project-a/src/index.js']`, + candidate`content-['project-b/src/index.js']`, + candidate`inverted:flex`, + candidate`hocus:underline`, + ]) + + await fs.write( + 'project-a/src/index.js', + js` + const className = "[.changed_&]:content-['project-a/src/index.js']" + module.exports = { className } + `, + ) + await fs.expectFileToContain('project-a/dist/out.css', [ + candidate`[.changed_&]:content-['project-a/src/index.js']`, + ]) + + await fs.write( + 'project-b/src/index.js', + js` + const className = "[.changed_&]:content-['project-b/src/index.js']" + module.exports = { className } + `, + ) + await fs.expectFileToContain('project-a/dist/out.css', [ + candidate`[.changed_&]:content-['project-b/src/index.js']`, + ]) + }, + ) +}) diff --git a/package.json b/package.json index 609845143..889e13d2b 100644 --- a/package.json +++ b/package.json @@ -60,5 +60,11 @@ "typescript": "^5.5.4", "vitest": "^2.0.5" }, - "packageManager": "pnpm@9.6.0" + "packageManager": "pnpm@9.6.0", + "pnpm": { + "patchedDependencies": { + "@parcel/watcher@2.4.1": "patches/@parcel__watcher@2.4.1.patch", + "lightningcss@1.26.0": "patches/lightningcss@1.26.0.patch" + } + } } diff --git a/packages/@tailwindcss-cli/package.json b/packages/@tailwindcss-cli/package.json index 5750d16ce..4a5310492 100644 --- a/packages/@tailwindcss-cli/package.json +++ b/packages/@tailwindcss-cli/package.json @@ -31,6 +31,7 @@ "dependencies": { "@parcel/watcher": "^2.4.1", "@tailwindcss/oxide": "workspace:^", + "enhanced-resolve": "^5.17.1", "lightningcss": "catalog:", "mri": "^1.2.0", "picocolors": "^1.0.1", diff --git a/packages/@tailwindcss-cli/src/commands/build/index.ts b/packages/@tailwindcss-cli/src/commands/build/index.ts index 1fd5de07c..473d525ce 100644 --- a/packages/@tailwindcss-cli/src/commands/build/index.ts +++ b/packages/@tailwindcss-cli/src/commands/build/index.ts @@ -2,7 +2,7 @@ import watcher from '@parcel/watcher' import { Scanner, type ChangedContent } from '@tailwindcss/oxide' import fixRelativePathsPlugin from 'internal-postcss-fix-relative-paths' import { Features, transform } from 'lightningcss' -import { existsSync } from 'node:fs' +import { existsSync, readFileSync } from 'node:fs' import fs from 'node:fs/promises' import path from 'node:path' import { pathToFileURL } from 'node:url' @@ -19,7 +19,7 @@ import { println, relative, } from '../../utils/renderer' -import { resolve } from '../../utils/resolve' +import { resolveCssId } from '../../utils/resolve' import { drainStdin, outputFile } from './utils' const css = String.raw @@ -90,7 +90,7 @@ export async function handle(args: Result>) { ? await drainStdin() : await fs.readFile(args['--input'], 'utf-8') : css` - @import '${resolve('tailwindcss/index.css')}'; + @import 'tailwindcss'; `, args['--input'] ?? base, ) @@ -200,7 +200,7 @@ export async function handle(args: Result>) { args['--input'] ? await fs.readFile(args['--input'], 'utf-8') : css` - @import '${resolve('tailwindcss/index.css')}'; + @import 'tailwindcss'; `, args['--input'] ?? base, ) @@ -372,7 +372,24 @@ function handleImports( } return postcss() - .use(atImport()) + .use( + atImport({ + resolve(id, basedir) { + let resolved = resolveCssId(id, basedir) + if (!resolved) { + throw new Error(`Could not resolve ${id} from ${basedir}`) + } + return resolved + }, + load(id) { + // We need to synchronously read the file here because when bundled + // with bun, some of the ids might resolve to files inside the bun + // embedded files root which can only be read by `node:fs` and not + // `node:fs/promises`. + return readFileSync(id, 'utf-8') + }, + }), + ) .use(fixRelativePathsPlugin()) .process(input, { from: file }) .then((result) => [ diff --git a/packages/@tailwindcss-cli/src/utils/renderer.ts b/packages/@tailwindcss-cli/src/utils/renderer.ts index 35365e8ba..6b0098586 100644 --- a/packages/@tailwindcss-cli/src/utils/renderer.ts +++ b/packages/@tailwindcss-cli/src/utils/renderer.ts @@ -8,10 +8,8 @@ import { formatNanoseconds } from './format-ns' export const UI = { indent: 2, } - export function header() { - let { version } = JSON.parse(fs.readFileSync(resolve('tailwindcss/package.json'), 'utf-8')) - return `${pc.italic(pc.bold(pc.blue('\u2248')))} tailwindcss ${pc.blue(`v${version}`)}` + return `${pc.italic(pc.bold(pc.blue('\u2248')))} tailwindcss ${pc.blue(`v${getVersion()}`)}` } export function highlight(file: string) { @@ -94,3 +92,11 @@ export function eprintln(value = '') { export function println(value = '') { process.stdout.write(`${value}\n`) } + +function getVersion(): string { + if (typeof globalThis.__tw_version === 'string') { + return globalThis.__tw_version + } + let { version } = JSON.parse(fs.readFileSync(resolve('tailwindcss/package.json'), 'utf-8')) + return version +} diff --git a/packages/@tailwindcss-cli/src/utils/resolve.ts b/packages/@tailwindcss-cli/src/utils/resolve.ts index 4702c2a26..e9197e874 100644 --- a/packages/@tailwindcss-cli/src/utils/resolve.ts +++ b/packages/@tailwindcss-cli/src/utils/resolve.ts @@ -1,3 +1,32 @@ +import EnhancedResolve from 'enhanced-resolve' +import fs from 'node:fs' import { createRequire } from 'node:module' -export const resolve = createRequire(import.meta.url).resolve +const localResolve = createRequire(import.meta.url).resolve +export function resolve(id: string) { + if (typeof globalThis.__tw_resolve === 'function') { + let resolved = globalThis.__tw_resolve(id) + if (resolved) { + return resolved + } + } + return localResolve(id) +} + +const resolver = EnhancedResolve.ResolverFactory.createResolver({ + fileSystem: new EnhancedResolve.CachedInputFileSystem(fs, 4000), + useSyncFileSystemCalls: true, + extensions: ['.css'], + mainFields: ['style'], + conditionNames: ['style'], +}) +export function resolveCssId(id: string, base: string) { + if (typeof globalThis.__tw_resolve === 'function') { + let resolved = globalThis.__tw_resolve(id, base) + if (resolved) { + return resolved + } + } + + return resolver.resolveSync({}, base, id) +} diff --git a/packages/@tailwindcss-standalone/package.json b/packages/@tailwindcss-standalone/package.json new file mode 100644 index 000000000..d3d1780dd --- /dev/null +++ b/packages/@tailwindcss-standalone/package.json @@ -0,0 +1,55 @@ +{ + "name": "@tailwindcss/standalone", + "version": "4.0.0-alpha.20", + "description": "Standalone CLI for Tailwind CSS", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tailwindlabs/tailwindcss.git", + "directory": "packages/@tailwindcss-standalone" + }, + "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", + "homepage": "https://tailwindcss.com", + "scripts": { + "lint": "tsc --noEmit", + "build": "bun ./scripts/build.ts" + }, + "bin": { + "tailwindcss": "./dist/index.mjs" + }, + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "publishConfig": { + "provenance": true, + "access": "public" + }, + "dependencies": { + "@tailwindcss/cli": "workspace:^", + "detect-libc": "1.0.3", + "enhanced-resolve": "^5.17.1", + "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.", + "devDependencies": { + "@parcel/watcher-darwin-arm64": "^2.4.2-alpha.0", + "@parcel/watcher-darwin-x64": "^2.4.2-alpha.0", + "@parcel/watcher-linux-arm64-glibc": "^2.4.2-alpha.0", + "@parcel/watcher-linux-arm64-musl": "^2.4.2-alpha.0", + "@parcel/watcher-linux-x64-glibc": "^2.4.2-alpha.0", + "@parcel/watcher-linux-x64-musl": "^2.4.2-alpha.0", + "@parcel/watcher-win32-x64": "^2.4.2-alpha.0", + "@types/bun": "^1.1.8", + "bun": "^1.1.26", + "lightningcss-darwin-arm64": "^1.25.1", + "lightningcss-darwin-x64": "^1.25.1", + "lightningcss-linux-arm64-gnu": "^1.25.1", + "lightningcss-linux-arm64-musl": "^1.25.1", + "lightningcss-linux-x64-gnu": "^1.25.1", + "lightningcss-linux-x64-musl": "^1.25.1", + "lightningcss-win32-x64-msvc": "^1.25.1" + } +} diff --git a/packages/@tailwindcss-standalone/scripts/build.ts b/packages/@tailwindcss-standalone/scripts/build.ts new file mode 100644 index 000000000..83f3b20a9 --- /dev/null +++ b/packages/@tailwindcss-standalone/scripts/build.ts @@ -0,0 +1,71 @@ +import { $ } from 'bun' +import { createHash } from 'node:crypto' +import { mkdir, readFile, writeFile } from 'node:fs/promises' +import * as path from 'node:path' +import { fileURLToPath } from 'node:url' + +const __dirname = fileURLToPath(new URL('.', import.meta.url)) + +async function buildForPlatform(triple: string, outfile: string) { + // We wrap this in a retry because occasionally the atomic rename fails for some reason + for (let i = 0; i < 5; ++i) { + try { + return await $`bun build --compile --target=${triple} ./src/index.ts --outfile=${outfile}` + } catch (err) { + if (i < 5) continue + + throw new Error(`Failed to build for platform ${triple}`, { cause: err }) + } + } +} + +async function build(triple: string, file: string) { + let start = process.hrtime.bigint() + + let outfile = path.resolve(__dirname, `../dist/${file}`) + + await buildForPlatform(triple, outfile) + + await new Promise((resolve) => setTimeout(resolve, 100)) + + let content = await readFile(outfile) + let sum = createHash('sha256').update(content).digest('hex') + + let elapsed = process.hrtime.bigint() - start + + return { + triple, + file, + sum, + elapsed, + } +} + +await mkdir(path.resolve(__dirname, '../dist'), { recursive: true }) + +// Build platform binaries and checksum them +let results = await Promise.all([ + build('bun-linux-arm64', './tailwindcss-linux-arm64'), + build('bun-linux-x64', './tailwindcss-linux-x64'), + // build('linux-armv7', 'tailwindcss-linux-armv7'), + build('bun-darwin-arm64', './tailwindcss-macos-arm64'), + build('bun-darwin-x64', './tailwindcss-macos-x64'), + // The Windows x64 build uses `bun-baseline` instead of the regular bun build. + // This enables support for running inside the ARM emulation mode. + build('bun-windows-x64-baseline', './tailwindcss-windows-x64.exe'), + // buildForPlatform('win32-arm64', 'tailwindcss-windows-arm64'), +]) + +// Write the checksums to a file +let sumsFile = path.resolve(__dirname, '../dist/sha256sums.txt') +let sums = results.map(({ file, sum }) => `${sum} ${file}`) + +console.table( + results.map(({ triple, sum, elapsed }) => ({ + triple, + sum, + elapsed: `${(Number(elapsed) / 1e6).toFixed(0)}ms`, + })), +) + +await writeFile(sumsFile, sums.join('\n') + '\n') diff --git a/packages/@tailwindcss-standalone/src/index.ts b/packages/@tailwindcss-standalone/src/index.ts new file mode 100644 index 000000000..5dfefaf82 --- /dev/null +++ b/packages/@tailwindcss-standalone/src/index.ts @@ -0,0 +1,46 @@ +import { createRequire } from 'node:module' +import packageJson from 'tailwindcss/package.json' + +import indexCss from 'tailwindcss/index.css' with { type: 'file' } +import preflightCss from 'tailwindcss/preflight.css' with { type: 'file' } +import themeCss from 'tailwindcss/theme.css' with { type: 'file' } +import utilitiesCss from 'tailwindcss/utilities.css' with { type: 'file' } + +const localResolve = createRequire(import.meta.url).resolve + +globalThis.__tw_resolve = (id, baseDir) => { + let isEmbeddedFileBase = baseDir === '/$bunfs/root' || baseDir?.includes(':/~BUN/root') + const likelyEmbeddedFile = + id === 'tailwindcss' || id.startsWith('tailwindcss/') || isEmbeddedFileBase + + if (!likelyEmbeddedFile) { + return false + } + + id = id.startsWith('tailwindcss/') + ? id.slice(12) + : isEmbeddedFileBase && id.startsWith('./') + ? id.slice(2) + : id + + switch (id) { + case 'index': + case 'index.css': + case 'tailwindcss': + return localResolve(indexCss) + case 'theme': + case 'theme.css': + return localResolve(themeCss) + case 'preflight': + case 'preflight.css': + return localResolve(preflightCss) + case 'utilities': + case 'utilities.css': + return localResolve(utilitiesCss) + default: + return false + } +} +globalThis.__tw_version = packageJson.version + +await import('../../@tailwindcss-cli/src/index.ts') diff --git a/packages/@tailwindcss-standalone/src/types.d.ts b/packages/@tailwindcss-standalone/src/types.d.ts new file mode 100644 index 000000000..dfdac2715 --- /dev/null +++ b/packages/@tailwindcss-standalone/src/types.d.ts @@ -0,0 +1,7 @@ +declare module '*.css' { + const content: string + export default content +} + +declare var __tw_version: string | undefined +declare var __tw_resolve: undefined | ((id: string, base?: string) => string | false) diff --git a/packages/@tailwindcss-standalone/tsconfig.json b/packages/@tailwindcss-standalone/tsconfig.json new file mode 100644 index 000000000..6ae022f65 --- /dev/null +++ b/packages/@tailwindcss-standalone/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../tsconfig.base.json", +} diff --git a/packages/tailwindcss/src/index.ts b/packages/tailwindcss/src/index.ts index c214a0286..7fcf97a07 100644 --- a/packages/tailwindcss/src/index.ts +++ b/packages/tailwindcss/src/index.ts @@ -341,7 +341,7 @@ export async function compile( }) if (process.env.NODE_ENV !== 'test') { - ast.unshift(comment(`! tailwindcss v${version} | MIT License | https://tailwindcss.com `)) + ast.unshift(comment(`! tailwindcss v${getVersion()} | MIT License | https://tailwindcss.com `)) } // Track all invalid candidates @@ -406,3 +406,11 @@ export async function __unstable__loadDesignSystem(css: string, opts: CompileOpt let result = await parseCss(css, opts) return result.designSystem } + +function getVersion() { + if (process.env.VERSION) { + return process.env.VERSION + } else { + return version + } +} diff --git a/patches/@parcel__watcher@2.4.1.patch b/patches/@parcel__watcher@2.4.1.patch new file mode 100644 index 000000000..29cf9659d --- /dev/null +++ b/patches/@parcel__watcher@2.4.1.patch @@ -0,0 +1,61 @@ +diff --git a/index.js b/index.js +index 8afb2b1126dcc687b7ff9b631589da252c1f9c22..97975cf342ff8c204b5731840a89b8ea88b0dbbc 100644 +--- a/index.js ++++ b/index.js +@@ -1,40 +1,26 @@ + const {createWrapper} = require('./wrapper'); + +-let name = `@parcel/watcher-${process.platform}-${process.arch}`; +-if (process.platform === 'linux') { +- const { MUSL, family } = require('detect-libc'); +- if (family === MUSL) { +- name += '-musl'; +- } else { +- name += '-glibc'; +- } +-} ++function loadPackage() { ++ if (process.platform === 'linux') { ++ let { MUSL, GLIBC, family, familySync } = require("detect-libc"); ++ // Bun polyfills `detect-libc` in compiled binaries. We rely on ++ // detect-libc@1.0.3 but the polyfilled version is 2.x. In detect-libc@2x ++ // there is a `familySync` function that we can use instead. ++ if (typeof familySync === 'function') family = familySync() + +-let binding; +-try { +- binding = require(name); +-} catch (err) { +- handleError(err); +- try { +- binding = require('./build/Release/watcher.node'); +- } catch (err) { +- handleError(err); +- try { +- binding = require('./build/Debug/watcher.node'); +- } catch (err) { +- handleError(err); +- throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`); ++ if (family === MUSL) { ++ return require(`@parcel/watcher-${process.platform}-${process.arch}-musl`); ++ } else if (family === GLIBC) { ++ return require(`@parcel/watcher-${process.platform}-${process.arch}-glibc`); ++ } else { ++ throw new Error(`Unsupported libc on: ${process.platform}-${process.arch}`); + } ++ } else { ++ return require(`@parcel/watcher-${process.platform}-${process.arch}`); + } + } + +-function handleError(err) { +- if (err?.code !== 'MODULE_NOT_FOUND') { +- throw err; +- } +-} +- +-const wrapper = createWrapper(binding); ++const wrapper = createWrapper(loadPackage()); + exports.writeSnapshot = wrapper.writeSnapshot; + exports.getEventsSince = wrapper.getEventsSince; + exports.subscribe = wrapper.subscribe; diff --git a/patches/lightningcss@1.26.0.patch b/patches/lightningcss@1.26.0.patch new file mode 100644 index 000000000..1b83d90c8 --- /dev/null +++ b/patches/lightningcss@1.26.0.patch @@ -0,0 +1,60 @@ +diff --git a/node/index.js b/node/index.js +index a9f2f6d5f3394329fcf8bc06af549030c01167a5..b92cc804adb694dbb17ee48368f13a03dd729267 100644 +--- a/node/index.js ++++ b/node/index.js +@@ -1,27 +1,32 @@ +-let parts = [process.platform, process.arch]; +-if (process.platform === 'linux') { +- const { MUSL, family } = require('detect-libc'); +- if (family === MUSL) { +- parts.push('musl'); +- } else if (process.arch === 'arm') { +- parts.push('gnueabihf'); +- } else { +- parts.push('gnu'); +- } +-} else if (process.platform === 'win32') { +- parts.push('msvc'); +-} ++function loadPackage() { ++ if (process.platform === "linux") { ++ let { MUSL, GLIBC, family, familySync } = require("detect-libc"); ++ // Bun polyfills `detect-libc` in compiled binaries. We rely on ++ // detect-libc@1.0.3 but the polyfilled version is 2.x. In detect-libc@2x ++ // there is a `familySync` function that we can use instead. ++ if (typeof familySync === 'function') family = familySync() + +-if (process.env.CSS_TRANSFORMER_WASM) { +- module.exports = require(`../pkg`); +-} else { +- try { +- module.exports = require(`lightningcss-${parts.join('-')}`); +- } catch (err) { +- module.exports = require(`../lightningcss.${parts.join('-')}.node`); ++ if (family === MUSL) { ++ return require(`lightningcss-${process.platform}-${process.arch}-musl`); ++ } else if (family === GLIBC) { ++ if (process.arch === "arm") { ++ return require(`lightningcss-${process.platform}-${process.arch}-gnueabihf`); ++ } else { ++ return require(`lightningcss-${process.platform}-${process.arch}-gnu`); ++ } ++ } else { ++ throw new Error( ++ `Unsupported libc on: ${process.platform}-${process.arch}` ++ ); ++ } ++ } else if (process.platform === "win32") { ++ return require(`lightningcss-${process.platform}-${process.arch}-msvc`); ++ } else { ++ return require(`lightningcss-${process.platform}-${process.arch}`); + } + } + +-module.exports.browserslistToTargets = require('./browserslistToTargets'); +-module.exports.composeVisitors = require('./composeVisitors'); +-module.exports.Features = require('./flags').Features; ++module.exports = loadPackage(); ++module.exports.browserslistToTargets = require("./browserslistToTargets"); ++module.exports.composeVisitors = require("./composeVisitors"); ++module.exports.Features = require("./flags").Features; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c069ae65..f65ad6b58 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,6 +16,14 @@ catalogs: specifier: ^5.4.0 version: 5.4.0 +patchedDependencies: + '@parcel/watcher@2.4.1': + hash: pnjyuz76kbyy7yxsvyvmenfmha + path: patches/@parcel__watcher@2.4.1.patch + lightningcss@1.26.0: + hash: 5hwfyehqvg5wjb7mwtdvubqbl4 + path: patches/lightningcss@1.26.0.patch + importers: .: @@ -52,7 +60,7 @@ importers: version: 5.5.4 vitest: specifier: ^2.0.5 - version: 2.0.5(@types/node@20.14.13)(lightningcss@1.26.0) + version: 2.0.5(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)) crates/node: optionalDependencies: @@ -129,13 +137,16 @@ importers: dependencies: '@parcel/watcher': specifier: ^2.4.1 - version: 2.4.1 + version: 2.4.1(patch_hash=pnjyuz76kbyy7yxsvyvmenfmha) '@tailwindcss/oxide': specifier: workspace:^ version: link:../../crates/node + enhanced-resolve: + specifier: ^5.17.1 + version: 5.17.1 lightningcss: specifier: 'catalog:' - version: 1.26.0 + version: 1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4) mri: specifier: ^1.2.0 version: 1.2.0 @@ -166,7 +177,7 @@ importers: version: link:../../crates/node lightningcss: specifier: 'catalog:' - version: 1.26.0 + version: 1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4) postcss-import: specifier: ^16.1.0 version: 16.1.0(postcss@8.4.41) @@ -190,6 +201,70 @@ importers: specifier: ^8.4.41 version: 8.4.41 + packages/@tailwindcss-standalone: + dependencies: + '@tailwindcss/cli': + specifier: workspace:^ + version: link:../@tailwindcss-cli + detect-libc: + specifier: 1.0.3 + version: 1.0.3 + enhanced-resolve: + specifier: ^5.17.1 + version: 5.17.1 + tailwindcss: + specifier: workspace:^ + version: link:../tailwindcss + devDependencies: + '@parcel/watcher-darwin-arm64': + specifier: ^2.4.2-alpha.0 + version: 2.4.2-alpha.0 + '@parcel/watcher-darwin-x64': + specifier: ^2.4.2-alpha.0 + version: 2.4.2-alpha.0 + '@parcel/watcher-linux-arm64-glibc': + specifier: ^2.4.2-alpha.0 + version: 2.4.2-alpha.0 + '@parcel/watcher-linux-arm64-musl': + specifier: ^2.4.2-alpha.0 + version: 2.4.2-alpha.0 + '@parcel/watcher-linux-x64-glibc': + specifier: ^2.4.2-alpha.0 + version: 2.4.2-alpha.0 + '@parcel/watcher-linux-x64-musl': + specifier: ^2.4.2-alpha.0 + version: 2.4.2-alpha.0 + '@parcel/watcher-win32-x64': + specifier: ^2.4.2-alpha.0 + version: 2.4.2-alpha.0 + '@types/bun': + specifier: ^1.1.8 + version: 1.1.8 + bun: + specifier: ^1.1.26 + version: 1.1.26 + lightningcss-darwin-arm64: + specifier: ^1.25.1 + version: 1.26.0 + lightningcss-darwin-x64: + specifier: ^1.25.1 + version: 1.26.0 + lightningcss-linux-arm64-gnu: + specifier: ^1.25.1 + version: 1.26.0 + lightningcss-linux-arm64-musl: + specifier: ^1.25.1 + version: 1.26.0 + lightningcss-linux-x64-gnu: + specifier: ^1.25.1 + version: 1.26.0 + lightningcss-linux-x64-musl: + specifier: ^1.25.1 + version: 1.26.0 + lightningcss-win32-x64-msvc: + specifier: ^1.25.1 + version: 1.26.0 + packages/@tailwindcss-vite: dependencies: '@tailwindcss/oxide': @@ -197,7 +272,7 @@ importers: version: link:../../crates/node lightningcss: specifier: 'catalog:' - version: 1.26.0 + version: 1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4) postcss-load-config: specifier: ^6.0.1 version: 6.0.1(postcss@8.4.41) @@ -213,7 +288,7 @@ importers: version: link:../internal-postcss-fix-relative-paths vite: specifier: 'catalog:' - version: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0) + version: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)) packages/internal-example-plugin: {} @@ -242,7 +317,7 @@ importers: version: 20.14.13 lightningcss: specifier: 'catalog:' - version: 1.26.0 + version: 1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4) playgrounds/nextjs: dependencies: @@ -291,7 +366,7 @@ importers: version: link:../../packages/@tailwindcss-vite '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.0(@types/node@20.14.13)(lightningcss@1.26.0)) + version: 4.3.1(vite@5.4.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4))) react: specifier: ^18.3.1 version: 18.3.1 @@ -313,10 +388,10 @@ importers: version: 1.1.22 vite: specifier: 'catalog:' - version: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0) + version: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)) vite-plugin-handlebars: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.14.13)(lightningcss@1.26.0) + version: 2.0.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)) packages: @@ -828,41 +903,81 @@ packages: cpu: [arm64] os: [darwin] + '@oven/bun-darwin-aarch64@1.1.26': + resolution: {integrity: sha512-E8/3i0RIvsIWS+kyeIlbwBh+4qB5DsQIfcO6xr4p3t7tEzvRWnrFkJrbJthru/eB1UsVV9PJ/hsxTrp3m3za4A==} + cpu: [arm64] + os: [darwin] + '@oven/bun-darwin-x64-baseline@1.1.22': resolution: {integrity: sha512-r1IOBt7A3NVfM3/PYkfpef3fo1cIdznRzCpE/XwEquYBbMFcvRETWWRUUNK80MFttYaPQuhyHui/b0VLJhoaEw==} cpu: [x64] os: [darwin] + '@oven/bun-darwin-x64-baseline@1.1.26': + resolution: {integrity: sha512-36HQlQfbrwP//xOS5VFN9AR/iH6BDQo3y8j5282DmRO+h6jylwlg+2+Sfz+1uXDOLDQWCbnNv3Mpl8+Ltso6cQ==} + cpu: [x64] + os: [darwin] + '@oven/bun-darwin-x64@1.1.22': resolution: {integrity: sha512-keEPJtDlvu/36J+NX1JUh6+u0PiyoRLVGdDNaVU5LsphnYIVL8A4VLAE+xA5FMPlvMyjVua8kYbgUuTTHJJGpg==} cpu: [x64] os: [darwin] + '@oven/bun-darwin-x64@1.1.26': + resolution: {integrity: sha512-ENRAAGBr2zh0VfETZXqcNPO3ZnnKDX3U6E/oWY+J70uWa9dJqRlRaj1oLB63AGoYJBNdhEcsSmTAk7toCJ+PGQ==} + cpu: [x64] + os: [darwin] + '@oven/bun-linux-aarch64@1.1.22': resolution: {integrity: sha512-qL7IVUIaCFzSYae1UhX0rSbG1I1ARH7t3d9EMUxG//nBOqdI5xgEmpFCWPh8Y1mdpPl3bPMT0EvmNx/HjFrUJw==} cpu: [arm64] os: [linux] + '@oven/bun-linux-aarch64@1.1.26': + resolution: {integrity: sha512-MqE/ClaEMW6B5i5UIYJnHbadWLt6QQQHV3NBlXd78Mhx1OiZY0YmARQmAItPUp9mxIEgGuA2QyrKvgGD3pzWPQ==} + cpu: [arm64] + os: [linux] + '@oven/bun-linux-x64-baseline@1.1.22': resolution: {integrity: sha512-xTaKbyAxn4jI5CaL13mhkj/wCNphDVHrxMIEfPW4rkVbnY/4Ci2uG9dRrNAXCxwRmyflcp8t2KWmmAUBS95McQ==} cpu: [x64] os: [linux] + '@oven/bun-linux-x64-baseline@1.1.26': + resolution: {integrity: sha512-jQeSLodwfQu5pG529jYG73VSFq26hdrTspxo9E/1B1WvwKrs2Vtz3w32zv+JWH+gvZqc28A/yK6pAmzQMiscNg==} + cpu: [x64] + os: [linux] + '@oven/bun-linux-x64@1.1.22': resolution: {integrity: sha512-y4ugmfIg9GlXgZPj2mE5D9g+ou8kwMgSraR4zWvaPPSGDB2nbULGAA9S5DCVEBAuTBxMgh3wXlEgZwQKPmDPuQ==} cpu: [x64] os: [linux] + '@oven/bun-linux-x64@1.1.26': + resolution: {integrity: sha512-sD/ZegJpnBg93qsKsiGnJgTROc68CWONwZpvtL65cBROLBqKb965ofhPUaM5oV8HckfaTDmT37cks59hG+tHvw==} + cpu: [x64] + os: [linux] + '@oven/bun-windows-x64-baseline@1.1.22': resolution: {integrity: sha512-Xdf0ZgonVup+YgFSTaGkzDpgcxojc2whFcaNvV0BJtTsl2MeAwGFl98AziGJSCh0ooG80ipUEIUoxDJBWxaEYw==} cpu: [x64] os: [win32] + '@oven/bun-windows-x64-baseline@1.1.26': + resolution: {integrity: sha512-qb593xu9WIKBCHd47z7ZaZTC9h8r4T6qDbBV/XGLhxdZEJb24ePWdhW8WoHxa9hsATio9SByozqwblXb2tJncw==} + cpu: [x64] + os: [win32] + '@oven/bun-windows-x64@1.1.22': resolution: {integrity: sha512-VNgJaK54MnyS4o47JBN0oMh+75kgaHrMt3HWS3Ree1zn2qYyAexeC9m6KPynHGtNFQrxuhHv5ULxJ0Z0pAU7+A==} cpu: [x64] os: [win32] + '@oven/bun-windows-x64@1.1.26': + resolution: {integrity: sha512-EkyW6JYnZPFxD9XsdEDqFxVCnWnAoyacUAiOEUYAiz8LsnbHLMlOfbdw7KYzvm7UPFoEkUZKD78eSdpg6q6c+Q==} + cpu: [x64] + os: [win32] + '@parcel/watcher-android-arm64@2.4.1': resolution: {integrity: sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==} engines: {node: '>= 10.0.0'} @@ -875,12 +990,22 @@ packages: cpu: [arm64] os: [darwin] + '@parcel/watcher-darwin-arm64@2.4.2-alpha.0': + resolution: {integrity: sha512-2xH4Ve7OKjIh+4YRfTN3HGJa2W8KTPLOALHZj5fxcbTPwaVxdpIRItDrcikUx2u3AzGAFme7F+AZZXHnf0F15Q==} + engines: {node: '>= 10.0.0'} + os: [darwin] + '@parcel/watcher-darwin-x64@2.4.1': resolution: {integrity: sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [darwin] + '@parcel/watcher-darwin-x64@2.4.2-alpha.0': + resolution: {integrity: sha512-xtjmXUH4YZVah5+7Q0nb+fpRP5qZn9cFfuPuZ4k77UfUGVwhacgZyIRQgIOwMP3GkgW4TsrKQaw1KIe7L1ZqcQ==} + engines: {node: '>= 10.0.0'} + os: [darwin] + '@parcel/watcher-freebsd-x64@2.4.1': resolution: {integrity: sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w==} engines: {node: '>= 10.0.0'} @@ -899,24 +1024,44 @@ packages: cpu: [arm64] os: [linux] + '@parcel/watcher-linux-arm64-glibc@2.4.2-alpha.0': + resolution: {integrity: sha512-vIIOcZf+fgsRReIK3Fw0WINvGo9UwiXfisnqYRzfpNByRZvkEPkGTIVe8iiDp72NhPTVmwIvBqM6yKDzIaw8GQ==} + engines: {node: '>= 10.0.0'} + os: [linux] + '@parcel/watcher-linux-arm64-musl@2.4.1': resolution: {integrity: sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + '@parcel/watcher-linux-arm64-musl@2.4.2-alpha.0': + resolution: {integrity: sha512-gXqEAoLG9bBCbQNUgqjSOxHcjpmCZmYT9M8UvrdTMgMYgXgiWcR8igKlPRd40mCIRZSkMpN2ScSy2WjQ0bQZnQ==} + engines: {node: '>= 10.0.0'} + os: [linux] + '@parcel/watcher-linux-x64-glibc@2.4.1': resolution: {integrity: sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + '@parcel/watcher-linux-x64-glibc@2.4.2-alpha.0': + resolution: {integrity: sha512-/WJJ3Y46ubwQW+Z+mzpzK3pvqn/AT7MA63NB0+k9GTLNxJQZNREensMtpJ/FJ+LVIiraEHTY22KQrsx9+DeNbw==} + engines: {node: '>= 10.0.0'} + os: [linux] + '@parcel/watcher-linux-x64-musl@2.4.1': resolution: {integrity: sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + '@parcel/watcher-linux-x64-musl@2.4.2-alpha.0': + resolution: {integrity: sha512-1dz4fTM5HaANk3RSRmdhALT+bNqTHawVDL1D77HwV/FuF/kSjlM3rGrJuFaCKwQ5E8CInHCcobqMN8Jh8LYaRg==} + engines: {node: '>= 10.0.0'} + os: [linux] + '@parcel/watcher-win32-arm64@2.4.1': resolution: {integrity: sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg==} engines: {node: '>= 10.0.0'} @@ -935,6 +1080,11 @@ packages: cpu: [x64] os: [win32] + '@parcel/watcher-win32-x64@2.4.2-alpha.0': + resolution: {integrity: sha512-U2abMKF7JUiIxQkos19AvTLFcnl2Xn8yIW1kzu+7B0Lux4Gkuu/BUDBroaM1s6+hwgK63NOLq9itX2Y3GwUThg==} + engines: {node: '>= 10.0.0'} + os: [win32] + '@parcel/watcher@2.4.1': resolution: {integrity: sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==} engines: {node: '>= 10.0.0'} @@ -1046,12 +1196,18 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/bun@1.1.8': + resolution: {integrity: sha512-PIwVFQKPviksiibobyvcWtMvMFMTj91T8dQEh9l1P3Ypr3ZuVn9w7HSr+5mTNrPqD1xpdDLEErzZPU8gqHBu6g==} + '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + '@types/node@20.12.14': + resolution: {integrity: sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg==} + '@types/node@20.14.13': resolution: {integrity: sha512-+bHoGiZb8UiQ0+WEtmph2IWQCjIqg8MDZMAV+ppRRhUZnquF5mQkP/9vpSwJClEiSM/C7fZZExPzfU0vJTyp8w==} @@ -1067,6 +1223,9 @@ packages: '@types/react@18.3.3': resolution: {integrity: sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==} + '@types/ws@8.5.12': + resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} + '@typescript-eslint/parser@6.21.0': resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1247,11 +1406,19 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + bun-types@1.1.26: + resolution: {integrity: sha512-n7jDe62LsB2+WE8Q8/mT3azkPaatKlj/2MyP6hi3mKvPz9oPpB6JW/Ll6JHtNLudasFFuvfgklYSE+rreGvBjw==} + bun@1.1.22: resolution: {integrity: sha512-G2HCPhzhjDc2jEDkZsO9vwPlpHrTm7a8UVwx9oNS5bZqo5OcSK5GPuWYDWjj7+37bRk5OVLfeIvUMtSrbKeIjQ==} os: [darwin, linux, win32] hasBin: true + bun@1.1.26: + resolution: {integrity: sha512-dWSewAqE7sVbYmflJxgG47dW4vmsbar7VAnQ4ao45y3ulr3n7CwdsMLFnzd28jhPRtF+rsaVK2y4OLIkP3OD4A==} + os: [darwin, linux, win32] + hasBin: true + bundle-require@5.0.0: resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2000,13 +2167,11 @@ packages: lightningcss-darwin-arm64@1.26.0: resolution: {integrity: sha512-n4TIvHO1NY1ondKFYpL2ZX0bcC2y6yjXMD6JfyizgR8BCFNEeArINDzEaeqlfX9bXz73Bpz/Ow0nu+1qiDrBKg==} engines: {node: '>= 12.0.0'} - cpu: [arm64] os: [darwin] lightningcss-darwin-x64@1.26.0: resolution: {integrity: sha512-Rf9HuHIDi1R6/zgBkJh25SiJHF+dm9axUZW/0UoYCW1/8HV0gMI0blARhH4z+REmWiU1yYT/KyNF3h7tHyRXUg==} engines: {node: '>= 12.0.0'} - cpu: [x64] os: [darwin] lightningcss-freebsd-x64@1.26.0: @@ -2024,25 +2189,21 @@ packages: lightningcss-linux-arm64-gnu@1.26.0: resolution: {integrity: sha512-iJmZM7fUyVjH+POtdiCtExG+67TtPUTer7K/5A8DIfmPfrmeGvzfRyBltGhQz13Wi15K1lf2cPYoRaRh6vcwNA==} engines: {node: '>= 12.0.0'} - cpu: [arm64] os: [linux] lightningcss-linux-arm64-musl@1.26.0: resolution: {integrity: sha512-XxoEL++tTkyuvu+wq/QS8bwyTXZv2y5XYCMcWL45b8XwkiS8eEEEej9BkMGSRwxa5J4K+LDeIhLrS23CpQyfig==} engines: {node: '>= 12.0.0'} - cpu: [arm64] os: [linux] lightningcss-linux-x64-gnu@1.26.0: resolution: {integrity: sha512-1dkTfZQAYLj8MUSkd6L/+TWTG8V6Kfrzfa0T1fSlXCXQHrt1HC1/UepXHtKHDt/9yFwyoeayivxXAsApVxn6zA==} engines: {node: '>= 12.0.0'} - cpu: [x64] os: [linux] lightningcss-linux-x64-musl@1.26.0: resolution: {integrity: sha512-yX3Rk9m00JGCUzuUhFEojY+jf/6zHs3XU8S8Vk+FRbnr4St7cjyMXdNjuA2LjiT8e7j8xHRCH8hyZ4H/btRE4A==} engines: {node: '>= 12.0.0'} - cpu: [x64] os: [linux] lightningcss-win32-arm64-msvc@1.26.0: @@ -2054,7 +2215,6 @@ packages: lightningcss-win32-x64-msvc@1.26.0: resolution: {integrity: sha512-pYS3EyGP3JRhfqEFYmfFDiZ9/pVNfy8jVIYtrx9TVNusVyDK3gpW1w/rbvroQ4bDJi7grdUtyrYU6V2xkY/bBw==} engines: {node: '>= 12.0.0'} - cpu: [x64] os: [win32] lightningcss@1.26.0: @@ -3302,36 +3462,64 @@ snapshots: '@oven/bun-darwin-aarch64@1.1.22': optional: true + '@oven/bun-darwin-aarch64@1.1.26': + optional: true + '@oven/bun-darwin-x64-baseline@1.1.22': optional: true + '@oven/bun-darwin-x64-baseline@1.1.26': + optional: true + '@oven/bun-darwin-x64@1.1.22': optional: true + '@oven/bun-darwin-x64@1.1.26': + optional: true + '@oven/bun-linux-aarch64@1.1.22': optional: true + '@oven/bun-linux-aarch64@1.1.26': + optional: true + '@oven/bun-linux-x64-baseline@1.1.22': optional: true + '@oven/bun-linux-x64-baseline@1.1.26': + optional: true + '@oven/bun-linux-x64@1.1.22': optional: true + '@oven/bun-linux-x64@1.1.26': + optional: true + '@oven/bun-windows-x64-baseline@1.1.22': optional: true + '@oven/bun-windows-x64-baseline@1.1.26': + optional: true + '@oven/bun-windows-x64@1.1.22': optional: true + '@oven/bun-windows-x64@1.1.26': + optional: true + '@parcel/watcher-android-arm64@2.4.1': optional: true '@parcel/watcher-darwin-arm64@2.4.1': optional: true + '@parcel/watcher-darwin-arm64@2.4.2-alpha.0': {} + '@parcel/watcher-darwin-x64@2.4.1': optional: true + '@parcel/watcher-darwin-x64@2.4.2-alpha.0': {} + '@parcel/watcher-freebsd-x64@2.4.1': optional: true @@ -3341,15 +3529,23 @@ snapshots: '@parcel/watcher-linux-arm64-glibc@2.4.1': optional: true + '@parcel/watcher-linux-arm64-glibc@2.4.2-alpha.0': {} + '@parcel/watcher-linux-arm64-musl@2.4.1': optional: true + '@parcel/watcher-linux-arm64-musl@2.4.2-alpha.0': {} + '@parcel/watcher-linux-x64-glibc@2.4.1': optional: true + '@parcel/watcher-linux-x64-glibc@2.4.2-alpha.0': {} + '@parcel/watcher-linux-x64-musl@2.4.1': optional: true + '@parcel/watcher-linux-x64-musl@2.4.2-alpha.0': {} + '@parcel/watcher-win32-arm64@2.4.1': optional: true @@ -3359,7 +3555,9 @@ snapshots: '@parcel/watcher-win32-x64@2.4.1': optional: true - '@parcel/watcher@2.4.1': + '@parcel/watcher-win32-x64@2.4.2-alpha.0': {} + + '@parcel/watcher@2.4.1(patch_hash=pnjyuz76kbyy7yxsvyvmenfmha)': dependencies: detect-libc: 1.0.3 is-glob: 4.0.3 @@ -3461,10 +3659,18 @@ snapshots: dependencies: '@babel/types': 7.25.2 + '@types/bun@1.1.8': + dependencies: + bun-types: 1.1.26 + '@types/estree@1.0.5': {} '@types/json5@0.0.29': {} + '@types/node@20.12.14': + dependencies: + undici-types: 5.26.5 + '@types/node@20.14.13': dependencies: undici-types: 5.26.5 @@ -3484,6 +3690,10 @@ snapshots: '@types/prop-types': 15.7.12 csstype: 3.1.3 + '@types/ws@8.5.12': + dependencies: + '@types/node': 20.14.13 + '@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 @@ -3526,14 +3736,14 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react@4.3.1(vite@5.4.0(@types/node@20.14.13)(lightningcss@1.26.0))': + '@vitejs/plugin-react@4.3.1(vite@5.4.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)))': dependencies: '@babel/core': 7.25.2 '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0) + vite: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)) transitivePeerDependencies: - supports-color @@ -3715,6 +3925,11 @@ snapshots: node-releases: 2.0.18 update-browserslist-db: 1.1.0(browserslist@4.23.2) + bun-types@1.1.26: + dependencies: + '@types/node': 20.12.14 + '@types/ws': 8.5.12 + bun@1.1.22: optionalDependencies: '@oven/bun-darwin-aarch64': 1.1.22 @@ -3726,6 +3941,17 @@ snapshots: '@oven/bun-windows-x64': 1.1.22 '@oven/bun-windows-x64-baseline': 1.1.22 + bun@1.1.26: + optionalDependencies: + '@oven/bun-darwin-aarch64': 1.1.26 + '@oven/bun-darwin-x64': 1.1.26 + '@oven/bun-darwin-x64-baseline': 1.1.26 + '@oven/bun-linux-aarch64': 1.1.26 + '@oven/bun-linux-x64': 1.1.26 + '@oven/bun-linux-x64-baseline': 1.1.26 + '@oven/bun-windows-x64': 1.1.26 + '@oven/bun-windows-x64-baseline': 1.1.26 + bundle-require@5.0.0(esbuild@0.23.0): dependencies: esbuild: 0.23.0 @@ -4077,7 +4303,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -4101,7 +4327,7 @@ snapshots: enhanced-resolve: 5.17.1 eslint: 8.57.0 eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.15.0 @@ -4123,7 +4349,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -4688,11 +4914,9 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - lightningcss-darwin-arm64@1.26.0: - optional: true + lightningcss-darwin-arm64@1.26.0: {} - lightningcss-darwin-x64@1.26.0: - optional: true + lightningcss-darwin-x64@1.26.0: {} lightningcss-freebsd-x64@1.26.0: optional: true @@ -4700,25 +4924,20 @@ snapshots: lightningcss-linux-arm-gnueabihf@1.26.0: optional: true - lightningcss-linux-arm64-gnu@1.26.0: - optional: true + lightningcss-linux-arm64-gnu@1.26.0: {} - lightningcss-linux-arm64-musl@1.26.0: - optional: true + lightningcss-linux-arm64-musl@1.26.0: {} - lightningcss-linux-x64-gnu@1.26.0: - optional: true + lightningcss-linux-x64-gnu@1.26.0: {} - lightningcss-linux-x64-musl@1.26.0: - optional: true + lightningcss-linux-x64-musl@1.26.0: {} lightningcss-win32-arm64-msvc@1.26.0: optional: true - lightningcss-win32-x64-msvc@1.26.0: - optional: true + lightningcss-win32-x64-msvc@1.26.0: {} - lightningcss@1.26.0: + lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4): dependencies: detect-libc: 1.0.3 optionalDependencies: @@ -5462,13 +5681,13 @@ snapshots: dependencies: punycode: 2.3.1 - vite-node@2.0.5(@types/node@20.14.13)(lightningcss@1.26.0): + vite-node@2.0.5(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)): dependencies: cac: 6.7.14 debug: 4.3.6 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0) + vite: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)) transitivePeerDependencies: - '@types/node' - less @@ -5480,10 +5699,10 @@ snapshots: - supports-color - terser - vite-plugin-handlebars@2.0.0(@types/node@20.14.13)(lightningcss@1.26.0): + vite-plugin-handlebars@2.0.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)): dependencies: handlebars: 4.7.8 - vite: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0) + vite: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)) transitivePeerDependencies: - '@types/node' - less @@ -5494,7 +5713,7 @@ snapshots: - sugarss - terser - vite@5.4.0(@types/node@20.14.13)(lightningcss@1.26.0): + vite@5.4.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)): dependencies: esbuild: 0.21.5 postcss: 8.4.41 @@ -5502,9 +5721,9 @@ snapshots: optionalDependencies: '@types/node': 20.14.13 fsevents: 2.3.3 - lightningcss: 1.26.0 + lightningcss: 1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4) - vitest@2.0.5(@types/node@20.14.13)(lightningcss@1.26.0): + vitest@2.0.5(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -5522,8 +5741,8 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0) - vite-node: 2.0.5(@types/node@20.14.13)(lightningcss@1.26.0) + vite: 5.4.0(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)) + vite-node: 2.0.5(@types/node@20.14.13)(lightningcss@1.26.0(patch_hash=5hwfyehqvg5wjb7mwtdvubqbl4)) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.14.13 diff --git a/scripts/pack-packages.mjs b/scripts/pack-packages.mjs index aa845c3e8..3bcf23bec 100644 --- a/scripts/pack-packages.mjs +++ b/scripts/pack-packages.mjs @@ -44,7 +44,7 @@ Promise.all( function pack() { return new Promise((resolve) => { exec( - `pnpm pack --pack-destination="${path.join(root, 'dist').replace(/\\/g, '\\\\')}"`, + `pnpm pack --pack-gzip-level=0 --pack-destination="${path.join(root, 'dist').replace(/\\/g, '\\\\')}"`, { cwd: dir }, (err, stdout, stderr) => { if (err) {