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

DevEx: use yarn instead of npm for installing dependencies #23566

Closed
wants to merge 6 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
@@ -1 +1,2 @@
npm-shrinkwrap.json binary
yarn.lock binary
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

6 changes: 3 additions & 3 deletions Dockerfile
Expand Up @@ -26,9 +26,9 @@ RUN bash /tmp/env-config.sh
# and should only change as often as the dependencies
# change. This layer should allow for final build times
# to be limited only by the Calypso build speed.
COPY ./package.json ./npm-shrinkwrap.json /calypso/
COPY ./package.json ./yarn.lock /calypso/
RUN true \
&& npm install --production \
&& yarn install --production \
&& rm -rf /root/.npm \
&& true

Expand Down Expand Up @@ -56,7 +56,7 @@ RUN touch node_modules
ARG commit_sha="(unknown)"
ENV COMMIT_SHA $commit_sha

RUN CALYPSO_ENV=production npm run build
RUN CALYPSO_ENV=production yarn run build

USER nobody
CMD NODE_ENV=production node build/bundle.js
35 changes: 0 additions & 35 deletions bin/install-if-deps-outdated.js

This file was deleted.

13 changes: 0 additions & 13 deletions bin/install-if-no-packages.js

This file was deleted.

14 changes: 9 additions & 5 deletions circle.yml
@@ -1,40 +1,44 @@
machine:
node:
version: 8.9.4
dependencies:
override:
- yarn
test:
pre:
- ? |
# make the build-server and i18n string data in parallel
if [[ "$CIRCLE_NODE_INDEX" == 0 ]]; then NODE_ENV=test npm run build-server; fi
if [[ "$CIRCLE_NODE_INDEX" == 0 ]]; then NODE_ENV=test yarn run build-server; fi
if ( [[ "$CIRCLE_NODE_INDEX" == 1 ]] || [[ "$CIRCLE_NODE_TOTAL" == 1 ]] ) && [[ "$CIRCLE_BRANCH" == "master" ]]; then
npm run translate; mkdir -p $CIRCLE_ARTIFACTS/translate; mv calypso-strings.pot $CIRCLE_ARTIFACTS/translate
yarn run translate; mkdir -p $CIRCLE_ARTIFACTS/translate; mv calypso-strings.pot $CIRCLE_ARTIFACTS/translate
elif [[ "$CIRCLE_NODE_INDEX" == 1 ]] || [[ "$CIRCLE_NODE_TOTAL" == 1 ]]; then
git clone https://github.com/Automattic/gp-localci-client.git
bash gp-localci-client/generate-new-strings-pot.sh $CIRCLE_BRANCH $CIRCLE_SHA1 $CIRCLE_ARTIFACTS/translate
rm -rf gp-localci-client
fi
: parallel: true
override:
- yarn
- bin/run-integration:
parallel: true
files:
- bin/**/integration/*.js
- client/**/integration/*.js
- server/**/integration/*.js
- npm run lint:config-defaults
- yarn run lint:config-defaults
- ./node_modules/.bin/eslint-eslines:
parallel: true
files:
- client/**/*.js
- client/**/*.jsx
- server/**/*.js
- server/**/*.jsx
- npm run test-client:ci:
- yarn run test-client:ci:
parallel: true
files:
- client/**/test/*.js
- client/**/test/*.jsx
- npm run test-server:ci:
- yarn run test-server:ci:
parallel: true
files:
- server/**/test/*.js
Expand Down