Skip to content

Commit

Permalink
feat: add exports-pnpmfile package
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Dec 31, 2024
1 parent a9e5860 commit 7533c54
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pnpm/registry-mock",
"version": "3.46.0",
"version": "3.47.0",
"description": "Mock the npm registry",
"main": "dist/index.js",
"bin": "dist/bin/pnpm-registry-mock.js",
Expand Down
4 changes: 4 additions & 0 deletions packages/exports-pnpmfile/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@pnpm.e2e/exports-pnpmfile",
"version": "1.0.0"
}
13 changes: 13 additions & 0 deletions packages/exports-pnpmfile/pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
hooks: {
readPackage (pkg) {
if (pkg.name === '@pnpm/x') {
if (!pkg.dependencies) {
pkg.dependencies = {}
}
pkg.dependencies['@pnpm/y'] = '1.0.0'
}
return pkg
}
}
}

0 comments on commit 7533c54

Please sign in to comment.