Skip to content

Commit

Permalink
fix(atomic): remove create-atomic-template from the dependencies (#809)
Browse files Browse the repository at this point in the history
* fix(atomic): remove create-atomic-template from the dependencies

https://coveord.atlassian.net/browse/CDX-1015

* cleanup

https://coveord.atlassian.net/browse/CDX-1015
  • Loading branch information
louis-bompart authored Jun 2, 2022
1 parent 7a47f9b commit dccc5b1
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions scripts/releaseV2/phase2-bump-all-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import {spawnSync} from 'child_process';
import {readFileSync} from 'fs';
import angularChangelogConvention from 'conventional-changelog-angular';
import {waitForPackages} from './utils/wait-for-published-packages';
import {waitForPackage} from './utils/wait-for-published-packages';
import {dirname, resolve, join} from 'path';
import {fileURLToPath} from 'url';
import retry from 'async-retry';
Expand Down Expand Up @@ -76,12 +76,20 @@ async function updateWorkspaceDependencies(version) {
readFileSync('package.json', {encoding: 'utf-8'})
);
const packageName = packageJson.name.replace('@coveo/', '');
const dependencies = topology.graph.dependencies[packageName]
const topologicalDependencies = topology.graph.dependencies[packageName]
.filter((dependency) => dependency.source == packageName)
.map((dependency) => `@coveo/${dependency.target}`);
await waitForPackages(dependencies);
for (const dependency of dependencies) {
await updateDependency(packageJson, dependency, version);
const npmDependencies = [
'dependencies',
'devDependencies',
'peerDependencies',
].reduce((acc, cur) => acc.concat(Object.keys(packageJson[cur] ?? [])));

for (const dependency of topologicalDependencies) {
if (npmDependencies.includes(dependency)) {
await waitForPackage(dependency);
await updateDependency(packageJson, dependency, version);
}
}
}

Expand Down

0 comments on commit dccc5b1

Please sign in to comment.