From cd3352aaa2f99eabaf31ebaabc09ef981f4241b9 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Thu, 1 Sep 2022 18:07:24 -0400 Subject: [PATCH] fix(js): remove check for non-buildable libs being used when packaging. (#11835) - unblocks custom server in next.js - builds are guaranteed to happen if nx.json is configured correctly - if a package isn't buildable it will be included in the package in the near-future --- packages/js/src/utils/check-dependencies.ts | 25 ++++++--------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/packages/js/src/utils/check-dependencies.ts b/packages/js/src/utils/check-dependencies.ts index 2b6858ce16..6c75352f1e 100644 --- a/packages/js/src/utils/check-dependencies.ts +++ b/packages/js/src/utils/check-dependencies.ts @@ -14,26 +14,15 @@ export function checkDependencies( target: ProjectGraphProjectNode; dependencies: DependentBuildableProjectNode[]; } { - const { target, dependencies, nonBuildableDependencies } = - calculateProjectDependencies( - context.projectGraph, - context.root, - context.projectName, - context.targetName, - context.configurationName - ); + const { target, dependencies } = calculateProjectDependencies( + context.projectGraph, + context.root, + context.projectName, + context.targetName, + context.configurationName + ); const projectRoot = target.data.root; - if (nonBuildableDependencies.length > 0) { - throw new Error( - `Buildable libraries can only depend on other buildable libraries. You must define the ${ - context.targetName - } target for the following libraries: ${nonBuildableDependencies - .map((t) => `"${t}"`) - .join(', ')}` - ); - } - if (dependencies.length > 0) { return { tmpTsConfig: createTmpTsConfig(