Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(misc): support workspaces using a root tsconfig.json instead of t…
…sconfig.base.json (#9195) * fix(misc): support workspaces using a root tsconfig.json instead of tsconfig.base.json * cleanup(angular): address pr feedback
- Loading branch information
1 parent
16c6891
commit acc29e9
Showing
81 changed files
with
884 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/angular/src/generators/application/files/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/angular/src/generators/library-secondary-entry-point/lib/add-path-mapping.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/angular/src/generators/library/files/lib/tsconfig.json__tpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 3 additions & 8 deletions
11
packages/angular/src/generators/web-worker/lib/update-tsconfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
import type { Tree } from '@nrwl/devkit'; | ||
import { | ||
getWorkspaceLayout, | ||
joinPathFragments, | ||
offsetFromRoot, | ||
readProjectConfiguration, | ||
updateJson, | ||
} from '@nrwl/devkit'; | ||
import { getRelativePathToRootTsConfig } from '@nrwl/workspace/src/utilities/typescript'; | ||
|
||
export function updateTsConfig(tree: Tree, project: string): void { | ||
const workerTsConfigPath = joinPathFragments( | ||
getWorkspaceLayout(tree).appsDir, | ||
project, | ||
'tsconfig.worker.json' | ||
); | ||
const { root } = readProjectConfiguration(tree, project); | ||
const workerTsConfigPath = joinPathFragments(root, 'tsconfig.worker.json'); | ||
updateJson(tree, workerTsConfigPath, (json) => { | ||
json.extends = `${offsetFromRoot(root)}tsconfig.base.json`; | ||
json.extends = getRelativePathToRootTsConfig(tree, root); | ||
return json; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.