Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
ci(shipjs): release package in dependent order (#3654)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Haroenv committed Oct 17, 2022
1 parent 9174806 commit 92737fc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
5 changes: 4 additions & 1 deletion packages/react-instantsearch-dom-maps/package.json
Expand Up @@ -48,5 +48,8 @@
"react": ">= 16.3.0 < 19",
"react-dom": ">= 16.3.0 < 19",
"react-instantsearch-dom": "6.36.0"
},
"devDependencies": {
"react-instantsearch-dom": "6.36.0"
}
}
}
21 changes: 11 additions & 10 deletions ship.config.js
@@ -1,21 +1,22 @@
const fs = require('fs');
const path = require('path');
const shell = require('shelljs');

const packages = JSON.parse(
shell.exec('yarn run --silent lerna list --toposort --json', {
silent: true,
})
);
const cwd = process.cwd();

module.exports = {
monorepo: {
mainVersionFile: 'lerna.json',
// We rely on Lerna to bump our dependencies.
packagesToBump: [],
packagesToPublish: [
'packages/react-instantsearch-core',
'packages/react-instantsearch-dom-maps',
'packages/react-instantsearch-dom',
'packages/react-instantsearch-hooks',
'packages/react-instantsearch-hooks-web',
'packages/react-instantsearch-hooks-server',
'packages/react-instantsearch-native',
'packages/react-instantsearch',
],
packagesToPublish: packages.map(({ location }) =>
location.replace(`${cwd}/`, '')
),
},
versionUpdated: ({ version, exec, dir }) => {
// Update version in `react-instantsearch-core`
Expand Down

0 comments on commit 92737fc

Please sign in to comment.