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

Preserve package scope when generating tags from component #1528

Closed
Jason3S opened this issue Jul 16, 2022 · 2 comments
Closed

Preserve package scope when generating tags from component #1528

Jason3S opened this issue Jul 16, 2022 · 2 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@Jason3S
Copy link
Contributor

Jason3S commented Jul 16, 2022

Is your feature request related to a problem? Please describe.
I'm in the process of porting a repo that uses Lerna to release-please, Rep: streetsidesoftware/cspell-dicts: Various cspell dictionaries. The challenge is that the tag generation in release-please is removing the scope from the package name when generating the tags. For example, the package name is @cspell/dict-en_us and the version tag is @cspell/[email protected]. But release-please is looking for tags staring with dict-en_us which do not exist.

image

There doesn't seem to be a way to tell release-please to keep the package scope.

Related to #1497 and #1497

Describe the solution you'd like

Add a configuration option to keep the original package name including scope when tags are generated.

Describe alternatives you've considered

I tried adding package-name in the packages section of release-please-config.json, but that did not work.

        "dictionaries/en_US": {
            "releaseType": "node",
            "package-name": "@cspell/dict-en_us"
        },

Additional context

@Jason3S Jason3S added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jul 16, 2022
@Jason3S
Copy link
Contributor Author

Jason3S commented Jul 16, 2022

This is the code that is removing the scope:

protected normalizeComponent(component: string | undefined): string {
if (!component) {
return '';
}
return component.match(/^@[\w-]+\//) ? component.split('/')[1] : component;
}

@Jason3S
Copy link
Contributor Author

Jason3S commented Jul 23, 2022

The workaround seems to be to explicitly add the component name to each entry:

release-please-config.json

        "dictionaries/en_US": {
            "releaseType": "node",
            "component": "@cspell/dict-en_us"
        },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant