Skip to content

Build: Fix publish script#23948

Merged
ndelangen merged 2 commits into
nextfrom
norbert/fix-no-linking-publish
Aug 25, 2023
Merged

Build: Fix publish script#23948
ndelangen merged 2 commits into
nextfrom
norbert/fix-no-linking-publish

Conversation

@ndelangen
Copy link
Copy Markdown
Member

@ndelangen ndelangen commented Aug 25, 2023

What I did

I found out that when running the local registry the workspace:* version ranges were present inside the package.json files by the local registry.

They should be replaced by running yarn pack.

I found that yarn pack is working as advertised, but there's a bug in the npm CLI: npm/cli#4533.
This bug causes the tarball CLI parameter to get ignored.

@JReinhold and me figured out that the way around the npm bug is to generate the tarball to a different directory and publish from there.

We hypothesise the npm bug somehow only occurs when npm can find a package.json with the same name upwards.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

  1. run yarn task publish -s install --no-link
  2. open into the .verdaccio-cache/@storybook/addon-a11y/package.json
  3. assert that there are no packages with version range "workspace:*"

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

@ndelangen ndelangen self-assigned this Aug 25, 2023
@ndelangen ndelangen added build Internal-facing build tooling & test updates ci:normal Run our default set of CI jobs (choose this for most PRs). labels Aug 25, 2023
@ndelangen ndelangen force-pushed the norbert/fix-no-linking-publish branch from cfc727e to 3026181 Compare August 25, 2023 09:14
@ndelangen ndelangen changed the base branch from norbert/fix-23217 to next August 25, 2023 09:14
Copy link
Copy Markdown
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

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

great comment! 💪

Comment thread scripts/utils/constants.ts Outdated
Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
@ndelangen ndelangen merged commit 1d1fb50 into next Aug 25, 2023
@ndelangen ndelangen deleted the norbert/fix-no-linking-publish branch August 25, 2023 10:46
@github-actions github-actions Bot mentioned this pull request Aug 25, 2023
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:normal Run our default set of CI jobs (choose this for most PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants