Skip to content

Commit

Permalink
fix(misc): restore tsconfig utils as deprecated in @nrwl/workspace (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Mar 3, 2023
1 parent 5e12d05 commit c956435
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Tree } from '@nrwl/devkit';
import { findNodes } from 'nx/src/utils/typescript';
import { getSourceNodes } from '@nrwl/workspace/src/utilities/typescript';
import { getSourceNodes } from '@nrwl/workspace/src/utilities/typescript/get-source-nodes';
import type { PropertyDeclaration } from 'typescript';
import { getTsSourceFile } from '../../../utils/nx-devkit/ast-utils';
import { ensureTypescript } from '@nrwl/js/src/utils/typescript/ensure-typescript';
Expand Down
6 changes: 0 additions & 6 deletions packages/workspace/src/utilities/ts-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,3 @@ export function getRootTsConfigFileName(): string | null {

return null;
}

export function getRootTsConfigPath(): string | null {
const tsConfigFileName = getRootTsConfigFileName();

return tsConfigFileName ? join(workspaceRoot, tsConfigFileName) : null;
}
21 changes: 20 additions & 1 deletion packages/workspace/src/utilities/typescript.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ensurePackage, workspaceRoot } from '@nrwl/devkit';
import { ensurePackage, Tree, workspaceRoot } from '@nrwl/devkit';
import { dirname } from 'path';
import type * as ts from 'typescript';
import { typescriptVersion } from '../utils/versions';
Expand Down Expand Up @@ -87,3 +87,22 @@ export function ensureTypescript() {
typescriptVersion
);
}

import {
getRelativePathToRootTsConfig as _getRelativePathToRootTsConfig,
getRootTsConfigPathInTree as _getRootTsConfigPathInTree,
} from './ts-config';

/**
* @deprecated Please import this from @nrwl/js instead. This function will be removed in v17
*/
export function getRelativePathToRootTsConfig(tree: Tree, targetPath: string) {
return _getRelativePathToRootTsConfig(tree, targetPath);
}

/**
* @deprecated Please import this from @nrwl/js instead. This function will be removed in v17
*/
export function getRootTsConfigPathInTree(tree: Tree) {
return _getRootTsConfigPathInTree(tree);
}

1 comment on commit c956435

@vercel
Copy link

@vercel vercel bot commented on c956435 Mar 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.