Skip to content

Commit

Permalink
fix bash scripts: enable alias
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu committed Mar 18, 2021
1 parent 0676295 commit cd5f987
Show file tree
Hide file tree
Showing 28 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "add a file"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/broken-patch-file/broken-patch-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

(>&2 echo "SNAPSHOT: patch-package fails when patch file is invalid")
Expand Down
1 change: 1 addition & 0 deletions integration-tests/collate-errors/collate-errors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "SNAPSHOT: left-pad, lodash, and zfs apply"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/create-issue/create-issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "modify left-pad"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/custom-patch-dir/custom-patch-dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "modify left-pad"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/custom-resolutions/custom-resolutions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "make changes to dependency/index.js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "apply patch-package"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/delete-scripts/delete-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set -e

echo 'install without error because package.json is sanitized'
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo 'unsnitize package.json'
Expand Down
1 change: 1 addition & 0 deletions integration-tests/dev-only-patches/dev-only-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export NODE_ENV=production

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "SNAPSHOT: patch-package happily ignores slash because it's a dev dep"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/error-on-fail/error-on-fail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

export NODE_ENV="development"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

(>&2 echo "SNAPSHOT: no package present failure")
Expand Down
1 change: 1 addition & 0 deletions integration-tests/file-mode-changes/file-mode-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "check file permissions 1"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/happy-path-npm/happy-path-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ npm i

echo "add patch-package"
npm i $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "Add left-pad"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/happy-path-yarn/happy-path-yarn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "Add left-pad"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/ignore-whitespace/ignore-whitespace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "add random bits of whitespace"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

npx replace postinstall lol node_modules/naughty-package/postinstall.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "edit some files"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "mutate words.js"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/lerna-canary/lerna-canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

# this test makes sure that we can patch packages with build metadata in their version strings e.g. 4.5.6+commitsha
Expand Down
1 change: 1 addition & 0 deletions integration-tests/nested-packages/nested-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "wrap-ansi=>string-width should not contain patch-package"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "@microsoft/mezzurite-core => @types/angular should not contain patch-package"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/newIntegrationTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ set -e
echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package
`,
{ mode: 0o755 },
Expand Down
1 change: 1 addition & 0 deletions integration-tests/no-symbolic-links/no-symbolic-links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "make symbolic link"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "SNAPSHOT: left-pad should contain patch-package"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

(>&2 echo "SNAPSHOT: patch parse failure message")
Expand Down
1 change: 1 addition & 0 deletions integration-tests/reverse-option/reverse-option.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "edit a file"
Expand Down
1 change: 1 addition & 0 deletions integration-tests/scoped-package/scoped-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "SNAPSHOT: left-pad typings should contain patch-package"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

echo "add patch-package"
yarn add $1
shopt -s expand_aliases # enable alias
alias patch-package=./node_modules/.bin/patch-package

echo "modify left-pad"
Expand Down

0 comments on commit cd5f987

Please sign in to comment.