Skip to content

Commit

Permalink
feat: move compat database to separate package (#4436)
Browse files Browse the repository at this point in the history
* feat: move compat database to separate package

The packageExtensions compat database is useful for pnpm as well.
By moving it to a separate package, we can use it in pnpm and
recommend the pnpm users to extend the database as well.

* Renames packages/extensions -> packages/yarnpkg-extensions

* Fixes constraints

* refactor: re-use extensions

* chore: remove unnecessary test

* chore: start at `1.0.0`

Co-authored-by: Maël Nison <nison.mael@gmail.com>
Co-authored-by: merceyz <merceyz@users.noreply.github.com>
  • Loading branch information
3 people committed May 24, 2022
1 parent dcd3d3f commit 646130c
Show file tree
Hide file tree
Showing 9 changed files with 934 additions and 828 deletions.
42 changes: 42 additions & 0 deletions .pnp.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarn/versions/1633b796.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
releases:
"@yarnpkg/extensions": minor

declined:
- "@yarnpkg/plugin-compat"
2 changes: 1 addition & 1 deletion packages/gatsby/static/configuration/yarnrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
},
"packageExtensions": {
"_package": "@yarnpkg/core",
"description": "Some packages may have been specified incorrectly with regard to their dependencies - for example with one dependency being missing, causing Yarn to refuse it the access. The `packageExtensions` fields offer a way to extend the existing package definitions with additional information. If you use it, consider sending a PR upstream and contributing your extension to the [`plugin-compat` database](https://github.com/yarnpkg/berry/blob/master/packages/plugin-compat/sources/extensions.ts).\nNote: This field is made to add dependencies; if you need to rewrite existing ones, prefer the [`resolutions`](/configuration/manifest#resolutions) field.",
"description": "Some packages may have been specified incorrectly with regard to their dependencies - for example with one dependency being missing, causing Yarn to refuse it the access. The `packageExtensions` fields offer a way to extend the existing package definitions with additional information. If you use it, consider sending a PR upstream and contributing your extension to the [`plugin-compat` database](https://github.com/yarnpkg/berry/blob/master/packages/extensions/sources/index.ts).\nNote: This field is made to add dependencies; if you need to rewrite existing ones, prefer the [`resolutions`](/configuration/manifest#resolutions) field.",
"type": "object",
"patternProperties": {
"^(?:@([^/]+?)/)?([^/]+?)(?:@(.+))$": {
Expand Down
3 changes: 3 additions & 0 deletions packages/plugin-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"@yarnpkg/core": "workspace:^",
"@yarnpkg/plugin-patch": "workspace:^"
},
"dependencies": {
"@yarnpkg/extensions": "workspace:^"
},
"devDependencies": {
"@types/lodash-es": "4.17.4",
"@types/resolve": "^1.17.1",
Expand Down
Loading

0 comments on commit 646130c

Please sign in to comment.