You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the root and demo npm lockfiles with a single committed pnpm-lock.yaml and add pnpm-workspace.yaml covering the root package, subpackages, test/ts, and demo. Pin packageManager to pnpm@11.1.0 and move the Volta Node pin to 24.15.0 so the repository runs on a Node version supported by pnpm 11.
Enable pnpm supply-chain hardening in workspace config: strict minimum release age, no-downgrade trust policy, blocked exotic transitive dependencies, strict dependency builds, engine strictness, and an explicit install-script allowBuilds policy. Keep trust-policy exceptions narrow and version-specific for chokidar@4.0.3, preact-render-to-string@6.5.0, reselect@5.1.1, and semver@6.3.1 instead of using a broad age-based bypass. Allow only esbuild build scripts and explicitly deny optional/native watcher or compatibility scripts for @parcel/watcher, fsevents, and styled-components.
Update CI and developer workflows for pnpm: use pnpm/action-setup@v6, pnpm cache keys, frozen installs, pnpm script invocations, pnpm exec for the Husky hook, and pnpm contributor docs. Declare nano-staged as a dev dependency because pnpm exec requires hook tools to be local instead of relying on npx to fetch them. Keep npm pack and npm publish behavior intact for the package release path.
Tighten dependency declarations exposed by pnpm's isolated linker: add demo's explicit sass-embedded dependency for SCSS builds, pin Vite resolutions that were previously coming from npm lockfiles, pin the direct undici dev dependency, and update @actions/github and @actions/glob dev tooling to current versions to avoid older trust-downgrade transitive resolution.
Verification run: pnpm install --frozen-lockfile; pnpm ignored-builds; pnpm run build; pnpm run lint; pnpm run test:unit; pnpm --dir demo run build; npm pack --ignore-scripts --dry-run --json. Also ran pnpm run format:check, which still fails on existing repository-wide formatting and CRLF diagnostics unrelated to this migration.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ These steps will help you set up your development environment. That includes all
8
8
9
9
1. Clone the git repository: `git clone git@github.com:preactjs/preact.git`
10
10
2. Go into the cloned folder: `cd preact/`
11
-
3. Install all dependencies: `npm install`
11
+
3. Install all dependencies: `pnpm install`
12
12
13
13
## The Repo Structure
14
14
@@ -100,7 +100,7 @@ The short summary is:
100
100
101
101
## Commonly used scripts for contributions
102
102
103
-
Scripts can be executed via `npm run [script]`.
103
+
Scripts can be executed via `pnpm run [script]`.
104
104
105
105
-`build` - compiles all packages ready for publishing to npm
106
106
-`build:core` - builds just Preact itself
@@ -142,7 +142,7 @@ it.only('should test something', () => {
142
142
143
143
## Benchmarks
144
144
145
-
We have a benchmark suite that we use to measure the performance of Preact. Our benchmark suite lives in our [preactjs/benchmarks repository](https://github.com/preactjs/benchmarks), but is included here as Git submodule. To run the benchmarks, first ensure [PNPM](https://pnpm.io/installation) is installed on your system and initialize and setup the submodule (it uses `pnpm` as a package manager):
145
+
We have a benchmark suite that we use to measure the performance of Preact. Our benchmark suite lives in our [preactjs/benchmarks repository](https://github.com/preactjs/benchmarks), but is included here as Git submodule. To run the benchmarks, first ensure [pnpm](https://pnpm.io/installation) is installed on your system and initialize and setup the submodule:
146
146
147
147
```bash
148
148
pnpm -v # Make sure pnpm is installed
@@ -212,13 +212,13 @@ Before using the automated npm publishing flow, make sure npm trusted publishing
212
212
> **ATTENTION:** Make sure that you've cleared the project correctly
213
213
> when switching from a 10.x branch.
214
214
215
-
0. Run `rm -rf dist node_modules && npm i` to make sure to have the correct dependencies.
215
+
0. Run `rm -rf dist node_modules && pnpm install` to make sure to have the correct dependencies.
216
216
1.[Write the release notes](#writing-release-notes) and keep them as a draft in GitHub
217
217
1. I'd recommend writing them in an offline editor because each edit to a draft will change the URL in GitHub.
218
218
2. Make a PR where **only** the version number is incremented in `package.json` (note: We follow `SemVer` conventions)
219
219
3. Wait until the PR is approved and merged.
220
220
4. Switch back to the `main` branch and pull the merged PR
221
-
5. Run `npm run build && npm publish`
221
+
5. Run `pnpm run build && npm publish`
222
222
1. Make sure you have 2FA enabled in npm, otherwise the above command will fail.
223
223
2. If you're doing a pre-release add `--tag next` to the `npm publish` command to publish it under a different tag (default is `latest`)
224
224
6. Publish the release notes and create the correct git tag.
0 commit comments