Skip to content

Commit b66c4ad

Browse files
committed
use npx everywhere
1 parent 410e42a commit b66c4ad

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

β€Žintegration-tests/delete-scripts/delete-scripts.shβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ echo 'install without error because package.json is sanitized'
44
yarn add $1
55

66
echo 'unsnitize package.json'
7-
replace '<<PREINSTALL>>' preinstall package.json
7+
npx replace '<<PREINSTALL>>' preinstall package.json
88

99
echo 'install fails because preinstall hook is bad'
1010
if yarn; then
1111
exit 1
1212
fi
1313

14-
replace leftPad patchPackage node_modules/left-pad/index.js
14+
npx replace leftPad patchPackage node_modules/left-pad/index.js
1515

1616
echo 'but patch-package still works because it ignores scripts'
1717
npx patch-package left-pad

β€Žintegration-tests/happy-path-npm/happy-path-npm.shβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cat patches/left-pad+1.1.3.patch
2121
echo "END SNAPSHOT"
2222

2323
echo "reinstall node_modules"
24-
rimraf node_modules
24+
npx rimraf node_modules
2525
npm i
2626

2727
echo "patch-package didn't run"
@@ -33,7 +33,7 @@ echo "add patch-package to postinstall hook"
3333
node ./add-postinstall.js
3434

3535
echo "reinstall node_modules"
36-
rimraf node_modules
36+
npx rimraf node_modules
3737
npm i
3838

3939
echo "patch-package did run"

β€Žintegration-tests/happy-path-yarn/happy-path-yarn.shβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ echo "Add left-pad"
88
yarn add left-pad@1.1.3
99

1010
echo "replace pad with yarn in left-pad/index.js"
11-
replace pad yarn node_modules/left-pad/index.js
11+
npx replace pad yarn node_modules/left-pad/index.js
1212

1313
echo "SNAPSHOT: making patch"
1414
npx patch-package left-pad
@@ -19,7 +19,7 @@ cat patches/left-pad+1.1.3.patch
1919
echo "END SNAPSHOT"
2020

2121
echo "reinstall node_modules"
22-
rimraf node_modules
22+
npx rimraf node_modules
2323
yarn
2424

2525
echo "patch-package didn't run"
@@ -31,7 +31,7 @@ echo "add patch-package to postinstall hook"
3131
node ./add-postinstall.js
3232

3333
echo "reinstall node_modules"
34-
rimraf node_modules
34+
npx rimraf node_modules
3535
yarn
3636

3737
echo "patch-package did run"

β€Žintegration-tests/ignore-whitespace/ignore-whitespace.shβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717

1818
echo "make a change to line a"
1919
node strip-whitespace.js
20-
replace 'a' 'patch-package' node_modules/alphabet/index.js
20+
npx replace 'a' 'patch-package' node_modules/alphabet/index.js
2121
node add-whitespace.js 2
2222

2323
echo "make patch file for line a"

β€Žintegration-tests/include-exclude-paths/include-exclude-paths.shβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ echo "add patch-package"
55
yarn add $1
66

77
echo "edit some files"
8-
replace exports patchPackage node_modules/lodash/_baseClamp.js
9-
replace exports patchPackage node_modules/lodash/_baseClone.js
10-
replace exports patchPackage node_modules/lodash/flip.js
8+
npx replace exports patchPackage node_modules/lodash/_baseClamp.js
9+
npx replace exports patchPackage node_modules/lodash/_baseClone.js
10+
npx replace exports patchPackage node_modules/lodash/flip.js
1111

1212
echo "add a file"
1313
echo "this is a new file" > node_modules/lodash/newFile.md
@@ -55,8 +55,8 @@ fi
5555
echo "run patch package including newFile (case insensitive)"
5656
npx patch-package lodash --include newFile --case-sensitive-path-filtering
5757

58-
echo "revet to the beginning"
59-
rimraf node_modules
58+
echo "revert to the beginning"
59+
npx rimraf node_modules
6060
yarn
6161

6262
echo "edit lodash's package.json"

β€Žintegration-tests/include-exclude-regex-relativity/include-exclude-regex-relativity.shβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ echo "add patch-package"
55
yarn add $1
66

77
echo "mutate words.js"
8-
replace words patch-packages node_modules/lodash/words.js
8+
npx replace words patch-packages node_modules/lodash/words.js
99

1010
echo "patch-package includes words.js in a patch by default"
1111
npx patch-package lodash

β€Žintegration-tests/reverse-option/reverse-option.shβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ echo "add patch-package"
55
yarn add $1
66

77
echo "edit a file"
8-
replace exports patchPackage node_modules/lodash/_baseClamp.js
8+
npx replace exports patchPackage node_modules/lodash/_baseClamp.js
99

1010
echo "add a file"
1111
echo "this is a new file" > node_modules/lodash/newFile.md

β€Žintegration-tests/scoped-package/scoped-package.shβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ grep patch-package node_modules/@types/left-pad/index.d.ts
99
echo "END SNAPSHOT"
1010

1111
echo "modify add.d.t.s"
12-
replace add patch-package node_modules/@types/lodash/add.d.ts
12+
npx replace add patch-package node_modules/@types/lodash/add.d.ts
1313

1414
echo "patch-package can make patches for scoped packages"
1515
npx patch-package @types/lodash
1616

1717
echo "remove node_modules"
18-
rimraf node_modules
18+
npx rimraf node_modules
1919

2020
echo "reinstall node_modules"
2121
yarn

β€Žintegration-tests/shrinkwrap/shrinkwrap.shβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
echo "add patch-package"
55
npm i $1
66

7-
rimraf node_modules
7+
npx rimraf node_modules
88

99
npm i
1010

0 commit comments

Comments
Β (0)