Skip to content

Commit d8fb134

Browse files
authored
Merge branch 'main' into ci/fix-corepack-enable-error
2 parents a93cbdc + afc0c0c commit d8fb134

24 files changed

+2646
-2586
lines changed

.github/workflows/benchmark.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
with:
2323
node-version: 22
2424
- run: |
25+
npm install --global corepack
2526
corepack enable
2627
corepack prepare pnpm@next-9 --activate
2728
corepack prepare yarn@stable --activate

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install pnpm
2020
run: |
2121
npm i -g --force corepack && corepack enable
22-
corepack prepare pnpm@next-9 --activate
22+
corepack prepare pnpm@next-10 --activate
2323
- name: Install dependencies
2424
run: pnpm install
2525
- name: Build

benchmarks/results/npm/11.1.0/alotta-files.yaml

+81
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,84 @@
2525
withWarmModulesAndLockfile: 1391
2626
withWarmModules: 1697
2727
updatedDependencies: 7520
28+
- firstInstall: 38379
29+
repeatInstall: 1471
30+
withWarmCacheAndLockfile: 8203
31+
withWarmCache: 12461
32+
withLockfile: 11341
33+
withWarmCacheAndModules: 1732
34+
withWarmModulesAndLockfile: 1398
35+
withWarmModules: 1750
36+
updatedDependencies: 7914
37+
- firstInstall: 35886
38+
repeatInstall: 1485
39+
withWarmCacheAndLockfile: 8290
40+
withWarmCache: 12598
41+
withLockfile: 11295
42+
withWarmCacheAndModules: 1724
43+
withWarmModulesAndLockfile: 1407
44+
withWarmModules: 1708
45+
updatedDependencies: 9932
46+
- firstInstall: 33654
47+
repeatInstall: 1495
48+
withWarmCacheAndLockfile: 8280
49+
withWarmCache: 12622
50+
withLockfile: 11244
51+
withWarmCacheAndModules: 1746
52+
withWarmModulesAndLockfile: 1418
53+
withWarmModules: 1726
54+
updatedDependencies: 8644
55+
- firstInstall: 34814
56+
repeatInstall: 1511
57+
withWarmCacheAndLockfile: 7984
58+
withWarmCache: 12052
59+
withLockfile: 10650
60+
withWarmCacheAndModules: 1667
61+
withWarmModulesAndLockfile: 1401
62+
withWarmModules: 1672
63+
updatedDependencies: 7106
64+
- firstInstall: 28907
65+
repeatInstall: 1465
66+
withWarmCacheAndLockfile: 7916
67+
withWarmCache: 12119
68+
withLockfile: 10725
69+
withWarmCacheAndModules: 1685
70+
withWarmModulesAndLockfile: 1377
71+
withWarmModules: 1692
72+
updatedDependencies: 6798
73+
- firstInstall: 31879
74+
repeatInstall: 1491
75+
withWarmCacheAndLockfile: 7948
76+
withWarmCache: 12137
77+
withLockfile: 10770
78+
withWarmCacheAndModules: 1677
79+
withWarmModulesAndLockfile: 1388
80+
withWarmModules: 1691
81+
updatedDependencies: 8487
82+
- firstInstall: 39445
83+
repeatInstall: 1457
84+
withWarmCacheAndLockfile: 7982
85+
withWarmCache: 12143
86+
withLockfile: 10804
87+
withWarmCacheAndModules: 1694
88+
withWarmModulesAndLockfile: 1376
89+
withWarmModules: 1716
90+
updatedDependencies: 8312
91+
- firstInstall: 33007
92+
repeatInstall: 1416
93+
withWarmCacheAndLockfile: 7988
94+
withWarmCache: 12255
95+
withLockfile: 10798
96+
withWarmCacheAndModules: 1680
97+
withWarmModulesAndLockfile: 1388
98+
withWarmModules: 1704
99+
updatedDependencies: 6944
100+
- firstInstall: 32747
101+
repeatInstall: 1434
102+
withWarmCacheAndLockfile: 8040
103+
withWarmCache: 12198
104+
withLockfile: 10739
105+
withWarmCacheAndModules: 1699
106+
withWarmModulesAndLockfile: 1370
107+
withWarmModules: 1689
108+
updatedDependencies: 9269
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- firstInstall: 9495
2+
repeatInstall: 895
3+
withWarmCacheAndLockfile: 2585
4+
withWarmCache: 5956
5+
withLockfile: 5228
6+
withWarmCacheAndModules: 2208
7+
withWarmModulesAndLockfile: 886
8+
withWarmModules: 5939
9+
updatedDependencies: 3539
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
- firstInstall: 8602
2+
repeatInstall: 921
3+
withWarmCacheAndLockfile: 2617
4+
withWarmCache: 5827
5+
withLockfile: 5174
6+
withWarmCacheAndModules: 2216
7+
withWarmModulesAndLockfile: 900
8+
withWarmModules: 5421
9+
updatedDependencies: 3616
10+
- firstInstall: 8361
11+
repeatInstall: 878
12+
withWarmCacheAndLockfile: 2477
13+
withWarmCache: 5648
14+
withLockfile: 5019
15+
withWarmCacheAndModules: 2220
16+
withWarmModulesAndLockfile: 896
17+
withWarmModules: 5531
18+
updatedDependencies: 3707
19+
- firstInstall: 7936
20+
repeatInstall: 881
21+
withWarmCacheAndLockfile: 2495
22+
withWarmCache: 5558
23+
withLockfile: 4973
24+
withWarmCacheAndModules: 2145
25+
withWarmModulesAndLockfile: 883
26+
withWarmModules: 5067
27+
updatedDependencies: 3194
28+
- firstInstall: 7835
29+
repeatInstall: 892
30+
withWarmCacheAndLockfile: 2467
31+
withWarmCache: 5507
32+
withLockfile: 4969
33+
withWarmCacheAndModules: 2139
34+
withWarmModulesAndLockfile: 892
35+
withWarmModules: 4931
36+
updatedDependencies: 3248
37+
- firstInstall: 9105
38+
repeatInstall: 906
39+
withWarmCacheAndLockfile: 2495
40+
withWarmCache: 5814
41+
withLockfile: 5259
42+
withWarmCacheAndModules: 2097
43+
withWarmModulesAndLockfile: 884
44+
withWarmModules: 5531
45+
updatedDependencies: 3565
46+
- firstInstall: 8671
47+
repeatInstall: 904
48+
withWarmCacheAndLockfile: 2535
49+
withWarmCache: 5771
50+
withLockfile: 5172
51+
withWarmCacheAndModules: 2141
52+
withWarmModulesAndLockfile: 906
53+
withWarmModules: 5266
54+
updatedDependencies: 3579
55+
- firstInstall: 8452
56+
repeatInstall: 898
57+
withWarmCacheAndLockfile: 2474
58+
withWarmCache: 5691
59+
withLockfile: 5336
60+
withWarmCacheAndModules: 2315
61+
withWarmModulesAndLockfile: 895
62+
withWarmModules: 5381
63+
updatedDependencies: 3643

benchmarks/results/yarn/4.6.0/alotta-files.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,30 @@
241241
withWarmModulesAndLockfile: 5210
242242
withWarmModules: 9461
243243
updatedDependencies: 6340
244+
- firstInstall: 16188
245+
repeatInstall: 5227
246+
withWarmCacheAndLockfile: 5570
247+
withWarmCache: 9814
248+
withLockfile: 5759
249+
withWarmCacheAndModules: 9615
250+
withWarmModulesAndLockfile: 5246
251+
withWarmModules: 9430
252+
updatedDependencies: 7251
253+
- firstInstall: 9756
254+
repeatInstall: 5177
255+
withWarmCacheAndLockfile: 5485
256+
withWarmCache: 9799
257+
withLockfile: 5539
258+
withWarmCacheAndModules: 9496
259+
withWarmModulesAndLockfile: 5172
260+
withWarmModules: 9570
261+
updatedDependencies: 6695
262+
- firstInstall: 9790
263+
repeatInstall: 5281
264+
withWarmCacheAndLockfile: 5384
265+
withWarmCache: 9964
266+
withLockfile: 5549
267+
withWarmCacheAndModules: 9574
268+
withWarmModulesAndLockfile: 5172
269+
withWarmModules: 9437
270+
updatedDependencies: 6373

benchmarks/results/yarn_pnp/4.6.0/alotta-files.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,30 @@
241241
withWarmModulesAndLockfile: 0
242242
withWarmModules: 0
243243
updatedDependencies: 5332
244+
- firstInstall: 6003
245+
repeatInstall: 0
246+
withWarmCacheAndLockfile: 1369
247+
withWarmCache: 5429
248+
withLockfile: 1354
249+
withWarmCacheAndModules: 0
250+
withWarmModulesAndLockfile: 0
251+
withWarmModules: 0
252+
updatedDependencies: 5400
253+
- firstInstall: 5956
254+
repeatInstall: 0
255+
withWarmCacheAndLockfile: 1353
256+
withWarmCache: 5435
257+
withLockfile: 1348
258+
withWarmCacheAndModules: 0
259+
withWarmModulesAndLockfile: 0
260+
withWarmModules: 0
261+
updatedDependencies: 5427
262+
- firstInstall: 9555
263+
repeatInstall: 0
264+
withWarmCacheAndLockfile: 1329
265+
withWarmCache: 5293
266+
withLockfile: 1352
267+
withWarmCacheAndModules: 0
268+
withWarmModulesAndLockfile: 0
269+
withWarmModules: 0
270+
updatedDependencies: 5952

blog/2020-05-27-flat-node-modules-is-not-the-only-way.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Flat node_modules is not the only way
3-
author: Zoltan Kochan
4-
authorURL: "http://twitter.com/zoltankochan"
5-
authorImageURL: "https://gravatar.com/avatar/1f59f040fb37d5799e3879fa678c2373?s=48"
3+
authors: zkochan
64
---
75

86
New users of pnpm frequently ask me about the weird structure of `node_modules` that pnpm creates. Why is it not flat? Where are all the sub-dependencies?

blog/2020-10-17-node-modules-configuration-options-with-pnpm.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Node-Modules configuration options with pnpm
3-
author: Zoltan Kochan
4-
authorURL: "http://twitter.com/zoltankochan"
5-
authorImageURL: "https://gravatar.com/avatar/1f59f040fb37d5799e3879fa678c2373?s=48"
3+
authors: zkochan
64
---
75

86
There are many ways to create a node_modules directory.

blog/2021-12-29-yearly-update.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: The year 2021 for pnpm
3-
author: Zoltan Kochan
4-
authorURL: "http://twitter.com/zoltankochan"
5-
authorImageURL: "https://gravatar.com/avatar/1f59f040fb37d5799e3879fa678c2373?s=48"
3+
authors: zkochan
64
---
75

86
It is the end of the year and it was a good year for pnpm, so let's see how it went.

blog/2022-12-30-yearly-update.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: The year 2022 for pnpm
3-
author: Zoltan Kochan
4-
authorURL: "http://twitter.com/zoltankochan"
5-
authorImageURL: "https://gravatar.com/avatar/1f59f040fb37d5799e3879fa678c2373?s=48"
3+
authors: zkochan
64
image: "/img/blog/2022-review.png"
75
---
86

blog/authors.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
zkochan:
2+
name: Zoltan Kochan
3+
title: Lead maintainer of pnpm
4+
url: https://www.kochan.io/
5+
image_url: "https://gravatar.com/avatar/1f59f040fb37d5799e3879fa678c2373?s=48"
6+
socials:
7+
x: ZoltanKochan
8+
github: zkochan
9+

crowdin.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
project_id: 302994
2-
api_token: 90c94c6aa5fb02574320b67fbff124ab87a33b1d959ea4afd627a75c4799d8a4f351fe14df1020df
31
preserve_hierarchy: true
42

53
languages_mapping: &languages_mapping

docs/cli/add.md

+15
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,21 @@ Install a package globally.
211211

212212
Only adds the new dependency if it is found in the workspace.
213213

214+
215+
### --allow-build
216+
217+
Added in: v10.4.0
218+
219+
A list of package names that are allowed to run postinstall scripts during installation.
220+
221+
Example:
222+
223+
```
224+
pnpm --allow-build=esbuild add my-bundler
225+
```
226+
227+
This will run `esbuild`'s postinstall script and also add it to the `pnpm.onlyBuiltDependencies` field of `package.json`. So, `esbuild` will always be allowed to run its scripts in the future.
228+
214229
### --filter <package_selector\>
215230

216231
[Read more about filtering.](../filtering.md)

docs/cli/approve-builds.md

+9
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,12 @@ title: pnpm approve-builds
66
Added in: v10.1.0
77

88
Approve dependencies for running scripts during installation.
9+
10+
## Options
11+
12+
### --global, -g
13+
14+
Added in: v10.4.0
15+
16+
Approve dependencies of globally installed packages.
17+

docs/cli/fetch.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ FROM node:20
2020

2121
WORKDIR /path/to/somewhere
2222

23-
RUN corepack enable pnpm && corepack install -g pnpm@latest-9
23+
RUN corepack enable pnpm && corepack install -g pnpm@latest-10
2424

2525
# Files required by pnpm install
26-
COPY .npmrc package.json pnpm-lock.yaml .pnpmfile.cjs ./
26+
COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml .pnpmfile.cjs ./
2727

2828
# If you patched any package, include patches before install too
2929
COPY patches patches
@@ -37,7 +37,7 @@ EXPOSE 8080
3737
CMD [ "node", "server.js" ]
3838
```
3939

40-
As long as there are no changes to `.npmrc`, `package.json`, `pnpm-lock.yaml`,
40+
As long as there are no changes to `.npmrc`, `package.json`, `pnpm-lock.yaml`, `pnpm-workspace.yaml`,
4141
`.pnpmfile.cjs`, docker build cache is still valid up to the layer of
4242
`RUN pnpm install --frozen-lockfile --prod`, which cost most of the time
4343
when building a docker image.
@@ -55,10 +55,10 @@ FROM node:20
5555

5656
WORKDIR /path/to/somewhere
5757

58-
RUN corepack enable pnpm && corepack install -g pnpm@latest-9
58+
RUN corepack enable pnpm && corepack install -g pnpm@latest-10
5959

6060
# Files required by pnpm install
61-
COPY .npmrc package.json pnpm-lock.yaml .pnpmfile.cjs ./
61+
COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml .pnpmfile.cjs ./
6262

6363
# If you patched any package, include patches before install too
6464
COPY patches patches
@@ -82,17 +82,17 @@ As you can see, the Dockerfile has to be updated when you add or remove
8282
sub-packages.
8383

8484
`pnpm fetch` solves the above problem perfectly by providing the ability
85-
to load packages into the virtual store using only information from a lockfile.
85+
to load packages into the virtual store using only information from a lockfile and a configuration file (`pnpm-workspace.yaml`).
8686

8787
```Dockerfile
8888
FROM node:20
8989

9090
WORKDIR /path/to/somewhere
9191

92-
RUN corepack enable pnpm && corepack install -g pnpm@latest-9
92+
RUN corepack enable pnpm && corepack install -g pnpm@latest-10
9393

9494
# pnpm fetch does require only lockfile
95-
COPY pnpm-lock.yaml ./
95+
COPY pnpm-lock.yaml pnpm-workspace.yaml ./
9696

9797
# If you patched any package, include patches before running pnpm fetch
9898
COPY patches patches

0 commit comments

Comments
 (0)