feat!: enabe-pre-post-scripts is true by default (#7634)

This commit is contained in:
Zoltan Kochan
2024-02-10 21:31:13 +01:00
committed by GitHub
parent e4f0307a05
commit 2b891558a8
3 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/config": major
"pnpm": major
---
`enable-pre-post-scripts` is set to `true` by default. This means that when you run a script like `start`, `prestart` and `poststart` will also run.

View File

@@ -210,6 +210,7 @@ export async function getConfig (
'dedupe-injected-deps': true,
'disallow-workspace-cycles': false,
'enable-modules-dir': true,
'enable-pre-post-scripts': true,
'exclude-links-from-lockfile': false,
'extend-node-path': true,
'fail-if-no-match': false,

View File

@@ -46,7 +46,9 @@ test('run: pass the args to the command that is specified in the build script',
const { default: args } = await import(path.resolve('args.json'))
expect(args).toStrictEqual([
[],
['arg', '--flag=true'],
[],
])
})
@@ -69,7 +71,9 @@ test('run: pass all arguments after script name to the build script, even --', a
const { default: args } = await import(path.resolve('args.json'))
expect(args).toStrictEqual([
[],
['arg', '--', '--flag=true'],
[],
])
})