fix(dev-infra): prep ts-circular-deps to load via node_modules (#36165)
to run ts-circular-deps via installed node_modules, we needed to set the hashbang of the script to be a node environment, and discover the project directory based on where the script is run rather than the scripts file location. PR Close #36165
This commit is contained in:
parent
e81ad3a1bc
commit
0e76b32aa5
|
@ -6,6 +6,7 @@ ts_library(
|
|||
module_name = "@angular/dev-infra-private/ts-circular-dependencies",
|
||||
visibility = ["//dev-infra:__subpackages__"],
|
||||
deps = [
|
||||
"//dev-infra/utils:config",
|
||||
"@npm//@types/glob",
|
||||
"@npm//@types/node",
|
||||
"@npm//@types/yargs",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
|
@ -17,7 +18,9 @@ import {Analyzer, ReferenceChain} from './analyzer';
|
|||
import {compareGoldens, convertReferenceChainToGolden, Golden} from './golden';
|
||||
import {convertPathToForwardSlash} from './file_system';
|
||||
|
||||
const projectDir = join(__dirname, '../../');
|
||||
import {getRepoBaseDir} from '../utils/config';
|
||||
|
||||
const projectDir = getRepoBaseDir();
|
||||
const packagesDir = join(projectDir, 'packages/');
|
||||
// The default glob does not capture deprecated packages such as http, or the webworker platform.
|
||||
const defaultGlob =
|
||||
|
|
Loading…
Reference in New Issue