forked from microsoft/rushstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common-versions.json
95 lines (83 loc) · 4.37 KB
/
common-versions.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/**
* This configuration file specifies NPM dependency version selections that affect all projects
* in a Rush repo. More documentation is available on the Rush website: https://rushjs.io
*/
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/common-versions.schema.json",
/**
* A table that specifies a "preferred version" for a given NPM package. This feature is typically used
* to hold back an indirect dependency to a specific older version, or to reduce duplication of indirect dependencies.
*
* The "preferredVersions" value can be any SemVer range specifier (e.g. "~1.2.3"). Rush injects these values into
* the "dependencies" field of the top-level common/temp/package.json, which influences how the package manager
* will calculate versions. The specific effect depends on your package manager. Generally it will have no
* effect on an incompatible or already constrained SemVer range. If you are using PNPM, similar effects can be
* achieved using the pnpmfile.js hook. See the Rush documentation for more details.
*
* After modifying this field, it's recommended to run "rush update --full" so that the package manager
* will recalculate all version selections.
*/
"preferredVersions": {
/**
* When someone asks for "^1.0.0" make sure they get "1.2.3" when working in this repo,
* instead of the latest version.
*/
// "some-library": "1.2.3"
// From the allowedAlternativeVersions list below, this should be the TypeScript version that's used to
// build most of the projects in the repo. Preferring it avoids errors for indirect dependencies
// that request it as a peer dependency.
"typescript": "~4.4.2",
// Workaround for https://github.com/microsoft/rushstack/issues/1466
"eslint": "~8.1.0"
},
/**
* When set to true, for all projects in the repo, all dependencies will be automatically added as preferredVersions,
* except in cases where different projects specify different version ranges for a given dependency. For older
* package managers, this tended to reduce duplication of indirect dependencies. However, it can sometimes cause
* trouble for indirect dependencies with incompatible peerDependencies ranges.
*
* The default value is true. If you're encountering installation errors related to peer dependencies,
* it's recommended to set this to false.
*
* After modifying this field, it's recommended to run "rush update --full" so that the package manager
* will recalculate all version selections.
*/
// "implicitlyPreferredVersions": false,
/**
* The "rush check" command can be used to enforce that every project in the repo must specify
* the same SemVer range for a given dependency. However, sometimes exceptions are needed.
* The allowedAlternativeVersions table allows you to list other SemVer ranges that will be
* accepted by "rush check" for a given dependency.
*
* IMPORTANT: THIS TABLE IS FOR *ADDITIONAL* VERSION RANGES THAT ARE ALTERNATIVES TO THE
* USUAL VERSION (WHICH IS INFERRED BY LOOKING AT ALL PROJECTS IN THE REPO).
* This design avoids unnecessary churn in this file.
*/
"allowedAlternativeVersions": {
/**
* For example, allow some projects to use an older TypeScript compiler
* (in addition to whatever "usual" version is being used by other projects in the repo):
*/
"typescript": [
// "~4.4.2" is the (inferred, not alternative) range used by most projects in this repo
// The oldest supported compiler, used by build-tests/api-extractor-lib1-test
"~2.9.2",
// The newest supported compiler, used by most build tests and used as the bundled compiler
// engine for API Extractor.
"~4.4.2"
],
"source-map": [
"~0.6.1" // API Extractor is using an older version of source-map because newer versions are async
],
"webpack": ["~5.35.1"],
// Use two different versions of @types/webpack-dev-server to allow pnpmfile.js to bring in
// two different versions of the webpack typings
"@types/webpack-dev-server": ["3.11.2"],
"webpack-dev-server": [
"~3.11.0" // heft-plugins/heft-webpack4-plugin is using an older version of webpack-dev-server for compatibility
],
"html-webpack-plugin": [
"~4.5.0" // Some test projects are still on Webpack 4 because some of our plugins don't support Webpack 5 yet
]
}
}