Skip to content

ci: enable dependabot for deno and make bundle reproducible - #37

Merged
Nugine merged 4 commits into
mainfrom
ci
Aug 16, 2026
Merged

Nugine merged 4 commits into
mainfrom
ci

Conversation

@Nugine

@Nugine Nugine commented Aug 16, 2026 •

Copy link
Copy Markdown
Owner

Overview

Three CI-related changes:

  1. Add Dependabot version-update support for the Deno ecosystem
  2. Fix dist/main.js non-reproducibility that caused CI failures
  3. Reduce auto-update schedule from monthly to quarterly

Background

CI fails on dependency updates even though deno.lock is present. Root cause: deno.lock only pins the dependencies Deno resolves (jsr:/npm: import chains), while the npm install run internally by dnt in scripts/bundle.ts resolves the latest transitive dependency versions from the npm registry (e.g. json-with-bigint). Whenever such a transitive dependency releases a new version, dist/main.js drifts and the CI assert_unchanged check fails.

Changes

File Change
.github/dependabot.yml Add deno package ecosystem (directory /, monthly, grouped into a single PR)
scripts/bundle.ts Preserve and reuse npm/package-lock.json across builds so npm install installs pinned versions; only swallow NotFound errors when restoring the lockfile
.gitignore Track npm/package-lock.json in version control
npm/package-lock.json New; pins the entire npm transitive dependency tree (e.g. json-with-bigint@3.5.11), resolved via the official npm registry
dist/main.js Regenerated against the pinned dependency versions
.github/workflows/auto-update.yml Schedule changed from monthly 0 0 1 * * to quarterly 0 0 1 */3 *

Verification

  • just ci passes locally (working tree clean after build)
  • Two consecutive builds produce identical output (idempotent); dist/main.js no longer drifts when npm transitive dependencies are released
  • Simulated the full auto-update flow (deno update + just dev + just bundle): no diff produced
  • Real dependency updates are still picked up and committed (package-lock.json + dist/main.js) by auto-update

Notes

  • The committed package-lock.json uses the official npm registry (registry.npmjs.org) for all resolved URLs
  • Addressed Copilot review feedback (both review threads resolved)
  • auto-update is kept: it refreshes bundle artifacts after dependency updates, which Dependabot does not cover

Nugine added 3 commits August 16, 2026 23:15
dnt runs \`npm install\` in npm/ which resolves the latest transitive
dependency versions, ignoring deno.lock. Whenever a transitive dependency
(e.g. json-with-bigint) releases a new version, dist/main.js drifts and the
CI's assert_unchanged check fails even though deno.lock is unchanged.

Preserve npm/package-lock.json across builds and track it in git so that
npm install installs the same pinned versions every time.
Copilot AI lite review requested due to automatic review settings August 16, 2026 15:19

Copilot AI 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.

Pull request overview

This PR updates the repo’s CI/dependency-update tooling to better support Deno dependencies and to make the generated JS bundle reproducible by pinning npm transitive dependencies used during the Deno-to-npm build.

Changes:

  • Add Dependabot version updates for the Deno ecosystem.
  • Make dist/main.js reproducible by preserving a committed npm/package-lock.json across dnt builds.
  • Change the auto-update workflow schedule from monthly to quarterly.

Reviewed changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/bundle.ts Preserves/restores npm/package-lock.json across ./npm clean/build to stabilize dnt’s npm install resolution.
npm/package-lock.json Adds a committed npm lockfile to pin the full transitive dependency tree used by bundling.
dist/main.js Regenerated bundle output consistent with the pinned lockfile.
.gitignore Keeps npm/ build artifacts ignored while allowing npm/package-lock.json to be tracked.
.github/workflows/auto-update.yml Adjusts the scheduled auto-update cadence to quarterly.
.github/dependabot.yml Enables Dependabot updates for the Deno ecosystem (grouped).
Files not reviewed (1)
  • npm/package-lock.json: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread npm/package-lock.json
Comment thread scripts/bundle.ts
- Only swallow NotFound when restoring package-lock.json; rethrow other errors
- Regenerate npm/package-lock.json against the official npm registry so CI no longer depends on the npmmirror mirror

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 6 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • npm/package-lock.json: Generated file
Suppressed comments (1)

npm/package-lock.json:25

  • PR description Notes section says the committed package-lock.json contains resolved URLs pointing to registry.npmmirror.com, but this lockfile appears to use registry.npmjs.org (e.g. the resolved URL here). Consider updating the PR description (or regenerating the lockfile with the intended registry) to avoid misleading future maintainers about where CI will download packages from.

@Nugine
Nugine merged commit b41c90a into main Aug 16, 2026
32 checks passed
@Nugine
Nugine deleted the ci branch August 16, 2026 15:37
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.

2 participants