Skip to content

Commit

Permalink
fix: browserslist --update-db for yarn v2+ lockfile (#619)
Browse files Browse the repository at this point in the history
* update-db: added detectLockfileVersion method

detects yarn.lock file version

* update-db: migrated code to updatePackageManually method

- migrated code from default method to read and manually update lock file and package
- Added yarn-v2 command to handle package updation

* update-db: fixed getLatestInfo for yarn v2

* update-db: updated test for yarn v2 lockfile

added checkRunUpdateYarnv2 test and updated checkYarnLockfile test

* updated .gitignore to ignore .yarn directory

* update-db: do not run yarn v2 tests on node 8, 10
  • Loading branch information
himankpathak committed Sep 4, 2021
1 parent 83764ea commit 8422845
Show file tree
Hide file tree
Showing 5 changed files with 777 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
.yarn/
npm-debug.log
yarn-error.log

Expand Down
8 changes: 8 additions & 0 deletions test/fixtures/update-yarn-v2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"license": "MIT",
"devDependencies": {
"autoprefixer": "^9.7.4",
"postcss-preset-env": "^6.7.0",
"qs": "^6.6.0"
}
}
Loading

0 comments on commit 8422845

Please sign in to comment.