From ef3dbde306d3b97503e3ed9858e1648fcaf2855e Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Mon, 22 Sep 2025 14:36:38 -0400 Subject: [PATCH 1/2] Bump Jiti dep --- .../tailwindcss-language-server/package.json | 2 +- pnpm-lock.yaml | 54 ++++++++----------- 2 files changed, 24 insertions(+), 32 deletions(-) diff --git a/packages/tailwindcss-language-server/package.json b/packages/tailwindcss-language-server/package.json index b71312b1..8b646fd9 100644 --- a/packages/tailwindcss-language-server/package.json +++ b/packages/tailwindcss-language-server/package.json @@ -74,7 +74,7 @@ "enhanced-resolve": "^5.16.1", "esbuild": "^0.25.5", "find-up": "5.0.0", - "jiti": "^2.3.3", + "jiti": "^2.6.0", "klona": "2.0.4", "minimist": "^1.2.8", "normalize-path": "3.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cbb046ad..9780811e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -162,8 +162,8 @@ importers: specifier: 5.0.0 version: 5.0.0 jiti: - specifier: ^2.3.3 - version: 2.3.3 + specifier: ^2.6.0 + version: 2.6.0 klona: specifier: 2.0.4 version: 2.0.4 @@ -220,13 +220,13 @@ importers: version: 5.8.3 vite: specifier: ^6.3.6 - version: 6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) + version: 6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) vite-tsconfig-paths: specifier: ^5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0)) + version: 5.1.4(typescript@5.8.3)(vite@6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0)) vitest: specifier: ^3.2.1 - version: 3.2.1(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) + version: 3.2.1(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) vscode-css-languageservice: specifier: 6.3.7 version: 6.3.7 @@ -368,10 +368,10 @@ importers: version: 5.8.3 vite: specifier: ^6.3.6 - version: 6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) + version: 6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) vitest: specifier: ^3.2.1 - version: 3.2.1(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) + version: 3.2.1(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) packages/tailwindcss-language-syntax: devDependencies: @@ -383,7 +383,7 @@ importers: version: 1.5.3 vitest: specifier: ^3.2.1 - version: 3.2.1(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) + version: 3.2.1(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) vscode-oniguruma: specifier: ^2.0.1 version: 2.0.1 @@ -692,13 +692,11 @@ packages: '@parcel/watcher-darwin-arm64@2.5.1': resolution: {integrity: sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==} engines: {node: '>= 10.0.0'} - cpu: [arm64] os: [darwin] '@parcel/watcher-darwin-x64@2.5.1': resolution: {integrity: sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==} engines: {node: '>= 10.0.0'} - cpu: [x64] os: [darwin] '@parcel/watcher-freebsd-x64@2.5.1': @@ -722,31 +720,26 @@ packages: '@parcel/watcher-linux-arm64-glibc@2.5.1': resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==} engines: {node: '>= 10.0.0'} - cpu: [arm64] os: [linux] '@parcel/watcher-linux-arm64-musl@2.5.1': resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==} engines: {node: '>= 10.0.0'} - cpu: [arm64] os: [linux] '@parcel/watcher-linux-x64-glibc@2.5.1': resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==} engines: {node: '>= 10.0.0'} - cpu: [x64] os: [linux] '@parcel/watcher-linux-x64-musl@2.5.1': resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} engines: {node: '>= 10.0.0'} - cpu: [x64] os: [linux] '@parcel/watcher-win32-arm64@2.5.1': resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==} engines: {node: '>= 10.0.0'} - cpu: [arm64] os: [win32] '@parcel/watcher-win32-ia32@2.5.1': @@ -758,7 +751,6 @@ packages: '@parcel/watcher-win32-x64@2.5.1': resolution: {integrity: sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==} engines: {node: '>= 10.0.0'} - cpu: [x64] os: [win32] '@parcel/watcher@2.5.1': @@ -1724,8 +1716,8 @@ packages: resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true - jiti@2.3.3: - resolution: {integrity: sha512-EX4oNDwcXSivPrw2qKH2LB5PoFxEvgtv2JgwW0bU858HoLQ+kutSvjLMUqBd0PeJYEinLWhoI9Ol0eYMqj/wNQ==} + jiti@2.6.0: + resolution: {integrity: sha512-VXe6RjJkBPj0ohtqaO8vSWP3ZhAKo66fKrFNCll4BTcwljPLz03pCbaNKfzGP5MbrCYcbJ7v0nOYYwUzTEIdXQ==} hasBin: true js-tokens@4.0.0: @@ -3241,13 +3233,13 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.1(vite@6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0))': + '@vitest/mocker@3.2.1(vite@6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0))': dependencies: '@vitest/spy': 3.2.1 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) + vite: 6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) '@vitest/pretty-format@3.2.1': dependencies: @@ -3917,7 +3909,7 @@ snapshots: jiti@1.21.6: {} - jiti@2.3.3: {} + jiti@2.6.0: {} js-tokens@4.0.0: {} @@ -4805,13 +4797,13 @@ snapshots: dependencies: builtins: 5.0.1 - vite-node@3.2.1(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0): + vite-node@3.2.1(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0): dependencies: cac: 6.7.14 debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) + vite: 6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) transitivePeerDependencies: - '@types/node' - jiti @@ -4826,18 +4818,18 @@ snapshots: - tsx - yaml - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.8.3) optionalDependencies: - vite: 6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) + vite: 6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) transitivePeerDependencies: - supports-color - typescript - vite@6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0): + vite@6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0): dependencies: esbuild: 0.25.5 fdir: 6.5.0(picomatch@4.0.3) @@ -4848,14 +4840,14 @@ snapshots: optionalDependencies: '@types/node': 18.19.43 fsevents: 2.3.3 - jiti: 2.3.3 + jiti: 2.6.0 yaml: 2.5.0 - vitest@3.2.1(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0): + vitest@3.2.1(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.1 - '@vitest/mocker': 3.2.1(vite@6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0)) + '@vitest/mocker': 3.2.1(vite@6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0)) '@vitest/pretty-format': 3.2.1 '@vitest/runner': 3.2.1 '@vitest/snapshot': 3.2.1 @@ -4873,8 +4865,8 @@ snapshots: tinyglobby: 0.2.14 tinypool: 1.1.0 tinyrainbow: 2.0.0 - vite: 6.3.6(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) - vite-node: 3.2.1(@types/node@18.19.43)(jiti@2.3.3)(yaml@2.5.0) + vite: 6.3.6(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) + vite-node: 3.2.1(@types/node@18.19.43)(jiti@2.6.0)(yaml@2.5.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 18.19.43 From 8f30f36ff85d9b25183546c650dacf829562ead6 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 23 Sep 2025 10:14:20 -0400 Subject: [PATCH 2/2] Patch jiti --- esbuild.mjs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/esbuild.mjs b/esbuild.mjs index 9f1c4890..a7c01d22 100644 --- a/esbuild.mjs +++ b/esbuild.mjs @@ -40,6 +40,22 @@ let ctx = await esbuild.context({ })) }, }, + { + name: 'patch-jiti', + setup(build) { + // TODO: Switch to rolldown and see if we can chunk split this instead? + build.onLoad({ filter: /jiti\/lib\/jiti\.mjs$/ }, async (args) => { + let original = await fs.readFile(args.path, 'utf8') + + return { + contents: original.replace( + 'createRequire(import.meta.url)("../dist/babel.cjs")', + 'require("../dist/babel.cjs")', + ), + } + }) + }, + }, { // https://github.com/evanw/esbuild/issues/1051#issuecomment-806325487 name: 'native-node-modules',