Skip to content

Commit

Permalink
fix(repo): handle circular deps between workspace and cli/jest
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Dec 8, 2021
1 parent 0280e5e commit 7885018
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 126 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@
"@ngrx/schematics": "~13.0.0",
"@ngrx/store": "~13.0.0",
"@ngrx/store-devtools": "~13.0.0",
"@nrwl/cli": "13.3.0-beta.18",
"@nrwl/cypress": "13.3.0-beta.18",
"@nrwl/eslint-plugin-nx": "13.3.0-beta.18",
"@nrwl/jest": "13.3.0-beta.18",
"@nrwl/js": "13.3.0-beta.18",
"@nrwl/linter": "13.3.0-beta.18",
"@nrwl/next": "13.3.0-beta.18",
"@nrwl/node": "13.3.0-beta.18",
"@nrwl/cli": "13.3.0-beta.19",
"@nrwl/cypress": "13.3.0-beta.19",
"@nrwl/eslint-plugin-nx": "13.3.0-beta.19",
"@nrwl/jest": "13.3.0-beta.19",
"@nrwl/js": "13.3.0-beta.19",
"@nrwl/linter": "13.3.0-beta.19",
"@nrwl/next": "13.3.0-beta.19",
"@nrwl/node": "13.3.0-beta.19",
"@nrwl/nx-cloud": "13.0.0-beta.17",
"@nrwl/react": "13.3.0-beta.18",
"@nrwl/tao": "13.3.0-beta.18",
"@nrwl/web": "13.3.0-beta.18",
"@nrwl/workspace": "13.3.0-beta.18",
"@nrwl/react": "13.3.0-beta.19",
"@nrwl/tao": "13.3.0-beta.19",
"@nrwl/web": "13.3.0-beta.19",
"@nrwl/workspace": "13.3.0-beta.19",
"@parcel/watcher": "2.0.4",
"@phenomnomnominal/tsquery": "4.1.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/tao/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"command": "node ./scripts/copy-readme.js tao"
},
{
"command": "node ./scripts/add-dependency-to-build.js tao nx@*"
"command": "node ./scripts/add-dependency-to-build.js tao nx"
}
],
"parallel": false
Expand Down
4 changes: 0 additions & 4 deletions packages/workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@
},
"dependencies": {
"@parcel/watcher": "2.0.4",
"@nrwl/cli": "*",
"@nrwl/devkit": "*",
"@nrwl/jest": "*",
"@nrwl/linter": "*",
"chokidar": "^3.5.1",
"cosmiconfig": "^4.0.0",
"fs-extra": "^9.1.0",
Expand Down
12 changes: 12 additions & 0 deletions packages/workspace/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@
},
{
"command": "node ./scripts/copy-readme.js workspace"
},
{
"command": "node ./scripts/add-dependency-to-build.js workspace @nrwl/cli"
},
{
"command": "node ./scripts/add-dependency-to-build.js workspace @nrwl/devkit"
},
{
"command": "node ./scripts/add-dependency-to-build.js workspace @nrwl/jest"
},
{
"command": "node ./scripts/add-dependency-to-build.js workspace @nrwl/linter"
}
],
"parallel": false
Expand Down
3 changes: 1 addition & 2 deletions scripts/add-dependency-to-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const [package, dependency] = process.argv.slice(2);

const pkgPath = join(__dirname, '../build/packages', package, 'package.json');
const packageJson = readJsonSync(pkgPath);
const [dependencyPkg, dependencyVersion] = dependency.split('@');
packageJson.dependencies[dependencyPkg] = dependencyVersion;
packageJson.dependencies[dependency] = '*';

writeJsonSync(pkgPath, packageJson, { spaces: 2 });
5 changes: 5 additions & 0 deletions scripts/depcheck/missing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ const IGNORE_MATCHES = {
'karma-jasmine-html-reporter',
'webpack',
'webpack-dev-server',
,
'@nrwl/cli',
'@nrwl/jest',
'@nrwl/linter',
'@nrwl/devkit',
],
nest: ['semver'],
};
Expand Down
Loading

0 comments on commit 7885018

Please sign in to comment.