File tree Expand file tree Collapse file tree 5 files changed +10
-6
lines changed
Expand file tree Collapse file tree 5 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ NG_DEV_EXTERNALS = [
55 # `typescript` is external because we want the project to provide a TypeScript version.
66 # TODO: Figure out how we want to manage dependencies for the dev-infra tool.
77 "typescript" ,
8+ # Package uses `__filename` and `__dirname` and cannot be bundled in ESM. We do not
9+ # intend to provide interop globals for this as it could hide other significant issues.
10+ "@yarnpkg/lockfile" ,
811]
912
1013ts_library (
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import * as path from 'path';
1111import which from 'which' ;
1212
1313import { isNodeJSWrappedError } from './nodejs-errors.js' ;
14- import { parse as parseLockfile } from '@yarnpkg/lockfile' ;
14+ import lockfile from '@yarnpkg/lockfile' ;
1515import { parse as parseYaml } from 'yaml' ;
1616import { ChildProcess } from './child-process.js' ;
1717import { Log } from './logging.js' ;
@@ -33,7 +33,7 @@ export interface YarnCommandInfo {
3333
3434/** List of Yarn configuration files and their parsing mechanisms. */
3535export const yarnConfigFiles : ConfigWithParser [ ] = [
36- { fileName : '.yarnrc' , parse : ( c ) => parseLockfile ( c ) . object } ,
36+ { fileName : '.yarnrc' , parse : ( c ) => lockfile . parse ( c ) . object } ,
3737 { fileName : '.yarnrc.yml' , parse : ( c ) => parseYaml ( c ) } ,
3838] ;
3939
Original file line number Diff line number Diff line change 88
99import * as path from 'path' ;
1010import * as fs from 'fs' ;
11- import { LockFileObject , parse as parseYarnLockfile } from '@yarnpkg/lockfile' ;
11+ import lockfile from '@yarnpkg/lockfile' ;
1212import {
1313 ngDevNpmPackageName ,
1414 workspaceRelativePackageJsonPath ,
@@ -34,7 +34,7 @@ export async function verifyNgDevToolIsUpToDate(workspacePath: string): Promise<
3434 try {
3535 const lockFileContent = fs . readFileSync ( workspaceDirLockFile , 'utf8' ) ;
3636 const packageJson = JSON . parse ( fs . readFileSync ( workspacePackageJsonFile , 'utf8' ) ) as any ;
37- const lockFile = parseYarnLockfile ( lockFileContent ) ;
37+ const lockFile = lockfile . parse ( lockFileContent ) ;
3838
3939 if ( lockFile . type !== 'success' ) {
4040 throw Error ( 'Unable to parse workspace lock file. Please ensure the file is valid.' ) ;
@@ -45,7 +45,7 @@ export async function verifyNgDevToolIsUpToDate(workspacePath: string): Promise<
4545 return true ;
4646 }
4747
48- const lockFileObject = lockFile . object as LockFileObject ;
48+ const lockFileObject = lockFile . object as lockfile . LockFileObject ;
4949 const devInfraPkgVersion =
5050 packageJson ?. dependencies ?. [ ngDevNpmPackageName ] ??
5151 packageJson ?. devDependencies ?. [ ngDevNpmPackageName ] ??
Original file line number Diff line number Diff line change 4545 "@types/tmp" : " ^0.2.1" ,
4646 "@types/uuid" : " ^8.3.1" ,
4747 "@types/yargs" : " ^17.0.0" ,
48+ "@yarnpkg/lockfile" : " ^1.1.0" ,
4849 "browser-sync" : " ^2.27.7" ,
4950 "clang-format" : " 1.8.0" ,
5051 "prettier" : " 2.7.0" ,
105106 "@types/wait-on" : " ^5.3.1" ,
106107 "@types/which" : " ^2.0.1" ,
107108 "@types/yarnpkg__lockfile" : " ^1.1.5" ,
108- "@yarnpkg/lockfile" : " ^1.1.0" ,
109109 "chalk" : " ^5.0.1" ,
110110 "cli-progress" : " ^3.7.0" ,
111111 "conventional-commits-parser" : " ^3.2.1" ,
Original file line number Diff line number Diff line change 88 true ,
99 {
1010 "noNamedExports" : [
11+ " @yarnpkg/lockfile" ,
1112 " typescript" ,
1213 " multimatch" ,
1314 " semver" ,
You can’t perform that action at this time.
0 commit comments