Merge branch 'next' of https://github.com/algolia/docsearch into next
This commit is contained in:
commit
f4fe8aac5e
1 changed files with 6 additions and 23 deletions
|
|
@ -10,40 +10,23 @@ const packages = [
|
||||||
module.exports = {
|
module.exports = {
|
||||||
monorepo: {
|
monorepo: {
|
||||||
mainVersionFile: 'lerna.json',
|
mainVersionFile: 'lerna.json',
|
||||||
packagesToBump: packages,
|
// We rely on Lerna to bump our dependencies.
|
||||||
|
packagesToBump: [],
|
||||||
packagesToPublish: packages,
|
packagesToPublish: packages,
|
||||||
},
|
},
|
||||||
publishCommand({ tag }) {
|
publishCommand({ tag }) {
|
||||||
return `yarn publish --access public --tag ${tag}`;
|
return `yarn publish --access public --tag ${tag}`;
|
||||||
},
|
},
|
||||||
versionUpdated({ exec, dir, version }) {
|
versionUpdated({ exec, dir, version }) {
|
||||||
const updatePackageDependencies = (...changes) => {
|
// Update package dependencies
|
||||||
for (const change of changes) {
|
exec(
|
||||||
const { package, dependencies } = change;
|
`yarn lerna version ${version} --exact --no-git-tag-version --no-push --yes`
|
||||||
|
);
|
||||||
exec(
|
|
||||||
`yarn workspace ${package} add ${dependencies
|
|
||||||
.map((dep) => `"${dep}"`)
|
|
||||||
.join(' ')}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Ship.js reads JSON and writes with `fs.writeFileSync(JSON.stringify(json, null, 2))`
|
// Ship.js reads JSON and writes with `fs.writeFileSync(JSON.stringify(json, null, 2))`
|
||||||
// which causes a lint error in the `lerna.json` file.
|
// which causes a lint error in the `lerna.json` file.
|
||||||
exec('yarn eslint lerna.json --fix');
|
exec('yarn eslint lerna.json --fix');
|
||||||
|
|
||||||
updatePackageDependencies(
|
|
||||||
{
|
|
||||||
package: '@docsearch/react',
|
|
||||||
dependencies: [`@docsearch/css@^${version}`],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
package: '@docsearch/js',
|
|
||||||
dependencies: [`@docsearch/react@^${version}`],
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
path.resolve(dir, 'packages', 'docsearch-react', 'src', 'version.ts'),
|
path.resolve(dir, 'packages', 'docsearch-react', 'src', 'version.ts'),
|
||||||
`export const version = '${version}';\n`
|
`export const version = '${version}';\n`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue