Skip to content

Commit b7e2af1

Browse files
committed
Upgrade to Rush 5.7.0 and PNPM 3.1.1
1 parent b605812 commit b7e2af1

3 files changed

Lines changed: 111 additions & 36 deletions

File tree

.gitattributes

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
*.jpg binary
4040
*.js text eol=crlf
4141
*.json text eol=crlf
42-
*.json linguist-language=JSON-with-Comments
4342
*.less text eol=crlf
4443
*.map text eol=lf
4544
*.md text eol=crlf
@@ -65,6 +64,15 @@
6564

6665
# Don't allow people to merge changes to these generated files, because the result
6766
# may be invalid. You need to run "rush update" again.
67+
pnpm-lock.yaml merge=binary
6868
shrinkwrap.yaml merge=binary
6969
npm-shrinkwrap.json merge=binary
7070
yarn.lock merge=binary
71+
72+
# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic
73+
# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor
74+
# may also require a special configuration to allow comments in JSON.
75+
#
76+
# For more information, see this issue: https://github.com/Microsoft/web-build-tools/issues/1088
77+
#
78+
*.json linguist-language=JSON-with-Comments

common/config/rush/command-line.json

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@
2121
// * The set of projects can be restricted e.g. using the "--to" or "--from" parameters.
2222
// */
2323
// "commandKind": "bulk",
24-
//
24+
//
2525
// /**
2626
// * (Required) The name that will be typed as part of the command line. This is also the name
2727
// * of the "scripts" hook in the project's package.json file.
2828
// * The name should be comprised of lower case words separated by hyphens.
2929
// */
3030
// "name": "my-bulk-command",
31-
//
31+
//
3232
// /**
3333
// * (Required) A short summary of the custom command to be shown when printing command line
3434
// * help, e.g. "rush --help".
3535
// */
3636
// "summary": "Example bulk custom command",
37-
//
37+
//
3838
// /**
3939
// * A detailed description of the command to be shown when printing command line
4040
// * help (e.g. "rush --help my-command").
@@ -44,33 +44,45 @@
4444
// * documentation can make a big difference for the developer experience in your repo.
4545
// */
4646
// "description": "This is an example custom command that runs separately for each project",
47-
//
47+
//
48+
// /**
49+
// * By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously
50+
// * in the same repo folder. (For example, it would be a mistake to run "rush install" and "rush build" at the
51+
// * same time.) If your command makes sense to run concurrently with other operations,
52+
// * set "safeForSimultaneousRushProcesses" to true to disable this protection.
53+
// *
54+
// * In particular, this is needed for custom scripts that invoke other Rush commands.
55+
// */
56+
// "safeForSimultaneousRushProcesses": false,
57+
//
4858
// /**
4959
// * (Required) If true, then this command is safe to be run in parallel, i.e. executed
5060
// * simultaneously for multiple projects. Similar to "rush build", regardless of parallelism
5161
// * projects will not start processing until their dependencies have completed processing.
5262
// */
5363
// "enableParallelism": false,
54-
//
64+
//
5565
// /**
5666
// * Normally Rush requires that each project's package.json has a "scripts" entry matching
5767
// * the custom command name. To disable this check, set "ignoreMissingScript" to true;
5868
// * projects with a missing definition will be skipped.
5969
// */
6070
// "ignoreMissingScript": false
6171
// },
62-
//
72+
//
6373
// {
6474
// /**
6575
// * (Required) Determines the type of custom command.
6676
// * Rush's "global" commands are invoked once for the entire repo.
6777
// */
6878
// "commandKind": "global",
69-
//
79+
//
7080
// "name": "my-global-command",
7181
// "summary": "Example global custom command",
7282
// "description": "This is an example custom command that runs once for the entire repo",
73-
//
83+
//
84+
// "safeForSimultaneousRushProcesses": false,
85+
//
7486
// /**
7587
// * A script that will be invoked using the OS shell. The working directory will be the folder
7688
// * that contains rush.json. If custom parameters are associated with this command, their
@@ -91,12 +103,12 @@
91103
// * A "flag" is a custom command-line parameter whose presence acts as an on/off switch.
92104
// */
93105
// "parameterKind": "flag",
94-
//
106+
//
95107
// /**
96108
// * (Required) The long name of the parameter. It must be lower-case and use dash delimiters.
97109
// */
98110
// "longName": "--my-flag",
99-
//
111+
//
100112
// /**
101113
// * An optional alternative short name for the parameter. It must be a dash followed by a single
102114
// * lower-case or upper-case letter, which is case-sensitive.
@@ -107,22 +119,22 @@
107119
// * a short name if you expect the parameter to be needed very often in everyday operations.
108120
// */
109121
// "shortName": "-m",
110-
//
122+
//
111123
// /**
112124
// * (Required) A long description to be shown in the command-line help.
113125
// *
114126
// * Whenever you introduce commands/parameters, taking a little time to write meaningful
115127
// * documentation can make a big difference for the developer experience in your repo.
116128
// */
117129
// "description": "A custom flag parameter that is passed to the scripts that are invoked when building projects",
118-
//
130+
//
119131
// /**
120132
// * (Required) A list of custom commands and/or built-in Rush commands that this parameter may
121133
// * be used with. The parameter will be appended to the shell command that Rush invokes.
122134
// */
123135
// "associatedCommands": [ "build", "rebuild" ]
124136
// },
125-
//
137+
//
126138
// {
127139
// /**
128140
// * (Required) Determines the type of custom parameter.
@@ -131,17 +143,17 @@
131143
// "parameterKind": "choice",
132144
// "longName": "--my-choice",
133145
// "description": "A custom choice parameter for the \"my-global-command\" custom command",
134-
//
146+
//
135147
// "associatedCommands": [ "my-global-command" ],
136-
//
148+
//
137149
// /**
138150
// * Normally if a parameter is omitted from the command line, it will not be passed
139151
// * to the shell command. this value will be inserted by default. Whereas if a "defaultValue"
140152
// * is defined, the parameter will always be passed to the shell command, and will use the
141153
// * default value if unspecified. The value must be one of the defined alternatives.
142154
// */
143155
// "defaultValue": "vanilla",
144-
//
156+
//
145157
// /**
146158
// * (Required) A list of alternative argument values that can be chosen for this parameter.
147159
// */
@@ -152,7 +164,7 @@
152164
// * e.g. "vanilla" in "--flavor vanilla".
153165
// */
154166
// "name": "vanilla",
155-
//
167+
//
156168
// /**
157169
// * A detailed description for the alternative that can be shown in the command-line help.
158170
// *
@@ -161,12 +173,12 @@
161173
// */
162174
// "description": "Use the vanilla flavor (the default)"
163175
// },
164-
//
176+
//
165177
// {
166178
// "name": "chocolate",
167179
// "description": "Use the chocolate flavor"
168180
// },
169-
//
181+
//
170182
// {
171183
// "name": "strawberry",
172184
// "description": "Use the strawberry flavor"

rush.json

Lines changed: 71 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* path segment in the "$schema" field for all your Rush config files. This will ensure
1717
* correct error-underlining and tab-completion for editors such as VS Code.
1818
*/
19-
"rushVersion": "5.6.1",
19+
"rushVersion": "5.7.0",
2020

2121
/**
2222
* The next field selects which package manager should be installed and determines its version.
@@ -26,7 +26,7 @@
2626
* Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation
2727
* for details about these alternatives.
2828
*/
29-
"pnpmVersion": "2.25.7",
29+
"pnpmVersion": "3.1.1",
3030

3131
// "npmVersion": "4.5.0",
3232
// "yarnVersion": "1.9.4",
@@ -46,7 +46,19 @@
4646
* The default value is false to avoid legacy compatibility issues.
4747
* It is strongly recommended to set strictPeerDependencies=true.
4848
*/
49-
"strictPeerDependencies": true
49+
// "strictPeerDependencies": true,
50+
51+
52+
/**
53+
* Configures the strategy used to select versions during installation.
54+
*
55+
* This feature requires PNPM version 3.1 or newer. It corresponds to the "--resolution-strategy" command-line
56+
* option for PNPM. Possible values are "fast" and "fewer-dependencies". PNPM's default is "fast", but this may
57+
* be incompatible with certain packages, for example the "@types" packages from DefinitelyTyped. Rush's default
58+
* is "fewer-dependencies", which causes PNPM to avoid installing a newer version if an already installed version
59+
* can be reused; this is more similar to NPM's algorithm.
60+
*/
61+
// "resolutionStrategy": "fast"
5062
},
5163

5264
/**
@@ -61,9 +73,12 @@
6173

6274
/**
6375
* If you would like the version specifiers for your dependencies to be consistent, then
64-
* uncomment this line. Note this is effectively like running "rush check" before the following:
76+
* uncomment this line. This is effectively similar to running "rush check" before any
77+
* of the following commands:
78+
*
6579
* rush install, rush update, rush link, rush version, rush publish
66-
* In some cases you may want this turned on, but need to allow some packages to use a different
80+
*
81+
* In some cases you may want this turned on, but need to allow certain packages to use a different
6782
* version. In those cases, you will need to add an entry to the "allowedAlternativeVersions"
6883
* section of the common-versions.json.
6984
*/
@@ -87,7 +102,7 @@
87102
* that brings people together, and maybe also identifies poor coding practices (e.g. file
88103
* references that reach into other project's folders without using NodeJS module resolution).
89104
*
90-
* The defaults are projectFolderMinDepth=2 and projectFolderMaxDepth=2.
105+
* The defaults are projectFolderMinDepth=1 and projectFolderMaxDepth=2.
91106
*
92107
* To remove these restrictions, you could set projectFolderMinDepth=1
93108
* and set projectFolderMaxDepth to a large number.
@@ -126,7 +141,7 @@
126141
* if the underlying package was already approved, this would imply that the typings
127142
* are also approved.
128143
*/
129-
"ignoredNpmScopes": [ "@types" ]
144+
"ignoredNpmScopes": [ "@types" ]
130145
},
131146

132147
/**
@@ -146,8 +161,8 @@
146161
* RegExp escapes need two backspashes, and ordinary periods should be "\\.".
147162
*/
148163
// "allowedEmailRegExps": [
149-
// "[^@]+@users\\.noreply\\.github\\.com",
150-
// "travis@example\\.org"
164+
// "[^@]+@users\\.noreply\\.github\\.com",
165+
// "travis@example\\.org"
151166
// ],
152167
"allowedEmailRegExps": [
153168
"[^@]+@users\\.noreply\\.github\\.com",
@@ -160,6 +175,15 @@
160175
* expressions.
161176
*/
162177
"sampleEmail": "mrexample@users.noreply.github.com"
178+
179+
/**
180+
* The commit message to use when committing changes during 'rush publish'.
181+
*
182+
* For example, if you want to prevent these commits from triggering a CI build,
183+
* you might configure your system's trigger to look for a special string such as "[skip-ci]"
184+
* in the commit message, and then customize Rush's message to contain that string.
185+
*/
186+
// "versionBumpCommitMessage": "Applying package updates. [skip-ci]"
163187
},
164188

165189
"repository": {
@@ -208,6 +232,37 @@
208232
"postRushBuild": []
209233
},
210234

235+
/**
236+
* Installation variants allow you to maintain a parallel set of configuration files that can be
237+
* used to build the entire monorepo with an alternate set of dependencies. For example, suppose
238+
* you upgrade all your projects to use a new release of an important framework, but during a transition period
239+
* you intend to maintain compability with the old release. In this situation, you probably want your
240+
* CI validation to build the entire repo twice: once with the old release, and once with the new release.
241+
*
242+
* Rush "installation variants" correspond to sets of config files located under this folder:
243+
*
244+
* common/config/rush/variants/<variant_name>
245+
*
246+
* The variant folder can contain an alternate common-versions.json file. Its "preferredVersions" field can be used
247+
* to select older versions of dependencies (within a loose SemVer range specified in your package.json files).
248+
* To install a variant, run "rush install --variant <variant_name>".
249+
*
250+
* For more details and instructions, see this article: https://rushjs.io/pages/advanced/installation_variants/
251+
*/
252+
"variants": [
253+
// {
254+
// /**
255+
// * The folder name for this variant.
256+
// */
257+
// "variantName": "old-sdk",
258+
//
259+
// /**
260+
// * An informative description
261+
// */
262+
// "description": "Build this repo using the previous release of the SDK"
263+
// }
264+
],
265+
211266
/**
212267
* Rush can collect anonymous telemetry about everyday developer activity such as
213268
* success/failure of installs, builds, and other operations. You can use this to identify
@@ -237,19 +292,19 @@
237292
// * The NPM package name of the project (must match package.json)
238293
// */
239294
// "packageName": "my-app",
240-
//
295+
//
241296
// /**
242297
// * The path to the project folder, relative to the rush.json config file.
243298
// */
244299
// "projectFolder": "apps/my-app",
245-
//
300+
//
246301
// /**
247302
// * An optional category for usage in the "browser-approved-packages.json"
248303
// * and "nonbrowser-approved-packages.json" files. The value must be one of the
249304
// * strings from the "reviewCategories" defined above.
250305
// */
251306
// "reviewCategory": "production",
252-
//
307+
//
253308
// /**
254309
// * A list of local projects that appear as devDependencies for this project, but cannot be
255310
// * locally linked because it would create a cyclic dependency; instead, the last published
@@ -258,28 +313,28 @@
258313
// "cyclicDependencyProjects": [
259314
// // "my-toolchain"
260315
// ],
261-
//
316+
//
262317
// /**
263318
// * If true, then this project will be ignored by the "rush check" command.
264319
// * The default value is false.
265320
// */
266321
// // "skipRushCheck": false,
267-
//
322+
//
268323
// /**
269324
// * A flag indicating that changes to this project will be published to npm, which affects
270325
// * the Rush change and publish workflows. The default value is false.
271326
// * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
272327
// */
273328
// // "shouldPublish": false,
274-
//
329+
//
275330
// /**
276331
// * An optional version policy associated with the project. Version policies are defined
277332
// * in "version-policies.json" file. See the "rush publish" documentation for more info.
278333
// * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
279334
// */
280335
// // "versionPolicyName": ""
281336
// },
282-
//
337+
//
283338
// "apps" folder (alphabetical order)
284339
{
285340
"packageName": "@microsoft/api-extractor",

0 commit comments

Comments
 (0)