mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
chore(config): allow a system's package manager to override pnpm's default settings (#3896)
https://github.com/Homebrew/homebrew-core/pull/85890
This commit is contained in:
8
.changeset/angry-shirts-flow.md
Normal file
8
.changeset/angry-shirts-flow.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"@pnpm-private/updater": minor
|
||||
"@pnpm/config": minor
|
||||
"@pnpm/exe": minor
|
||||
"pnpm": minor
|
||||
---
|
||||
|
||||
Allow a system's package manager to override pnpm's default settings
|
||||
@@ -172,7 +172,8 @@ async function updateManifest (workspaceDir: string, manifest: ProjectManifest,
|
||||
scripts.compile += ' && rimraf dist bin/nodes && pnpm run bundle \
|
||||
&& shx cp -r node-gyp-bin dist/node-gyp-bin \
|
||||
&& shx cp -r node_modules/@pnpm/tabtab/lib/scripts dist/scripts \
|
||||
&& shx cp -r node_modules/ps-list/vendor dist/vendor'
|
||||
&& shx cp -r node_modules/ps-list/vendor dist/vendor \
|
||||
&& shx cp pnpmrc dist/pnpmrc'
|
||||
} else {
|
||||
scripts.prepublishOnly = 'pnpm run compile'
|
||||
homepage = `https://github.com/pnpm/pnpm/blob/master/${relative}#readme`
|
||||
|
||||
@@ -214,6 +214,8 @@ export default async (
|
||||
'workspace-prefix': opts.workspaceDir,
|
||||
})
|
||||
|
||||
npmConfig.addFile(path.resolve(path.join(__dirname, 'pnpmrc')), 'pnpm-builtin')
|
||||
|
||||
delete cliOptions.prefix
|
||||
|
||||
process.execPath = originalExecPath
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as execa from 'execa'
|
||||
import path from 'path'
|
||||
|
||||
function build (target: string) {
|
||||
execa.sync('pkg', ['../pnpm/dist/pnpm.cjs', `--out-path=../artifacts/${target}`, `--targets=node14-${target}`], {
|
||||
execa.sync('pkg', ['../pnpm/dist/pnpm.cjs', `--config=../pnpm/package-${target}.json`], {
|
||||
cwd: path.join(__dirname, '..'),
|
||||
stdio: 'inherit',
|
||||
})
|
||||
|
||||
7
packages/pnpm/package-linux-arm64.json
Normal file
7
packages/pnpm/package-linux-arm64.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"pkg": {
|
||||
"assets": "dist/pnpmrc",
|
||||
"targets": ["node14-macos-arm64"],
|
||||
"outputPath": "../artifacts/macos-x64"
|
||||
}
|
||||
}
|
||||
7
packages/pnpm/package-linux-x64.json
Normal file
7
packages/pnpm/package-linux-x64.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"pkg": {
|
||||
"assets": "dist/pnpmrc",
|
||||
"targets": ["node14-linux-x64"],
|
||||
"outputPath": "../artifacts/linux-x64"
|
||||
}
|
||||
}
|
||||
7
packages/pnpm/package-linuxstatic-x64.json
Normal file
7
packages/pnpm/package-linuxstatic-x64.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"pkg": {
|
||||
"assets": "dist/pnpmrc",
|
||||
"targets": ["node14-linuxstatic-x64"],
|
||||
"outputPath": "../artifacts/linuxstatic-x64"
|
||||
}
|
||||
}
|
||||
7
packages/pnpm/package-macos-arm64.json
Normal file
7
packages/pnpm/package-macos-arm64.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"pkg": {
|
||||
"assets": "dist/pnpmrc",
|
||||
"targets": ["node14-macos-arm64"],
|
||||
"outputPath": "../artifacts/macos-x64"
|
||||
}
|
||||
}
|
||||
7
packages/pnpm/package-macos-x64.json
Normal file
7
packages/pnpm/package-macos-x64.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"pkg": {
|
||||
"assets": "dist/pnpmrc",
|
||||
"targets": ["node14-macos-x64"],
|
||||
"outputPath": "../artifacts/macos-x64"
|
||||
}
|
||||
}
|
||||
7
packages/pnpm/package-win-x64.json
Normal file
7
packages/pnpm/package-win-x64.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"pkg": {
|
||||
"assets": "dist/pnpmrc",
|
||||
"targets": ["node14-win-x64"],
|
||||
"outputPath": "../artifacts/win-x64"
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@
|
||||
"test": "pnpm run compile && pnpm run _test",
|
||||
"prepublishOnly": "pnpm compile && npm cache clear --force && publish-packed --prune --npm-client yarn --dest dist",
|
||||
"postpublish": "publish-packed",
|
||||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix && rimraf dist bin/nodes && pnpm run bundle && shx cp -r node-gyp-bin dist/node-gyp-bin && shx cp -r node_modules/@pnpm/tabtab/lib/scripts dist/scripts && shx cp -r node_modules/ps-list/vendor dist/vendor"
|
||||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix && rimraf dist bin/nodes && pnpm run bundle && shx cp -r node-gyp-bin dist/node-gyp-bin && shx cp -r node_modules/@pnpm/tabtab/lib/scripts dist/scripts && shx cp -r node_modules/ps-list/vendor dist/vendor && shx cp pnpmrc dist/pnpmrc"
|
||||
},
|
||||
"publishConfig": {
|
||||
"tag": "next",
|
||||
|
||||
2
packages/pnpm/pnpmrc
Normal file
2
packages/pnpm/pnpmrc
Normal file
@@ -0,0 +1,2 @@
|
||||
# DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT WILL HAPPEN
|
||||
# This file is intended for changing pnpm's default settings by the package manager that install pnpm
|
||||
Reference in New Issue
Block a user