Skip to content

Commit d21250a

Browse files
fix(clean): make sure to delete node_modules as last item (#2429)
1 parent 38ebaee commit d21250a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

packages/cli-clean/src/clean.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -153,26 +153,6 @@ export async function clean(
153153
},
154154
],
155155
},
156-
npm: {
157-
description:
158-
'`node_modules` folder in the current package, and optionally verify npm cache',
159-
tasks: [
160-
{
161-
label: 'Remove node_modules',
162-
action: () => cleanDir(`${projectRoot}/node_modules`),
163-
},
164-
...(verifyCache
165-
? [
166-
{
167-
label: 'Verify npm cache',
168-
action: async () => {
169-
await execa('npm', ['cache', 'verify'], {cwd: projectRoot});
170-
},
171-
},
172-
]
173-
: []),
174-
],
175-
},
176156
bun: {
177157
description: 'Bun cache',
178158
tasks: [
@@ -216,6 +196,26 @@ export async function clean(
216196
},
217197
],
218198
},
199+
npm: {
200+
description:
201+
'`node_modules` folder in the current package, and optionally verify npm cache',
202+
tasks: [
203+
{
204+
label: 'Remove node_modules',
205+
action: () => cleanDir(`${projectRoot}/node_modules`),
206+
},
207+
...(verifyCache
208+
? [
209+
{
210+
label: 'Verify npm cache',
211+
action: async () => {
212+
await execa('npm', ['cache', 'verify'], {cwd: projectRoot});
213+
},
214+
},
215+
]
216+
: []),
217+
],
218+
},
219219
};
220220

221221
const groups = include ? include.split(',') : await promptForCaches(COMMANDS);

0 commit comments

Comments
 (0)