Skip to content

Commit f6f8536

Browse files
jaysooFrozenPandaz
authored andcommitted
fix(js): update detection of ts solution setup (#29576)
Since we simplified `tsconfig.base.json`'s `compilerOptions` to not include values that match defaults (as per Jake's feedback), the logic to detect TS solution setup should check that `declaration` is explicitly set to `false`, rather than that it is falsy. Clean up PR: #29550 <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> We're not detecting TS solution setup correctly ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Detection works ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes # (cherry picked from commit cbfc6fe)
1 parent 1c3c90a commit f6f8536

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/js/src/plugins/typescript/plugin.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2905,7 +2905,6 @@ describe(`Plugin: ${PLUGIN_NAME}`, () => {
29052905
},
29062906
"outputs": [
29072907
"{workspaceRoot}/dist/libs/my-lib",
2908-
"{workspaceRoot}/dist/libs/*.tsbuildinfo",
29092908
],
29102909
"syncGenerators": [
29112910
"@nx/js:typescript-sync",
@@ -3066,7 +3065,6 @@ describe(`Plugin: ${PLUGIN_NAME}`, () => {
30663065
"{workspaceRoot}/dist/libs/my-lib/lib.d.ts.map",
30673066
"{workspaceRoot}/dist/libs/my-lib/lib.tsbuildinfo",
30683067
"{workspaceRoot}/dist/libs/my-lib/other",
3069-
"{workspaceRoot}/dist/libs/my-lib/*.tsbuildinfo",
30703068
],
30713069
"syncGenerators": [
30723070
"@nx/js:typescript-sync",

packages/js/src/utils/typescript/ts-solution-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function isWorkspaceSetupWithTsSolution(tree: Tree): boolean {
6262
if (
6363
!baseTsconfigJson.compilerOptions ||
6464
!baseTsconfigJson.compilerOptions.composite ||
65-
!baseTsconfigJson.compilerOptions.declaration
65+
baseTsconfigJson.compilerOptions.declaration === false
6666
) {
6767
return false;
6868
}

0 commit comments

Comments
 (0)