File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
packages/angular_devkit/core/node/experimental/jobs Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 7
7
*/
8
8
import { Observable , of } from 'rxjs' ;
9
9
import { JsonValue , experimental as core_experimental , schema } from '../../../src' ;
10
- import { ModuleNotFoundException , resolve } from '../../resolve' ;
11
10
12
11
export class NodeModuleJobRegistry < MinimumArgumentValueT extends JsonValue = JsonValue ,
13
12
MinimumInputValueT extends JsonValue = JsonValue ,
14
13
MinimumOutputValueT extends JsonValue = JsonValue ,
15
14
> implements core_experimental . jobs . Registry < MinimumArgumentValueT ,
16
15
MinimumInputValueT ,
17
16
MinimumOutputValueT > {
18
- public constructor ( private _resolveLocal = true , private _resolveGlobal = false ) {
19
- }
20
17
21
18
protected _resolve ( name : string ) : string | null {
22
19
try {
23
- return resolve ( name , {
24
- checkLocal : this . _resolveLocal ,
25
- checkGlobal : this . _resolveGlobal ,
26
- basedir : __dirname ,
27
- } ) ;
20
+ return require . resolve ( name ) ;
28
21
} catch ( e ) {
29
- if ( e instanceof ModuleNotFoundException ) {
22
+ if ( e . code === 'MODULE_NOT_FOUND' ) {
30
23
return null ;
31
24
}
32
25
throw e ;
You can’t perform that action at this time.
0 commit comments