-
Notifications
You must be signed in to change notification settings - Fork 67
Switch from yarn to pnpm pacakge manager #1428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
flevi29
wants to merge
9
commits into
main
Choose a base branch
from
yarn-to-pnpm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
af0bc35
Switch to pnpm, adjust documentation and workflows
flevi29 a51f0ea
Switch remaining yarn based commands
flevi29 08d3580
Get rid of unneeded package
flevi29 a3a92f7
Make dependabot act the same as in core meilisearch package
flevi29 f0d99c2
Fix CI errors
flevi29 272c15e
Format code
flevi29 13e11e0
Patch type and lint errors
flevi29 84665fb
Remove all references to geo playground
flevi29 16a218b
Add back removed development dependency
flevi29 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: "Set up Node.js and install dependencies" | ||
| description: "Install pnpm, configure Node.js, and install dependencies with pnpm" | ||
| inputs: | ||
| node-version: | ||
| description: "Same as in actions/setup-node" | ||
| default: "lts/*" | ||
| registry-url: | ||
| description: "Same as in actions/setup-node" | ||
| default: "" | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| - name: Set up Node.js ${{ inputs.node-version }} | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: ${{ inputs.node-version }} | ||
| registry-url: ${{ inputs.registry-url }} | ||
| cache: "pnpm" | ||
| - name: Install dependencies | ||
| shell: bash | ||
| run: pnpm install | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,41 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| - package-ecosystem: 'github-actions' | ||
| directory: '/' | ||
| schedule: | ||
| interval: "monthly" | ||
| interval: 'monthly' | ||
| labels: | ||
| - "dependencies" | ||
| rebase-strategy: disabled | ||
| - 'dependencies' | ||
|
|
||
| - package-ecosystem: npm | ||
| directory: "/" | ||
| directory: '/' | ||
| schedule: | ||
| interval: weekly | ||
| time: "04:00" | ||
| open-pull-requests-limit: 10 | ||
| interval: 'monthly' | ||
| labels: | ||
| - skip-changelog | ||
| - dependencies | ||
| versioning-strategy: increase | ||
| rebase-strategy: disabled | ||
| allow: | ||
| - dependency-name: meilisearch | ||
| groups: | ||
| vite: | ||
| patterns: | ||
| - 'vite' | ||
| - '@vitejs/plugin-vue' | ||
| react: | ||
| patterns: | ||
| - 'react' | ||
| - 'react-dom' | ||
| - 'react-router-dom' | ||
| instantsearch: | ||
| patterns: | ||
| - '*instantsearch*' | ||
| - '@algolia/*' | ||
| - 'algoliasearch' | ||
| - 'algoliasearch-helper' | ||
| - 'search-insights' | ||
| eslint: | ||
| patterns: | ||
| - '*eslint*' | ||
| - 'globals' | ||
| prettier: | ||
| patterns: | ||
| - 'prettier' | ||
| - 'prettier-plugin-jsdoc' |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
actions/setup-node current stable version 2024 2025💡 Result:
As of Dec 13, 2025 the stable actions/setup-node release series is v6 (latest tag v6.1.0). Use it as: uses: actions/setup-node@v6. [1][2]
The action accepts version aliases like latest/current/node and explicit Node versions (e.g., 24, 24.8.0, lts/*). [1]
Sources:
[1] actions/setup-node README.
[2] actions/setup-node Releases (v6.1.0).
🌐 Web query:
pnpm/action-setup current stable version recommendations💡 Result:
Short answer: use pnpm/action-setup@v4 (the current major maintained release). Prefer pinning the major tag (pnpm/action-setup@v4) or an exact patch/tag for reproducibility, and set the action input "version" (or rely on package.json's packageManager field) to the pnpm version you want. Example:
Why: the repo/marketplace README explicitly shows and documents v4 as the current supported major and warns v2 is broken on newer Node.js — upgrade to v4 and avoid unpinned "latest" to prevent unexpected breakage. [1][2]
Sources:
[1] pnpm/action-setup README (GitHub).
[2] Setup pnpm — GitHub Marketplace.
🌐 Web query:
GitHub Actions pinning to commit SHA security best practice💡 Result:
Short best-practice checklist for pinning GitHub Actions to commit SHAs
If you want, I can:
🌐 Web query:
pnpm install --frozen-lockfile CI best practice💡 Result:
Short best-practices for using pnpm --frozen-lockfile in CI
Commit a single canonical pnpm-lock.yaml for your repo (keep it up-to-date locally). pnpm will fail in CI if the lockfile is missing or out-of-sync. [1]
Pin/activate the pnpm version in CI (Corepack): corepack prepare pnpm@ --activate. Use the same pnpm version locally and in CI to avoid lockfile mismatches. [2][1]
In CI run: pnpm install --frozen-lockfile (or rely on CI default). This guarantees installs use the committed lockfile and prevents implicit lockfile changes during builds. [1]
If you need to update deps, do it outside CI (locally or in a dedicated job) and commit the updated pnpm-lock.yaml (or run pnpm install --lockfile-only in a controlled step/agent) — then open a PR. Avoid using --no-frozen-lockfile in regular CI. [1]
Cache the pnpm store or store-dir to speed CI (optional): configure pnpm_config_store_dir or pnpm config set store-dir and cache that directory per your CI docs. Caching is recommended but not required. [3]
For monorepos/workspaces: ensure all package.json changes and the workspace lockfile are kept in sync; CI will fail if any package manifest differs from the lockfile. Consider running automated pre-merge checks (pnpm install locally or pnpm install --lockfile-only) in PR pipelines. [1]
When debugging unexpected ERR_PNPM_OUTDATED_LOCKFILE errors, confirm pnpm versions and CI detection (env vars) and reproduce the install locally; if necessary run pnpm install to update the lockfile and commit. See known issues/PR guidance in pnpm repo. [4]
Sources
[1] pnpm install docs (frozen-lockfile behaviour and CI default).
[2] pnpm Continuous Integration guide (Corepack + pinning + caching examples).
[3] pnpm CI caching / store guidance.
[4] pnpm GitHub issue about CI/outdated-lockfile (debugging/mismatch context).
If you want, I can produce a minimal CI job (GitHub Actions / GitLab / Azure) that follows these practices.
Harden CI: pin actions to commit SHAs and use
pnpm install --frozen-lockfile.Actions v6 and pnpm/action-setup@v4 are current stable versions. For supply-chain security and reproducibility, pin both actions to their full-length commit SHAs (with version tags in comments) and ensure
pnpm installuses--frozen-lockfileto enforce the committed lockfile in CI.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm uses version from main
package.json, Node.js version is specified via input, otherwise it's latest LTS.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.