Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: use default channel for prereleases #609

Merged

Conversation

davidlj95
Copy link
Owner

@davidlj95 davidlj95 commented May 26, 2024

Issue or need

Until now, semantic releases have been done in the main channel by mistake. This meant having a main NPM dist tag for every release. In order to get the latest tag for pre-releases, tag was set to latest in package.json's publishConfig.

But that's a misconfiguration workaround. The proper way is to indicate pre-releases on the default channel in semantic release. Which means using the latest dist tag on npm.

Related to this: npm publish default was to add latest tag to every publish. But as that can be not desired it some scenarios, seems this default may change soon

Proposed changes

Use default channel for pre-releases in semantic release configuration. Remove tag in package.json used to add latest apart from main dist tag.

In order to migrate existing releases to the default channel, manually updated git notes. Git notes are used by semantic release to track in which channel(s) a release has been performed.

Relevant commands:

  • git for-each-ref 'refs/notes/*' # to list local notes refs
    • May add --format '%(refname)' --shell
  • git ls-remote 'refs/notes/*' # to list remote notes
  • git fetch origin 'refs/notes/*:refs/notes/*' # to fetch remote notes
  • git update-ref -d 'refs/notes/<ref>' # to remove local ref
  • git push --delete origin 'refs/notes/<ref>' # to remove remote ref
  • git notes --ref <note-ref> add -f -m 'content' <ref> # to add a note to a ref

Notes content is (to indicate default branch):

{"channels":[null]}

Notes ref name is (recently changed though)

semantic-release-{gitTag}

https://github.com/semantic-release/semantic-release/blob/v23.1.1/lib/git.js#L344-L350

Name was before semantic-release for all tags

Quick reminders

  • 🤝 I will follow Code of Conduct
  • No existing pull request already does almost same changes
  • 👁️ Contributing docs are something I've taken a look at
  • 📝 Commit messages convention has been followed
  • 💬 TSDoc comments have been added or updated indicating API visibility if API surface has changed.
  • 🧪 Tests have been added if needed. For instance, if adding new features or fixing a bug. Or removed if removing features.
  • ⚙️ API Report has been updated if API surface is altered.

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @davidlj95 and the rest of your teammates on Graphite Graphite

Copy link

github-actions bot commented May 26, 2024

📦 Bundle size (Angular v17)

Git ref: 85b1214adae9579e02f4607a32e7ad6253f5e929

Module file Size Base size Difference
ngx-meta-core.mjs 3094 bytes (3.1KiB) 3094 bytes (3.1KiB) No change
ngx-meta-json-ld.mjs 226 bytes (226B) 226 bytes (226B) No change
ngx-meta-open-graph.mjs 869 bytes (869B) 869 bytes (869B) No change
ngx-meta-routing.mjs 839 bytes (839B) 839 bytes (839B) No change
ngx-meta-standard.mjs 768 bytes (768B) 768 bytes (768B) No change
ngx-meta-twitter-card.mjs 470 bytes (470B) 470 bytes (470B) No change
Total 6266 bytes (6.2KiB) 6266 bytes (6.2KiB) No change

Copy link

github-actions bot commented May 26, 2024

📦 Bundle size (Angular v16)

Git ref: 85b1214adae9579e02f4607a32e7ad6253f5e929

Module file Size Base size Difference
ngx-meta-core.mjs 3501 bytes (3.5KiB) 3501 bytes (3.5KiB) No change
ngx-meta-json-ld.mjs 386 bytes (386B) 386 bytes (386B) No change
ngx-meta-open-graph.mjs 1220 bytes (1.2KiB) 1220 bytes (1.2KiB) No change
ngx-meta-routing.mjs 1009 bytes (1009B) 1009 bytes (1009B) No change
ngx-meta-standard.mjs 885 bytes (885B) 885 bytes (885B) No change
ngx-meta-twitter-card.mjs 641 bytes (641B) 641 bytes (641B) No change
Total 7642 bytes (7.5KiB) 7642 bytes (7.5KiB) No change

Copy link

github-actions bot commented May 26, 2024

📦 Bundle size (Angular v18)

Git ref: 85b1214adae9579e02f4607a32e7ad6253f5e929

Module file Size Base size Difference
ngx-meta-core.mjs 3094 bytes (3.1KiB) 3094 bytes (3.1KiB) No change
ngx-meta-json-ld.mjs 226 bytes (226B) 226 bytes (226B) No change
ngx-meta-open-graph.mjs 869 bytes (869B) 869 bytes (869B) No change
ngx-meta-routing.mjs 839 bytes (839B) 839 bytes (839B) No change
ngx-meta-standard.mjs 768 bytes (768B) 768 bytes (768B) No change
ngx-meta-twitter-card.mjs 470 bytes (470B) 470 bytes (470B) No change
Total 6266 bytes (6.2KiB) 6266 bytes (6.2KiB) No change

Copy link

github-actions bot commented May 26, 2024

📦 Bundle size (Angular v15)

Git ref: 85b1214adae9579e02f4607a32e7ad6253f5e929

Module file Size Base size Difference
ngx-meta-core.mjs 3501 bytes (3.5KiB) 3501 bytes (3.5KiB) No change
ngx-meta-json-ld.mjs 386 bytes (386B) 386 bytes (386B) No change
ngx-meta-open-graph.mjs 1220 bytes (1.2KiB) 1220 bytes (1.2KiB) No change
ngx-meta-routing.mjs 1009 bytes (1009B) 1009 bytes (1009B) No change
ngx-meta-standard.mjs 885 bytes (885B) 885 bytes (885B) No change
ngx-meta-twitter-card.mjs 641 bytes (641B) 641 bytes (641B) No change
Total 7642 bytes (7.5KiB) 7642 bytes (7.5KiB) No change

@davidlj95 davidlj95 force-pushed the stacked/build-use-default-channel-for-prereleases-for-now branch from 2aaf322 to 85b1214 Compare May 26, 2024 23:37
@davidlj95 davidlj95 enabled auto-merge (squash) May 26, 2024 23:37
@davidlj95 davidlj95 changed the title build: use default channel for prereleases for now build: use default channel for prereleases May 26, 2024
@davidlj95 davidlj95 disabled auto-merge May 26, 2024 23:38
@davidlj95 davidlj95 enabled auto-merge (squash) May 26, 2024 23:38
@davidlj95 davidlj95 merged commit f64053c into main May 26, 2024
24 checks passed
@davidlj95 davidlj95 deleted the stacked/build-use-default-channel-for-prereleases-for-now branch May 26, 2024 23:40
Copy link

🎉 This PR is included in version 1.0.0-beta.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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