Skip to content

Commit 43673d1

Browse files
authored
chore: move to pnpm (#1015)
* chore: move to pnpm * chore: move to pnpm
1 parent 6af0df5 commit 43673d1

18 files changed

Lines changed: 7461 additions & 11145 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@doc-kit/generator-react': patch
3+
---
4+
5+
Resolve the React→Preact aliases to absolute paths and anchor package imports
6+
in generated virtual modules to the generator's own dependencies, so builds
7+
work under isolated installs (pnpm) that don't hoist Preact and the UI
8+
component packages to the project root.

.github/workflows/ci.yml

Lines changed: 14 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,11 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- name: Harden Runner
22-
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
21+
- name: Setup environment
22+
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
2323
with:
24-
egress-policy: block
25-
allowed-endpoints: >
26-
github.com:443
27-
registry.npmjs.org:443
28-
29-
- name: Checkout code
30-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
31-
with:
32-
persist-credentials: false
33-
34-
- name: Setup Node.js
35-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
36-
with:
37-
node-version-file: '.nvmrc'
38-
cache: 'npm'
39-
40-
- name: Install dependencies
41-
run: npm ci
24+
use-version-file: true
25+
pnpm: true
4226

4327
- name: Run linting
4428
run: node --run lint
@@ -51,33 +35,11 @@ jobs:
5135
runs-on: ubuntu-latest
5236

5337
steps:
54-
- name: Harden Runner
55-
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
38+
- name: Setup environment
39+
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
5640
with:
57-
egress-policy: block
58-
allowed-endpoints: >
59-
cli.codecov.io:443
60-
github.com:443
61-
ingest.codecov.io:443
62-
keybase.io:443
63-
o26192.ingest.us.sentry.io:443
64-
raw.githubusercontent.com:443
65-
registry.npmjs.org:443
66-
storage.googleapis.com:443
67-
68-
- name: Checkout code
69-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
70-
with:
71-
persist-credentials: false
72-
73-
- name: Setup Node.js
74-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
75-
with:
76-
node-version-file: '.nvmrc'
77-
cache: 'npm'
78-
79-
- name: Install dependencies
80-
run: npm ci
41+
use-version-file: true
42+
pnpm: true
8143

8244
- name: Run tests with coverage
8345
run: node --run test:ci
@@ -100,37 +62,11 @@ jobs:
10062
runs-on: ubuntu-latest
10163

10264
steps:
103-
- name: Harden Runner
104-
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
105-
with:
106-
egress-policy: block
107-
allowed-endpoints: >
108-
*.archive.ubuntu.com:80
109-
*.microsoft.com:443
110-
api.github.com:443
111-
cdn.playwright.dev:443
112-
dl.google.com:443
113-
esm.ubuntu.com:443
114-
fonts.googleapis.com:443
115-
fonts.gstatic.com:443
116-
github.com:443
117-
raw.githubusercontent.com:443
118-
registry.npmjs.org:443
119-
storage.googleapis.com:443
120-
121-
- name: Checkout code
122-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
65+
- name: Setup environment
66+
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
12367
with:
124-
persist-credentials: false
125-
126-
- name: Setup Node.js
127-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
128-
with:
129-
node-version-file: '.nvmrc'
130-
cache: 'npm'
131-
132-
- name: Install dependencies
133-
run: npm ci
68+
use-version-file: true
69+
pnpm: true
13470

13571
- name: Checkout Node.js source
13672
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -141,10 +77,10 @@ jobs:
14177
path: node
14278

14379
- name: Build Node.js API docs
144-
run: npx @doc-kit/cli generate -t web -i "./node/doc/api/assert.md" -o out --config-file ./e2e/doc-kit.config.mjs
80+
run: node packages/cli/bin/cli.mjs generate -t web -i "./node/doc/api/assert.md" -o out --config-file ./e2e/doc-kit.config.mjs
14581

14682
- name: Install Playwright browsers
147-
run: npx playwright install --with-deps
83+
run: pnpm exec playwright install --with-deps
14884

14985
- name: Run E2E tests
15086
run: node --run test:e2e

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
with:
2424
ignore_words_list: crate,raison
2525
exclude_file: .gitignore
26-
skip: package-lock.json, ./packages/core/src/generators/mandoc/template.1
26+
skip: pnpm-lock.yaml, ./packages/core/src/generators/mandoc/template.1

.github/workflows/docs.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,11 @@ jobs:
1919
name: Build docs site
2020
runs-on: ubuntu-latest
2121
steps:
22-
- name: Harden Runner
23-
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
22+
- name: Setup environment
23+
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
2424
with:
25-
egress-policy: audit
26-
27-
- name: Git Checkout
28-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
29-
with:
30-
persist-credentials: false
31-
32-
- name: Setup Node.js
33-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
34-
with:
35-
node-version-file: '.nvmrc'
36-
cache: 'npm'
37-
38-
- name: Install dependencies
39-
run: npm ci
25+
use-version-file: true
26+
pnpm: true
4027

4128
- name: Build site
4229
run: node --run docs:build

.github/workflows/generate.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,11 @@ jobs:
110110
input: './node/doc/api/*.md'
111111
compare: file-size
112112
steps:
113-
- name: Harden Runner
114-
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
113+
- name: Setup environment
114+
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
115115
with:
116-
egress-policy: audit
117-
118-
- name: Git Checkout
119-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
120-
with:
121-
persist-credentials: false
116+
use-version-file: true
117+
pnpm: true
122118

123119
- name: Git Checkout
124120
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -132,15 +128,6 @@ jobs:
132128
.
133129
path: node
134130

135-
- name: Setup Node.js
136-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
137-
with:
138-
node-version-file: '.nvmrc'
139-
cache: 'npm'
140-
141-
- name: Install dependencies
142-
run: npm ci
143-
144131
- name: Create output directory
145132
run: mkdir -p out/${{ matrix.target }}
146133

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
3939
with:
4040
use-version-file: true
41+
pnpm: true
4142
registry-url: 'https://registry.npmjs.org'
4243
fetch-depth: 0
4344

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
npm-shrinkwrap.json
1+
pnpm-lock.yaml
22

33
# Tests files
44
packages/node/src/api-links/__tests__/fixtures/

0 commit comments

Comments
 (0)