Skip to content

Commit a944ec2

Browse files
committed
Upgrade to Rush 5.17.2 using "rush init"
1 parent bf742d9 commit a944ec2

6 files changed

Lines changed: 123 additions & 30 deletions

File tree

common/config/rush/command-line.json

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
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.
28-
// * The name should be comprised of lower case words separated by hyphens.
28+
// * The name should be comprised of lower case words separated by hyphens or colons. The name should include an
29+
// * English verb (e.g. "deploy"). Use a hyphen to separate words (e.g. "upload-docs"). A group of related commands
30+
// * can be prefixed with a colon (e.g. "docs:generate", "docs:deploy", "docs:serve", etc).
2931
// */
3032
// "name": "my-bulk-command",
3133
//
@@ -63,11 +65,41 @@
6365
// "enableParallelism": false,
6466
//
6567
// /**
68+
// * Normally projects will be processed according to their dependency order: a given project will not start
69+
// * processing the command until all of its dependencies have completed. This restriction doesn't apply for
70+
// * certain operations, for example a "clean" task that deletes output files. In this case
71+
// * you can set "ignoreDependencyOrder" to true to increase parallelism.
72+
// */
73+
// "ignoreDependencyOrder": false,
74+
//
75+
// /**
6676
// * Normally Rush requires that each project's package.json has a "scripts" entry matching
6777
// * the custom command name. To disable this check, set "ignoreMissingScript" to true;
6878
// * projects with a missing definition will be skipped.
6979
// */
70-
// "ignoreMissingScript": false
80+
// "ignoreMissingScript": false,
81+
//
82+
// /**
83+
// * When invoking shell scripts, Rush uses a heuristic to distinguish errors from warnings:
84+
// * - If the shell script returns a nonzero process exit code, Rush interprets this as "one or more errors".
85+
// * Error output is displayed in red, and it prevents Rush from attempting to process any downstream projects.
86+
// * - If the shell script returns a zero process exit code but writes something to its stderr stream,
87+
// * Rush interprets this as "one or more warnings". Warning output is printed in yellow, but does NOT prevent
88+
// * Rush from processing downstream projects.
89+
// *
90+
// * Thus, warnings do not interfere with local development, but they will cause a CI job to fail, because
91+
// * the Rush process itself returns a nonzero exit code if there are any warnings or errors. This is by design.
92+
// * In an active monorepo, we've found that if you allow any warnings in your master branch, it inadvertently
93+
// * teaches developers to ignore warnings, which quickly leads to a situation where so many "expected" warnings
94+
// * have accumulated that warnings no longer serve any useful purpose.
95+
// *
96+
// * Sometimes a poorly behaved task will write output to stderr even though its operation was successful.
97+
// * In that case, it's strongly recommended to fix the task. However, as a workaround you can set
98+
// * allowWarningsInSuccessfulBuild=true, which causes Rush to return a nonzero exit code for errors only.
99+
// *
100+
// * Note: The default value is false. In Rush 5.7.x and earlier, the default value was true.
101+
// */
102+
// "allowWarningsInSuccessfulBuild": false
71103
// },
72104
//
73105
// {

common/config/rush/common-versions.json

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@
66
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/common-versions.schema.json",
77

88
/**
9-
* A table that specifies a "preferred version" for a dependency package. The "preferred version"
10-
* is typically used to hold an indirect dependency back to a specific version, however generally
11-
* it can be any SemVer range specifier (e.g. "~1.2.3"), and it will narrow any (compatible)
12-
* SemVer range specifier. See the Rush documentation for details about this feature.
9+
* A table that specifies a "preferred version" for a given NPM package. This feature is typically used
10+
* to hold back an indirect dependency to a specific older version, or to reduce duplication of indirect dependencies.
11+
*
12+
* The "preferredVersions" value can be any SemVer range specifier (e.g. "~1.2.3"). Rush injects these values into
13+
* the "dependencies" field of the top-level common/temp/package.json, which influences how the package manager
14+
* will calculate versions. The specific effect depends on your package manager. Generally it will have no
15+
* effect on an incompatible or already constrained SemVer range. If you are using PNPM, similar effects can be
16+
* achieved using the pnpmfile.js hook. See the Rush documentation for more details.
17+
*
18+
* After modifying this field, it's recommended to run "rush update --full" so that the package manager
19+
* will recalculate all version selections.
1320
*/
1421
"preferredVersions": {
1522

@@ -30,6 +37,20 @@
3037
"@types/webpack": "4.39.8"
3138
},
3239

40+
/**
41+
* When set to true, for all projects in the repo, all dependencies will be automatically added as preferredVersions,
42+
* except in cases where different projects specify different version ranges for a given dependency. For older
43+
* package managers, this tended to reduce duplication of indirect dependencies. However, it can sometimes cause
44+
* trouble for indirect dependencies with incompatible peerDependencies ranges.
45+
*
46+
* The default value is true. If you're encountering installation errors related to peer dependencies,
47+
* it's recommended to set this to false.
48+
*
49+
* After modifying this field, it's recommended to run "rush update --full" so that the package manager
50+
* will recalculate all version selections.
51+
*/
52+
// "implicitlyPreferredVersions": false,
53+
3354
/**
3455
* The "rush check" command can be used to enforce that every project in the repo must specify
3556
* the same SemVer range for a given dependency. However, sometimes exceptions are needed.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* This configuration file allows repo maintainers to enable and disable experimental
3+
* Rush features. For full documentation, please see https://rushjs.io
4+
*/
5+
{
6+
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/experiments.schema.json",
7+
8+
/**
9+
* Rush 5.14.0 improved incremental builds to ignore spurious changes in the pnpm-lock.json file.
10+
* This optimization is enabled by default. If you encounter a problem where "rush build" is neglecting
11+
* to build some projects, please open a GitHub issue. As a workaround you can uncomment this line
12+
* to temporarily restore the old behavior where everything must be rebuilt whenever pnpm-lock.json
13+
* is modified.
14+
*/
15+
// "legacyIncrementalBuildDependencyDetection": true
16+
}

common/config/rush/pnpmfile.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
* For details, see the PNPM documentation:
99
* https://pnpm.js.org/docs/en/hooks.html
1010
*
11-
* IMPORTANT: SINCE THIS FILE CONTAINS EXECUTABLE CODE, MODIFYING IT IS LIKELY
12-
* TO INVALIDATE ANY CACHED DEPENDENCY ANALYSIS. We recommend to run "rush update --full"
13-
* after any modification to pnpmfile.js.
14-
*
11+
* IMPORTANT: SINCE THIS FILE CONTAINS EXECUTABLE CODE, MODIFYING IT IS LIKELY TO INVALIDATE
12+
* ANY CACHED DEPENDENCY ANALYSIS. After any modification to pnpmfile.js, it's recommended to run
13+
* "rush update --full" so that PNPM will recalculate all version selections.
1514
*/
1615
module.exports = {
1716
hooks: {

common/config/rush/version-policies.json

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@
2020
// * SemVer range is usually restricted to a single version.
2121
// */
2222
// "definitionName": "lockStepVersion",
23-
//
23+
//
2424
// /**
2525
// * (Required) The name that will be used for the "versionPolicyName" field in rush.json.
2626
// * This name is also used command-line parameters such as "--version-policy"
2727
// * and "--to-version-policy".
2828
// */
2929
// "policyName": "MyBigFramework",
30-
//
30+
//
3131
// /**
3232
// * (Required) The current version. All packages belonging to the set should have this version
3333
// * in the current branch. When bumping versions, Rush uses this to determine the next version.
3434
// * (The "version" field in package.json is NOT considered.)
3535
// */
3636
// "version": "1.0.0",
37-
//
37+
//
3838
// /**
3939
// * (Required) The type of bump that will be performed when publishing the next release.
4040
// * When creating a release branch in Git, this field should be updated according to the
@@ -43,7 +43,7 @@
4343
// * Valid values are: "prerelease", "release", "minor", "patch", "major"
4444
// */
4545
// "nextBump": "prerelease",
46-
//
46+
//
4747
// /**
4848
// * (Optional) If specified, all packages in the set share a common CHANGELOG.md file.
4949
// * This file is stored with the specified "main" project, which must be a member of the set.
@@ -53,7 +53,7 @@
5353
// */
5454
// "mainProject": "my-app"
5555
// },
56-
//
56+
//
5757
// {
5858
// /**
5959
// * (Required) Indicates the kind of version policy being defined ("lockStepVersion" or "individualVersion").
@@ -66,17 +66,26 @@
6666
// * is changed.
6767
// */
6868
// "definitionName": "individualVersion",
69-
//
69+
//
7070
// "policyName": "MyRandomLibraries",
71-
//
71+
//
7272
// /**
7373
// * (Optional) This can be used to enforce that all packages in the set must share a common
7474
// * major version number, e.g. because they are from the same major release branch.
7575
// * It can also be used to discourage people from accidentally making "MAJOR" SemVer changes
7676
// * inappropriately. The minor/patch version parts will be bumped independently according
7777
// * to the types of changes made to each project, according to the "rush change" command.
7878
// */
79-
// "lockedMajor": 3
79+
// "lockedMajor": 3,
80+
//
81+
// /**
82+
// * (Optional) When publishing is managed by Rush, by default the "rush change" command will
83+
// * request changes for any projects that are modified by a pull request. These change entries
84+
// * will produce a CHANGELOG.md file. If you author your CHANGELOG.md manually or announce updates
85+
// * in some other way, set "exemptFromRushChange" to true to tell "rush change" to ignore the projects
86+
// * belonging to this version policy.
87+
// */
88+
// "exemptFromRushChange": false
8089
// }
8190
{
8291
"policyName": "rush",

rush.json

Lines changed: 28 additions & 12 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.16.0",
19+
"rushVersion": "5.17.2",
2020

2121
/**
2222
* The next field selects which package manager should be installed and determines its version.
@@ -57,20 +57,36 @@
5757
* be incompatible with certain packages, for example the "@types" packages from DefinitelyTyped. Rush's default
5858
* is "fewer-dependencies", which causes PNPM to avoid installing a newer version if an already installed version
5959
* can be reused; this is more similar to NPM's algorithm.
60+
*
61+
* After modifying this field, it's recommended to run "rush update --full" so that the package manager
62+
* will recalculate all version selections.
6063
*/
6164
// "resolutionStrategy": "fast"
6265
},
6366

6467
/**
65-
* Older releases of the NodeJS engine may be missing features required by your system.
68+
* Older releases of the Node.js engine may be missing features required by your system.
6669
* Other releases may have bugs. In particular, the "latest" version will not be a
6770
* Long Term Support (LTS) version and is likely to have regressions.
6871
*
69-
* Specify a SemVer range to ensure developers use a NodeJS version that is appropriate
72+
* Specify a SemVer range to ensure developers use a Node.js version that is appropriate
7073
* for your repo.
7174
*/
7275
"nodeSupportedVersionRange": ">=8.9.4 <9.0.0 || >=10.13.0 <11.0.0 || >=12.0.0 <13.0.0",
7376

77+
/**
78+
* Odd-numbered major versions of Node.js are experimental. Even-numbered releases
79+
* spend six months in a stabilization period before the first Long Term Support (LTS) version.
80+
* For example, 8.9.0 was the first LTS version of Node.js 8. Pre-LTS versions are not recommended
81+
* for production usage because they frequently have bugs. They may cause Rush itself
82+
* to malfunction.
83+
*
84+
* Rush normally prints a warning if it detects a pre-LTS Node.js version. If you are testing
85+
* pre-LTS versions in preparation for supporting the first LTS version, you can use this setting
86+
* to disable Rush's warning.
87+
*/
88+
// "suppressNodeLtsWarning": false,
89+
7490
/**
7591
* If you would like the version specifiers for your dependencies to be consistent, then
7692
* uncomment this line. This is effectively similar to running "rush check" before any
@@ -100,7 +116,7 @@
100116
* occasionally, but if that's painful, it's a warning sign that your development style may
101117
* discourage refactoring. Reorganizing the categories should be an enlightening discussion
102118
* that brings people together, and maybe also identifies poor coding practices (e.g. file
103-
* references that reach into other project's folders without using NodeJS module resolution).
119+
* references that reach into other project's folders without using Node.js module resolution).
104120
*
105121
* The defaults are projectFolderMinDepth=1 and projectFolderMaxDepth=2.
106122
*
@@ -255,7 +271,7 @@
255271
// * The folder name for this variant.
256272
// */
257273
// "variantName": "old-sdk",
258-
//
274+
//
259275
// /**
260276
// * An informative description
261277
// */
@@ -294,19 +310,19 @@
294310
// * The NPM package name of the project (must match package.json)
295311
// */
296312
// "packageName": "my-app",
297-
//
313+
//
298314
// /**
299315
// * The path to the project folder, relative to the rush.json config file.
300316
// */
301317
// "projectFolder": "apps/my-app",
302-
//
318+
//
303319
// /**
304320
// * An optional category for usage in the "browser-approved-packages.json"
305321
// * and "nonbrowser-approved-packages.json" files. The value must be one of the
306322
// * strings from the "reviewCategories" defined above.
307323
// */
308324
// "reviewCategory": "production",
309-
//
325+
//
310326
// /**
311327
// * A list of local projects that appear as devDependencies for this project, but cannot be
312328
// * locally linked because it would create a cyclic dependency; instead, the last published
@@ -315,28 +331,28 @@
315331
// "cyclicDependencyProjects": [
316332
// // "my-toolchain"
317333
// ],
318-
//
334+
//
319335
// /**
320336
// * If true, then this project will be ignored by the "rush check" command.
321337
// * The default value is false.
322338
// */
323339
// // "skipRushCheck": false,
324-
//
340+
//
325341
// /**
326342
// * A flag indicating that changes to this project will be published to npm, which affects
327343
// * the Rush change and publish workflows. The default value is false.
328344
// * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
329345
// */
330346
// // "shouldPublish": false,
331-
//
347+
//
332348
// /**
333349
// * An optional version policy associated with the project. Version policies are defined
334350
// * in "version-policies.json" file. See the "rush publish" documentation for more info.
335351
// * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
336352
// */
337353
// // "versionPolicyName": ""
338354
// },
339-
//
355+
//
340356
// "apps" folder (alphabetical order)
341357
{
342358
"packageName": "@microsoft/api-extractor",

0 commit comments

Comments
 (0)