Skip to content

Commit

Permalink
refactor(config): Remove rootModuleFolders variable which was not used (
Browse files Browse the repository at this point in the history
#6846)

* refactor(config): Remove rootModuleFolders variable which was not used anywhere.

* update changelog for PR #6846
  • Loading branch information
rally25rs authored and arcanis committed Feb 28, 2019
1 parent 9fae32c commit 9eedb65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa

## Master

- Removes `rootModuleFolders` (internal variable which wasn't used anywhere)

[#6846](https://github.com/yarnpkg/yarn/pull/6846) - [**Jeff Valore**](https://twitter.com/codingwithspike)

- Allows `global-folder` to be set in `.yarnrc` files

[#7056](https://github.com/yarnpkg/yarn/pull/7056) - [**Hsiao-nan Cheung**](https://github.com/niheaven)
Expand Down
1 change: 0 additions & 1 deletion src/cli/commands/config.js
Expand Up @@ -7,7 +7,6 @@ import buildSubCommands from './_build-sub-commands.js';

const CONFIG_KEYS = [
// 'reporter',
'rootModuleFolders',
'registryFolders',
'linkedModules',
// 'registries',
Expand Down
12 changes: 0 additions & 12 deletions src/config.js
Expand Up @@ -127,9 +127,6 @@ export default class Config {
//
linkedModules: Array<string>;

//
rootModuleFolders: Array<string>;

//
linkFolder: string;

Expand Down Expand Up @@ -317,10 +314,6 @@ export default class Config {
if (this.registryFolders.indexOf(registry.folder) === -1) {
this.registryFolders.push(registry.folder);
}
const rootModuleFolder = path.join(this.cwd, registry.folder);
if (this.rootModuleFolders.indexOf(rootModuleFolder) === -1) {
this.rootModuleFolders.push(rootModuleFolder);
}
}

if (this.modulesFolder) {
Expand Down Expand Up @@ -458,7 +451,6 @@ export default class Config {
}

_init(opts: ConfigOptions) {
this.rootModuleFolders = [];
this.registryFolders = [];
this.linkedModules = [];

Expand Down Expand Up @@ -499,10 +491,6 @@ export default class Config {
captureHar: !!opts.captureHar,
});

if (this.modulesFolder) {
this.rootModuleFolders.push(this.modulesFolder);
}

this.focus = !!opts.focus;
this.focusedWorkspaceName = '';

Expand Down

0 comments on commit 9eedb65

Please sign in to comment.