Skip to content
Permalink
Browse files
fix(misc): buildable libs should not throw when some npm packages are…
… not defined
  • Loading branch information
vsavkin authored and FrozenPandaz committed Sep 28, 2022
1 parent 65dc805 commit d070fdfee86795bc0d0058cc1e957a24b82e5931
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 68 deletions.
@@ -60,7 +60,7 @@
"@nrwl/js": "14.7.16",
"@nrwl/linter": "14.7.16",
"@nrwl/next": "14.7.16",
"@nrwl/nx-cloud": "14.6.2",
"@nrwl/nx-cloud": "14.7.0-beta.1",
"@nrwl/react": "14.7.16",
"@nrwl/web": "14.7.16",
"@parcel/watcher": "2.0.4",

This file was deleted.

@@ -103,7 +103,7 @@ describe('missingDependencies', () => {
example: [
{
source: 'example',
target: 'npm:formik',
target: 'missing',
type: DependencyType.static,
},
],
@@ -128,6 +128,14 @@ function collectDependencies(
): { name: string; isTopLevel: boolean }[] {
(projGraph.dependencies[project] || []).forEach((dependency) => {
if (!acc.some((dep) => dep.name === dependency.target)) {
// Temporary skip this. Currently the set of external nodes is built from package.json, not lock file.
// As a result, some nodes might be missing. This should not cause any issues, we can just skip them.
if (
dependency.target.startsWith('npm:') &&
!projGraph.externalNodes[dependency.target]
)
return;

acc.push({ name: dependency.target, isTopLevel: areTopLevelDeps });
if (!shallow) {
collectDependencies(dependency.target, projGraph, acc, shallow, false);
@@ -3811,14 +3811,15 @@
url-loader "^4.1.1"
webpack-merge "^5.8.0"

"@nrwl/nx-cloud@14.6.2":
version "14.6.2"
resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-14.6.2.tgz#2eef39b790ba93a7003042c4045981327a64af0c"
integrity sha512-w8ujbFMOxE7lJg52O3JjnpTGlBKc+/vovxVTplIfGU9TYgEgAo/v4HS9svztzGd9Era7qmNaoYOmxm6Ebtbo5g==
"@nrwl/nx-cloud@14.7.0-beta.1":
version "14.7.0-beta.1"
resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-14.7.0-beta.1.tgz#7d59370465f83bc753b27ec04bed734d11f8b611"
integrity sha512-BRV7EPOlCPB9O6sjNOZSrmjb9u9n0AAcdWYkV5bg6RJIv8kjYri6IU2tYk7+mOPayDbINYN09UiTKycCWoMyLg==
dependencies:
axios "^0.21.1"
chalk "4.1.0"
dotenv "~10.0.0"
fs-extra "^10.1.0"
node-machine-id "^1.1.12"
strip-json-comments "^3.1.1"
tar "6.1.11"

0 comments on commit d070fdf

Please sign in to comment.