mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
5
.changeset/perfect-geckos-fry.md
Normal file
5
.changeset/perfect-geckos-fry.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/core": patch
|
||||
---
|
||||
|
||||
Don't write a lockfile if useLockfile is set to false.
|
||||
@@ -912,7 +912,9 @@ const _installInContext: InstallFunction = async (projects, ctx, opts) => {
|
||||
])
|
||||
} else {
|
||||
await finishLockfileUpdates()
|
||||
await writeWantedLockfile(ctx.lockfileDir, newLockfile, lockfileOpts)
|
||||
if (opts.useLockfile) {
|
||||
await writeWantedLockfile(ctx.lockfileDir, newLockfile, lockfileOpts)
|
||||
}
|
||||
|
||||
if (opts.nodeLinker !== 'hoisted') {
|
||||
// This is only needed because otherwise the reporter will hang
|
||||
|
||||
@@ -24,6 +24,22 @@ test('installing with hoisted node-linker', async () => {
|
||||
expect(fs.existsSync('node_modules/send/node_modules/ms')).toBeTruthy()
|
||||
})
|
||||
|
||||
test('installing with hoisted node-linker and no lockfile', async () => {
|
||||
prepareEmpty()
|
||||
|
||||
await install({
|
||||
dependencies: {
|
||||
ms: '1.0.0',
|
||||
},
|
||||
}, await testDefaults({
|
||||
useLockfile: false,
|
||||
nodeLinker: 'hoisted',
|
||||
}))
|
||||
|
||||
expect(fs.realpathSync('node_modules/ms')).toEqual(path.resolve('node_modules/ms'))
|
||||
expect(fs.existsSync('pnpm-lock.yaml')).toBeFalsy()
|
||||
})
|
||||
|
||||
test('overwriting (is-positive@3.0.0 with is-positive@latest)', async () => {
|
||||
const project = prepareEmpty()
|
||||
const manifest = await addDependenciesToPackage(
|
||||
|
||||
Reference in New Issue
Block a user