Skip to content

Commit

Permalink
Upgrade to Rush 5.7.0 and PNPM 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
octogonz committed Apr 23, 2019
1 parent b605812 commit b7e2af1
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 36 deletions.
10 changes: 9 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
*.jpg binary
*.js text eol=crlf
*.json text eol=crlf
*.json linguist-language=JSON-with-Comments
*.less text eol=crlf
*.map text eol=lf
*.md text eol=crlf
Expand All @@ -65,6 +64,15 @@

# Don't allow people to merge changes to these generated files, because the result
# may be invalid. You need to run "rush update" again.
pnpm-lock.yaml merge=binary
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary

# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic
# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor
# may also require a special configuration to allow comments in JSON.
#
# For more information, see this issue: https://github.com/Microsoft/web-build-tools/issues/1088
#
*.json linguist-language=JSON-with-Comments
50 changes: 31 additions & 19 deletions common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
// * The set of projects can be restricted e.g. using the "--to" or "--from" parameters.
// */
// "commandKind": "bulk",
//
//
// /**
// * (Required) The name that will be typed as part of the command line. This is also the name
// * of the "scripts" hook in the project's package.json file.
// * The name should be comprised of lower case words separated by hyphens.
// */
// "name": "my-bulk-command",
//
//
// /**
// * (Required) A short summary of the custom command to be shown when printing command line
// * help, e.g. "rush --help".
// */
// "summary": "Example bulk custom command",
//
//
// /**
// * A detailed description of the command to be shown when printing command line
// * help (e.g. "rush --help my-command").
Expand All @@ -44,33 +44,45 @@
// * documentation can make a big difference for the developer experience in your repo.
// */
// "description": "This is an example custom command that runs separately for each project",
//
//
// /**
// * By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously
// * in the same repo folder. (For example, it would be a mistake to run "rush install" and "rush build" at the
// * same time.) If your command makes sense to run concurrently with other operations,
// * set "safeForSimultaneousRushProcesses" to true to disable this protection.
// *
// * In particular, this is needed for custom scripts that invoke other Rush commands.
// */
// "safeForSimultaneousRushProcesses": false,
//
// /**
// * (Required) If true, then this command is safe to be run in parallel, i.e. executed
// * simultaneously for multiple projects. Similar to "rush build", regardless of parallelism
// * projects will not start processing until their dependencies have completed processing.
// */
// "enableParallelism": false,
//
//
// /**
// * Normally Rush requires that each project's package.json has a "scripts" entry matching
// * the custom command name. To disable this check, set "ignoreMissingScript" to true;
// * projects with a missing definition will be skipped.
// */
// "ignoreMissingScript": false
// },
//
//
// {
// /**
// * (Required) Determines the type of custom command.
// * Rush's "global" commands are invoked once for the entire repo.
// */
// "commandKind": "global",
//
//
// "name": "my-global-command",
// "summary": "Example global custom command",
// "description": "This is an example custom command that runs once for the entire repo",
//
//
// "safeForSimultaneousRushProcesses": false,
//
// /**
// * A script that will be invoked using the OS shell. The working directory will be the folder
// * that contains rush.json. If custom parameters are associated with this command, their
Expand All @@ -91,12 +103,12 @@
// * A "flag" is a custom command-line parameter whose presence acts as an on/off switch.
// */
// "parameterKind": "flag",
//
//
// /**
// * (Required) The long name of the parameter. It must be lower-case and use dash delimiters.
// */
// "longName": "--my-flag",
//
//
// /**
// * An optional alternative short name for the parameter. It must be a dash followed by a single
// * lower-case or upper-case letter, which is case-sensitive.
Expand All @@ -107,22 +119,22 @@
// * a short name if you expect the parameter to be needed very often in everyday operations.
// */
// "shortName": "-m",
//
//
// /**
// * (Required) A long description to be shown in the command-line help.
// *
// * Whenever you introduce commands/parameters, taking a little time to write meaningful
// * documentation can make a big difference for the developer experience in your repo.
// */
// "description": "A custom flag parameter that is passed to the scripts that are invoked when building projects",
//
//
// /**
// * (Required) A list of custom commands and/or built-in Rush commands that this parameter may
// * be used with. The parameter will be appended to the shell command that Rush invokes.
// */
// "associatedCommands": [ "build", "rebuild" ]
// },
//
//
// {
// /**
// * (Required) Determines the type of custom parameter.
Expand All @@ -131,17 +143,17 @@
// "parameterKind": "choice",
// "longName": "--my-choice",
// "description": "A custom choice parameter for the \"my-global-command\" custom command",
//
//
// "associatedCommands": [ "my-global-command" ],
//
//
// /**
// * Normally if a parameter is omitted from the command line, it will not be passed
// * to the shell command. this value will be inserted by default. Whereas if a "defaultValue"
// * is defined, the parameter will always be passed to the shell command, and will use the
// * default value if unspecified. The value must be one of the defined alternatives.
// */
// "defaultValue": "vanilla",
//
//
// /**
// * (Required) A list of alternative argument values that can be chosen for this parameter.
// */
Expand All @@ -152,7 +164,7 @@
// * e.g. "vanilla" in "--flavor vanilla".
// */
// "name": "vanilla",
//
//
// /**
// * A detailed description for the alternative that can be shown in the command-line help.
// *
Expand All @@ -161,12 +173,12 @@
// */
// "description": "Use the vanilla flavor (the default)"
// },
//
//
// {
// "name": "chocolate",
// "description": "Use the chocolate flavor"
// },
//
//
// {
// "name": "strawberry",
// "description": "Use the strawberry flavor"
Expand Down
87 changes: 71 additions & 16 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* path segment in the "$schema" field for all your Rush config files. This will ensure
* correct error-underlining and tab-completion for editors such as VS Code.
*/
"rushVersion": "5.6.1",
"rushVersion": "5.7.0",

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

// "npmVersion": "4.5.0",
// "yarnVersion": "1.9.4",
Expand All @@ -46,7 +46,19 @@
* The default value is false to avoid legacy compatibility issues.
* It is strongly recommended to set strictPeerDependencies=true.
*/
"strictPeerDependencies": true
// "strictPeerDependencies": true,


/**
* Configures the strategy used to select versions during installation.
*
* This feature requires PNPM version 3.1 or newer. It corresponds to the "--resolution-strategy" command-line
* option for PNPM. Possible values are "fast" and "fewer-dependencies". PNPM's default is "fast", but this may
* be incompatible with certain packages, for example the "@types" packages from DefinitelyTyped. Rush's default
* is "fewer-dependencies", which causes PNPM to avoid installing a newer version if an already installed version
* can be reused; this is more similar to NPM's algorithm.
*/
// "resolutionStrategy": "fast"
},

/**
Expand All @@ -61,9 +73,12 @@

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

/**
Expand All @@ -146,8 +161,8 @@
* RegExp escapes need two backspashes, and ordinary periods should be "\\.".
*/
// "allowedEmailRegExps": [
// "[^@]+@users\\.noreply\\.github\\.com",
// "travis@example\\.org"
// "[^@]+@users\\.noreply\\.github\\.com",
// "travis@example\\.org"
// ],
"allowedEmailRegExps": [
"[^@]+@users\\.noreply\\.github\\.com",
Expand All @@ -160,6 +175,15 @@
* expressions.
*/
"sampleEmail": "[email protected]"

/**
* The commit message to use when committing changes during 'rush publish'.
*
* For example, if you want to prevent these commits from triggering a CI build,
* you might configure your system's trigger to look for a special string such as "[skip-ci]"
* in the commit message, and then customize Rush's message to contain that string.
*/
// "versionBumpCommitMessage": "Applying package updates. [skip-ci]"
},

"repository": {
Expand Down Expand Up @@ -208,6 +232,37 @@
"postRushBuild": []
},

/**
* Installation variants allow you to maintain a parallel set of configuration files that can be
* used to build the entire monorepo with an alternate set of dependencies. For example, suppose
* you upgrade all your projects to use a new release of an important framework, but during a transition period
* you intend to maintain compability with the old release. In this situation, you probably want your
* CI validation to build the entire repo twice: once with the old release, and once with the new release.
*
* Rush "installation variants" correspond to sets of config files located under this folder:
*
* common/config/rush/variants/<variant_name>
*
* The variant folder can contain an alternate common-versions.json file. Its "preferredVersions" field can be used
* to select older versions of dependencies (within a loose SemVer range specified in your package.json files).
* To install a variant, run "rush install --variant <variant_name>".
*
* For more details and instructions, see this article: https://rushjs.io/pages/advanced/installation_variants/
*/
"variants": [
// {
// /**
// * The folder name for this variant.
// */
// "variantName": "old-sdk",
//
// /**
// * An informative description
// */
// "description": "Build this repo using the previous release of the SDK"
// }
],

/**
* Rush can collect anonymous telemetry about everyday developer activity such as
* success/failure of installs, builds, and other operations. You can use this to identify
Expand Down Expand Up @@ -237,19 +292,19 @@
// * The NPM package name of the project (must match package.json)
// */
// "packageName": "my-app",
//
//
// /**
// * The path to the project folder, relative to the rush.json config file.
// */
// "projectFolder": "apps/my-app",
//
//
// /**
// * An optional category for usage in the "browser-approved-packages.json"
// * and "nonbrowser-approved-packages.json" files. The value must be one of the
// * strings from the "reviewCategories" defined above.
// */
// "reviewCategory": "production",
//
//
// /**
// * A list of local projects that appear as devDependencies for this project, but cannot be
// * locally linked because it would create a cyclic dependency; instead, the last published
Expand All @@ -258,28 +313,28 @@
// "cyclicDependencyProjects": [
// // "my-toolchain"
// ],
//
//
// /**
// * If true, then this project will be ignored by the "rush check" command.
// * The default value is false.
// */
// // "skipRushCheck": false,
//
//
// /**
// * A flag indicating that changes to this project will be published to npm, which affects
// * the Rush change and publish workflows. The default value is false.
// * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
// */
// // "shouldPublish": false,
//
//
// /**
// * An optional version policy associated with the project. Version policies are defined
// * in "version-policies.json" file. See the "rush publish" documentation for more info.
// * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
// */
// // "versionPolicyName": ""
// },
//
//
// "apps" folder (alphabetical order)
{
"packageName": "@microsoft/api-extractor",
Expand Down

0 comments on commit b7e2af1

Please sign in to comment.