|
28 | 28 | }, |
29 | 29 | }, |
30 | 30 | async ({ fs, exec, expect }) => { |
31 | | - let output = await exec('npx @tailwindcss/upgrade') |
| 31 | + let output = await exec('pnpm exec upgrade') |
32 | 32 | expect(output).toContain('Cannot find any CSS files that reference Tailwind CSS.') |
33 | 33 |
|
34 | 34 | // Files should not be modified |
@@ -100,7 +100,7 @@ test( |
100 | 100 | }, |
101 | 101 | }, |
102 | 102 | async ({ exec, fs, expect }) => { |
103 | | - await exec('npx @tailwindcss/upgrade') |
| 103 | + await exec('pnpm exec upgrade') |
104 | 104 |
|
105 | 105 | expect(await fs.dumpFiles('./src/**/*.{css,html}')).toMatchInlineSnapshot(` |
106 | 106 | " |
@@ -158,7 +158,7 @@ test( |
158 | 158 | }) |
159 | 159 |
|
160 | 160 | // Ensure the v4 project compiles correctly |
161 | | - await exec('npx tailwindcss --input src/input.css --output dist/out.css') |
| 161 | + await exec('pnpm exec tailwindcss --input src/input.css --output dist/out.css') |
162 | 162 |
|
163 | 163 | await fs.expectFileToContain('dist/out.css', [ |
164 | 164 | candidate`flex!`, |
@@ -204,7 +204,7 @@ test( |
204 | 204 | }, |
205 | 205 | }, |
206 | 206 | async ({ exec, fs, expect }) => { |
207 | | - await exec('npx @tailwindcss/upgrade') |
| 207 | + await exec('pnpm exec upgrade') |
208 | 208 |
|
209 | 209 | expect(await fs.dumpFiles('./**/*.{html,php,txt}')).toMatchInlineSnapshot(` |
210 | 210 | " |
@@ -262,7 +262,7 @@ test( |
262 | 262 | }, |
263 | 263 | }, |
264 | 264 | async ({ exec, fs, expect }) => { |
265 | | - await exec('npx @tailwindcss/upgrade') |
| 265 | + await exec('pnpm exec upgrade') |
266 | 266 |
|
267 | 267 | expect(await fs.dumpFiles('./src/**/*.{css,html}')).toMatchInlineSnapshot(` |
268 | 268 | " |
@@ -334,7 +334,7 @@ test( |
334 | 334 | }, |
335 | 335 | }, |
336 | 336 | async ({ exec, fs, expect }) => { |
337 | | - await exec('npx @tailwindcss/upgrade') |
| 337 | + await exec('pnpm exec upgrade') |
338 | 338 |
|
339 | 339 | expect(await fs.dumpFiles('./src/**/*.css')).toMatchInlineSnapshot(` |
340 | 340 | " |
@@ -406,7 +406,7 @@ test( |
406 | 406 | }, |
407 | 407 | }, |
408 | 408 | async ({ exec, fs, expect }) => { |
409 | | - await exec('npx @tailwindcss/upgrade') |
| 409 | + await exec('pnpm exec upgrade') |
410 | 410 |
|
411 | 411 | expect(await fs.dumpFiles('./src/**/*.css')).toMatchInlineSnapshot(` |
412 | 412 | " |
@@ -483,7 +483,7 @@ test( |
483 | 483 | }, |
484 | 484 | }, |
485 | 485 | async ({ exec, fs, expect }) => { |
486 | | - await exec('npx @tailwindcss/upgrade') |
| 486 | + await exec('pnpm exec upgrade') |
487 | 487 |
|
488 | 488 | expect(await fs.dumpFiles('./src/**/*.css')).toMatchInlineSnapshot(` |
489 | 489 | " |
@@ -586,7 +586,7 @@ test( |
586 | 586 | }, |
587 | 587 | }, |
588 | 588 | async ({ exec, fs, expect }) => { |
589 | | - await exec('npx @tailwindcss/upgrade') |
| 589 | + await exec('pnpm exec upgrade') |
590 | 590 |
|
591 | 591 | expect(await fs.dumpFiles('./src/**/*.css')).toMatchInlineSnapshot(` |
592 | 592 | " |
@@ -694,7 +694,7 @@ test( |
694 | 694 | }, |
695 | 695 | }, |
696 | 696 | async ({ exec, fs, expect }) => { |
697 | | - await exec('npx @tailwindcss/upgrade') |
| 697 | + await exec('pnpm exec upgrade') |
698 | 698 |
|
699 | 699 | await fs.expectFileToContain( |
700 | 700 | 'postcss.config.js', |
@@ -765,7 +765,7 @@ test( |
765 | 765 | }, |
766 | 766 | }, |
767 | 767 | async ({ exec, fs, expect }) => { |
768 | | - await exec('npx @tailwindcss/upgrade') |
| 768 | + await exec('pnpm exec upgrade') |
769 | 769 |
|
770 | 770 | let packageJsonContent = await fs.read('package.json') |
771 | 771 | let packageJson = JSON.parse(packageJsonContent) |
@@ -812,7 +812,7 @@ test( |
812 | 812 | }, |
813 | 813 | }, |
814 | 814 | async ({ exec, fs, expect }) => { |
815 | | - await exec('npx @tailwindcss/upgrade') |
| 815 | + await exec('pnpm exec upgrade') |
816 | 816 |
|
817 | 817 | let packageJsonContent = await fs.read('package.json') |
818 | 818 | let packageJson = JSON.parse(packageJsonContent) |
@@ -864,7 +864,7 @@ test( |
864 | 864 | }, |
865 | 865 | }, |
866 | 866 | async ({ exec, fs, expect }) => { |
867 | | - await exec('npx @tailwindcss/upgrade') |
| 867 | + await exec('pnpm exec upgrade') |
868 | 868 |
|
869 | 869 | await fs.expectFileToContain('src/index.css', css`@import 'tailwindcss';`) |
870 | 870 | await fs.expectFileToContain( |
@@ -940,7 +940,7 @@ test( |
940 | 940 | }, |
941 | 941 | }, |
942 | 942 | async ({ exec, fs, expect }) => { |
943 | | - await exec('npx @tailwindcss/upgrade') |
| 943 | + await exec('pnpm exec upgrade') |
944 | 944 |
|
945 | 945 | await fs.expectFileToContain('src/index.css', css`@import 'tailwindcss';`) |
946 | 946 | await fs.expectFileToContain( |
@@ -1007,7 +1007,7 @@ test( |
1007 | 1007 | }, |
1008 | 1008 | }, |
1009 | 1009 | async ({ exec, fs, expect }) => { |
1010 | | - await exec('npx @tailwindcss/upgrade') |
| 1010 | + await exec('pnpm exec upgrade') |
1011 | 1011 |
|
1012 | 1012 | expect(await fs.dumpFiles('./src/**/*.html')).toMatchInlineSnapshot(` |
1013 | 1013 | " |
@@ -1054,7 +1054,7 @@ test( |
1054 | 1054 | }, |
1055 | 1055 | }, |
1056 | 1056 | async ({ exec, fs, expect }) => { |
1057 | | - await exec('npx @tailwindcss/upgrade') |
| 1057 | + await exec('pnpm exec upgrade') |
1058 | 1058 |
|
1059 | 1059 | expect(await fs.dumpFiles('./src/**/*.html')).toMatchInlineSnapshot(` |
1060 | 1060 | " |
@@ -1098,7 +1098,7 @@ test( |
1098 | 1098 | }, |
1099 | 1099 | }, |
1100 | 1100 | async ({ exec, fs, expect }) => { |
1101 | | - await exec('npx @tailwindcss/upgrade --force') |
| 1101 | + await exec('pnpm exec upgrade --force') |
1102 | 1102 |
|
1103 | 1103 | expect(await fs.dumpFiles('./src/**/*.css')).toMatchInlineSnapshot(` |
1104 | 1104 | " |
@@ -1170,7 +1170,7 @@ test( |
1170 | 1170 | }, |
1171 | 1171 | }, |
1172 | 1172 | async ({ exec, fs, expect }) => { |
1173 | | - await exec('npx @tailwindcss/upgrade --force') |
| 1173 | + await exec('pnpm exec upgrade --force') |
1174 | 1174 |
|
1175 | 1175 | expect(await fs.dumpFiles('./src/**/*.css')).toMatchInlineSnapshot(` |
1176 | 1176 | " |
@@ -1281,7 +1281,7 @@ test( |
1281 | 1281 | }, |
1282 | 1282 | }, |
1283 | 1283 | async ({ exec, fs, expect }) => { |
1284 | | - await exec('npx @tailwindcss/upgrade --force') |
| 1284 | + await exec('pnpm exec upgrade --force') |
1285 | 1285 |
|
1286 | 1286 | expect(await fs.dumpFiles('./src/**/*.css')).toMatchInlineSnapshot(` |
1287 | 1287 | " |
@@ -1414,7 +1414,7 @@ test( |
1414 | 1414 | }, |
1415 | 1415 | }, |
1416 | 1416 | async ({ exec, fs, expect }) => { |
1417 | | - let output = await exec('npx @tailwindcss/upgrade --force') |
| 1417 | + let output = await exec('pnpm exec upgrade --force') |
1418 | 1418 |
|
1419 | 1419 | expect(output).toMatch( |
1420 | 1420 | /You have one or more stylesheets that are imported into a utility layer and non-utility layer./, |
@@ -1538,7 +1538,7 @@ test( |
1538 | 1538 | }, |
1539 | 1539 | }, |
1540 | 1540 | async ({ exec, fs, expect }) => { |
1541 | | - await exec('npx @tailwindcss/upgrade --force') |
| 1541 | + await exec('pnpm exec upgrade --force') |
1542 | 1542 |
|
1543 | 1543 | expect(await fs.dumpFiles('./src/**/*.{html,css}')).toMatchInlineSnapshot(` |
1544 | 1544 | " |
@@ -1763,8 +1763,8 @@ test( |
1763 | 1763 | }, |
1764 | 1764 | }, |
1765 | 1765 | async ({ exec, expect }) => { |
1766 | | - let output = await exec('npx @tailwindcss/upgrade --force', {}, { ignoreStdErr: true }).catch( |
1767 | | - (e) => e.toString(), |
| 1766 | + let output = await exec('pnpm exec upgrade --force', {}, { ignoreStdErr: true }).catch((e) => |
| 1767 | + e.toString(), |
1768 | 1768 | ) |
1769 | 1769 |
|
1770 | 1770 | expect(output).toMatch('Could not determine configuration file for:') |
@@ -1835,7 +1835,7 @@ test( |
1835 | 1835 | }, |
1836 | 1836 | }, |
1837 | 1837 | async ({ exec, fs, expect }) => { |
1838 | | - await exec('npx @tailwindcss/upgrade --force') |
| 1838 | + await exec('pnpm exec upgrade --force') |
1839 | 1839 |
|
1840 | 1840 | expect(await fs.dumpFiles('./src/**/*.{html,css}')).toMatchInlineSnapshot(` |
1841 | 1841 | " |
@@ -1971,7 +1971,7 @@ test( |
1971 | 1971 | }, |
1972 | 1972 | }, |
1973 | 1973 | async ({ exec, fs, expect }) => { |
1974 | | - await exec('npx @tailwindcss/upgrade --force') |
| 1974 | + await exec('pnpm exec upgrade --force') |
1975 | 1975 |
|
1976 | 1976 | expect(await fs.dumpFiles('./src/**/*.{html,css}')).toMatchInlineSnapshot(` |
1977 | 1977 | " |
@@ -2091,7 +2091,7 @@ test( |
2091 | 2091 | }, |
2092 | 2092 | }, |
2093 | 2093 | async ({ exec, fs, expect }) => { |
2094 | | - await exec('npx @tailwindcss/upgrade --force') |
| 2094 | + await exec('pnpm exec upgrade --force') |
2095 | 2095 |
|
2096 | 2096 | expect(await fs.dumpFiles('./src/**/*.{html,css}')).toMatchInlineSnapshot(` |
2097 | 2097 | " |
@@ -2171,7 +2171,7 @@ test( |
2171 | 2171 | }, |
2172 | 2172 | }, |
2173 | 2173 | async ({ exec, fs, expect }) => { |
2174 | | - await exec('npx @tailwindcss/upgrade --force') |
| 2174 | + await exec('pnpm exec upgrade --force') |
2175 | 2175 |
|
2176 | 2176 | expect(await fs.dumpFiles('./src/**/*.css')).toMatchInlineSnapshot(` |
2177 | 2177 | " |
@@ -2255,7 +2255,7 @@ test( |
2255 | 2255 | }, |
2256 | 2256 | }, |
2257 | 2257 | async ({ exec, fs, expect }) => { |
2258 | | - await exec('npx @tailwindcss/upgrade --force') |
| 2258 | + await exec('pnpm exec upgrade --force') |
2259 | 2259 |
|
2260 | 2260 | expect(await fs.dumpFiles('./src/**/*.css')).toMatchInlineSnapshot(` |
2261 | 2261 | " |
@@ -2309,7 +2309,7 @@ test( |
2309 | 2309 | }, |
2310 | 2310 | }, |
2311 | 2311 | async ({ exec, fs, expect }) => { |
2312 | | - await exec('npx @tailwindcss/upgrade --force') |
| 2312 | + await exec('pnpm exec upgrade --force') |
2313 | 2313 |
|
2314 | 2314 | let pkg = JSON.parse(await fs.read('package.json')) |
2315 | 2315 |
|
@@ -2388,7 +2388,7 @@ test( |
2388 | 2388 | }, |
2389 | 2389 | }, |
2390 | 2390 | async ({ exec, fs, expect }) => { |
2391 | | - await exec('npx @tailwindcss/upgrade --force') |
| 2391 | + await exec('pnpm exec upgrade --force') |
2392 | 2392 |
|
2393 | 2393 | // Files should not be modified |
2394 | 2394 | expect(await fs.dumpFiles('./*.{js,css,html}')).toMatchInlineSnapshot(` |
@@ -2486,7 +2486,7 @@ test( |
2486 | 2486 | }, |
2487 | 2487 | }, |
2488 | 2488 | async ({ exec, fs, expect }) => { |
2489 | | - await exec('npx @tailwindcss/upgrade --force') |
| 2489 | + await exec('pnpm exec upgrade --force') |
2490 | 2490 |
|
2491 | 2491 | // Files should not be modified |
2492 | 2492 | expect(await fs.dumpFiles('./*.{js,css,html,tsx}')).toMatchInlineSnapshot(` |
@@ -2593,7 +2593,7 @@ test( |
2593 | 2593 | }, |
2594 | 2594 | }, |
2595 | 2595 | async ({ exec, fs, expect }) => { |
2596 | | - await exec('npx @tailwindcss/upgrade ./src/index.css') |
| 2596 | + await exec('pnpm exec upgrade ./src/index.css') |
2597 | 2597 |
|
2598 | 2598 | expect(await fs.dumpFiles('./src/**/*.{css,html}')).toMatchInlineSnapshot(` |
2599 | 2599 | " |
@@ -2719,7 +2719,7 @@ test( |
2719 | 2719 | }, |
2720 | 2720 | }, |
2721 | 2721 | async ({ exec, fs, expect }) => { |
2722 | | - await exec('npx @tailwindcss/upgrade') |
| 2722 | + await exec('pnpm exec upgrade') |
2723 | 2723 |
|
2724 | 2724 | expect(await fs.dumpFiles('./src/**/*.{css,html}')).toMatchInlineSnapshot(` |
2725 | 2725 | " |
@@ -2805,7 +2805,7 @@ test( |
2805 | 2805 | }, |
2806 | 2806 | }, |
2807 | 2807 | async ({ exec, fs, expect }) => { |
2808 | | - await exec('npx @tailwindcss/upgrade') |
| 2808 | + await exec('pnpm exec upgrade') |
2809 | 2809 |
|
2810 | 2810 | expect(await fs.dumpFiles('./src/**/*.{css,html}')).toMatchInlineSnapshot(` |
2811 | 2811 | " |
@@ -2873,7 +2873,7 @@ test( |
2873 | 2873 | }, |
2874 | 2874 | }, |
2875 | 2875 | async ({ exec, root, fs, expect }) => { |
2876 | | - await exec('npx @tailwindcss/upgrade') |
| 2876 | + await exec('pnpm exec upgrade') |
2877 | 2877 |
|
2878 | 2878 | let before = await fs.dumpFiles('./src/**/*.{css,html}') |
2879 | 2879 | expect(before).toMatchInlineSnapshot(` |
@@ -2915,7 +2915,7 @@ test( |
2915 | 2915 | } |
2916 | 2916 |
|
2917 | 2917 | // Run the upgrade again |
2918 | | - let output = await exec('npx @tailwindcss/upgrade') |
| 2918 | + let output = await exec('pnpm exec upgrade') |
2919 | 2919 | expect(output).toContain('No changes were made to your repository') |
2920 | 2920 |
|
2921 | 2921 | let after = await fs.dumpFiles('./src/**/*.{css,html}') |
@@ -2994,7 +2994,7 @@ test( |
2994 | 2994 | }, |
2995 | 2995 | }, |
2996 | 2996 | async ({ exec, fs, expect }) => { |
2997 | | - await exec('npx @tailwindcss/upgrade') |
| 2997 | + await exec('pnpm exec upgrade') |
2998 | 2998 |
|
2999 | 2999 | expect(await fs.dumpFiles('./src/**/*.{css,html}')).toMatchInlineSnapshot(` |
3000 | 3000 | " |
@@ -3043,7 +3043,7 @@ test( |
3043 | 3043 | }, |
3044 | 3044 | }, |
3045 | 3045 | async ({ exec, fs, expect }) => { |
3046 | | - await exec('npx @tailwindcss/upgrade') |
| 3046 | + await exec('pnpm exec upgrade') |
3047 | 3047 |
|
3048 | 3048 | expect(await fs.dumpFiles('./src/**/{*,.env,.env.*}')).toMatchInlineSnapshot(` |
3049 | 3049 | " |
@@ -3114,7 +3114,7 @@ test( |
3114 | 3114 | }, |
3115 | 3115 | }, |
3116 | 3116 | async ({ exec, fs, expect }) => { |
3117 | | - await exec('npx @tailwindcss/upgrade') |
| 3117 | + await exec('pnpm exec upgrade') |
3118 | 3118 |
|
3119 | 3119 | expect(await fs.dumpFiles('./{src,templates}/**/*')).toMatchInlineSnapshot(` |
3120 | 3120 | " |
@@ -3190,7 +3190,7 @@ test( |
3190 | 3190 | let originalKeepFile = await fs.read('src/keep.php') |
3191 | 3191 | let originalTemplate = await fs.read('src/templates/template-0.php') |
3192 | 3192 |
|
3193 | | - let process = await spawn('npx @tailwindcss/upgrade --force', { |
| 3193 | + let process = await spawn('pnpm exec upgrade --force', { |
3194 | 3194 | env: { |
3195 | 3195 | NODE_OPTIONS: '--require=./hook.cjs', |
3196 | 3196 | }, |
@@ -3257,7 +3257,7 @@ test( |
3257 | 3257 | }, |
3258 | 3258 | }, |
3259 | 3259 | async ({ root, exec, fs, expect }) => { |
3260 | | - let stdout = await exec('npx @tailwindcss/upgrade', { |
| 3260 | + let stdout = await exec('pnpm exec upgrade', { |
3261 | 3261 | cwd: path.join(root, 'project-a'), |
3262 | 3262 | }) |
3263 | 3263 |
|
@@ -3331,7 +3331,7 @@ test( |
3331 | 3331 | }, |
3332 | 3332 | }, |
3333 | 3333 | async ({ exec, fs, expect }) => { |
3334 | | - let stdout = await exec('npx @tailwindcss/upgrade') |
| 3334 | + let stdout = await exec('pnpm exec upgrade') |
3335 | 3335 |
|
3336 | 3336 | expect(stdout).not.toContain( |
3337 | 3337 | 'Running this command will add the dependency to the workspace root', |
@@ -3407,7 +3407,7 @@ test( |
3407 | 3407 | }, |
3408 | 3408 | }, |
3409 | 3409 | async ({ exec, fs, expect }) => { |
3410 | | - await exec('npx @tailwindcss/upgrade') |
| 3410 | + await exec('pnpm exec upgrade') |
3411 | 3411 |
|
3412 | 3412 | expect(await fs.dumpFiles('./src/**/*.{css,vue}')).toMatchInlineSnapshot(` |
3413 | 3413 | " |
|
0 commit comments