File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,12 +7,9 @@ import { RushCommandLineParser } from '../RushCommandLineParser';
77import { LinkManagerFactory } from '../../logic/LinkManagerFactory' ;
88import { BaseLinkManager } from '../../logic/base/BaseLinkManager' ;
99import { BaseRushAction } from './BaseRushAction' ;
10- import { CommandLineStringParameter } from '@microsoft/ts-command-line' ;
11- import { Variants } from '../../api/Variants' ;
1210
1311export class LinkAction extends BaseRushAction {
1412 private _force : CommandLineFlagParameter ;
15- private _variant : CommandLineStringParameter ;
1613
1714 constructor ( parser : RushCommandLineParser ) {
1815 super ( {
@@ -33,14 +30,10 @@ export class LinkAction extends BaseRushAction {
3330 description : 'Deletes and recreates all links, even if the filesystem state seems to indicate that this is ' +
3431 'unnecessary.'
3532 } ) ;
36-
37- this . _variant = this . defineStringParameter ( Variants . VARIANT_PARAMETER ) ;
3833 }
3934
4035 protected run ( ) : Promise < void > {
41- const linkManager : BaseLinkManager = LinkManagerFactory . getLinkManager ( this . rushConfiguration , {
42- variant : this . _variant . value
43- } ) ;
36+ const linkManager : BaseLinkManager = LinkManagerFactory . getLinkManager ( this . rushConfiguration ) ;
4437 return linkManager . createSymlinksForProjects ( this . _force . value ) ;
4538 }
4639}
Original file line number Diff line number Diff line change @@ -323,9 +323,7 @@ export class InstallManager {
323323 } )
324324 . then ( ( ) => {
325325 if ( ! options . noLink ) {
326- const linkManager : BaseLinkManager = LinkManagerFactory . getLinkManager ( this . _rushConfiguration , {
327- variant : options . variant
328- } ) ;
326+ const linkManager : BaseLinkManager = LinkManagerFactory . getLinkManager ( this . _rushConfiguration ) ;
329327 return linkManager . createSymlinksForProjects ( false ) ;
330328 } else {
331329 console . log ( os . EOL
Original file line number Diff line number Diff line change 22// See LICENSE in the project root for license information.
33
44import { RushConfiguration } from '../api/RushConfiguration' ;
5- import { BaseLinkManager , IBaseLinkManagerOptions } from './base/BaseLinkManager' ;
5+ import { BaseLinkManager } from './base/BaseLinkManager' ;
66import { NpmLinkManager } from './npm/NpmLinkManager' ;
77import { PnpmLinkManager } from './pnpm/PnpmLinkManager' ;
88
99export class LinkManagerFactory {
1010 public static getLinkManager (
11- rushConfiguration : RushConfiguration ,
12- options : IBaseLinkManagerOptions
11+ rushConfiguration : RushConfiguration
1312 ) : BaseLinkManager {
1413
1514 switch ( rushConfiguration . packageManager ) {
1615 case 'npm' :
17- return new NpmLinkManager ( rushConfiguration , options ) ;
16+ return new NpmLinkManager ( rushConfiguration ) ;
1817 case 'pnpm' :
19- return new PnpmLinkManager ( rushConfiguration , options ) ;
18+ return new PnpmLinkManager ( rushConfiguration ) ;
2019 case 'yarn' :
2120 // Yarn uses the same node_modules structure as NPM
22- return new NpmLinkManager ( rushConfiguration , options ) ;
21+ return new NpmLinkManager ( rushConfiguration ) ;
2322 }
2423
2524 throw new Error ( `Unsupported package manager: ${ rushConfiguration . packageManager } ` ) ;
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import { RushConfiguration } from '../../api/RushConfiguration';
1212import { Utilities } from '../../utilities/Utilities' ;
1313import { Stopwatch } from '../../utilities/Stopwatch' ;
1414import { BasePackage } from './BasePackage' ;
15- import { Variants } from '../../api/Variants' ;
1615
1716export enum SymlinkKind {
1817 File ,
@@ -23,13 +22,8 @@ export interface IBaseLinkManagerCreateSymlinkOptions extends IFileSystemCreateL
2322 symlinkKind : SymlinkKind ;
2423}
2524
26- export interface IBaseLinkManagerOptions {
27- variant ?: Variants . IVariantName ;
28- }
29-
3025export abstract class BaseLinkManager {
3126 protected _rushConfiguration : RushConfiguration ;
32- protected _variant : Variants . IVariantName ;
3327
3428 protected static _createSymlink ( options : IBaseLinkManagerCreateSymlinkOptions ) : void {
3529 const newLinkFolder : string = path . dirname ( options . newLinkPath ) ;
@@ -178,10 +172,8 @@ export abstract class BaseLinkManager {
178172 }
179173 }
180174
181- constructor ( rushConfiguration : RushConfiguration , options : IBaseLinkManagerOptions ) {
175+ constructor ( rushConfiguration : RushConfiguration ) {
182176 this . _rushConfiguration = rushConfiguration ;
183-
184- this . _variant = options . variant ;
185177 }
186178
187179 /**
Original file line number Diff line number Diff line change @@ -56,8 +56,7 @@ export class NpmLinkManager extends BaseLinkManager {
5656 commonPackageLookup . loadTree ( commonRootPackage ) ;
5757
5858 const rushLinkJson : IRushLinkJson = {
59- localLinks : { } ,
60- ...( this . _variant ? { variant : this . _variant } : { } )
59+ localLinks : { }
6160 } ;
6261
6362 for ( const rushProject of this . _rushConfiguration . projects ) {
Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ export class PnpmLinkManager extends BaseLinkManager {
3131 protected _linkProjects ( ) : Promise < void > {
3232 try {
3333 const rushLinkJson : IRushLinkJson = {
34- localLinks : { } ,
35- ...( this . _variant ? { variant : this . _variant } : { } )
34+ localLinks : { }
3635 } ;
3736
3837 let promise : Promise < void > = Promise . resolve ( ) ;
You can’t perform that action at this time.
0 commit comments