Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normalize the e2e behavior for npm link in npm 5 and below #3105

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tasks/e2e-kitchensink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ npm install test-integrity@^2.0.1
cd "$temp_app_path/test-kitchensink"

# Link to our preset
npm link "$root_path"/packages/babel-preset-react-app
cp -r "$root_path"/packages/babel-preset-react-app node_modules

# Link to test module
npm link "$temp_module_path/node_modules/test-integrity"
Expand Down Expand Up @@ -219,16 +219,16 @@ E2E_FILE=./build/index.html \
# ******************************************************************************

# Unlink our preset
npm unlink "$root_path"/packages/babel-preset-react-app
rm -rf node_modules/packages/babel-preset-react-app

# Eject...
echo yes | npm run eject

# ...but still link to the local packages
npm link "$root_path"/packages/babel-preset-react-app
npm link "$root_path"/packages/eslint-config-react-app
npm link "$root_path"/packages/react-dev-utils
npm link "$root_path"/packages/react-scripts
cp -r "$root_path"/packages/babel-preset-react-app node_modules
cp -r "$root_path"/packages/eslint-config-react-app node_modules
cp -r "$root_path"/packages/react-dev-utils node_modules
cp -r "$root_path"/packages/react-scripts node_modules

# Link to test module
npm link "$temp_module_path/node_modules/test-integrity"
Expand Down
8 changes: 4 additions & 4 deletions tasks/e2e-simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ verify_module_scope
echo yes | npm run eject

# ...but still link to the local packages
npm link "$root_path"/packages/babel-preset-react-app
npm link "$root_path"/packages/eslint-config-react-app
npm link "$root_path"/packages/react-dev-utils
npm link "$root_path"/packages/react-scripts
cp -r "$root_path"/packages/babel-preset-react-app node_modules
cp -r "$root_path"/packages/eslint-config-react-app node_modules
cp -r "$root_path"/packages/react-dev-utils node_modules
cp -r "$root_path"/packages/react-scripts node_modules

# Test the build
npm run build
Expand Down