-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to opt-out of offline mirror (#3009)
Configs are merged with configs in parent directories, so currently if a .yarnrc in a parent directory enables the offline mirror, all projects in child directories would also use the offline mirror. This commit allows a child directory to opt-out of the offline mirror in their own .yarnrc with `yarn-offline-mirror false`. Previously if you specified `false` you'd get an exception as false is parsed as boolean but it expects a string. Also included tests verifying the existing .yarnrc merging behaviour (previously wasn't covered). t14078443
- Loading branch information
Showing
11 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
__tests__/fixtures/install/offline-mirror-configuration/.yarnrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yarn-offline-mirror "./offline-mirror" |
1 change: 1 addition & 0 deletions
1
__tests__/fixtures/install/offline-mirror-configuration/disabled-locally/.yarnrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yarn-offline-mirror false |
5 changes: 5 additions & 0 deletions
5
__tests__/fixtures/install/offline-mirror-configuration/disabled-locally/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"mime-types": "2.1.14" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
__tests__/fixtures/install/offline-mirror-configuration/enabled-from-parent-merge/.yarnrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
something else |
5 changes: 5 additions & 0 deletions
5
...ts__/fixtures/install/offline-mirror-configuration/enabled-from-parent-merge/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"mime-types": "2.1.14" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
__tests__/fixtures/install/offline-mirror-configuration/enabled-from-parent/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"mime-types": "2.1.14" | ||
} | ||
} |
Binary file added
BIN
+23.5 KB
__tests__/fixtures/install/offline-mirror-configuration/offline-mirror/mime-db-1.27.0.tgz
Binary file not shown.
Binary file added
BIN
+4.41 KB
__tests__/fixtures/install/offline-mirror-configuration/offline-mirror/mime-types-2.1.15.tgz
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters