Skip to content

Conversation

@fisker
Copy link
Member

@fisker fisker commented Jan 15, 2020

Lock file in next seems not right.

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker fisker mentioned this pull request Jan 15, 2020
4 tasks
@kachkaev
Copy link
Member

kachkaev commented Jan 15, 2020

@fisker WDYT of integrating the repo with yarn-deduplicate in a separate PR? Here's what we have in package.json at work since recently:

{
  "scripts": {
    "fix": "yarn fix:eslint && yarn fix:prettier && fix:yarn-deduplicate",
    "fix:eslint": "eslint \"**/*.*\" --fix",
    "fix:prettier": "prettier --write \"**/*.*\"",
    "fix:yarn-deduplicate": "yarn-deduplicate --strategy=fewer",
    "lint": "yarn lint:eslint && yarn lint:prettier && yarn lint:tsc && yarn lint:yarn-deduplicate",
    "lint:eslint": "eslint --report-unused-disable-directives \"**/*.*\"",
    "lint:prettier": "prettier --check \"**/*.*\"",
    "lint:tsc": "tsc -p .",
    "lint:yarn-deduplicate": "yarn-deduplicate --list --fail --strategy=fewer",
  },
  "devDependencies": {
    "...": "...",
    "yarn-deduplicate": "^1.1.1"
  },
  "...": "..."
}

This helps continuously maintain a clean yarn.lock files by running yarn lint in CI.

@thorn0
Copy link
Member

thorn0 commented Jan 15, 2020

This lock file is still unstable. The issue is caused by yarnpkg/yarn#7770 and fsevents 1.x, which is a dependency of Jest (jest-haste-map). Should be gone after updating to the upcoming version 25 of Jest as it'll use fsevents 2.x.

@thorn0 thorn0 closed this Jan 15, 2020
@thorn0
Copy link
Member

thorn0 commented Jan 15, 2020

thorn@THORN-LNV:/mnt/d/dev/prettier-fisker$ rm -rf node_modules/ yarn.lock && yarn cache clean && yarn
yarn cache v1.21.1
success Cleared cache.
Done in 10.75s.
yarn install v1.21.1
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning cspell > comment-json > [email protected]: `json-parser` is deprecated. Please use `comment-json` instead
warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: use String.prototype.padStart()
warning [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
[3/5] Fetching packages...
warning [email protected]: Invalid bin entry for "sha.js" (in "sha.js").
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "@angular/compiler@^6.0.0 || ^7.0.0".
[5/5] Building fresh packages...

success Saved lockfile.
Done in 61.25s.
thorn@THORN-LNV:/mnt/d/dev/prettier-fisker$ git status
On branch next-lock
Your branch is up to date with 'origin/next-lock'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   yarn.lock

no changes added to commit (use "git add" and/or "git commit -a")

node-pre-gyp and its dependencies are back in the lock file.

@fisker
Copy link
Member Author

fisker commented Jan 15, 2020

I don't mean to regenerate new lock, old one changes when run yarn

@thorn0 thorn0 reopened this Jan 15, 2020
@thorn0 thorn0 merged commit d6f7beb into prettier:next Jan 15, 2020
@fisker fisker deleted the next-lock branch January 15, 2020 15:47
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Apr 15, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants