Use pnpm v11#20094
Conversation
The issue is sthat for `require` in exports, the file has to be in CommonJS syntax. But that only happens once we compile. We can try to modify the the .cts file directly to get it into a more CommonJS-style file. But I think it's safer to just rely on the build files. This is only necessary for our Next.js playground where we require CommonJS. Other spots that use `@tailwindcss/node` during tests will still use the src file in TypeScript / ESM format.
| "pnpm": { | ||
| "patchedDependencies": { | ||
| "@parcel/watcher@2.5.1": "patches/@parcel__watcher@2.5.1.patch", | ||
| "lightningcss@1.32.0": "patches/lightningcss@1.32.0.patch" | ||
| } | ||
| } |
There was a problem hiding this comment.
This is moved to the pnpm-workspace.yaml file
| '@parcel/watcher': true | ||
| bun: true | ||
| esbuild: true | ||
| sharp: false |
There was a problem hiding this comment.
Only used in the Next.js playground where we don't work with images so no need to allow the build for this.
| @@ -1 +0,0 @@ | |||
| node-linker=hoisted | |||
There was a problem hiding this comment.
This was hoisted to the pnpm-workspace.yaml file
| # TODO: Scope this just for the oxide-wasm32-wasi package | ||
| nodeLinker: hoisted | ||
| # packageConfigs: | ||
| # '@tailwindcss/oxide-wasm32-wasi': | ||
| # nodeLinker: hoisted |
There was a problem hiding this comment.
Ideally we scope nodeLinker just for the @tailwindcss/oxide-wasm32-wasi package, but that causes issues during pnpm install
The initial setup was done using pnpx codemod run pnpm-v10-to-v11, but turns out that's invalid.
| "prettier-plugin-organize-imports": "^4.3.0", | ||
| "tsup": "^8.5.1", | ||
| "turbo": "^2.9.6", | ||
| "turbo": "^2.9.14", |
There was a problem hiding this comment.
Necessary for pnpm v11 compatibility. See: https://github.com/vercel/turborepo/releases/tag/v2.9.7
We only needed to bump 1 patch version, but using the latest version to get other fixes.
Because of the `nodeLinker: hoisted`, resolutions of dependencies start from the root where `tailwindcss` couldn't be found. I don't like this, I don't like the top-level `nodeLinker` setup. But going to see if we can get further with this setup in CI.
We do need the workspace for the overrides to work
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? #### ✳️ eslint (9.35.0 → 9.36.0) · [Repo](https://github.com/eslint/eslint) · [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/eslint/eslint/releases/tag/v9.36.0">9.36.0</a></h4> <blockquote><h2 dir="auto">Features</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/47afcf668df65eac68d7b04145d037037010a076"><code class="notranslate">47afcf6</code></a> feat: correct <code class="notranslate">preserve-caught-error</code> edge cases (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20109">#20109</a>) (Francesco Trotta)</li> </ul> <h2 dir="auto">Bug Fixes</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/75b74d865d3b8e7fa3bcf5ad29f4bf6d18d1310e"><code class="notranslate">75b74d8</code></a> fix: add missing rule option types (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20127">#20127</a>) (ntnyq)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/1c0d85049e3f30a8809340c1abc881c63b7812ff"><code class="notranslate">1c0d850</code></a> fix: update <code class="notranslate">eslint-all.js</code> to use <code class="notranslate">Object.freeze</code> for <code class="notranslate">rules</code> object (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20116">#20116</a>) (루밀LuMir)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/7d61b7fadc9c5c6f2b131e37e8a3cffa5aae8ee6"><code class="notranslate">7d61b7f</code></a> fix: add missing scope types to <code class="notranslate">Scope.type</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20110">#20110</a>) (Pixel998)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/7a670c301b58609017ce8cfda99ee81f95de3898"><code class="notranslate">7a670c3</code></a> fix: correct rule option typings in <code class="notranslate">rules.d.ts</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20084">#20084</a>) (Pixel998)</li> </ul> <h2 dir="auto">Documentation</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/b73ab12acd3e87f8d8173cda03499f6cd1f26db6"><code class="notranslate">b73ab12</code></a> docs: update examples to use <code class="notranslate">defineConfig</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20131">#20131</a>) (sethamus)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/31d93926990fba536846ec727d7a2625fc844649"><code class="notranslate">31d9392</code></a> docs: fix typos (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20118">#20118</a>) (Pixel998)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/c7f861b3f8c1ac961b4cd4f22483798f3324c62b"><code class="notranslate">c7f861b</code></a> docs: Update README (GitHub Actions Bot)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/6b0c08b106aa66f2e9fa484282f0eb63c64a1215"><code class="notranslate">6b0c08b</code></a> docs: Update README (GitHub Actions Bot)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/91f97c50468fbdc089c91e99c2ea0fe821911df2"><code class="notranslate">91f97c5</code></a> docs: Update README (GitHub Actions Bot)</li> </ul> <h2 dir="auto">Chores</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/12411e8d450ed26a5f7cca6a78ec05323c9323e8"><code class="notranslate">12411e8</code></a> chore: upgrade @eslint/js@9.36.0 (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20139">#20139</a>) (Milos Djermanovic)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/488cba6b391b97b2cfc74bbb46fdeacb1361949e"><code class="notranslate">488cba6</code></a> chore: package.json update for @eslint/js release (Jenkins)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/bac82a2a9c80a3f69087852758d7737aea371f09"><code class="notranslate">bac82a2</code></a> ci: simplify renovate configuration (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/19907">#19907</a>) (唯然)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/c00bb37d62c1bcc0a37f094371be9c40064009f1"><code class="notranslate">c00bb37</code></a> ci: bump actions/labeler from 5 to 6 (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20090">#20090</a>) (dependabot[bot])</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/fee751dc8aeab54547af4538332ea5c069ef28b6"><code class="notranslate">fee751d</code></a> refactor: use <code class="notranslate">defaultOptions</code> in rules (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20121">#20121</a>) (Pixel998)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/1ace67d9f7903adc3d3f09868aa05b673e7d3f3b"><code class="notranslate">1ace67d</code></a> chore: update example to use <code class="notranslate">defineConfig</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20111">#20111</a>) (루밀LuMir)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/4821963bf765532069c49e9da9ecbe9485b073fc"><code class="notranslate">4821963</code></a> test: add missing loc information to error objects in rule tests (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20112">#20112</a>) (루밀LuMir)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/b42c42e7cd3ac9ee1b5a15f16ff25b325d0482e4"><code class="notranslate">b42c42e</code></a> chore: disallow use of deprecated <code class="notranslate">type</code> property in core rule tests (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20094">#20094</a>) (Milos Djermanovic)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/7bb498d720dcd054cc042ca4b60b138d8485f07c"><code class="notranslate">7bb498d</code></a> test: remove deprecated <code class="notranslate">type</code> property from core rule tests (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20093">#20093</a>) (Pixel998)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/e10cf2ab42fe5b481d980dc652f7504414747733"><code class="notranslate">e10cf2a</code></a> ci: bump actions/setup-node from 4 to 5 (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20089">#20089</a>) (dependabot[bot])</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/5cb0ce48ef6cfbbe6d09131c33a53f9d66fe9bd4"><code class="notranslate">5cb0ce4</code></a> refactor: use <code class="notranslate">meta.defaultOptions</code> in <code class="notranslate">preserve-caught-error</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20080">#20080</a>) (Pixel998)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/f9f7cb578dced3c14f635e17c75aa6744d291f4d"><code class="notranslate">f9f7cb5</code></a> chore: package.json update for eslint-config-eslint release (Jenkins)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/81764b298065a328038cd067bc8fedef97e57500"><code class="notranslate">81764b2</code></a> chore: update <code class="notranslate">eslint</code> peer dependency in <code class="notranslate">eslint-config-eslint</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20079">#20079</a>) (Milos Djermanovic)</li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/eslint/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/eslint/eslint/compare/8401101d1e3e3e4e1edc2a9e59cafc9956bf2610...b4857e54e54b5dba96d156cd8d8b4d42dc5a3bf4">See the full diff on Github</a>. The new version differs by 25 commits:</p> <ul> <li><a href="https://github.com/eslint/eslint/commit/b4857e54e54b5dba96d156cd8d8b4d42dc5a3bf4"><code>9.36.0</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/5878a4243f623b46b476eb81043d06244eae5877"><code>Build: changelog update for 9.36.0</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/12411e8d450ed26a5f7cca6a78ec05323c9323e8"><code>chore: upgrade @eslint/js@9.36.0 (tailwindlabs#20139)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/488cba6b391b97b2cfc74bbb46fdeacb1361949e"><code>chore: package.json update for @eslint/js release</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/b73ab12acd3e87f8d8173cda03499f6cd1f26db6"><code>docs: update examples to use `defineConfig` (tailwindlabs#20131)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/47afcf668df65eac68d7b04145d037037010a076"><code>feat: correct `preserve-caught-error` edge cases (tailwindlabs#20109)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/75b74d865d3b8e7fa3bcf5ad29f4bf6d18d1310e"><code>fix: add missing rule option types (tailwindlabs#20127)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/bac82a2a9c80a3f69087852758d7737aea371f09"><code>ci: simplify renovate configuration (tailwindlabs#19907)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/1c0d85049e3f30a8809340c1abc881c63b7812ff"><code>fix: update `eslint-all.js` to use `Object.freeze` for `rules` object (tailwindlabs#20116)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/c00bb37d62c1bcc0a37f094371be9c40064009f1"><code>ci: bump actions/labeler from 5 to 6 (tailwindlabs#20090)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/fee751dc8aeab54547af4538332ea5c069ef28b6"><code>refactor: use `defaultOptions` in rules (tailwindlabs#20121)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/31d93926990fba536846ec727d7a2625fc844649"><code>docs: fix typos (tailwindlabs#20118)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/7d61b7fadc9c5c6f2b131e37e8a3cffa5aae8ee6"><code>fix: add missing scope types to `Scope.type` (tailwindlabs#20110)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/1ace67d9f7903adc3d3f09868aa05b673e7d3f3b"><code>chore: update example to use `defineConfig` (tailwindlabs#20111)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/4821963bf765532069c49e9da9ecbe9485b073fc"><code>test: add missing loc information to error objects in rule tests (tailwindlabs#20112)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/c7f861b3f8c1ac961b4cd4f22483798f3324c62b"><code>docs: Update README</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/6b0c08b106aa66f2e9fa484282f0eb63c64a1215"><code>docs: Update README</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/7a670c301b58609017ce8cfda99ee81f95de3898"><code>fix: correct rule option typings in `rules.d.ts` (tailwindlabs#20084)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/b42c42e7cd3ac9ee1b5a15f16ff25b325d0482e4"><code>chore: disallow use of deprecated `type` property in core rule tests (tailwindlabs#20094)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/7bb498d720dcd054cc042ca4b60b138d8485f07c"><code>test: remove deprecated `type` property from core rule tests (tailwindlabs#20093)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/91f97c50468fbdc089c91e99c2ea0fe821911df2"><code>docs: Update README</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/e10cf2ab42fe5b481d980dc652f7504414747733"><code>ci: bump actions/setup-node from 4 to 5 (tailwindlabs#20089)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/5cb0ce48ef6cfbbe6d09131c33a53f9d66fe9bd4"><code>refactor: use `meta.defaultOptions` in `preserve-caught-error` (tailwindlabs#20080)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/f9f7cb578dced3c14f635e17c75aa6744d291f4d"><code>chore: package.json update for eslint-config-eslint release</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/81764b298065a328038cd067bc8fedef97e57500"><code>chore: update `eslint` peer dependency in `eslint-config-eslint` (tailwindlabs#20079)</code></a></li> </ul> </details> ---  [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>
This PR upgrades the repo to use pnpm v11
This also includes some cleanup to make sure all builds work. For example the Next.js playground uses
@tailwindcss/nodebut it requires CommonJS syntax. The.ctsfile is in ESM and is later converted to CommonJS during a build step. For that reason we changed theexportsfield to use thedist/files for CommonJS instead.This also cleans up the
pnpm-lock.yamlfile found in thewasm32-wasipackage. It also hoists thenodeLinkerto the rootpnpm-workspace.ymlfile as required by pnpm v11. That said, I noticed a weird bug withpnpm packthat it looks for a top-levelnodeLinkerbut not for a specific package. For that we use the nodeLinker flag during our pack command.Pnpm 11 (maybe even 10) moves a lot of information to the
pnpm-workspace.yamlfile. In our integration tests we often rely on thepnpm.overridesfield of thepackage.jsonfiles. So this PR also makes some changes there to make sure that we do move overrides to the yaml file.Test plan