Commit Graph

9472 Commits

Author SHA1 Message Date
Khải
f3ffaed009 feat(install): option to disable fast reinstall (#8977) 2025-01-26 11:53:16 +01:00
v1rtl
acdf26d8cd refactor: replace strip-ansi with built-in util.stripVTControlCharacters (#9009) 2025-01-26 11:44:40 +01:00
btea
b65303dc6c fix: check package name when run publish (#8973)
* fix: check package name when run publish

* feat: use validate-npm-package-name

* Update .changeset/cuddly-items-own.md
2025-01-25 20:38:34 +01:00
Khải
5c8654f300 fix: check for delete modules dir in sub-project (#8967)
* fix: check for delete modules dir in sub-project

Fixes https://github.com/pnpm/pnpm/issues/8959

* docs: remove todo

* refactor: merge branching

* docs: explain

* fix: actually return `upToDate: false`

* test: issue 8959

* test: add assertions to `multiProjectWorkspace.ts`

* feat: delete `optionalDependencies`

* fix: filtered install
2025-01-25 19:42:57 +01:00
Zoltan Kochan
961dc5d29d feat: add ignored-builds command (#8963)
* feat: add ignored-builds command

* test: ignored-builds

* test: ignored-builds

* fix: document the new command

* refactor: update text

* feat: add approve-builds command

* feat: rebuild approved packages

* fix: ignored builds

* feat: add final approval prompt

* test: approve builds

* refactor: approve-builds
2025-01-25 18:51:35 +01:00
Khải
0bc7a3f746 refactor: replace statIfExists with safeStat (#8966) 2025-01-14 01:04:10 +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
040e67b88d fix: don't print patched dependencies in list of non-built deps (#8961)
close #8952
2025-01-11 02:20:12 +01:00
Khải
c96eb2b042 fix(lifecycle): skip verify for install hooks (#8957)
close #8954

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-01-10 23:14:27 +01:00
Zoltan Kochan
4ca321903c ci: print only the major Node.js version in the job name 2025-01-10 13:24:05 +01:00
Zoltan Kochan
ab74e6a169 ci: pin Node.js versions
Sometimes new versions of Node.js make pnpm fail. We are spending more time than needed to investigate such issues because we cannot know that a new Node.js version got installed in CI
2025-01-09 01:56:29 +01:00
Khải
ea58bfdc47 fix(validatePeerDependencies): allow combinations (#8946) 2025-01-08 11:31:37 +01:00
Zoltan Kochan
c27856e789 chore: update pnpm to v10.0 2025-01-07 15:49:40 +01:00
Zoltan Kochan
42ecf04fd0 chore(release): 10.0.0 v10.0.0 2025-01-07 15:28:17 +01:00
Khải
26fe99440d feat!: prevent nonsense peerDependencies (#8942)
* feat!: prevent nonsense `peerDependencies`

close #8934

* fix: eslint

* feat: refuse aliases

* feat: only validate packages from the workspace

* refactor: change call signature and error messages

* docs(hint): improve wordings

* docs: add quotes to make it more readable

* test: remove `use-`
2025-01-07 14:55:22 +01:00
Zoltan Kochan
e050221384 fix: pnpm link should keep the indentations in the updated manifest 2025-01-07 02:48:02 +01:00
Zoltan Kochan
c0c63ef5b5 docs: update years 2025-01-07 02:47:01 +01:00
Fotis Papadogeorgopoulos
dde650b96f fix: ensure that recursive pnpm update --latest <pkg> updates only the specified package (#8933)
* test(pnpm): expand dedupePeers test to account for other dependencies in same package

Previously, this test only asserted that _other_ monorepo packages were unaffected,
but it did not check other dependencies of the _same_ monorepo package.

* fix: ensure that recursive update --latest only updates matched packages

* fix: move update check to resolveDependendency

* refactor: move updateToLatest conditional up in resolveDependency

* refactor: make update types mutually exclusive in resolveDependencies

* refactor: rename 'in-range' update type to 'compatible'

Co-authored-by: Zoltan Kochan <z@kochan.io>

* refactor: use update union type in package-requester and store-controller-type

* docs: add changesets

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-01-07 02:08:26 +01:00
Zoltan Kochan
c5080ded56 chore(release): 10.0.0-rc.3 v10.0.0-rc.3 2025-01-05 13:26:28 +01:00
yuna0x0
b28a533507 fix(pack): missing end of line anchor in package.json regex filter (#8938) 2025-01-05 12:18:27 +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
btea
12aebe29fe docs: README add Bluesky link (#8937) 2025-01-05 03:17:34 +01:00
Khải
0f35416e6e fix(patching): reuse patch without version (#8936)
close #8919
2025-01-04 11:33:42 +01:00
Zoltan Kochan
9591a18d96 feat: configurational dependencies (#8915)
* feat: configuration dependencies

* feat: remove configuration dependencies

* feat: update configuration dependencies

* feat: configuration dependencies fast check on repeat install

* revert: comment

* refactor: install configurational deps

* refactor: install config deps

* refactor: install config deps

* test: config deps

* test: config deps

* docs: add changeset

* test: loading a pnpmfile from config deps

* fix: reading hooks after installing config deps

* test: fix

* test: fix

* test: fix

* test: fix

* test: loading patch from config dep

* fix: do not allow config deps w/o integrity checksum
2025-01-04 11:29:22 +01:00
Khải
b4b293a7be refactor: replace custom parser with @pnpm/dependency-path (#8926)
* refactor: use `@pnpm/dependency-path`

* fix: make `dependency-path` works

* refactor: reduce computation

* refactor: deduplicate code as function

* refactor: correct the names and terminologies
2025-01-01 23:01:11 +01:00
huuya
046388c64b fix(plugin-commands-patching): exclude .DS_Store file at patch-commit (#8923)
close #8922
2024-12-31 02:41:41 +01:00
Zoltan Kochan
1f5169fd0f fix: update @pnpm/npm-conf to v3 (#8931)
ref #8827
2024-12-31 02:30:51 +01:00
Zoltan Kochan
52204d51a7 chore: pd should not switch to another version of pnpm (#8930)
close #8928
2024-12-30 21:10:44 +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
e103abe941 chore(release): 10.0.0-rc.2 v10.0.0-rc.2 2024-12-29 02:47:35 +01:00
Zoltan Kochan
f90a94b474 fix: onlyBuiltDependencies (#8921)
close #8920
2024-12-29 02:18:01 +01:00
Khải
f89128883f feat(deploy): create dedicated lockfile (#8828)
* feat(deploy): create dedicated lockfile

Closes https://github.com/pnpm/pnpm/issues/8778

* chore: remove a leftover `console.log`

* fix: hoisted should also use dedicated lockfile

* feat: inherit more keys

* docs(changeset): more details

* refactor: remove a variable

* refactor: use `selectedProject.rootDir`

* fix: manifest files

* fix: update lockfile

* fix: accidentally skipped normal dependencies

* test: update

* fix: meta

* fix: remove links to nowhere

* docs: remove the false todo

* fix: transitive workspace dependencies

* fix: package snapshot names

* fix: dependencies that depend on deployed package

* perf: do not repeat computation

* fix: compile error

* refactor: base on allProjects

* fix: add missing `link:` prefix

* test: add some tests

* fix: revert stupid refactor

This reverts commit 000788127c.

* test: more assertions

* test: more assertions

* test: https://github.com/pnpm/pnpm/issues/8778

* test: exact paths

* refactor: use `toBe`

* refactor: divide section

* fix: eslint

* test: fix assertions

* fix: dependencies that depend on deploy package

* perf: cheap operation first

* test: remove `.only`

* test: add assertions

* test: remove unnecessary assertions

* test: remove unnecessary details

* fix: deployed package depends on itself

* docs: remove the other todo

* fix: self-referential dependencies

* test: fix

* test: more assertions

* feat: convert fallbacks to programmer errors

* fix: `file:` protocol

* refactor: more types

* refactor: remove unused variables

* refactor: fix regex

* feat: force-legacy-deploy

* feat: suggest reporting bug and using workaround

* feat: overrides, patchedDependencies, packageExtensions (wip)

* test: fix

* feat: handle `packageExtensions` in a smarter way

* fix: pnpmfile

* docs: change wording

* fix: `packageExtensions` with internal dependencies

* fix: directory resolution location

* refactor: use `rootProjectManifestDir`

* feat: set `overrides` to `undefined` instead

* refactor: remove `as ProjectRootDirRealPath`

* test: packageExtensions

* test: use regex string matchers

* refactor: move new tests to its own file

* fix: patchedDependencies

* fix: eslint

* test: patchedDependencies

* test: fix windows

* fix: pnpmfile checksum

* docs: change wording

* fix: peer dependencies

* docs: omission of peers

* docs: more detailed explanation

* fix: preserve unique peer dependencies suffix

* refactor: code rearrange

* refactor: shorten lines of code

* feat: add `dedupeInjectedDeps` to `InstallCommandOptions`

* test: peer dependencies suffix

* docs(changeset): config -> force-legacy-deploy

* docs(changeset): merge

* docs(changeset): add missing period
2024-12-27 17:17:12 +01:00
Zoltan Kochan
09c1ffbae5 chore: update pnpm to v10.0 RC 1 2024-12-27 15:18:20 +01:00
Zoltan Kochan
b27e7f553a chore(release): 10.0.0-rc.1 v10.0.0-rc.1 2024-12-27 14:20:04 +01:00
Zoltan Kochan
cf9a8562eb docs: add new sponsor 2024-12-27 12:35:50 +01:00
Denis Zavershinskiy
738d9e4679 fix: correctly resolve workspace dependencies with relative paths (#8907) 2024-12-27 03:23:36 +01:00
Utsav Shah
b10096228c fix(git-resolver): handle private git repo resolution (#8906)
* fix(git-resolver): handle private git repo resolution

In the case where:

1. No git auth token was specified by the user
2. The package requested to be fetched via https
3. The user does not have SSH access to the repo but has HTTPS access
4. The package was hosted in a private GitHub repo

pnpm would fallback to using SSH since it was a "likely private repo"
and would fail to resolve the package. Now, rather than only checking if
there is an auth token specified, it also checks both:

1. Is the repo private
2. Does the user have access to ls-remote it.

And if these conditions are true, it tries to use https anyway.

This matches the behavior of npm and Yarn berry. Yarn classic also has
this bug, and there's a code comment that alludes to it.
2024-12-27 02:48:59 +01:00
Zoltan Kochan
d86015b09c chore: fix spellcheck error 2024-12-26 01:54:19 +01:00
btea
7272992741 feat: extend symlink error message (#8879)
---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-12-26 01:24:47 +01:00
Zoltan Kochan
ecb30d11b4 revert: "fix: installation dependency error in exFAT drive (#8872)"
This reverts commit 835b4e8f64.
2024-12-26 01:14:12 +01:00
Zoltan Kochan
bb6e5cafe8 chore: update symlink-dir to v6.0.4 2024-12-25 13:47:30 +01:00
Zoltan Kochan
878ea8c43b feat!: use an allow list of built dependencies by default (#8897) 2024-12-24 14:06:50 +01:00
David
3a3cc49af2 feat: add support for specifying a custom output path in the pack command (#8900)
close #7834

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-12-24 11:34:29 +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
Zoltan Kochan
516c4b301b fix: improve how ignored lifecycle scripts are reported (#8899) 2024-12-22 21:22:06 +01:00
btea
e8c0ae354b chore: remove unnecessary comment (#8896) 2024-12-22 01:43:09 +01:00
Rantetsu Inori
f74070d72f fix: command suggestion to apply patch on Windows (#8851)
close #7546

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-12-20 10:38:17 +01:00
Zoltan Kochan
3bc9d5c50e fix: hoisted install with dependency that is a peer of itself (#8892)
close #8854
2024-12-20 01:05:54 +01:00
Zoltan Kochan
82de1bd1dd feat!: update node-gyp to v11 (#8887) 2024-12-19 02:27:30 +01:00