Skip to content

chore(deps): add a 7-day npm min-release-age - #51

Merged
ThomasK33 merged 4 commits into
mainfrom
chore/npm-min-release-age
Oct 30, 2026
Merged

ThomasK33 merged 4 commits into
mainfrom
chore/npm-min-release-age

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Why

The goal is to fix every open issue on this repo. #16 showed that a manual npm update adopts releases that are only 1 to 5 days old. This PR makes npm wait 7 days before it picks a new version, so a compromised or broken release has time to be found and pulled first.

Closes #18

What changed

  • New .npmrc with min-release-age=7. It needs npm 11.10 or later, and the pinned Node 26.12.1 ships npm 11.20.
  • devEngines in package.json stops npm 10.9 to 11.9 in this checkout with EBADDEVENGINES, because those versions ignore the setting without an error.
  • README: a "Dependency Updates" section with the rule, the one-command override (--min-release-age=0), and two caveats. npm audit fix can be blocked, and a bare npm update moves lockfile entries younger than 7 days back to older versions.

Scope

  • Covers every manual npm install and npm update in this checkout. npm 10.8 and older (Node 20, end of life) ignore both the setting and devEngines.
  • Does not add .github/dependabot.yml. Its cooldown applies only to version updates, and adding the file would turn on version-update PRs. This repo bundles dependency updates by hand (chore(deps): combine dependency updates #16) because Dependabot's lockfile-only PRs conflict with each other. Dependabot also reads min-release-age from .npmrc as the cooldown if version updates are added later (dependabot-core#15132).

Blast Radius

Only contributors who run npm in this repo see it. npm ci (CI, release) installs the lockfile as pinned and ignores release age. Dependabot security updates pass --min-release-age=0 and are not delayed (dependabot-core#15139, #15386). npm never packs .npmrc and checks devEngines only for the root project, so consumers are unaffected (a consumer on npm 10.9.8 installs a dependency that has this devEngines with exit 0).

Verification

  • Repo copy, npm update --package-lock-only: without .npmrc rolldown goes to 1.2.16 (0.86 days old). With it rolldown stays at 1.2.15, and the youngest lockfile entry is 8.73 days old.
  • Scratch project: rolldown@^1.2.14 resolves to 1.2.15, not 1.2.16. rolldown@1.2.16 fails with ETARGET. Adding --min-release-age=0 installs it. A lockfile that already pins 1.2.16 still passes npm ci and npm install.
  • npm 10.9.8 with only the .npmrc resolves rolldown 1.2.16 and exits 0. With devEngines, npm ci, npm install and npm run stop with EBADDEVENGINES. npm 11.12.1 and 11.20.0 pass.
  • Full gate on the final head with .npmrc and devEngines in place: npm ci, build:libghostty, build:native, build, typecheck, test (85 passed), smoke, and npm pack --dry-run all exit 0. The tarball has no .npmrc.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Set min-release-age=7 in a project .npmrc so npm install and npm update skip versions published in the last week. Document the rule, its override, and how it interacts with npm ci, npm audit fix, and Dependabot security updates.

Change-Id: I9e4a7cf86a081e5fe732d10e9f910aa64349ed46
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T11:24:01.676492Z 79116cf Manual request
🔒 Security Review ✅ Completed 2026-10-30T11:25:40.531760Z 79116cf Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 3d1866f429

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d1866f429

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .npmrc Resolved
Change-Id: I191b33b796b1ec9d33ab419f2c255ac93ae2a71d
Signed-off-by: Thomas Kosiewski <tk@coder.com>
npm before 11.10 ignores min-release-age, so a contributor on Node 22 (npm 10.9) would resolve brand-new releases with no error. devEngines stops npm 10.9 and later in this checkout. Consumers of the package are not checked.

Change-Id: I39f8ed21c6aaff0dc8daa3eb2390cc7da0181e56
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 79116cf7cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 79116cf7cb

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33
ThomasK33 merged commit 272cd22 into main Oct 30, 2026
5 checks passed
@ThomasK33 ThomasK33 mentioned this pull request Oct 30, 2026
ThomasK33 added a commit that referenced this pull request Oct 30, 2026
## Why
Ship the fixes merged since `v0.1.0-beta.3` to npm, so downstream projects such as agent-tty can update. The consumer-visible change is #53: `getNativeInfo()` now reports the Ghostty commit the addon was built from (`ghosttyCommit`), and `ghosttyVersion` reads `0.1.0-dev+<commit>`.

## What changed
- `package.json` and `package-lock.json` go from `0.1.0-beta.3` to `0.1.0-beta.4`. The branch name matches the version, so `publish.yml` creates `v0.1.0-beta.4` after merge.
- The `release-changelog` workflow adds the CHANGELOG entry to this branch.

## Scope
- Included since beta.3: #53 (Ghostty commit in `getNativeInfo()`), #51 (7-day `min-release-age` for this repo's own npm installs, `devEngines` npm >= 11.10), #52 (verify skill scripts, not in the npm tarball), #50 (skill sync, not in the tarball).

## Blast Radius
The merge publishes `0.1.0-beta.4` to npm under the `beta` dist-tag. `latest` stays on `0.1.0-beta.0`. The tarball's `package.json` now carries `devEngines`. npm checks it only for the project it runs in, and the #51 verifier installed a packed tarball with npm 9.9.4, 10.8.2, 10.9.8 and 11.20.0 (all exit 0). `.npmrc` is not in the tarball.

## Verification
- `prepare-release-changelog.mjs` prints `should_generate=true` and `version-changed`. `resolve-npm-publish-tag.mjs` prints `beta`.
- Local gate on this branch with Node 26.12.1: results posted as a PR comment.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(deps): add a release-age cooldown for dependency updates

1 participant