Skip to content

Commit 1dca833

Browse files
committed
refactor(@angular-devkit/architect): use standard node resolution methods where possible
1 parent ace02f6 commit 1dca833

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/angular_devkit/architect/node/node-modules-architect-host.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
import { experimental, json, workspaces } from '@angular-devkit/core';
9-
import { resolve } from '@angular-devkit/core/node';
109
import * as path from 'path';
1110
import { BuilderInfo } from '../src';
1211
import { Schema as BuilderSchema } from '../src/builders-schema';
@@ -56,11 +55,8 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost<NodeModu
5655
throw new Error('No builder name specified.');
5756
}
5857

59-
const packageJsonPath = resolve(packageName, {
60-
basedir: this._root,
61-
checkLocal: true,
62-
checkGlobal: true,
63-
resolvePackageJson: true,
58+
const packageJsonPath = require.resolve(packageName + '/package.json', {
59+
paths: [this._root],
6460
});
6561

6662
const packageJson = require(packageJsonPath);

0 commit comments

Comments
 (0)