Skip to content

Commit 6a1e7f2

Browse files
committed
feat(npm-run-all): remove the old library in addition to installing the fork to complete the replace
1 parent 271602d commit 6a1e7f2

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/package/scripts/lifter.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import updateTestScript from './test-script-updater.js';
33
export default function ({existingScripts, scripts}) {
44
return {
55
scripts: updateTestScript({...existingScripts, ...scripts}),
6-
dependencies: {javascript: {development: ['npm-run-all2']}}
6+
dependencies: {
7+
javascript: {
8+
development: ['npm-run-all2'],
9+
remove: ['npm-run-all']
10+
}
11+
}
712
};
813
}

src/package/scripts/lifter.test.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ describe('package.json scripts lifter', () => {
1616

1717
expect(liftScripts({existingScripts, scripts})).toEqual({
1818
scripts: updatedScripts,
19-
dependencies: {javascript: {development: ['npm-run-all2']}}
19+
dependencies: {
20+
javascript: {
21+
development: ['npm-run-all2'],
22+
remove: ['npm-run-all']
23+
}
24+
}
2025
});
2126
});
2227
});

test/integration/features/step_definitions/dependencies-steps.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function assertDevDependencyIsInstalled(execa, dependencyName) {
2525
}
2626

2727
export function assertDependenciesWereRemoved(execa, packageManager, dependencyNames) {
28-
td.verify(execa(packageManager, ['remove', ...dependencyNames]));
28+
td.verify(execa(packageManager, td.matchers.contains('remove', ...dependencyNames)));
2929
}
3030

3131
Then('ls-engines is added as a dependency', async function () {

0 commit comments

Comments
 (0)