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

Fix/cleanup yarn lock #41847

Merged
merged 9 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from 7 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
13 changes: 12 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ references:
environment:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
name: Install dependencies
command: CHROMEDRIVER_VERSION=$(<.chromedriver_version) yarn install --frozen-lockfile
command: CHROMEDRIVER_VERSION=$(<.chromedriver_version) yarn install

save-yarn-cache: &save-yarn-cache
name: 'Save yarn cache'
Expand Down Expand Up @@ -227,6 +227,17 @@ jobs:
name: Lint Config Keys
when: always
command: yarn run lint:config-defaults
- run:
name: Lint yarn.lock
when: always
command: |
DIRTY_FILES=$(git status --porcelain 2>/dev/null)
if [[ ! -z "$DIRTY_FILES" ]]; then
echo "Repository contains uncommitted changes: "
echo "$DIRTY_FILES"
echo "You need to checkout the branch, run 'yarn' and commit those files."
exit 1
fi
- run:
name: Lint Client and Server
when: always
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/full-site-editing-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@master
- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install
- name: Build FSE
run: cd apps/full-site-editing && yarn build
- name: Upload build artifact
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN bash /tmp/env-config.sh
# This layer is populated with up-to-date files from
# Calypso development.
COPY . /calypso/
RUN yarn install --frozen-lockfile && yarn cache clean
RUN yarn install && yarn cache clean


# Build the final layer
Expand Down
4 changes: 2 additions & 2 deletions bin/install-if-deps-outdated.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

/**
* Installs `node_modules` with `yarn install --frozen-lockfile`. Since that's a costly operation,
* Installs `node_modules` with `yarn install`. Since that's a costly operation,
* it will only perform it if needed, that is, if the packages
* installed at `node_modules` aren't in sync over what
* `yarn.lock` has. For that, modification times of both
Expand Down Expand Up @@ -52,7 +52,7 @@ function install() {
process.exit( cleanResult.status );
}

const installResult = spawnSync( 'yarn', [ 'install', '--frozen-lockfile' ], {
const installResult = spawnSync( 'yarn', [ 'install' ], {
shell: true,
stdio: 'inherit',
env: { PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true', ...process.env },
Expand Down
2 changes: 1 addition & 1 deletion bin/install-if-no-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fs = require( 'fs' );

if ( ! fs.existsSync( 'node_modules' ) ) {
console.log( 'No "node_modules" present, installing dependencies…' );
const installResult = spawnSync( 'yarn', [ 'install', '--frozen-lockfile' ], {
const installResult = spawnSync( 'yarn', [ 'install' ], {
shell: true,
stdio: 'inherit',
env: { PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true', ...process.env },
Expand Down
2 changes: 1 addition & 1 deletion docs/lockfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Yarn will automattically generate and update the lock file whenever `yarn`, `yar
To verify that the new `yarn.lock` works:

- Run `yarn run distclean` to delete local `node_modules`
- Run `yarn install --frozen-lockfile`
- Run `yarn install`
- Verify that Calypso works as expected and that tests pass
2 changes: 1 addition & 1 deletion docs/monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ git checkout master
git pull
git status (should be clean!)
yarn run distclean
yarn install --frozen-lockfile
yarn install
yarn run build-packages
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"pretest-client": "check-npm-client && yarn run -s pretest",
"test-client": "check-npm-client && jest -c=test/client/jest.config.js",
"test-client:watch": "check-npm-client && yarn run -s test-client --watch",
"test-e2e": "check-npm-client && cd test/e2e && yarn install --frozen-lockfile --ignore-scripts && yarn run test",
"test-e2e": "check-npm-client && cd test/e2e && yarn install --ignore-scripts && yarn run test",
"encrypt-e2e-config": "check-npm-client && openssl enc -md sha1 -aes-256-cbc -pass env:CONFIG_KEY -out ./test/e2e/config/encrypted.enc -in ./test/e2e/config/local-$NODE_ENV.json",
"decrypt-e2e-config": "check-npm-client && openssl enc -md sha1 -aes-256-cbc -d -pass env:CONFIG_KEY -in ./test/e2e/config/encrypted.enc -out ./test/e2e/config/local-$NODE_ENV.json",
"pretest-integration": "check-npm-client && yarn run -s pretest",
Expand Down