diff --git a/packages/angular_devkit/core/node/resolve.ts b/packages/angular_devkit/core/node/resolve.ts index a2fc8702cc3e..47c0578940ec 100644 --- a/packages/angular_devkit/core/node/resolve.ts +++ b/packages/angular_devkit/core/node/resolve.ts @@ -12,6 +12,7 @@ import { isFile } from './fs'; /** * Exception thrown when a module could not be resolved. + * @deprecated since version 8. Use `MODULE_NOT_FOUND` Node error code instead. */ export class ModuleNotFoundException extends BaseException { public readonly code: string; @@ -70,6 +71,7 @@ function _getGlobalNodeModules() { } +/** @deprecated since version 8. Use `require.resolve` instead. */ export interface ResolveOptions { /** * The basedir to use from which to resolve. @@ -111,6 +113,7 @@ export interface ResolveOptions { let _resolveHook: ((x: string, options: ResolveOptions) => string | null) | null = null; +/** @deprecated since version 8. Use `require.resolve` instead. */ export function setResolveHook( hook: ((x: string, options: ResolveOptions) => string | null) | null, ) { @@ -125,6 +128,7 @@ export function setResolveHook( * @returns {string} Path to the index to include, or if `resolvePackageJson` option was * passed, a path to that file. * @throws {ModuleNotFoundException} If no module with that name was found anywhere. + * @deprecated since version 8. Use `require.resolve` instead. */ export function resolve(packageName: string, options: ResolveOptions): string { if (_resolveHook) { diff --git a/packages/angular_devkit/core/src/index.ts b/packages/angular_devkit/core/src/index.ts index 4e372e55f445..b30525e2d2fb 100644 --- a/packages/angular_devkit/core/src/index.ts +++ b/packages/angular_devkit/core/src/index.ts @@ -9,7 +9,7 @@ import * as analytics from './analytics'; import * as experimental from './experimental'; import * as json from './json/index'; import * as logging from './logger/index'; -import * as terminal from './terminal/index'; +import * as ɵterminal from './terminal/index'; import * as workspaces from './workspace'; export * from './exception/exception'; @@ -17,11 +17,13 @@ export * from './json/index'; export * from './utils/index'; export * from './virtual-fs/index'; + /** @deprecated since version 8 - Instead use other 3rd party libraries like `colors` and `chalk`. */ +export const terminal = ɵterminal; + export { analytics, experimental, json, logging, - terminal, workspaces, };