Commit Graph

179 Commits

Author SHA1 Message Date
Khải
93ac21ccd0 refactor: add types to installSome and installCase (#9539)
---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-05-15 11:16:22 +02:00
Khải
c8341cca57 feat: pnpm add option to add new entries to catalogs (#9484)
close #9425

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-05-14 18:32:05 +02:00
Zoltan Kochan
f0c3ed6781 fix: don't fail with strictPeerDependencies=true if the peerDependencyRules ignore the peer issues (#9505)
close #9449
close #8859
close #7978
close #8382
2025-05-09 11:38:56 +02:00
Zoltan Kochan
8a9f3a4835 refactor: rename pref to bare specifier (#9445) 2025-04-20 22:58:08 +02:00
Khải
5d7ba81f77 refactor: replace & with interface extends where possible (#9437) 2025-04-18 23:02:25 +02:00
Zoltan Kochan
5b73df1eb1 refactor: resolvers should calculate the specifiers that are saved into package.json (#9426)
* refactor: resolvers should return specifier templates

* refactor: updating workspace protocol specs in package.json

* refactor: move workspace selector calculation logic to npm-resolver

* refactor: move workspace selector calculation logic to npm-resolver

* refactor: calculating range in npm-resolver

* refactor: rename normalizedPref and specifierTemplate to specifier

* refactor: specifiers creation

* refactor: npm-resolver

* refactor: remove which-version-is-pinned package

* refactor: which version is pinned

* docs: add changesets

* refactor: implement suggestions

* refactor: revert regex usage
2025-04-18 17:48:03 +02:00
Zoltan Kochan
81f441cd3a refactor: updating specs in the manifest (#9410) 2025-04-13 21:44:35 +02:00
btea
bd94ce0753 fix: keep the ignoredBuilds field when installing different pkg (#9242)
* fix: keep the `ignoredBuilds` field when installing different dependencies

* fix: print warning about ignored builds

---------

close #9240

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-03-19 01:09:12 +01:00
Khải
5f7be645e4 feat(patching): version ranges and strict patches (#9236)
* feat: replace a config

This is a test commit to see if CI fails

* feat: `strictPatches`

* docs: future instruction

* feat: `strictPatches` → `allowPatchFailure`

* docs(changeset): correction

* test: getOptionsFromRootManifest

* fix: allowFailure

* feat: groupPatchedDependencies

* fix: update code after merge

* fix: star spec

* feat: error on invalid ranges

* fix: eslint

* docs: change task

* feat(patching): version ranges

* fix: `verifyPatches`

* refactor: move types to `@pnpm/patching.types`

* docs(changeset): add missing package

* refactor: move `verifyPatches` to `@pnpm/patching.config`

* test: fix

* feat: change error message of unused patches

* refactor: exact options into an interface

* test(patching): version range

* test(patching): allowPatchFailure

* docs: change wording

* docs: change wording

* test(patching): version range error

* test(patching): legacy behavior

* test: don't use star

* test(patching): strict versionless

* test: strictPatches

* chore(deps): `@pnpm/logger` must be peer

* docs: fix grammar

* refactor: rename `blank` to `all`

* refactor: use string

* refactor: use array for `PatchGroup.range`

* refactor: stop re-exporting `allPatchKeys`

* feat: re-export `PatchGroupRangeItem`

* refactor: move error creation into a class

* docs: replace "versionless" with "name-only"

* docs: coherent wordings

* test: exact version overrides range conflict

* test: tweak

* docs: consistent wordings

* docs: correct wordings

* refactor: rename `allowPatchFailure` to `ignorePatchFailures`

* feat: replace `strictPatches` with `ignorePatchFailures`

* docs: legacy behavior

* feat: introduce `allowUnusedPatches`

* docs(changeset): update

* docs: remove outdated comment

* docs: backward-compatibility
2025-03-13 12:13:06 +01:00
btea
adb236f1a1 refactor: improve regexp (#9203) 2025-03-02 13:17:09 +01:00
Brandon Cheng
41dada429b fix: catalog snapshots removed on filtered install with --fix-lockfile (#9152)
close #8639
2025-02-24 02:41:27 +01:00
Brandon Cheng
43681529cf refactor: make frozen install logic clearer (#9148)
* refactor: declare interface for `_install` function result

* refactor: create new function for attempting frozen install

* refactor: early return if frozen-like install is not possible

* refactor: early return in frozenInstall() for empty/missing lockfile

* refactor: return `null` from tryFrozenInstall() if attempt failed

* refactor: add comments to `isFrozenInstallPossible`

* refactor: move tryFrozenInstall out from _install

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-02-23 13:34:07 +01:00
Brandon Cheng
2d16f7a4a9 fix: stale catalog protocol reference on filtered install (#9126)
#8638
2025-02-22 13:22:36 +01:00
Zoltan Kochan
8fcc221394 feat: reading settings from pnpm-workspace.yaml (#9121)
Related discussion: https://github.com/orgs/pnpm/discussions/9037

close #9033
2025-02-22 02:10:43 +01:00
Zoltan Kochan
f6006f2b4b feat: add an option to fail on unapproved dependency builds (#9071) 2025-02-11 00:26:25 +01:00
Zoltan Kochan
371734043a fix: make the warning about blocked install scripts more prominent (#9067) 2025-02-09 01:34:18 +01:00
Zoltan Kochan
9843aedd76 fix: don't read from side-effects cache packages that aren't allowed to be built (#9047)
close #9042
2025-02-06 00:12:54 +01:00
btea
2b49ee77c7 fix: install dependencies execute preprepare and postprepare scripts (#8989)
* fix: install dependencies execute preprepare script

* chore: remove unnecessary code

* fix: postprepare should run

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-01-26 20:31:00 +01:00
btea
7a9473b237 fea: pnpm.ignoredBuiltDependencies for muting warnings about ignored dependency builds (#8958)
close #8935

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-01-12 02:17:44 +01:00
Zoltan Kochan
cc3bbc950d fix: don't load side-effects cache for packages that are not allowed to be built (#8901)
* fix: don't read ignored deps from side effects cache

* test: fix

* test: fix
2025-01-05 03:17:54 +01:00
Fotis Papadogeorgopoulos
c7eefdd082 fix: pnpm update --filter --latest should only change relevant packages and projects, with dedupe-peer-dependents=true (#8905)
* test(update): add failing tests for update with dedupe-peer-dependents=true

Relates to https://github.com/pnpm/pnpm/issues/8877

* fix: update --filter --latest should work with dedupe-peer-dependents

Fixes https://github.com/pnpm/pnpm/issues/8877, whereby
`update --filter --latest` with `dedupe-peer-dependents` would end up
updating all available dependencies for all projects.

* test(pnpm): more accurate dedupePeers filtered install case

* docs: add changeset for updateToLatest moving to projects/importers

* docs: add changesets for pnpm and plugin-commands-installation

* chore: fix tsc issue by removing unknown bound resolver property

This unknown property was accepted by tsc prior to adding updateToLatest
in toResovleImporter options, but now it was erroring out. This is
likely a tsc quirk about the shape of the object; regardless that
property is not defined, and should not be present.

* test: keep only pnpm/test/monorepo/dedupePeers.test.ts

There was duplicate coverage of the pnpm update --filter --latest
command between two tests, so this keeps only the one dedicated
to testing the dedupe-peer-dependents feature.

* chore: fix unused import error
2024-12-29 17:30:36 +01:00
Zoltan Kochan
4771813309 feat: store ignored dependencies list in modules state file (#8903) 2024-12-24 03:01:35 +01:00
Zoltan Kochan
512465c4ce refactor: remove allowBuild from options of resolveDependencies() (#8902) 2024-12-23 01:24:50 +01:00
martinkors
c0895e8b12 feat(add): pnpm add should use the default catalog (#8870)
close #8640
2024-12-16 02:10:24 +01:00
Zoltan Kochan
fb9e3b4ee0 feat!: drop lockfile v6 support 2024-12-15 15:38:20 +01:00
Zoltan Kochan
a76da0c53c feat!: remove conversion of lockfile v6 to v9 (#8866) 2024-12-15 14:39:19 +01:00
Zoltan Kochan
6483b646fe feat: a new setting for injecting workspace packages (#8836) 2024-12-05 17:37:15 +01:00
Zoltan Kochan
4b80c2c648 fix: do not fail if the active store directory was created by pnpm v9 (#8814)
* fix: do not fail if the active store directory was created by pnpm v9

* test: checkCompatibility
2024-11-28 08:55:19 +01:00
Jordan
9ea8fa457b fix: only validate modules directory if required (e.g. for install) (#8657) 2024-10-24 17:45:49 +02:00
Zoltan Kochan
477e0c1f74 feat!: the link command should add overrides (#8653) 2024-10-24 16:59:55 +02:00
Zoltan Kochan
b33f153b36 Merge branch 'main' into v10 2024-10-12 03:21:03 +02:00
Zoltan Kochan
a943fc9741 refactor: error message on out of date lockfile 2024-10-07 21:54:50 +02:00
Zoltan Kochan
aae0808b35 Merge remote-tracking branch 'origin/main' into v10 2024-10-05 02:24:28 +02:00
Khải
51f3ba1df8 refactor: extract some logics from core/install (#8597) 2024-10-04 04:27:27 +02:00
Khải
2d5f6a7933 refactor: create hashObjectNullableWithPrefix (#8601) 2024-10-03 15:26:10 +02:00
Zoltan Kochan
b6206dd492 Merge remote-tracking branch 'origin/main' into v10 2024-09-22 13:43:06 +02:00
Khải
ad1fd64b64 fix(deploy): node-linker=hoisted produces empty node_modules (#8525)
close https://github.com/pnpm/pnpm/issues/6682

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-09-20 03:27:05 +02:00
Zoltan Kochan
5284f9d8c0 Merge remote-tracking branch 'origin/main' into v10 2024-09-18 10:25:17 +02:00
Zoltan Kochan
501c152e34 feat!: use SHA256 for hashing side effects cache keys in index files (#8533) 2024-09-18 10:24:03 +02:00
Khải
24ad47cfb8 refactor: replace array.reduce (#8537) 2024-09-18 04:41:35 +02:00
Zoltan Kochan
5d260193a8 feat!: use SHA256 for storing the checksums for patch files (#8532) 2024-09-18 04:14:58 +02:00
Khải
f071d00815 refactor: replace forEach with for-loops (#8535)
* refactor: replace `forEach` with `for`-loops

Changes:
* Most `Object.keys(o).forEach` are replaced by `for in`.
* Most `Array.filter(c).forEach` are replaced by `for of` + `if continue`.
* `return` in `forEach` callbacks are replaced by `continue`.

There may be minor improvement to memory footprint as this change would
reduce the creations of temporary arrays and temporary functions.

* fix: return -> continue

* refactor: remove the commented out code
2024-09-18 03:58:25 +02:00
Zoltan Kochan
e50baa8458 fix: don't print a warning when printing packages globally (#8529)
close #4761
2024-09-16 01:09:31 +02:00
Zoltan Kochan
39f693ba89 fix(core): don't fail on skipped optional deps, when calculating depsRequiringBuild (#8404) 2024-08-11 14:54:27 +02:00
Zoltan Kochan
8e055d2f05 fix(core): don't fail on skipped optional deps, when calculating depsRequiringBuild (#8390) 2024-08-08 14:04:47 +02:00
Zoltan Kochan
09876c931f feat(core): return the list of dependencies that require a build (#8371) 2024-08-02 23:37:23 +02:00
Khải
cb006df38c feat(patching): apply patch to all versions (#8337)
Related issue: #5686
2024-08-01 15:05:15 +02:00
Zoltan Kochan
daa45dfd91 refactor: rename prune-lockfile to lockfile.pruner 2024-07-28 01:48:23 +02:00
Zoltan Kochan
c5ef9b0643 refactor: rename filter-utils to lockfile.utils 2024-07-28 01:35:40 +02:00
Zoltan Kochan
8055a30be1 refactor: rename filter-lockfile to lockfile.filtering 2024-07-28 01:24:55 +02:00