Commit Graph

197 Commits

Author SHA1 Message Date
Zoltan Kochan
a943fc9741 refactor: error message on out of date lockfile 2024-10-07 21:54:50 +02:00
Zoltan Kochan
d7b9ae5870 fix: installation hanging due to parent peers resolution dead lock (#8584)
This fixes an issue that appeared after merging #8457

close #8570
2024-10-02 12:09:33 +02:00
btea
9797a1e889 refactor: remove useless parameters from the catch statement (#8583) 2024-09-29 12:08:48 +02:00
Khải
b7fb704522 feat(overrides): remove dependencies (#8576)
close #8572
2024-09-28 14:27:13 +02:00
Zoltan Kochan
db420ab592 refactor(cafs): create a separate function for creating index file path (#8508) 2024-09-08 14:43:09 +02:00
Zoltan Kochan
2393a49ec6 fix: out-of-memory on peers resolution (#8457) 2024-08-24 20:58:41 +02:00
Khải
9b4f73caaf chore(scripts): typecheck-only (#8395)
* chore(scripts): typecheck-only

* feat: change all configuration

* feat: include pnpm/ and pnpm/test/

* chore(deps): remove unused dependency

* refactor(typescript-only): use find-packages

* refactor(typescript-only): refactor paths

* fix: typescript-only

* fix: update compile-only

* fix: compile pnpm

* fix: windows

* fix: windows

* chore: meta-updater

* refactor(tsconfig): remove explicit composite

* fix: path in windows

* feat: don't depend on cwd

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-08-11 08:26:01 +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
Zoltan Kochan
e9908b3185 refactor: rename lockfile-file to lockfile.fs 2024-07-28 01:15:20 +02:00
Zoltan Kochan
797ef0fc46 refactor: rename lockfile-types to lockfile.types 2024-07-27 14:46:23 +02:00
Zoltan Kochan
2e3eae3990 refactor: create @pnpm/lockfile.verification (#8350) 2024-07-27 14:18:38 +02:00
Zoltan Kochan
1b349deba5 test(core): remove only from lockfile tests 2024-07-27 12:35:16 +02:00
Zoltan Kochan
a3e2a182a6 test: fix a lockfile test 2024-07-26 18:10:40 +02:00
Zoltan Kochan
96821291a8 fix: install peer of optional peer (#8330)
close #8323
2024-07-25 18:00:24 +02:00
Zoltan Kochan
7329b9afc4 ci: test on Node.js 22 (#8010) 2024-07-25 16:45:47 +02:00
Zoltan Kochan
0f0e44101d fix: resolve catalogs in overrides (#8321)
close #8303
2024-07-22 01:35:30 +02:00
Brandon Cheng
f30590bdfc fix: skip cataloged dependencies when running pnpm update --latest (#8286)
* fix: skip over cataloged deps on `pnpm update --latest`

* Update pkg-manager/core/test/catalogs.ts
2024-07-07 15:53:34 +02:00
Brandon Cheng
824363b0ba fix: preserve catalog protocol when updating project manifest (#8285)
* fix: preserve catalog protocol when updating project manifest

This makes `pnpm add foo@catalog:` preserve the catalog protocol when
updating `package.json`.

This also fixes a quirk with `pnpm update --latest <name>` when <name>
is a catalog'ed dep. The `updateSpec` field is set on all deps if
`wantedDependencies` filters to 0.

341656f9b3/pkg-manager/resolve-dependencies/src/toResolveImporter.ts (L44-L48)

* test: ensure pnpm update does not update catalog dependencies (yet)

* test: `pnpm add is-positive@catalog:`
2024-07-07 14:27:22 +02:00
Brandon Cheng
08fd918dd3 fix: reuse catalog resolutions of npm aliases correctly (#8281)
* fix: reuse catalog resolutions of npm aliases correctly

* test: catalog resolution can be reused for npm aliases
2024-07-05 13:51:04 +02:00
Zoltan Kochan
0406d4ad3d refactor: use a branded type for project root dir paths (#8272) 2024-07-04 13:13:34 +02:00
Zoltan Kochan
341656f9b3 refactor: make workspace packages a map 2024-07-02 22:49:38 +02:00
Zoltan Kochan
dd00eeb18c refactor: normalize dir field names across project objects (#8262) 2024-07-01 11:27:04 +02:00
Brandon Cheng
6efda2ea03 fix: reuse existing cataloged resolutions for consistency (#8259)
* test: add a test to ensure catalog resolutions are consistent

* fix: reuse existing cataloged resolutions for consistency
2024-07-01 01:58:17 +02:00
Zoltan Kochan
9927c2855a refactor(core): workspace packages (#8248)
Make workspace packages optional.
2024-06-30 15:17:07 +02:00
Brandon Cheng
9bf9f71ad3 fix: show better error when encountering external catalog protocol usage (#8254)
* fix: show better error when encountering external catalog protocol usage

* refactor: reuse SPEC_NOT_SUPPORTED error

* Apply suggestions from code review

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-06-30 09:53:39 +02:00
Brandon Cheng
9c63679df1 feat: catalogs (#8122)
* feat: create new @pnpm/catalogs.types package (#8026)

* feat: read catalog configs from workspace manifest (#8123)

* refactor: move InvalidWorkspaceManifestError to its own file

* feat: read catalogs config from workspace manifest

* chore: add changeset for new catalog config parsing

* feat: create new `@pnpm/catalogs.protocol-parser` package (#8124)

This works around a problem with pnpm's CI setup not compiling
packages that are not dependencies of the main pnpm package before
running these tests.

https://github.com/pnpm/pnpm/pull/8027#issuecomment-2081650304

* refactor: factor out isWantedDepPrefSame to extend in a future commit (#8125)

* feat: create new `@pnpm/catalogs.config` package (#8220)

* refactor: remove single default catalog check

This check will happen in  `@pnpm/catalogs.config` instead.

* feat: create new @pnpm/catalogs.config package

* fix: work around CI setup not compiling orphan packages before testing

This works around a problem with pnpm's CI setup not compiling
packages that are not dependencies of the main pnpm package before
running these tests.

https://github.com/pnpm/pnpm/pull/8027#issuecomment-2081650304

* feat: create new `@pnpm/catalogs.resolver` package (#8219)

* feat: create new @pnpm/catalogs.resolver package

* fix: work around CI setup not compiling orphan packages before testing

This works around a problem with pnpm's CI setup not compiling
packages that are not dependencies of the main pnpm package before
running these tests.

https://github.com/pnpm/pnpm/pull/8027#issuecomment-2081650304

* feat: implement catalog protocol for publish (#8225)

* feat: implement catalog protocol for install (#8221)

* feat: add catalogs to @pnpm/config

* refactor: factor out resolveDependenciesOfImporterDependency function

* feat: implement catalog resolver and replace prefs

* revert: work around CI setup not compiling orphan packages before testing

* feat: record catalog lookup snapshots through propagated metadata

* feat: update projects when catalogs config changes

* test: add catalog protocol install tests

* refactor: remove filter-packages-from-dir dependency from core tests (#8244)

* refactor: remove filter-packages-from-dir dependency from core tests

* test: refactor

* test: refactor

---------

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

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-06-27 14:19:38 +02:00
Zoltan Kochan
13e55b2865 fix: a filtered install should update the lockfile first (#8183)
close #8165
2024-06-12 14:49:39 +02:00
Zoltan Kochan
47341e5004 fix: make the peers suffix shorter (#8177)
ref #7079
2024-06-07 23:37:07 +02:00
Zoltan Kochan
3dd30b1909 refactor: create branded type for project ID (#8164) 2024-06-04 18:30:59 +02:00
Brandon Cheng
c7e1b6fae8 chore: configure TypeScript project references for tests (#8128)
* refactor: store link values before converting to references

* fix: use .sort() without localeCompare

https://github.com/pnpm/pnpm/pull/8128#discussion_r1614031566

> Nit, but you probably just want to call sort without a comparison
> function; these are already strings and locale compare is not a good
> comparison for anything but human readable strings since it will
> differ on different people's machines based on their language setting.
> I've hit this too many times before for code gen.

* feat: configure meta-updater to write test/tsconfig.json files

* fix: relative imports for __typings__

* chore: `pnpm run meta-updater`

* fix: explicitly use test/tsconfig.json for ts-jest
2024-05-31 12:48:13 +02:00
Zoltan Kochan
74c1057778 perf: fix hoisting peers (#8144)
Reverts 4b65113

ref #8072

This change makes install faster at least 3 times in some Bit workspaces.
2024-05-30 12:17:17 +02:00
Zoltan Kochan
4b65113b9c fix: temporarily don't hoist peers when dedupe peers is on 2024-05-29 14:01:15 +02:00
Zoltan Kochan
27c33f0319 fix: dependencies that are not only optional should be installed when optionals are skipped (#8076)
close #8066

Co-authored-by: khai96_ <hvksmr1996@gmail.com>
2024-05-23 13:20:13 +02:00
Zoltan Kochan
0c08e1c50f fix: clear metadata cache after resolution is finished (#8109) 2024-05-22 00:23:14 +02:00
Zoltan Kochan
c649954e41 refactor: create a separate type for DepPath (#8094) 2024-05-20 16:11:46 +02:00
Zoltan Kochan
5a03c1f284 perf: improve performance of peer dependencies resolution (#8060) 2024-05-12 01:29:19 +02:00
Khải
b1d7f8c6cf fix(override): relative file in workspace (#8055)
close #8053

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-05-10 23:31:33 +02:00
Zoltan Kochan
fd6cd27817 test: don't skip deep recursion test 2024-05-07 16:49:44 +02:00
Zoltan Kochan
b3d1495566 fix: recreate node_modules if virtual-store-dir-max-length changes (#8032) 2024-04-29 15:24:06 +02:00
Zoltan Kochan
9719a42d0e feat: configurable max length of directories inside node_modules/.pnpm (#7994)
close #7355
2024-04-28 11:07:29 +02:00
Zoltan Kochan
b7d2ed47be fix: ignore the engines.pnpm field of dependencies (#7968)
close #7965
2024-04-19 02:49:01 +02:00
Zoltan Kochan
b3961cb19d fix: linking optional dependencies (#7949)
close #7943
2024-04-17 17:35:05 +02:00
Zoltan Kochan
253d50c550 fix: optional peer dependencies should resolve to optional dependencies (#7918) 2024-04-13 18:26:47 +02:00
Zoltan Kochan
c9db742824 fix: update typescript to v5.4 (#7905) 2024-04-12 14:03:45 +02:00
Zoltan Kochan
db162f3801 test: remove console.log 2024-04-09 11:28:39 +02:00
Zoltan Kochan
501133d30b refactor: bump lockfile version to v9 instead of v7 (#7861)
In order to align the lockfile version with pnpm version that ships it.
2024-04-06 17:12:37 +02:00
Zoltan Kochan
6caec8109b fix: hoist peer dependencies (#7841) 2024-03-30 12:23:29 +01:00
Khải
984b976672 refactor: replace deprecated jest methods (#7840) 2024-03-29 00:03:58 +01:00
Zoltan Kochan
670ed188df fix: auto install optional peer (#7837) 2024-03-28 00:02:14 +01:00
Zoltan Kochan
e74e7847f3 fix: resolve missing optional peer if it is installed as a dep somewhere (#7830) 2024-03-27 13:43:52 +01:00