Skip to content

build(yarn): Upgrade yarn to 1.16.0, embed in repo #13569

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

Merged
merged 6 commits into from
Jun 11, 2019
Merged
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
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ env:
- DJANGO_VERSION=">=1.8,<1.9"
# node's version is pinned by .nvmrc and is autodetected by `nvm install`.
- NODE_DIR="${HOME}/.nvm/versions/node/v$(< .nvmrc)"
- YARN_VERSION="1.13.0"
- NODE_OPTIONS=--max-old-space-size=4096

script:
Expand All @@ -55,7 +54,7 @@ after_script:
pip install codecov
codecov -e TEST_SUITE
fi
- npm install -g @zeus-ci/cli
- ./bin/yarn global add @zeus-ci/cli
- zeus upload -t "text/xml+xunit" .artifacts/*junit.xml
- zeus upload -t "text/xml+coverage" .artifacts/*coverage.xml
- zeus upload -t "text/xml+coverage" .artifacts/coverage/cobertura-coverage.xml
Expand Down Expand Up @@ -90,7 +89,6 @@ base_acceptance: &acceptance_default
before_install:
- find "$NODE_DIR" -type d -empty -delete
- nvm install
- npm install -g "yarn@${YARN_VERSION}"
- docker run -d --network host --name clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server:18.14.9
- docker run -d --network host --name snuba --env SNUBA_SETTINGS=test --env CLICKHOUSE_SERVER=localhost:9000 getsentry/snuba
- docker ps -a
Expand Down Expand Up @@ -120,7 +118,6 @@ matrix:
- SENTRY_LIGHT_BUILD=1 pip install -e ".[dev,tests,optional]"
- find "$NODE_DIR" -type d -empty -delete
- nvm install
- npm install -g "yarn@${YARN_VERSION}"
- yarn install --pure-lockfile

- <<: *postgres_default
Expand Down Expand Up @@ -158,7 +155,6 @@ matrix:
before_install:
- find "$NODE_DIR" -type d -empty -delete
- nvm install
- npm install -g "yarn@${YARN_VERSION}"
install:
- yarn install --pure-lockfile

Expand All @@ -180,7 +176,6 @@ matrix:
before_install:
- find "$NODE_DIR" -type d -empty -delete
- nvm install
- npm install -g "yarn@${YARN_VERSION}"

- <<: *postgres_default
name: 'Symbolicator Integration'
Expand Down Expand Up @@ -225,7 +220,6 @@ matrix:
- tar -xzf credentials.tar.gz
# Use the decrypted service account credentials to authenticate the command line tool
- gcloud auth activate-service-account --key-file client-secret.json
- npm install -g "yarn@${YARN_VERSION}"
install:
- yarn install --pure-lockfile
- gcloud version
Expand Down
2 changes: 1 addition & 1 deletion .travis/deploy-storybook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BRANCH_PROCESSED=$(echo "${DEPLOY_BRANCH}" | tr '[:upper:]./' '[:lower:]--' | tr
BUCKET_DIR_NAME="branches/${BRANCH_PROCESSED}"
echo "Bucket directory: ${BUCKET_DIR_NAME}"

npm run storybook-build
./bin/yarn run storybook-build

# Upload the files
gsutil cp .storybook-out/favicon.ico "gs://${GS_BUCKET_NAME}/favicon.ico"
Expand Down
2 changes: 2 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarn-path "./bin/yarn"
disable-self-update-check true
16 changes: 7 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ifneq "$(wildcard /usr/local/opt/openssl/lib)" ""
endif

PIP = LDFLAGS="$(LDFLAGS)" pip
WEBPACK = NODE_ENV=production ./node_modules/.bin/webpack
YARN_VERSION = 1.13.0
WEBPACK = NODE_ENV=production ./bin/yarn webpack
YARN = ./bin/yarn

bootstrap: install-system-pkgs develop init-config run-dependent-services create-db apply-migrations

Expand Down Expand Up @@ -76,19 +76,17 @@ node-version-check:
install-system-pkgs: node-version-check
@echo "--> Installing system packages (from Brewfile)"
@command -v brew 2>&1 > /dev/null && brew bundle || (echo 'WARNING: homebrew not found or brew bundle failed - skipping system dependencies.')
@echo "--> Installing yarn $(YARN_VERSION) (via npm)"
@$(volta --version 2>&1 > /dev/null || npm install -g "yarn@$(YARN_VERSION)")

install-yarn-pkgs:
@echo "--> Installing Yarn packages (for development)"
@command -v yarn 2>&1 > /dev/null || (echo 'yarn not found. Please install it before proceeding.'; exit 1)
@command -v $(YARN) 2>&1 > /dev/null || (echo 'yarn not found. Please install it before proceeding.'; exit 1)
# Use NODE_ENV=development so that yarn installs both dependencies + devDependencies
NODE_ENV=development yarn install --pure-lockfile
NODE_ENV=development $(YARN) install --pure-lockfile
# A common problem is with node packages not existing in `node_modules` even though `yarn install`
# says everything is up to date. Even though `yarn install` is run already, it doesn't take into
# account the state of the current filesystem (it only checks .yarn-integrity).
# Add an additional check against `node_modules`
yarn check --verify-tree || yarn install --check-files
$(YARN) check --verify-tree || $(YARN) install --check-files

install-sentry-dev:
@echo "--> Installing Sentry (for development)"
Expand Down Expand Up @@ -135,13 +133,13 @@ test-js: node-version-check
@echo "--> Building static assets"
@$(WEBPACK) --profile --json > .artifacts/webpack-stats.json
@echo "--> Running JavaScript tests"
@npm run test-ci
@$(YARN) run test-ci
@echo ""

# builds and creates percy snapshots
test-styleguide:
@echo "--> Building and snapshotting styleguide"
@npm run snapshot
@$(YARN) run snapshot
@echo ""

test-python:
Expand Down
Loading