Skip to content

ci: migrate from npm to pnpm - #12193

Merged
pkuczynski merged 1 commit into
v0.3from
ci/migrate-v03-to-pnpm
Mar 12, 2026
Merged

pkuczynski merged 1 commit into
v0.3from
ci/migrate-v03-to-pnpm

Conversation

@pkuczynski

@pkuczynski pkuczynski commented Mar 12, 2026 •

Copy link
Copy Markdown
Member

Migrates the v0.3 branch from npm to pnpm, matching what was done on master in #11881. Changes: all CI workflows use pnpm, package-lock.json replaced with pnpm-lock.yaml, husky pre-commit updated, gulpfile and DEVELOPER.md updated, added @types/gulp dev dependency.

This is needed for the package publish workflow to work.

@pkuczynski pkuczynski self-assigned this Mar 12, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Review Summary by Qodo

Migrate from npm to pnpm package manager

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Replace npm with pnpm across all CI workflows and build scripts
• Add pnpm setup action and caching to all GitHub Actions workflows
• Update gulpfile commands to use pnpm instead of npm
• Update documentation and configuration files for pnpm compatibility
• Add pnpm-specific configuration to package.json with dependency settings
Diagram
flowchart LR
  npm["npm package manager"]
  pnpm["pnpm package manager"]
  workflows["GitHub Actions workflows"]
  gulpfile["gulpfile.ts"]
  docs["DEVELOPER.md"]
  pkg["package.json"]
  
  npm -->|"replace with"| pnpm
  pnpm -->|"update"| workflows
  pnpm -->|"update"| gulpfile
  pnpm -->|"update"| docs
  pnpm -->|"configure"| pkg
Loading

Grey Divider

File Changes

1. gulpfile.ts ⚙️ Configuration changes +3/-3

Replace npm commands with pnpm equivalents

gulpfile.ts


2. .github/workflows/tests-linux.yml ⚙️ Configuration changes +44/-22

Add pnpm setup and update all npm commands

.github/workflows/tests-linux.yml


3. .github/workflows/tests-windows.yml ⚙️ Configuration changes +12/-6

Add pnpm setup and update all npm commands

.github/workflows/tests-windows.yml


View more (9)
4. .github/workflows/tests.yml ⚙️ Configuration changes +13/-10

Update workflows to use pnpm and hardcode Node version

.github/workflows/tests.yml


5. .github/workflows/preview.yml ⚙️ Configuration changes +7/-12

Simplify workflow with pnpm setup and caching

.github/workflows/preview.yml


6. .github/workflows/publish-package.yml ⚙️ Configuration changes +6/-4

Update publish workflow to use pnpm

.github/workflows/publish-package.yml


7. DEVELOPER.md 📝 Documentation +13/-13

Update all npm commands to pnpm equivalents

DEVELOPER.md


8. package.json ⚙️ Configuration changes +20/-3

Add pnpm configuration and update scripts

package.json


9. .prettierignore ⚙️ Configuration changes +1/-1

Replace package-lock.json with pnpm-lock.yaml

.prettierignore


10. .husky/pre-commit ⚙️ Configuration changes +1/-1

Update pre-commit hook to use pnpm exec

.husky/pre-commit


11. pnpm-lock.yaml Dependencies +10068/-0

Add pnpm lockfile for dependency management

pnpm-lock.yaml


12. .nvmrc Additional files +0/-1

...

.nvmrc


Grey Divider

Qodo Logo

@pkg-pr-new

pkg-pr-new Bot commented Mar 12, 2026

Copy link
Copy Markdown
  • typeorm-sql-js-example

    npm i https://pkg.pr.new/typeorm/typeorm@12193
    

commit: aef5433

@pkuczynski
pkuczynski enabled auto-merge (squash) March 12, 2026 00:42
@sonarqubecloud

sonarqubecloud Bot commented Mar 12, 2026 •

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Gulpfile changes skip CI 🐞 Bug ⛯ Reliability
Description
detect-changes watches gulpfile.js, but the repo’s build entrypoint is gulpfile.ts, so PRs
that only change the gulp packaging logic won’t run build/tests workflows. This can let breaking
packaging/publish changes merge without CI coverage.
Code

↗ .github/workflows/tests.yml

              - .github/workflows/test/**/*
Evidence
The workflow’s paths-filter includes gulpfile.js under the src filter, but the repository
contains gulpfile.ts as the gulpfile; therefore changes to gulpfile.ts alone won’t match the
filter and won’t trigger the dependent jobs.

.github/workflows/tests.yml[16-31]
gulpfile.ts[1-8]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The CI change detector (`dorny/paths-filter`) is configured to watch `gulpfile.js`, but this repository uses `gulpfile.ts`. As a result, PRs that only modify the gulp build/package pipeline can bypass CI jobs that depend on the detected `src-or-tests` change set.

## Issue Context
This repo’s build/package logic is driven by `gulpfile.ts`, and CI should run when it changes.

## Fix Focus Areas
- .github/workflows/tests.yml[26-31]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. CI install not lockfile-frozen 🐞 Bug ⛯ Reliability
Description
Workflows replaced npm ci with plain pnpm install, which does not enforce a lockfile-only
install mode in CI. This reduces reproducibility and can allow CI to succeed even when the lockfile
is out of sync with package.json.
Code

.github/workflows/tests.yml[R52-58]

+      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v6
        with:
-          node-version-file: .nvmrc
-      - run: npm ci
-      - run: npm run lint
-      - run: npm run format:ci
+          node-version: 20
+          cache: "pnpm"
+      - run: pnpm install
+      - run: pnpm run lint
Evidence
The CI jobs now run pnpm install (without a CI/frozen mode flag) while the repo explicitly treats
pnpm-lock.yaml as the dependency lock source for change detection; this combination no longer
guarantees lockfile fidelity during CI installs the way npm ci did.

.github/workflows/tests.yml[46-59]
.github/workflows/tests.yml[18-22]
Best Practice: pnpm CI reproducibility

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
CI workflows use plain `pnpm install`, which does not enforce lockfile fidelity in the same way as `npm ci`. This can reduce reproducibility and allow dependency drift relative to `pnpm-lock.yaml`.

## Issue Context
Multiple GitHub Actions workflows were migrated from npm to pnpm and now install dependencies via `pnpm install`.

## Fix Focus Areas
- .github/workflows/tests.yml[52-58]
- .github/workflows/preview.yml[21-29]
- .github/workflows/publish-package.yml[15-26]
- .github/workflows/tests-linux.yml[24-37]
- .github/workflows/tests-windows.yml[14-28]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Docs reference missing .nvmrc 🐞 Bug ✓ Correctness
Description
DEVELOPER.md instructs contributors to use the Node version in .nvmrc, but .nvmrc is gitignored
while CI now hardcodes Node 20. This breaks the documentation guidance for selecting the project’s
intended Node version.
Code

.github/workflows/tests.yml[R53-56]

      - uses: actions/setup-node@v6
        with:
-          node-version-file: .nvmrc
-      - run: npm ci
-      - run: npm run lint
-      - run: npm run format:ci
+          node-version: 20
+          cache: "pnpm"
Evidence
The contributor docs explicitly link to .nvmrc for the required Node version, but the repo
configuration ignores .nvmrc and the updated workflows no longer read it (they hardcode Node 20).
Therefore the docs point to a non-repo source of truth and are inconsistent with CI.

DEVELOPER.md[53-56]
.gitignore[5-8]
.github/workflows/tests.yml[50-56]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
DEVELOPER.md instructs developers to use a Node version defined in `.nvmrc`, but `.nvmrc` is not tracked (gitignored) and CI now hardcodes Node 20. This makes the documentation guidance incorrect/inconsistent with CI.

## Issue Context
The PR migrated CI from `node-version-file: .nvmrc` to `node-version: 20`.

## Fix Focus Areas
- DEVELOPER.md[53-56]
- .gitignore[5-8]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@naorpeled

Copy link
Copy Markdown
Member

I think @alumni did this on purpose, let's wait for this reply on this 🙏

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 80.777%. remained the same
when pulling aef5433 on ci/migrate-v03-to-pnpm
into 0c533c0 on v0.3.

@alumni

alumni commented Mar 12, 2026 •

Copy link
Copy Markdown
Collaborator

We said we'll not bother with 0.3 that much so this would not be needed. Not a problem to do it, but it's nothing more than wasted effort.

It also adds even more to the repo noise in the past 2 weeks, which makes it more difficult to follow what is really important and what not.

@pkuczynski

Copy link
Copy Markdown
Member Author

We said we'll not bother with 0.3 that much that this would not be needed. Not a problem to do it, but it's wasted effort.

It was super easy change, took me few minutes. So not really wasted. We don't know how many things we will need to port back to v0.3...

@pkuczynski

Copy link
Copy Markdown
Member Author

Anyway, it's done. Can you approve then?

@alumni

alumni commented Mar 12, 2026 •

Copy link
Copy Markdown
Collaborator

@naorpeled is it okay without the docs?

I remember last time the docs weren't working anymore :)

@naorpeled

Copy link
Copy Markdown
Member

@naorpeled is it okay without the docs?

I remember last time the docs weren't working anymore :)

It's because we had it setup on CF and not in a GH, now it should work

@pkuczynski
pkuczynski merged commit 1332873 into v0.3 Mar 12, 2026
47 checks passed
@pkuczynski
pkuczynski deleted the ci/migrate-v03-to-pnpm branch March 12, 2026 17:06
@alumni

alumni commented Mar 12, 2026

Copy link
Copy Markdown
Collaborator

Ah great, thanks for confirming! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants