Skip to content

ci: skip the version bump for changes outside the npm package (GN-240) - #35

Open
planadecu wants to merge 3 commits into
mainfrom
gn-240-version-check-scope
Open

planadecu wants to merge 3 commits into
mainfrom
gn-240-version-check-scope

Conversation

@planadecu

@planadecu planadecu commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

CI required a version bump on every PR into main, so a CODEOWNERS-only change (#33) could only pass by publishing an npm release with no code change. The Glassnode repository rules say docs-, CI- and tooling-only changes don't bump the version.

What changed

  • scripts/check-changelog-heading.mjs: the version comparison applies only when a file changed since BASE_SHA matches RELEASE_PATHS: src/, tsconfig.json, package.json, LICENSE, NOTICE. These are what npm pack ships (as dist/) or what changes it. In package.json, a change to devDependencies alone doesn't count: those never reach users. Any other change (docs, CODEOWNERS, .github/, scripts/, test/, the lockfile, CHANGELOG.md) needs no bump. The heading check is unchanged.
  • .github/dependabot.yml: the weekly group is split into runtime (dependency-type: production) and development. A development PR passes CI as opened; a runtime PR changes what users install, so it gets a version bump and CHANGELOG entry pushed onto it before merging (as on Bump the minor-and-patch group across 1 directory with 7 updates #34). This replaces the Dependabot exemption proposed in CI: exempt Dependabot PRs from the version bump; fix source-map-js alert #37.
  • CONTRIBUTING.md and CLAUDE.md: the bump rule applies to changes to the published package; the exempt paths are listed.
  • Tests: CODEOWNERS-only, docs-only, CI/test-only, other unlisted files and devDependencies-only changes pass without a bump; a change to src/, package.json dependencies, tsconfig.json or NOTICE still requires one.

Verification

pnpm test: 119 passed (test/release-scripts.spec.ts: 61, including 11 new cases). This PR only touches exempt paths, so its own CI exercises the new rule.

Downstream impact

Docs, CODEOWNERS, .github/, scripts/ and test/ changes no longer need a
version bump or changelog entry. Matches the Glassnode repository rules.
Comment thread scripts/check-changelog-heading.mjs Outdated
import { compareSemver, parseSemver } from './release-plan.mjs';

// Changes to these paths never reach users of the npm package, so they need no version bump.
const NO_RELEASE_PATHS = [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

it could be "inverted" and changes only in src/ directory should generate Changelog (otherwise we keep growing this list with other stuff + package.json to reflect dependency update

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, inverted in 2742410: RELEASE_PATHS lists what requires a bump, and anything else needs none. Besides src/ and package.json it includes tsconfig.json (changes the compiled dist/) and LICENSE/NOTICE (shipped in the npm tarball). README.md is in the tarball too but left out, so a docs fix does not force a release.

List the paths that change the npm package (src/, tsconfig.json,
package.json, LICENSE, NOTICE) instead of the paths that don't, so new
docs or tooling files need no list update.
…ncy type (GN-240)

devDependencies never reach users, so a package.json change that only
touches them is not a release. Dependabot opens separate runtime and
development PRs: development ones pass as opened, runtime ones get a
version bump before merging.

This branch has not been deployed

No deployments
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