Commit Graph

79 Commits

Author SHA1 Message Date
Zoltan Kochan
c7d65fe7fb fix: don't incorrectly consider a lockfile to be out-of-date (#5121) 2022-07-30 12:22:29 +03:00
Brandon Cheng
4fa1091c80 feat: add experimental use-inline-specifiers-lockfile-format (#5091)
* feat: add experimental use-inline-specifiers-lockfile-format

* fix(lockfile-file): check importers key for shared lockfile format

The `convertFromLockfileFileMutable` function reverts changes from
`normalizeLockfile` when not using the shared lockfile format.

  - The non-shared lockfile format puts fields like `specifiers`,
    `dependencies`, `devDependencies`, `optionalDependencies`, and
    `dependenciesMeta` on the root of the lockfile. This is typically
    the case for a repo not using pnpm workspaces.
  - The shared lockfile format puts these under a `importers` block
    scoped by a path.

The `use-inline-specifiers-lockfile-format` feature flag removes the
`specifiers` block in favor of putting each specifier next to the
resolved version within each `dependencies`, `devDependencies`, etc
block.

This means the `convertFromLockfileFileMutable` function can no longer
check for `specifiers` to detect the whether the "shared" format is
used. @zkochan suggested checking for `importers` instead, which should
have the same effect.
https://github.com/pnpm/pnpm/pull/5091#discussion_r929326835

* test(lockfile-file): add read & write test for useInlineSpecifiersFormat
2022-07-27 12:27:41 +03:00
Zoltan Kochan
0569f10227 fix(deploy): don't modify the lockfile and fail in CI (#5074)
close #5071
2022-07-21 18:15:28 +03:00
Zoltan Kochan
e3f4d131cc fix: auto install root peer deps when auto-install-peers=true (#5067)
close #5028
2022-07-21 18:15:16 +03:00
Michał Belniak
406656f806 feat: add lockfile-include-tarball-url option (#5054)
* feat: add save-tarball-url .npmrc option

- add save-tarball-url option, which saves resolved tarball URL to
pnpm-lock.yaml during install or add command

* feat: add save-tarball-url .npmrc option - remove incorrect change

- remove help section for new option

* feat: add lockfile-include-tarball-url option - change option name, add test

- option is now named lockfile-include-tarball-url as suggested by
@zkochan
- add test covering new feature

* feat: add lockfile-include-tarball-url option - add changeset

- add changeset

* refactor: lockfile-include-tarball-url

Co-authored-by: Zoltan Kochan <z@kochan.io>
2022-07-20 16:57:47 +03:00
Zoltan Kochan
28f0005096 feat: prefer-symlinked-executables (#5048)
A new setting supported: `prefer-symlinked-executables`
When `true`, on Posix systems pnpm will create symlinks to executables in
`node_modules/.bin` instead of command shims.

This setting is `true` by default when `node-linker` is set to
`hoisted`.

close #4782
2022-07-18 17:18:31 +03:00
Zoltan Kochan
0ee3dfbe07 fix: don't print redundant warnings 2022-07-18 02:21:23 +03:00
Zoltan Kochan
d89bb43f2d fix: don't symlink the autoinstalled peers to the root of node_modules (#4998)
close #4988
2022-07-09 00:58:23 +03:00
Zoltan Kochan
ff7061929f fix: don't fail when removing a dep from a workspace that has patches
ref https://github.com/pnpm/pnpm/issues/4954#issuecomment-1172858634
2022-07-02 14:16:25 +03:00
javier-garcia-meteologica
f5621a42c2 feat: use workspace spec alias by default in pnpm add (#4947) 2022-07-02 14:12:08 +03:00
Zoltan Kochan
b55b3782d8 fix: --lockfile-only in CI and with frozen-lockfile=true (#4955)
close #4951
2022-06-30 11:00:52 +03:00
Zoltan Kochan
5f643f23b0 fix(deps): update ramda to v0.28 2022-06-28 15:33:17 +03:00
Zoltan Kochan
7922d63145 feat: deploy command (#4933)
close #4378
2022-06-27 19:58:29 +03:00
Zoltan Kochan
12aa1e2e19 fix: install --lockfile-only should exit early (#4932)
ref #4910
2022-06-25 15:21:13 +03:00
Zoltan Kochan
d01c323559 fix: patch package even if it is not in the onlyBuiltDependencies list (#4925)
close #4914
2022-06-24 21:44:25 +03:00
Zoltan Kochan
285ff09ba7 fix: packages should be patched even when scripts are ignored (#4922) 2022-06-24 18:04:38 +03:00
Zoltan Kochan
8e5b77ef61 fix: a modified patch should update the deps on install (#4918)
close #4916
2022-06-24 16:17:10 +03:00
Zoltan Kochan
2a34b21ced feat: patch package (#4885)
ref #3077
ref #2675
2022-06-19 11:44:38 +03:00
Zoltan Kochan
0abfe17182 fix: built packages should not modify the original files in the store (#4898) 2022-06-18 21:45:11 +03:00
Cheng
56cf04cb36 feat: add git-branch-lockfile config to generate lockfile in each branch (#4475)
Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: David Michon <dmichon@microsoft.com>
2022-06-14 23:31:16 +03:00
Travis Ryan
fb5bbfd7a8 feat: enhance peer dependency rules (#4876)
Co-authored-by: Zoltan Kochan <z@kochan.io>

close #4835
2022-06-13 22:39:32 +03:00
Zoltan Kochan
4d39e4a0c3 feat: allowed deprecated versions (#4864)
close #4306
2022-06-08 15:19:13 +03:00
Zoltan Kochan
190f0b331f fix: auto install of peer dependencies (#4776)
close #4684
2022-05-22 03:19:40 +03:00
Zoltan Kochan
bd35d77221 refactor: use @yarnpkg/extensions instead of @yarnpkg/plugin-compat (#4710) 2022-05-10 03:15:55 +03:00
Zoltan Kochan
0075fcd234 fix(prune): should work in a workspace (#4691)
close #4647
2022-05-07 04:10:05 +03:00
Zoltan Kochan
cadefe5b68 fix: print a warning when too many file's integrity is checked (#4688) 2022-05-06 19:46:19 +03:00
Zoltan Kochan
315871260b fix: use Yarn's compatibility database (#4676)
ref https://github.com/yarnpkg/berry/pull/4436
2022-05-06 15:45:35 +03:00
Zoltan Kochan
af6ac00e4d fix: global linking (#4641) 2022-04-29 16:21:33 +03:00
Zoltan Kochan
c38feff08f fix: only pnpm install should fail on peer dep issues (#4596)
close #4577
2022-04-22 12:38:30 +03:00
Kam Figy
88289a42c9 fix(core): prevent duplication of peerDependencyRules in the lockfile (#4576)
If a workspace has a global peerDependencyRule that is applied by more
than one package, the lockfile could contain duplicate copies
of the patched range. For example react-dom might have
`peerDependencies: 17.0.2 | 17 | 17 | 17 | 17` in the lockfile.

This causes merge conflicts as package updates seem to regularly change
the number of duplicates, causing lockfile conflicts.

The fix checks if the same widened range has already been appended,
and ignores subsequent duplicates if they exist.
2022-04-15 20:06:11 +03:00
Zoltan Kochan
8fa95fd868 fix(cmd-shim): extend NODE_PATH with path to hidden hoisted dir (#4513)
Deprecating `extend-node-path` in pnpm v7 has caused issues with "next dev".

This change is bringing back extending `NODE_PATH` in bin command shims. However, only when `node-linker` is set to `isolated` and packages are hoisted to `node_modules/.pnpm/node_modules`. Only `node_modules/.pnpm/node_modules` is added to `NODE_PATH`, so it should not cause too long input errors (as it was sometimes the case in pnpm v6)
2022-04-01 21:58:46 +03:00
CommanderRoot
bc35dff9a9 chore: replace deprecated String.prototype.substr() (#4479)
Co-authored-by: Zoltan Kochan <z@kochan.io>
2022-03-25 23:04:20 +02:00
Zoltan Kochan
faf830b8f6 feat: improve dep path of local deps 2022-03-19 20:39:10 +02:00
Zoltan Kochan
a36b6026bb feat(core): pruneLockfileImporters is true by default 2022-03-16 23:46:39 +02:00
Zoltan Kochan
06e679f80f feat: prevent deep imports using exports (#4440) 2022-03-15 23:42:48 +02:00
Zoltan Kochan
73d71a2d5b feat: strict-peer-dependencies is true by default (#4427) 2022-03-10 11:54:19 +02:00
Zoltan Kochan
56249f8c3c fix: onlyBuiltDependencies should work (#4377) 2022-02-23 01:54:55 +02:00
Zoltan Kochan
a60a6e591d fix: peerDependencyRules with * as range (#4370) 2022-02-22 00:38:47 +02:00
Zoltan Kochan
9c36c0fd6c feat: use the versions from overrides when adding deps without specs (#4355)
* feat: use the versions from overrides when adding deps without specs

close #4313

* docs: fix changeset
2022-02-19 15:45:30 +02:00
Zoltan Kochan
5d2b5ee641 feat: onlyBuiltDependencies (#4014)
close #4001

Co-authored-by: Jack Works <jackworks@protonmail.com>
2022-02-17 11:14:17 +02:00
Zoltan Kochan
b9fdc3104c Merge branch 'main' into v7 2022-02-06 23:38:24 +02:00
Zoltan Kochan
329e186e9e feat: set hoisting limits (#4300) 2022-02-05 13:23:58 +02:00
Zoltan Kochan
3b77e2f1e5 Merge remote-tracking branch 'origin/main' into v7 2022-01-30 22:20:07 +02:00
Zoltan Kochan
cc727797f9 fix(core): add publicHoistPattern to the fields of InstallOptions 2022-01-30 17:21:32 +02:00
Zoltan Kochan
37d09a68fa fix: a package should be able to be a dependency of itself (#4289) 2022-01-30 05:02:42 +02:00
Zoltan Kochan
9d9977d937 Merge branch 'main' into v7 2022-01-26 00:02:22 +02:00
Zoltan Kochan
c1383044d1 fix(core): don't try to read the name prop of manifest that is null 2022-01-25 16:38:30 +02:00
Zoltan Kochan
73fce0d935 Merge branch 'main' into v7 2022-01-20 23:28:21 +02:00
Zoltan Kochan
cdc521cfa4 feat: save the locations of injected deps to the modules state file (#4259) 2022-01-20 13:05:30 +02:00
Zoltan Kochan
d9fc6abdd3 Merge branch 'main' into v7 2022-01-20 12:35:54 +02:00