Skip to content

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Aug 22, 2025

Overview

Use a dual tag: latest + dev

graph LR
  5.3["5.3 (audited)"] --dev--> 5.4["5.4 (audited)"] --dev--> 5.5["5.5 (unaudited)"] --dev--> 5.6["5.6 (unaudited)"] --dev--> 5.7["5.7 (audited)"] --dev--> 5.8["5.8 (unaudited)"]
  5.3 --latest--> 5.4 --latest--> 5.7
  
Loading

At each point, dev points to the latest version (audited or not), which latest (which npm serves by default) points to the latest audited version.

If the latest version was audited, then both latest and dev will point to the same version.

How does the users get the package

If a user wants to get the latest audited release:

  • npm i @openzeppelin/contracts
  • npm i @openzeppelin/contracts@latest

If a user wants to get the latest release (audited or not):

  • npm i @openzeppelin/contracts@dev

If a user wants to get the latest release candidate (might not exist, might correspond to an unaudited version):

  • npm i @openzeppelin/contracts@next

Changes to the release process

  • (automatic) release next version with with dev tag instead of latest <= THIS PR
  • (manual) move the latest tag when an audited release is published

Summary by Sourcery

Build:

  • Change release script to tag new packages as ‘dev’ instead of ‘latest’

@Amxx Amxx requested a review from a team as a code owner August 22, 2025 12:36
Copy link

changeset-bot bot commented Aug 22, 2025

⚠️ No Changeset found

Latest commit: 99dd90c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

sourcery-ai bot commented Aug 22, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Implements a dual npm dist-tag strategy by defaulting new releases to the "dev" tag (instead of "latest"), reserving "latest" for audited versions which are promoted manually.

Flow diagram for new release tagging process

flowchart TD
    A["New release detected"] --> B{"Is prerelease?"}
    B -- Yes --> C["Tag as 'next'"]
    B -- No --> D{"Is version > latest audited?"}
    D -- Yes --> E["Tag as 'dev'"]
    D -- No --> F["Tag as patch (manual tag)"]
Loading

File-Level Changes

Change Details Files
Update default release tag in packaging script to use "dev"
  • Replace echo "latest" with echo "dev" in dist_tag function
scripts/release/workflow/pack.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant