SIGN IN SIGN UP

A utility-first CSS framework for rapid UI development.

94202 0 1 TypeScript
2024-03-05 14:23:26 +01:00
{
"name": "@tailwindcss/root",
"private": true,
"version": "1.0.0",
"prettier": {
"semi": false,
"singleQuote": true,
"printWidth": 100,
"plugins": [
"prettier-plugin-organize-imports"
],
"overrides": [
{
"files": [
"tsconfig.json"
],
"options": {
"parser": "jsonc"
}
Add integration test setup and tests for the Vite integration (#14089) This PR adds a new root `/integrations` folder that will be the home of integration tests. The idea of these tests is to use Tailwind in various setups just like our users would (by only using the publishable npm builds). To avoid issues with concurrent tests making changes to the file system, to make it very easy to test through a range of versions, and to avoid changing configuration objects over and over in test runs, we decided to inline the scaffolding completely into the test file and have no examples checked into the repo. Here's an example of how this can look like for a simple Vite test: ```ts test('works with production builds', { fs: { 'package.json': json` { "type": "module", "dependencies": { "@tailwindcss/vite": "workspace:^", "tailwindcss": "workspace:^" }, "devDependencies": { "vite": "^5.3.5" } } `, 'vite.config.ts': ts` import tailwindcss from '@tailwindcss/vite' import { defineConfig } from 'vite' export default defineConfig({ build: { cssMinify: false }, plugins: [tailwindcss()], }) `, 'index.html': html` <head> <link rel="stylesheet" href="./src/index.css"> </head> <body> <div class="underline m-2">Hello, world!</div> </body> `, 'src/index.css': css` @import 'tailwindcss/theme' reference; @import 'tailwindcss/utilities'; `, }, }, async ({ fs, exec }) => { await exec('pnpm vite build') expect.assertions(2) for (let [path, content] of await fs.glob('dist/**/*.css')) { expect(path).toMatch(/\.css$/) expect(stripTailwindComment(content)).toMatchInlineSnapshot( ` ".m-2 { margin: var(--spacing-2, .5rem); } .underline { text-decoration-line: underline; }" `, ) } }, ) ``` By defining all dependencies this way, we never have to worry about which fixtures are checked in and can more easily describe changes to the setup. For ergonomics, we've also added the [`embed` prettier plugin](https://github.com/Sec-ant/prettier-plugin-embed). This will mean that files inlined in the `fs` setup are properly indented. No extra work needed! If you're using VS Code, I can also recommend the [Language Literals](https://marketplace.visualstudio.com/items?itemName=sissel.language-literals) extension so that syntax highlighting also _just works_. A neat feature of inlining the scaffolding like this is to make it very simple to test through a variety of versions. For example, here's how we can set up a test against Vite 5 and Vite 4: ```js ;['^4.5.3', '^5.3.5'].forEach(viteVersion => { test(`works with production builds for Vite ${viteVersion}`, { fs: { 'package.json': json` { "type": "module", "devDependencies": { "vite": "${viteVersion}" } } `, async () => { // Do something }, ) }) ``` ## Philosophy Before we dive into the specifics, I want to clearly state the design considerations we have chosen for this new test suite: - All file mutations should be done in temp folders, nothing should ever mess with your working directory - Windows as a first-class citizen - Have a clean and simple API that describes the test setup only using public APIs - Focus on reliability (make sure cleanup scripts work and are tolerant to various error scenarios) - If a user reports an issue with a specific configuration, we want to be able to reproduce them with integration tests, no matter how obscure the setup (this means the test need to be in control of most of the variables) - Tests should be reasonably fast (obviously this depends on the integration. If we use a slow build tool, we can't magically speed it up, but our overhead should be minimal). ## How it works The current implementation provides a custom `test` helper function that, when used, sets up the environment according to the configuration. It'll create a new temporary directory and create all files, ensuring things like proper `\r\n` line endings on Windows. We do have to patch the `package.json` specifically, since we can not use public versions of the tailwindcss packages as we want to be able to test against a development build. To make this happen, every `pnpm build` run now creates tarballs of the npm modules (that contain only the files that would also in the published build). We then patch the `package.json` to rewrite `workspace:^` versions to link to those tarballs. We found this to work reliably on Windows and macOS as well as being fast enough to not cause any issues. Furthermore we also decided to use `pnpm` as the version manager for integration tests because of it's global module cache (so installing `vite` is fast as soon as you installed it once). The test function will receive a few utilities that it can use to more easily interact with the temp dir. One example is a `fs.glob` function that you can use to easily find files in eventual `dist/` directories or helpers around `spawn` and `exec` that make sure that processes are cleaned up correctly. Because we use tarballs from our build dependencies, working on changes requires a workflow where you run `pnpm build` before running `pnpm test:integrations`. However it also means we can run clients like our CLI client with no additional overhead—just install the dependency like any user would and set up your test cases this way. ## Test plan This PR also includes two Vite specific integration tests: One testing a static build (`pnpm vite build`) and one a dev mode build (`pnpm vite dev`) that also makes changes to the file system and asserts that the resources properly update. --------- Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2024-08-02 11:50:49 +02:00
},
{
"files": [
"integrations/**/*.ts"
],
"options": {
"plugins": [
"prettier-plugin-embed",
"prettier-plugin-organize-imports"
]
}
2024-03-05 14:23:26 +01:00
}
]
},
"scripts": {
"format": "prettier --write .",
"lint": "prettier --check . && turbo lint",
"build": "turbo build --filter=!./playgrounds/*",
"postbuild": "node ./scripts/pack-packages.mjs",
2024-03-05 14:23:26 +01:00
"dev": "turbo dev --filter=!./playgrounds/*",
"test": "cargo test && vitest run --hideSkippedTests",
"test:integrations": "vitest --root=./integrations",
"test:ui": "pnpm run --filter=tailwindcss test:ui && pnpm run --filter=@tailwindcss/browser test:ui",
"tdd": "vitest --hideSkippedTests",
2024-03-05 14:23:26 +01:00
"bench": "vitest bench",
"version-packages": "node ./scripts/version-packages.mjs",
"vite": "pnpm run --filter=vite-playground dev",
"nextjs": "pnpm run --filter=nextjs-playground dev"
},
"license": "MIT",
"devDependencies": {
"@playwright/test": "^1.58.0",
"@types/node": "catalog:",
Update postcss 8.5.4 → 8.5.6 (patch) (#18395) Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ postcss (8.5.4 → 8.5.6) · [Repo](https://github.com/postcss/postcss) · [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/postcss/postcss/releases/tag/8.5.6">8.5.6</a></h4> <blockquote><ul dir="auto"> <li>Fixed <code class="notranslate">ContainerWithChildren</code> type discriminating (by <a href="https://bounce.depfu.com/github.com/Goodwine">@Goodwine</a>).</li> </ul></blockquote> <h4><a href="https://github.com/postcss/postcss/releases/tag/8.5.5">8.5.5</a></h4> <blockquote><ul dir="auto"> <li>Fixed <code class="notranslate">package.json</code>→<code class="notranslate">exports</code> compatibility with some tools (by <a href="https://bounce.depfu.com/github.com/JounQin">@JounQin</a>).</li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/postcss/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/postcss/postcss/compare/6cb4a6673fb6d8b23eb1ebe66a22b6267ab141de...91d6eb5c3d1ca8acb4e8e3926005acf2b066c211">See the full diff on Github</a>. The new version differs by 7 commits:</p> <ul> <li><a href="https://github.com/postcss/postcss/commit/91d6eb5c3d1ca8acb4e8e3926005acf2b066c211"><code>Release 8.5.6 version</code></a></li> <li><a href="https://github.com/postcss/postcss/commit/65ffc55117bf4289b1f977986ed76fad402641b1"><code>Update dependencies</code></a></li> <li><a href="https://github.com/postcss/postcss/commit/ecd20eb7f9587d63e3f3348b768aec0e9fb000d3"><code>Fix ContainerWithChildren to allow discriminating the node type by comparing its type property (#2049)</code></a></li> <li><a href="https://github.com/postcss/postcss/commit/c18159719e4a6d65ad7085edf1dc42e07814f683"><code>Release 8.5.5 version</code></a></li> <li><a href="https://github.com/postcss/postcss/commit/c5523fbec5f32622e77103c643e1258007c2609d"><code>Update dependencies</code></a></li> <li><a href="https://github.com/postcss/postcss/commit/2e3450c55f41e378e086f4f189e5243a573c3390"><code>refactor: `import` should be listed before `require` (#2052)</code></a></li> <li><a href="https://github.com/postcss/postcss/commit/4d720bd01adec2e8645bf91e725825bebb712e1b"><code>Update EM text</code></a></li> </ul> </details> --- ![Depfu Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg) [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@​depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@​depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2025-06-26 11:28:01 +02:00
"postcss": "8.5.6",
Update postcss-import 16.1.0 → 16.1.1 (patch) (#18376) Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ postcss-import (16.1.0 → 16.1.1) · [Repo](https://github.com/postcss/postcss-import) · [Changelog](https://github.com/postcss/postcss-import/blob/master/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4>16.1.1 (from changelog)</h4> <blockquote><ul dir="auto"> <li>Fix incorrect cascade layer order when some resources can not be inlined (<a href="https://bounce.depfu.com/github.com/postcss/postcss-import/issues/567">#567</a>, <a href="https://bounce.depfu.com/github.com/postcss/postcss-import/pull/574">#574</a>)</li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/postcss-import/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/postcss/postcss-import/compare/9217ec361b8d0b062841d5634f40017aeaad078b...4ae9894edc6bced4ad983c5556de493d77c8cc6d">See the full diff on Github</a>. The new version differs by 10 commits:</p> <ul> <li><a href="https://github.com/postcss/postcss-import/commit/4ae9894edc6bced4ad983c5556de493d77c8cc6d"><code>16.1.1</code></a></li> <li><a href="https://github.com/postcss/postcss-import/commit/a3f38897da54e61bcb4a34484dc6a6c0543134bc"><code>Test on modern Node versions (#577)</code></a></li> <li><a href="https://github.com/postcss/postcss-import/commit/10325fc02498da689d3c6f2821c6448c6064831c"><code>Upgrade eslint &amp; config; use flat config (#576)</code></a></li> <li><a href="https://github.com/postcss/postcss-import/commit/92276420402a400566f30d7b494f8b51ef76b0f1"><code>Migrate config renovate.json (#575)</code></a></li> <li><a href="https://github.com/postcss/postcss-import/commit/25441554913ca9f4f8469636ef7001d9cdbdb832"><code>Update dependency prettier to ~3.5.0 (#572)</code></a></li> <li><a href="https://github.com/postcss/postcss-import/commit/83108aa207e96eeac159dde08e2153cddeb7172e"><code>Fix incorrect cascade layer order when some resources can not be inlined (#574)</code></a></li> <li><a href="https://github.com/postcss/postcss-import/commit/cad00220bf02f881be6475e943c499906b623241"><code>Update dependency sugarss to v5 (#568)</code></a></li> <li><a href="https://github.com/postcss/postcss-import/commit/32deb082c687c0d324e5812b3593f7e44af10166"><code>Update dependency c8 to v10 (#565)</code></a></li> <li><a href="https://github.com/postcss/postcss-import/commit/d43ca1506d65d9943a3c4bb885aff94dc809d69c"><code>Update dependency prettier to ~3.4.0 (#569)</code></a></li> <li><a href="https://github.com/postcss/postcss-import/commit/9af465e598b51f933ac15baeab09caf086c3083b"><code>Update dependency prettier to ~3.3.0 (#564)</code></a></li> </ul> </details> --- ![Depfu Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg) [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@​depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@​depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2025-06-24 09:57:35 -04:00
"postcss-import": "^16.1.1",
"prettier": "catalog:",
Update prettier-plugin-embed 0.5.0 → 0.5.1 (minor) (#19492) Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ prettier-plugin-embed (0.5.0 → 0.5.1) · [Repo](https://github.com/Sec-ant/prettier-plugin-embed) · [Changelog](https://github.com/Sec-ant/prettier-plugin-embed/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/Sec-ant/prettier-plugin-embed/releases/tag/v0.5.1">0.5.1</a></h4> <blockquote><h3 dir="auto">Patch Changes</h3> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/Sec-ant/prettier-plugin-embed/commit/0c1b3c457c56d742a72b686c64cb076ad61f8047"><tt>0c1b3c4</tt></a>: Fix indentation issues in sql, css and markdown embedded languages.</li> <li> <a href="https://bounce.depfu.com/github.com/Sec-ant/prettier-plugin-embed/commit/0c1b3c457c56d742a72b686c64cb076ad61f8047"><tt>0c1b3c4</tt></a>: Fix embedded xml and prisma formatting behavior.</li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/prettier-plugin-embed/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/Sec-ant/prettier-plugin-embed/compare/488a11218e6315c68e971f3585c012f7c2ac39b0...41d171dfd748321387541a977b924732476a7407">See the full diff on Github</a>. The new version differs by 3 commits:</p> <ul> <li><a href="https://github.com/Sec-ant/prettier-plugin-embed/commit/41d171dfd748321387541a977b924732476a7407"><code>chore(release): v0.5.1 (#158)</code></a></li> <li><a href="https://github.com/Sec-ant/prettier-plugin-embed/commit/80173f4eb76f658d6c96574e6f6e3cf3d0e8dbad"><code>fix(ci): test workflow</code></a></li> <li><a href="https://github.com/Sec-ant/prettier-plugin-embed/commit/0c1b3c457c56d742a72b686c64cb076ad61f8047"><code>fix: refactor embedded options and embedder logic (#157)</code></a></li> </ul> </details> --- ![Depfu Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg) [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@​depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@​depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2025-12-26 12:36:51 -05:00
"prettier-plugin-embed": "^0.5.1",
Update prettier-plugin-organize-imports 4.2.0 → 4.3.0 (minor) (#19013) Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ prettier-plugin-organize-imports (4.2.0 → 4.3.0) · [Repo](https://github.com/simonhaenisch/prettier-plugin-organize-imports) · [Changelog](https://github.com/simonhaenisch/prettier-plugin-organize-imports/blob/master/changelog.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/releases/tag/v4.3.0">4.3.0</a></h4> <blockquote><h2 dir="auto">What's Changed</h2> <ul dir="auto"> <li>feat: allow configuration of <code class="notranslate">organizeImportsTypeOrder</code>(<a href="https://bounce.depfu.com/github.com/simonhaenisch/prettier-plugin-organize-imports/pull/152">#152</a>) - thanks <a href="https://bounce.depfu.com/github.com/goege64">@goege64</a> for your first contribution 🎉</li> </ul> <p dir="auto"><strong>Full Changelog</strong>: <a href="https://bounce.depfu.com/github.com/simonhaenisch/prettier-plugin-organize-imports/compare/v4.2.0...v4.3.0"><tt>v4.2.0...v4.3.0</tt></a></p></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/prettier-plugin-organize-imports/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/compare/93df5019c4295cf286bc7c6b3726393b6bbf46a2...f354c0ef8689f4592807e85fa5bc0157588390c7">See the full diff on Github</a>. The new version differs by 4 commits:</p> <ul> <li><a href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/commit/f354c0ef8689f4592807e85fa5bc0157588390c7"><code>4.3.0</code></a></li> <li><a href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/commit/98d053aa1669d0c5d25b898ac7a321e327efd00d"><code>chore: update dev dependencies</code></a></li> <li><a href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/commit/bc4d8facb09bb386322a0fde63f1f9115cc44df5"><code>feat: allow configuration of `organizeImportsTypeOrder` (#152)</code></a></li> <li><a href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/commit/ed9c19a5b193d75c88301a9c0a5cac96c9cfa6d6"><code>docs: update changelog</code></a></li> </ul> </details> --- ![Depfu Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg) [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@​depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@​depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2025-09-26 16:10:41 -04:00
"prettier-plugin-organize-imports": "^4.3.0",
Update tsup 8.5.0 → 8.5.1 (patch) (#19338) Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ tsup (8.5.0 → 8.5.1) Sorry, we couldn't find anything useful about this release. --- ![Depfu Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg) [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@​depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@​depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2025-11-19 18:18:45 -05:00
"tsup": "^8.5.1",
"turbo": "^2.7.6",
"typescript": "^5.5.4",
"vitest": "^4.0.18"
},
Add standalone CLI (#14270) This PR adds a new standalone client: A single-binary file that you can use to run Tailwind v4 without having a node setup. To make this work we use Bun's single-binary build which can properly package up native modules and the bun runtime for us so we do not have to rely on any expand-into-tmp-folder-at-runtime workarounds. When running locally, `pnpm build` will now standalone artifacts inside `packages/@tailwindcss-standalone/dist`. Note that since we do not build Oxide for other environments in the local setup, you won't be able to use the standalone artifacts for other platforms in local dev mode. Unfortunately Bun does not have support for Windows ARM builds yet but we found that using the `bun-baseline` runtime for Windows x64 would make the builds work fine in ARM emulation mode: ![Screenshot windows](https://github.com/user-attachments/assets/5b39387f-ec50-4757-9469-19b98e43162d) Some Bun related issues we faced and worked around: - We found that the regular Windows x64 build of `bun` does not run on Windows ARM via emulation. Instead, we have to use the `bun-baseline` builds which emulate correctly. - When we tried to bundle artifacts with [embed directories](https://bun.sh/docs/bundler/executables#embed-directories), node binary dependencies were no longer resolved correctly even though they would still be bundled and accessible within the [`embeddedFiles` list](https://bun.sh/docs/bundler/executables#listing-embedded-files). We worked around this by using the `import * as from ... with { type: "file" };` and patching the resolver we use in our CLI. - If you have an import to a module that is used as a regular import _and_ a `with { type: "file" }`, it will either return the module in both cases _or_ the file path when we would expect only the `with { type: "file" }` import to return the path. We do read the Tailwind CSS version via the file system and `require.resolve()` in the CLI and via `import * from './package.json'` in core and had to work around this by patching the version resolution in our CLI. ```ts import packageJson from "./package.json" import packageJsonPath from "./package.json" with {type: "file"} // We do not expect these to be equal packageJson === packageJsonPath ``` - We can not customize the app icon used for Windows `.exe` builds without decompiling the binary. For now we will leave the default but one workaround is to [use tools like ResourceHacker](https://github.com/tailwindlabs/tailwindcss/pull/14270/commits/698d9c4bd182391adb4b236f19a539aff13f78f9) to decompile the binary first. --------- Co-authored-by: Jordan Pittman <jordan@cryptica.me> Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2024-09-02 15:23:46 +02:00
"packageManager": "pnpm@9.6.0",
"pnpm": {
"patchedDependencies": {
"@parcel/watcher@2.5.1": "patches/@parcel__watcher@2.5.1.patch",
"lightningcss@1.32.0": "patches/lightningcss@1.32.0.patch"
Add standalone CLI (#14270) This PR adds a new standalone client: A single-binary file that you can use to run Tailwind v4 without having a node setup. To make this work we use Bun's single-binary build which can properly package up native modules and the bun runtime for us so we do not have to rely on any expand-into-tmp-folder-at-runtime workarounds. When running locally, `pnpm build` will now standalone artifacts inside `packages/@tailwindcss-standalone/dist`. Note that since we do not build Oxide for other environments in the local setup, you won't be able to use the standalone artifacts for other platforms in local dev mode. Unfortunately Bun does not have support for Windows ARM builds yet but we found that using the `bun-baseline` runtime for Windows x64 would make the builds work fine in ARM emulation mode: ![Screenshot windows](https://github.com/user-attachments/assets/5b39387f-ec50-4757-9469-19b98e43162d) Some Bun related issues we faced and worked around: - We found that the regular Windows x64 build of `bun` does not run on Windows ARM via emulation. Instead, we have to use the `bun-baseline` builds which emulate correctly. - When we tried to bundle artifacts with [embed directories](https://bun.sh/docs/bundler/executables#embed-directories), node binary dependencies were no longer resolved correctly even though they would still be bundled and accessible within the [`embeddedFiles` list](https://bun.sh/docs/bundler/executables#listing-embedded-files). We worked around this by using the `import * as from ... with { type: "file" };` and patching the resolver we use in our CLI. - If you have an import to a module that is used as a regular import _and_ a `with { type: "file" }`, it will either return the module in both cases _or_ the file path when we would expect only the `with { type: "file" }` import to return the path. We do read the Tailwind CSS version via the file system and `require.resolve()` in the CLI and via `import * from './package.json'` in core and had to work around this by patching the version resolution in our CLI. ```ts import packageJson from "./package.json" import packageJsonPath from "./package.json" with {type: "file"} // We do not expect these to be equal packageJson === packageJsonPath ``` - We can not customize the app icon used for Windows `.exe` builds without decompiling the binary. For now we will leave the default but one workaround is to [use tools like ResourceHacker](https://github.com/tailwindlabs/tailwindcss/pull/14270/commits/698d9c4bd182391adb4b236f19a539aff13f78f9) to decompile the binary first. --------- Co-authored-by: Jordan Pittman <jordan@cryptica.me> Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2024-09-02 15:23:46 +02:00
}
}
2024-03-05 14:23:26 +01:00
}