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

Commit 92737fc

Browse files
authored
ci(shipjs): release package in dependent order (#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
1 parent 9174806 commit 92737fc

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

packages/react-instantsearch-dom-maps/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,8 @@
4848
"react": ">= 16.3.0 < 19",
4949
"react-dom": ">= 16.3.0 < 19",
5050
"react-instantsearch-dom": "6.36.0"
51+
},
52+
"devDependencies": {
53+
"react-instantsearch-dom": "6.36.0"
5154
}
52-
}
55+
}

ship.config.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
const fs = require('fs');
22
const path = require('path');
3+
const shell = require('shelljs');
4+
5+
const packages = JSON.parse(
6+
shell.exec('yarn run --silent lerna list --toposort --json', {
7+
silent: true,
8+
})
9+
);
10+
const cwd = process.cwd();
311

412
module.exports = {
513
monorepo: {
614
mainVersionFile: 'lerna.json',
715
// We rely on Lerna to bump our dependencies.
816
packagesToBump: [],
9-
packagesToPublish: [
10-
'packages/react-instantsearch-core',
11-
'packages/react-instantsearch-dom-maps',
12-
'packages/react-instantsearch-dom',
13-
'packages/react-instantsearch-hooks',
14-
'packages/react-instantsearch-hooks-web',
15-
'packages/react-instantsearch-hooks-server',
16-
'packages/react-instantsearch-native',
17-
'packages/react-instantsearch',
18-
],
17+
packagesToPublish: packages.map(({ location }) =>
18+
location.replace(`${cwd}/`, '')
19+
),
1920
},
2021
versionUpdated: ({ version, exec, dir }) => {
2122
// Update version in `react-instantsearch-core`

0 commit comments

Comments
 (0)