feat(repo): new semantic versioning and CD process#363
feat(repo): new semantic versioning and CD process#363Charles Hudson (phobetron) wants to merge 2 commits into
Conversation
20ecb27 to
0e1298a
Compare
Replace the `commitizen`/`cz-vinyl` workflow with Commitlint-backed Conventional Commits. Commit messages now require scopes, local `commit-msg` validation, CI checks for PR titles and pushed `main` commits, and an interactive prompt for `pnpm commit` and plain interactive `git commit`. Add Release Please manifest mode as the source of truth for independent package releases. The manifest covers all public NPM packages plus Android and Swift, uses package-specific components and tags, and keeps one shared release PR titled `chore(repo): release packages`. Bootstrap the first semantic release away from the old alpha line. The initial generated releases are forced to `1.0.0` for GA NPM packages and `1.0.0-beta.0` for Android and Swift. Package-local `CHANGELOG.md` seeds make this PR touch every configured release path. Add a small Release Please runner with a `native-bridge-impact` plugin. Shared releasable runtime changes in the bridge/core path synthesize Android and Swift patch candidates. Real `android` and `swift` commits can still drive their own minor or major bumps. Update publishing to run only from released package tags. NPM publishing resolves package-specific Release Please tags, sorts released packages in workspace dependency order, rewrites package READMEs for their release tag, skips already-published versions, and publishes only to GitHub Packages. Android and Swift publishing now require `optimization-android-v*` and `optimization-swift-v*` tags. They derive versions from those tags and stamp native bridge builds with the released version. Add native `VERSION` files, Release Please config, package changelog seeds, release self-checks, and package-version build helpers so published bundles can fall back to `package.json` versions outside release-tag builds. Refresh `CONTRIBUTING.md` with the new contributor and maintainer flow: scoped commit expectations, squash-merge PR title rules, release impact guidance, Release Please ownership, publishing behavior, and troubleshooting notes. [[NT-3524](https://contentful.atlassian.net/browse/NT-3524)]
0e1298a to
cd94aca
Compare
| @@ -0,0 +1 @@ | |||
| 0.1.0-alpha17 | |||
There was a problem hiding this comment.
Is here should not match .release-please-manifest.json file?
| const JIRA_BASE_URL = 'https://contentful.atlassian.net/browse' | ||
| const JIRA_FOOTER_REGEX = | ||
| /^\[\[[A-Z][A-Z0-9]+-\d+\]\(https:\/\/contentful\.atlassian\.net\/browse\/[A-Z][A-Z0-9]+-\d+\)\]$/imu | ||
| const JIRA_TICKET_REGEX = /(^|[^A-Z0-9])([A-Z][A-Z0-9]+-\d+)(?=$|[^A-Z0-9])/iu |
There was a problem hiding this comment.
I was considering using something like process.env.JIRA_BASE_URL instead, in case anyone wanted to fork the repo.
| @@ -0,0 +1,46 @@ | |||
| const scopes = [ | |||
There was a problem hiding this comment.
I think would be better to use commitlint.config.ts instead, favoring what AGENTS.md says:
Write new JavaScript/Node tooling as TypeScript whenever the repo toolchain can run it; do not add .js or .mjs scripts when a .ts script is practical.
| exec </dev/tty | ||
| pnpm exec tsx scripts/prepare-commit-message.ts "$1" |
There was a problem hiding this comment.
I think we would have a problem for those cases git (or the user) has already supplied a commit message, so we mustn't overwrite it. (e.g. Signed-off-by)
We should have a guard like, before pnpm exec:
if [ -s "$1" ] && grep -vq '^#' "$1"; then
exit 0
fiSo it will skip if an earlier hook or tool already wrote a real message into $1, also grep succeeds when at least one line is not a # comment.
Replace the
commitizen/cz-vinylworkflow with Commitlint-backed Conventional Commits. Commit messages now require scopes, localcommit-msgvalidation, CI checks for PR titles and pushedmaincommits, and an interactive prompt forpnpm commitand plain interactivegit commit.Add Release Please manifest mode as the source of truth for independent package releases. The manifest covers all public NPM packages plus Android and Swift, uses package-specific components and tags, and keeps one shared release PR titled
chore(repo): release packages.Bootstrap the first semantic release away from the old alpha line. The initial generated releases are forced to
1.0.0for GA NPM packages and1.0.0-beta.0for Android and Swift. Package-localCHANGELOG.mdseeds make this PR touch every configured release path.Add a small Release Please runner with a
native-bridge-impactplugin. Shared releasable runtime changes in the bridge/core path synthesize Android and Swift patch candidates. Realandroidandswiftcommits can still drive their own minor or major bumps.Update publishing to run only from released package tags. NPM publishing resolves package-specific Release Please tags, sorts released packages in workspace dependency order, rewrites package READMEs for their release tag, skips already-published versions, and publishes only to GitHub Packages.
Android and Swift publishing now require
optimization-android-v*andoptimization-swift-v*tags. They derive versions from those tags and stamp native bridge builds with the released version.Add native
VERSIONfiles, Release Please config, package changelog seeds, release self-checks, and package-version build helpers so published bundles can fall back topackage.jsonversions outside release-tag builds.Refresh
CONTRIBUTING.mdwith the new contributor and maintainer flow: scoped commit expectations, squash-merge PR title rules, release impact guidance, Release Please ownership, publishing behavior, and troubleshooting notes.[NT-3524]