Commit Graph

257 Commits

Author SHA1 Message Date
Zoltan Kochan
e18a879d72 feat!: drop Node.js 22.12 support 2026-02-18 14:54:09 +01:00
Zoltan Kochan
56a59df674 perf: persist bundled manifest in store index to avoid reading package.json from CAFS (#10473)
close #10461
2026-02-17 12:03:08 +01:00
Khải
cc7c0d22df refactor!: replace npm publish with libnpmpublish (#10591)
* chore(deps): add `libnpmpublish` to catalog

* chore(deps): install `libnpmpublish`

* feat: publishableManifest (wip)

* feat: publishableManifest (wip)

* chore(cspell): libnpmpublish

* test: fix

* feat: validate field and version

* chore: @npm/types

* chore: todo

* refactor: reorganize

* feat: transformRequiredFields

* chore(deps): patch `libnpmpublish`

* fix: `BaseManifest.config`

* fix: eslint

* chore(git): revert a patch that doesn't work

This reverts commit 45f2c6a6c2.

We will use type casting

* feat: `engines.runtime`

* feat: normalize bin

* fix: `bin === ''`

* test: fix

* refactor: inference friendly

* feat: `peerDependenciesMeta`

* refactor: group into a directory

* refactor: use `ramda.pipe`

* refactor: less intrusive type assertion

* feat!: returning `ExportedManifest`

* refactor: remove unnecessary file

* docs: add a todo

* refactor: getNetworkConfigs (#10458)

Some tests are added as a bonus

* feat: `publishPackedPkg` (wip)

* feat: replace `\t` with 4 spaces

* fix: newline

* fix: newline

* refactor: extract `FailedToPublishError`

* test: FailedToPublishError

* feat: registryConfigKeys

* feat: `publishPackedPkg` (wip)

* feat(config/getNetworkConfigs): load auth info

* feat(config/getNetworkConfigs): load auth info (#10491)

* feat: `publishPackedPkg` (wip)

* refactor: extract a `static` function

* fix: inheritance, override, and merge

* feat: `executeTokenHelper`

* fix: use the visible `globalWarn`

* feat: add options

* feat: add more options

* docs: more links

* fix: private packages

* fix: --dry-run

* feat: log more things

* fix: name

* fix: tag

* refactor: remove extraneous `assertPublicPackage`

* feat: use `publishPackedPkg` for directories

* refactor: require only necessary fields

* refactor: extractManifestFromPacked

* fix: extractManifestFromPacked

* test: extractManifestFromPacked

* feat: isTarballPath

* feat: use `publishPackedPkg` for tarballs

* style: add an empty line for clarity

* refactor: remove unnecessary works

* feat: --otp

* feat: PNPM_CONFIG_OTP

* feat: oidc

* test: fix name collision

* fix: eslint

* test: disable a false test

* feat: set `provenance`

* docs(todo): auto provenance

* refactor: run oidc in `createPublishOptions`

* fix: correct auth keys for `libnpmpublish`

* docs: changeset

* fix: incorrect `password` field

* fix: typo, grammar

* chore(git): resolve merge conflict ahead of time

In preparation for https://github.com/pnpm/pnpm/pull/10385

* fix: field name

* fix(config): decoding `_password`

* fix: edge case of partial `cert`/`key`

* fix: ensure `registry` always match its config key

* fix: `_password`

* test: correct a name

* test: more specific assertions

* fix: grammar

* docs(changeset): fix grammar

* docs: fix grammar

* fix: clean up after failure

* test: fix windows

* feat(provenance): auto detect

* refactor: consistent name

* fix: correct error names

* refactor: extract the `provenance` code

* feat: show code and body of an error

* refactor: use `encodeURIComponent`

* refactor: rename a type

* refactor: use the try-catch model

* refactor: move `normalizeBinObject`

* refactor: split `oidc` into `idToken` and `authToken`

* refactor: run `next` on `stream`'s `'end'`

* fix: use the correct encoding

* feat: guard against weird names

* test: `transform/engines`

Closes https://github.com/pnpm/pnpm/pull/10599

* test: `transformPeerDependenciesMeta`

Closes https://github.com/pnpm/pnpm/pull/10600

* refactor: dependency inject the `Date` too

* refactor: export an interface

* test: oidc

Closes https://github.com/pnpm/pnpm/pull/10598

* refactor: re-arrange imports

* refactor: remove unnecessary type casts

* refactor: improve test
2026-02-12 21:10:54 +01:00
Zoltan Kochan
1b4df57a01 feat!: drop Node.js 20 and 21 support (#10569) 2026-02-08 19:16:24 +01:00
Johan Quan Vo
7b1c189f2e feat!: remove deprecated patch options (#10505)
* refactor: remove allowNonAppliedPatches

* refactor: remove ignorePatchFailures

* refactor: remove `strict` field in groupPatchedDependencies

* test: update test failure in package patching

* test: fix

* docs: update changesets

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-01-27 17:08:45 +01:00
Zoltan Kochan
3c40892b90 feat!: remove old way of declaring node.js in dependencies (#10507) 2026-01-25 16:07:30 +01:00
Johan Quan Vo
cc1b8e310a fix: use tarball URL returned in package metadata (#10431)
close #10254
2026-01-16 17:31:04 +01:00
Zoltan Kochan
a00f9e515c chore: use typescript-go (#10452) 2026-01-14 01:18:13 +01:00
baozj
9c0637f531 docs: fix typos on changelogs (#10441)
Co-authored-by: baozj <www.1670370148@qq.com>
2026-01-12 12:15:36 +01:00
Zoltan Kochan
8b4bdf9a83 refactor: replace onlyBuiltDependencies and ignoredBuiltDependencies with allowBuilds (#10401) 2026-01-02 23:21:17 +01:00
Zoltan Kochan
cb367b9515 feat!: deprecate old settings that were replaced by allowBuilds (#10382) 2026-01-02 12:22:42 +01:00
Zoltan Kochan
71de2b3f2b feat!: remove use-node-version CLI option and pnpm.executionEnv.nodeVersion manifest field (#10373) 2025-12-27 22:41:53 +01:00
Dasa Paddock
29764fb140 feat(hooks): add beforePacking hook (#10303)
* feat(hooks): add `readPackageForPublishing` hook

* feat: pass project `dir` parameter to `readPackageForPublishing` hook

* chore: cleanup

* fix: add support for multiple pnpmfiles

* test: readPackageForPublishing hook

* test: add more tests

* test: small update

* refactor: pass in `hooks` as an option

* test: pass in `hooks` as an option

* test: small update

* chore: rename `readPackageForPublishing` to `beforePacking`
2025-12-21 15:49:47 +01:00
Zoltan Kochan
76718b32ad feat: create a new field for allowing/disallowing builds (#10311)
ref #10235
2025-12-13 22:14:27 +01:00
Zoltan Kochan
05fb1aee5f fix: reporting ignored dependency builds (#10276) 2025-12-06 16:32:19 +01:00
Ryo Matsukawa
8ffb1a7f0c fix: display npm: protocol for aliased packages in list and why (#10084)
* fix: support alias resolution in pnpm why with npm:
protocol

* refactor: make alias required instead of optional

* refactor: reorder field to put alias first
2025-11-20 01:08:53 +01:00
Zoltan Kochan
7e2910e70f chore(release): 11.0.0-alpha.0 2025-11-13 15:44:27 +01:00
Ryo Matsukawa
10bc39152e feat: add support for npm package trust evidence check via a new trustPolicy setting (#10103)
close #8889

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-11-09 23:23:58 +01:00
Zoltan Kochan
efb48dcab5 feat: install js runtime as prod dependency (#10141) 2025-10-31 17:12:50 +01:00
Zoltan Kochan
dab9abef5c Merge remote-tracking branch 'origin/main' into v11 2025-10-24 14:19:07 +02:00
Zoltan Kochan
0cde1287c8 chore: update repository fields 2025-10-23 11:57:12 +02:00
Zoltan Kochan
43d7b18c2f chore(release): 10.19.0 2025-10-21 15:30:20 +02:00
Zoltan Kochan
dee39ecb8a feat: support allowing the build of specific versions of dependencies (#10104)
close #10076
2025-10-21 12:38:16 +02:00
Ryo Matsukawa
7c1382f7b7 feat: add support for exact versions in minimumReleaseAgeExclude (#10059)
close #9985

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-10-18 11:10:08 +02:00
Zoltan Kochan
6f861bccaa Merge remote-tracking branch 'origin/main' into v11 2025-09-12 22:35:14 +02:00
Zoltan Kochan
a3c1498403 chore(release): 10.16.0 2025-09-12 14:24:30 +02:00
Zoltan Kochan
e792927841 feat: support finder functions for performing complex searches with list and why commands (#9946) 2025-09-12 11:46:32 +02:00
Zoltan Kochan
491a84fb26 feat: use ESM instead of commonjs (#9870) 2025-08-25 10:02:00 +02:00
Zoltan Kochan
51bc234712 Merge branch 'main' into v11 2025-08-19 15:29:18 +02:00
Zoltan Kochan
facd7656e8 refactor: always use extensions in relative imports (#9878) 2025-08-19 15:25:11 +02:00
Zoltan Kochan
7d2fd48215 feat!: drop Node.js 18 support (#9858) 2025-08-14 14:06:03 +02:00
Zoltan Kochan
fb9de7ac3a chore(release): 10.14.0-0 2025-07-23 14:54:13 +02:00
btea
4a8243a00d chore: package.json add type field (#9765)
* chore: `package.json` add type field

* chore: add type field to every package.json

* chore: add type field to every package.json

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-07-20 03:21:46 +02:00
Zoltan Kochan
1a07b8fc7c feat: install Node.js runtime as a dependency (#9755) 2025-07-19 15:11:40 +02:00
Zoltan Kochan
789e7235ce chore(release): 10.11.0 2025-05-13 16:01:19 +02:00
Ian Krieger
5ec7255b2a feat(audit): add --ignore and --ignore-unfixable flags (#8474)
* feat(audit): add --ignore-vulnerabilities flag for CVE

* fix: no need for changes

* feat: add changeset

* fix: need the GHSA id

* docs: update changeset

* test: fix

* test: fix

* feat(audit): --ignore and --ignore-unfixable

* refactor: change output

* fix: reading audit settings from pnpm-workspace.yaml

* test: ignoring a list of cves

* docs: add changeset

---------

Co-authored-by: Ian Krieger <ian.krieger@gc.com@mac.lan>
Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-05-07 17:59:35 +02:00
Zoltan Kochan
a4ba06ddc9 chore(release): 10.9.0 2025-04-21 10:13:38 +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
6574546eee chore(release): 10.8.0 2025-04-07 18:21:12 +02:00
Zoltan Kochan
750ae7d1d7 feat(cli): installing new configurational dependencies (#9377) 2025-04-07 13:38:18 +02:00
Zoltan Kochan
bd4caa5051 chore(release): 10.7.0 2025-03-26 11:56:11 +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
Zoltan Kochan
86ff415755 chore(release): 10.6.0 2025-03-06 12:09:26 +01:00
Zoltan Kochan
5e78da2d57 style: order the keys in package.json files 2025-03-01 21:45:13 +01:00
btea
a5e4965c59 fix(deploy): missing imports and license fields (#9199) 2025-03-01 01:39:30 +01:00
Zoltan Kochan
0e9fff7bef chore(release): 10.5.0 2025-02-25 12:27:14 +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
c5a0b9ea43 chore(release): 10.1.0 2025-01-26 22:26:45 +01:00
Richard Peach
b562debaf4 fix: deploy should maintain type on new manifest (#9002) 2025-01-26 19:41:05 +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