File tree Expand file tree Collapse file tree
apps/rush-lib/src/cli/utilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,9 +5,6 @@ import * as colors from 'colors';
55import * as semver from 'semver' ;
66import npmPackageArg = require( 'npm-package-arg' ) ;
77
8- import Utilities from '../../utilities/Utilities' ;
9- import { RushConstants } from '../../RushConstants' ;
10-
118/**
129 * This class is a parser for NPM's npm-shrinkwrap.json file format.
1310 */
Original file line number Diff line number Diff line change @@ -88,6 +88,18 @@ export default class NpmShrinkwrapFile extends ShrinkwrapFile {
8888 return dependencyJson . version ;
8989 }
9090
91+ protected _getTempProjectNames ( dependencies : { [ key : string ] : { } } ) : ReadonlyArray < string > {
92+ const result : string [ ] = [ ] ;
93+ for ( const key of Object . keys ( dependencies ) ) {
94+ // If it starts with @rush-temp, then include it:
95+ if ( Utilities . parseScopedPackageName ( key ) . scope === RushConstants . rushTempNpmScope ) {
96+ result . push ( key ) ;
97+ }
98+ }
99+ result . sort ( ) ; // make the result deterministic
100+ return result ;
101+ }
102+
91103 private constructor ( shrinkwrapJson : IShrinkwrapJson ) {
92104 super ( ) ;
93105 this . _shrinkwrapJson = shrinkwrapJson ;
@@ -103,16 +115,4 @@ export default class NpmShrinkwrapFile extends ShrinkwrapFile {
103115 this . _shrinkwrapJson . dependencies = { } ;
104116 }
105117 }
106-
107- protected _getTempProjectNames ( dependencies : { [ key : string ] : { } } ) : ReadonlyArray < string > {
108- const result : string [ ] = [ ] ;
109- for ( const key of Object . keys ( dependencies ) ) {
110- // If it starts with @rush-temp, then include it:
111- if ( Utilities . parseScopedPackageName ( key ) . scope === RushConstants . rushTempNpmScope ) {
112- result . push ( key ) ;
113- }
114- }
115- result . sort ( ) ; // make the result deterministic
116- return result ;
117- }
118118}
You can’t perform that action at this time.
0 commit comments