tailwindcss/packages/@tailwindcss-cli/package.json

41 lines
1,008 B
JSON
Raw Normal View History

{
"name": "@tailwindcss/cli",
2026-04-21 14:52:34 +02:00
"version": "4.2.4",
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/tailwindlabs/tailwindcss.git",
"directory": "packages/@tailwindcss-cli"
},
"bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
"homepage": "https://tailwindcss.com",
"scripts": {
"lint": "tsc --noEmit",
Add `@source` support (#14078) This PR is an umbrella PR where we will add support for the new `@source` directive. This will allow you to add explicit content glob patterns if you want to look for Tailwind classes in other files that are not automatically detected yet. Right now this is an addition to the existing auto content detection that is automatically enabled in the `@tailwindcss/postcss` and `@tailwindcss/cli` packages. The `@tailwindcss/vite` package doesn't use the auto content detection, but uses the module graph instead. From an API perspective there is not a lot going on. There are only a few things that you have to know when using the `@source` directive, and you probably already know the rules: 1. You can use multiple `@source` directives if you want. 2. The `@source` accepts a glob pattern so that you can match multiple files at once 3. The pattern is relative to the current file you are in 4. The pattern includes all files it is matching, even git ignored files 1. The motivation for this is so that you can explicitly point to a `node_modules` folder if you want to look at `node_modules` for whatever reason. 6. Right now we don't support negative globs (starting with a `!`) yet, that will be available in the near future. Usage example: ```css /* ./src/input.css */ @import "tailwindcss"; @source "../laravel/resources/views/**/*.blade.php"; @source "../../packages/monorepo-package/**/*.js"; ``` It looks like the PR introduced a lot of changes, but this is a side effect of all the other plumbing work we had to do to make this work. For example: 1. We added dedicated integration tests that run on Linux and Windows in CI (just to make sure that all the `path` logic is correct) 2. We Have to make sure that the glob patterns are always correct even if you are using `@import` in your CSS and use `@source` in an imported file. This is because we receive the flattened CSS contents where all `@import`s are inlined. 3. We have to make sure that we also listen for changes in the files that match any of these patterns and trigger a rebuild. PRs: - [x] https://github.com/tailwindlabs/tailwindcss/pull/14063 - [x] https://github.com/tailwindlabs/tailwindcss/pull/14085 - [x] https://github.com/tailwindlabs/tailwindcss/pull/14079 - [x] https://github.com/tailwindlabs/tailwindcss/pull/14067 - [x] https://github.com/tailwindlabs/tailwindcss/pull/14076 - [x] https://github.com/tailwindlabs/tailwindcss/pull/14080 - [x] https://github.com/tailwindlabs/tailwindcss/pull/14127 - [x] https://github.com/tailwindlabs/tailwindcss/pull/14135 Once all the PRs are merged, then this umbrella PR can be merged. > [!IMPORTANT] > Make sure to merge this without rebasing such that each individual PR ends up on the main branch. --------- Co-authored-by: Philipp Spiess <hello@philippspiess.com> Co-authored-by: Jordan Pittman <jordan@cryptica.me> Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2024-08-07 16:38:44 +02:00
"build": "tsup-node",
"dev": "pnpm run build -- --watch"
},
"bin": {
"tailwindcss": "./dist/index.mjs"
},
"exports": {
"./package.json": "./package.json"
},
"files": [
"dist"
],
"publishConfig": {
"provenance": true,
"access": "public"
},
"dependencies": {
"@parcel/watcher": "^2.5.1",
"@tailwindcss/node": "workspace:*",
"@tailwindcss/oxide": "workspace:*",
Update enhanced-resolve 5.20.1 → 5.21.0 (minor) (#19998) 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? #### ✳️ enhanced-resolve (5.20.1 → 5.21.0) · [Repo](https://github.com/webpack/enhanced-resolve) · [Changelog](https://github.com/webpack/enhanced-resolve/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/webpack/enhanced-resolve/releases/tag/v5.21.0">5.21.0</a></h4> <blockquote><h3 dir="auto">Minor Changes</h3> <ul dir="auto"> <li> <p dir="auto">Added promise API and support to resolve without <code class="notranslate">context</code> and <code class="notranslate">resolveContext</code>. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/520">#520</a>)</p> </li> <li> <p dir="auto">Add <code class="notranslate">extensionAliasForExports</code> option. When <code class="notranslate">true</code>, <code class="notranslate">extensionAlias</code> also applies to paths resolved through the <code class="notranslate">package.json</code> <code class="notranslate">exports</code> field. Off by default to match Node.js; opt in for full TypeScript-resolver parity with packages that ship <code class="notranslate">.ts</code> sources alongside the compiled <code class="notranslate">.js</code> they declare in <code class="notranslate">exports</code>. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/554">#554</a>)</p> </li> </ul> <h3 dir="auto">Patch Changes</h3> <ul dir="auto"> <li> <p dir="auto">Properly handle DOS device paths (<code class="notranslate">\\?\…</code> and <code class="notranslate">\\.\…</code>). (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/551">#551</a>)</p> </li> <li> <p dir="auto">Prevent fallback to parent node_modules when the <code class="notranslate">exports</code> field target file is not found. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/495">#495</a>)</p> </li> <li> <p dir="auto">Imports field spec deviation: non-relative targets (e.g. <code class="notranslate">"#a": "#b"</code>) no longer re-enter imports resolution, aligning with the Node.js ESM spec where <code class="notranslate">PACKAGE_IMPORTS_RESOLVE</code> does not recursively resolve <code class="notranslate">#</code> specifiers. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/503">#503</a>)</p> <p dir="auto">Previously <code class="notranslate">{ "#a": "#b", "#b": "./the.js" }</code> would chain-resolve <code class="notranslate">#a</code> to <code class="notranslate">./the.js</code>; now it correctly fails, matching Node.js behavior.</p> </li> <li> <p dir="auto">Move <code class="notranslate">cachedJoin</code>/<code class="notranslate">cachedDirname</code>/<code class="notranslate">createCachedBasename</code> caches from module-level globals to per-Resolver instances. This prevents unbounded memory growth in long-running processes — when a Resolver is garbage collected, its join/dirname/basename caches are released with it. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/507">#507</a>)</p> </li> <li> <p dir="auto">Fixed when <code class="notranslate">tsconfig: true</code> is used (default config file) and no <code class="notranslate">tsconfig.json</code> exists. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/502">#502</a>)</p> </li> <li> <p dir="auto">Apply the <code class="notranslate">extensionAlias</code> option to the <code class="notranslate">imports</code> field to be align with typescript resolution. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/549">#549</a>)</p> </li> <li> <p dir="auto">Improved performance of the many plugins. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/529">#529</a>)</p> </li> <li> <p dir="auto">Replace the <code class="notranslate">Set&lt;string&gt;</code>-based resolver stack with a singly-linked <code class="notranslate">StackEntry</code> class that exposes a Set-compatible API. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/526">#526</a>)</p> <p dir="auto">Each <code class="notranslate">doResolve</code> call now prepends a single linked-list node instead of cloning the entire Set, making stack push O(1) in time and memory. Recursion detection walks the linked list (O(n)), but because the stack is typically shallow this is much cheaper than cloning a Set per call.</p> </li> <li> <p dir="auto">Cache the result of <code class="notranslate">stripJsonComments</code> + <code class="notranslate">JSON.parse</code> in <code class="notranslate">readJson</code> using a <code class="notranslate">WeakMap</code> keyed by the raw file buffer. This avoids redundant comment-stripping and JSON parsing on every resolve call that reads tsconfig.json files (via <code class="notranslate">stripComments: true</code>), improving TsconfigPathsPlugin warm performance by ~20-35% depending on the depth of the <code class="notranslate">extends</code> chain. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/524">#524</a>)</p> </li> <li> <p dir="auto">Avoid OOM in CachedInputFileSystem when duration is Infinity. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/527">#527</a>)</p> </li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/enhanced-resolve/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/webpack/enhanced-resolve/compare/ebc67d38969e8abe6789a51968380fa721fea778...35035ca158f1c8ada86fcf1653f319cbce669200">See the full diff on Github</a>. The new version differs by more commits than we can show here.</p> </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>
2026-05-01 11:29:19 +00:00
"enhanced-resolve": "^5.21.0",
"mri": "^1.2.0",
"picocolors": "^1.1.1",
Ensure clients pin the `tailwindcss` version (#15011) We noticed that in the current alpha 34 release, the `package.json` file of the `@tailwindcss/node` package only defines `tailwindcss` as a dev dependency. This makes it very easy for version mismatches to happen when a v3 version (or an earlier v4 alpha for that matter) was installed in the same project: ```json { "name": "@tailwindcss/node", "version": "4.0.0-alpha.34", "description": "A utility-first CSS framework for rapidly building custom user interfaces.", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/tailwindlabs/tailwindcss.git", "directory": "packages/@tailwindcss-node" }, "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", "homepage": "https://tailwindcss.com", "files": [ "dist/" ], "publishConfig": { "provenance": true, "access": "public" }, "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.js" }, "./require-cache": { "types": "./dist/require-cache.d.ts", "default": "./dist/require-cache.js" }, "./esm-cache-loader": { "types": "./dist/esm-cache.loader.d.mts", "default": "./dist/esm-cache.loader.mjs" } }, "devDependencies": { "tailwindcss": "4.0.0-alpha.34" }, "dependencies": { "enhanced-resolve": "^5.17.1", "jiti": "^2.0.0-beta.3" }, "scripts": { "build": "tsup-node", "dev": "pnpm run build -- --watch" } } ``` Furthermore, we were trying to fix issues where our integration test setup could not install `tailwindcss@3` because of how we did pnpm overrides. This PR fixes this by: - Ensuring every client that calls into `tailwindcss` core marks it as a version-pinned dependency. You are still required to install `tailwindcss` in your project along side a client (e.g. `@tailwindcss/vite`) but we now only use your installed version for importing the respective `.css` files. For the core logic, we are now requiring each package to use `tailwindcss` at the same version. This should help resolve issues like https://github.com/tailwindlabs/tailwindcss/discussions/14652 - We tried to eliminate the dependency on `tailwindcss` from the `@tailwindcss/upgrade` package. Unfortunately this is not possible to do right now because we need to load the CSS files from v4 to create the right environment. In a future version we could bundle the required CSS files with `@tailwidncss/upgrade` but it doesn't seem necessary for now. - We then changed our integration test overrides to only override the `tailwindcss` package that are dependencies of the known list of packages that we have `tailwindcss` dependencies on: `@tailwindcss/node` and `@tailwindcss/upgrade`. This ensures that we can install v3 of `tailwindcss` in the integration tests and it will work. Something we want to do for some upgrade tests. # Test plan Integration work again. Furthermore we added a quick setup with the CLI using the local tarballs and ensured it works: ```bash pnpm init pnpm install ../../tailwindcss/dist/tailwindcss-cli.tgz pnpm install ../../tailwindcss/dist/tailwindcss.tgz echo '@import "tailwindcss";' > index.css echo '<div class="underline"></div>' > index.html pnpm tailwindcss -i index.css -o out.css cat out.css ```
2024-11-15 17:18:48 +01:00
"tailwindcss": "workspace:*"
}
}