mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-30 04:52:04 -04:00
fix: don't run prepublishOnly of git-hosted dependencies (#7096)
close #7026
This commit is contained in:
6
.changeset/metal-starfishes-decide.md
Normal file
6
.changeset/metal-starfishes-decide.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/prepare-package": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Don't run the `prepublishOnly` scripts of git-hosted dependencies [#7026](https://github.com/pnpm/pnpm/issues/7026).
|
||||
@@ -7,9 +7,11 @@ import rimraf from '@zkochan/rimraf'
|
||||
import preferredPM from 'preferred-pm'
|
||||
import omit from 'ramda/src/omit'
|
||||
|
||||
// We don't run prepublishOnly to prepare the dependency.
|
||||
// This might be counterintuitive as prepublishOnly is where a lot of packages put their build scripts.
|
||||
// However, neither npm nor Yarn run prepublishOnly of git-hosted dependencies (checked on npm v10 and Yarn v3).
|
||||
const PREPUBLISH_SCRIPTS = [
|
||||
'prepublish',
|
||||
'prepublishOnly',
|
||||
'prepack',
|
||||
'publish',
|
||||
]
|
||||
|
||||
@@ -278,7 +278,6 @@ test('run prepare script for git-hosted dependencies', async () => {
|
||||
'install',
|
||||
'postinstall',
|
||||
'prepare',
|
||||
'prepublishOnly',
|
||||
'preinstall',
|
||||
'install',
|
||||
'postinstall',
|
||||
|
||||
Reference in New Issue
Block a user