Skip to content

chore(npm): pin only-allow and ncu to latest versions#1730

Merged
donniean merged 1 commit intomainfrom
dev
Apr 16, 2026
Merged

chore(npm): pin only-allow and ncu to latest versions#1730
donniean merged 1 commit intomainfrom
dev

Conversation

@donniean
Copy link
Copy Markdown
Owner

  • update preinstall only-allow invocation to use @latest pnpm
  • update ncu scripts to use npm-check-updates@latest with --deep
  • align npm-check-updates config with updated ncu command

Signed-off-by: donniean donniean1@gmail.com

- update preinstall only-allow invocation to use @latest pnpm
- update ncu scripts to use npm-check-updates@latest with --deep
- align npm-check-updates config with updated ncu command

Signed-off-by: donniean <donniean1@gmail.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 16, 2026

⚠️ No Changeset found

Latest commit: a495eb6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@donniean donniean merged commit 1156f01 into main Apr 16, 2026
8 checks passed
@donniean donniean deleted the dev branch April 16, 2026 16:15
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates several scripts and configurations to use the @latest tag for npm-check-updates and only-allow when using pnpm dlx. Feedback across all files suggests that using @latest introduces non-deterministic behavior and potential instability; it is recommended to pin these dependencies to specific versions to ensure reproducibility and consistent behavior across different environments and CI pipelines.

Comment thread package.json
"docs": "tsx src/scripts",
"postdocs": "prettier --write README.md",
"preinstall": "pnpm dlx only-allow pnpm",
"preinstall": "pnpm dlx only-allow@latest pnpm",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using @latest is the opposite of pinning; it creates a floating dependency that fetches the newest version on every run. In a preinstall script, this makes the installation process non-deterministic and can break the build for all contributors if a buggy version is released. It is recommended to pin to a specific version to ensure stability and reproducibility.

Comment thread package.json
"lint:text:fix": "autocorrect --fix",
"lint:types": "tsc --noEmit",
"ncu": "pnpm dlx npm-check-updates --deep",
"ncu": "pnpm dlx npm-check-updates@latest --deep",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using @latest for npm-check-updates can lead to inconsistent behavior across different environments. Pinning to a specific version ensures that the tool behaves the same way for all contributors and in CI, while still providing the required feature support.

pkg: {
scripts: [
{ key: 'ncu', value: 'pnpm dlx npm-check-updates --deep' },
{ key: 'ncu', value: 'pnpm dlx npm-check-updates@latest --deep' },
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This configuration propagates the use of @latest to other projects. To ensure those projects have stable and reproducible scripts, it is better to specify a fixed version of npm-check-updates here.

Comment thread README.md
```bash
pnpm pkg set \
scripts.ncu='pnpm dlx npm-check-updates --deep' \
scripts.ncu='pnpm dlx npm-check-updates@latest --deep' \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation should ideally demonstrate best practices for reproducibility by using a pinned version instead of @latest.

Comment thread README.md

pnpm pkg set \
scripts.ncu='pnpm dlx npm-check-updates --deep' \
scripts.ncu='pnpm dlx npm-check-updates@latest --deep' \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation should ideally demonstrate best practices for reproducibility by using a pinned version instead of @latest.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant