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

ci(shipjs): publish packages topographically #23

Merged
merged 2 commits into from Oct 17, 2022
Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Oct 17, 2022

If anything goes wrong, like npm being down in the middle of publishing, we want to have gotten to a valid state, only having packages that are depended on, not ones that depend on other packages that aren't yet published.

There's two commits here. First a manual reorder, then using lerna and shelljs (dependency of shipjs) to create the list.

After this is done here, we could either build this into shipjs or have this copied into other packages.

What this PR doesn't solve is if there's a failure midway, a rerun will still fail (as the first ones are already published). You'd still do that manually or publish a second patch.

This is the order of the dependents, and thus if there's some error, we won't have published an impossible state.

I didn't search about that yet, but i think lerna can give a list of packages as well, in the right order.
@Haroenv Haroenv requested review from sarahdayan, a team and FabienMotte and removed request for a team October 17, 2022 10:22
@Haroenv Haroenv merged commit 58ee539 into master Oct 17, 2022
@Haroenv Haroenv deleted the fix/ci-config branch October 17, 2022 11:45
Haroenv added a commit to algolia/react-instantsearch that referenced this pull request Oct 17, 2022
If we'd use `lerna publish` instead of a publish command per package, this may not be needed, but I couldn't find how to make that work correctly with shipjs just yet.

The order is now (note dom-maps is published later):

```
  'packages/react-instantsearch-core',
  'packages/react-instantsearch-hooks',
  'packages/react-instantsearch-dom',
  'packages/react-instantsearch-hooks-server',
  'packages/react-instantsearch-hooks-web',
  'packages/react-instantsearch-native',
  'packages/react-instantsearch-dom-maps',
  'packages/react-instantsearch'
  ```

  This is equivalent to algolia/ui-components#23
Haroenv added a commit to algolia/react-instantsearch that referenced this pull request Oct 17, 2022
If we'd use `lerna publish` instead of a publish command per package,
this may not be needed, but I couldn't find how to make that work
correctly with shipjs just yet.

The order is now (note dom-maps is published later):

```
  'packages/react-instantsearch-core',
  'packages/react-instantsearch-hooks',
  'packages/react-instantsearch-dom',
  'packages/react-instantsearch-hooks-server',
  'packages/react-instantsearch-hooks-web',
  'packages/react-instantsearch-native',
  'packages/react-instantsearch-dom-maps',
  'packages/react-instantsearch'
  ```

  This is equivalent to algolia/ui-components#23
Haroenv added a commit to algolia/instantsearch that referenced this pull request Jan 4, 2023
…search#3654)

If we'd use `lerna publish` instead of a publish command per package,
this may not be needed, but I couldn't find how to make that work
correctly with shipjs just yet.

The order is now (note dom-maps is published later):

```
  'packages/react-instantsearch-core',
  'packages/react-instantsearch-hooks',
  'packages/react-instantsearch-dom',
  'packages/react-instantsearch-hooks-server',
  'packages/react-instantsearch-hooks-web',
  'packages/react-instantsearch-native',
  'packages/react-instantsearch-dom-maps',
  'packages/react-instantsearch'
  ```

  This is equivalent to algolia/ui-components#23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants