Skip to content

Provide mechanism to override --dist-tag in lerna publish #1264

@sambostock

Description

@sambostock

hard codes the latest tag.

This is problematic for stacks publishing backports to previous versions of a package.

There should be a way to inject a custom value to be passed to --dist-tag.

Something similar exists in

def dist_tag(version)
# Pre-release SemVer tags such as 'beta', 'alpha', 'rc' and 'next'
# are treated as 'next' npm dist-tags.
# An 1.0.0-beta.1 would be installable using both:
# `yarn add [email protected]` and `yarn add package@next`
return 'next' if ['-beta', '-alpha', '-rc', '-next'].any? { |tag| version.include?(tag) }
'latest'
end
but this too would be insufficient, as a backport stack would need to define an entirely custom tag (e.g. v5-stable or 5.x).


Relevant to https://github.com/Shopify/sewing-kit/pull/2954
cc. @BPScott

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions