chore(*): update minimum Yarn version, do some Yarn-related cleanups
Included changes: *Update minimum Yarn version from 1.3.2 to 1.10.1* Yarn 1.10 added the integrity field to the lockfile, making newer Yarn users have their lockfile changed a lot if they run `yarn`. This commit updates the required Yarn version to be at least 1.10.1 and changes Travis & Jenkins to use Yarn 1.10.1 *Change the package.json's engines grunt field to grunt-cli* The grunt field suggested it's the grunt package version we're checking while we check the grunt-cli version instead. *Stop separating Yarn script arguments from script names via " -- "* The " -- " separator is necessary in npm but not in Yarn. In fact, it's deprecated in Yarn and some future version is supposed to start passing this parameter directly to the scripts which may break them. *Don't install grunt-cli globally during the build* It's enough to use `yarn grunt` instead of `grunt` and the global grunt-cli installation is no longer needed. *Use `yarn grunt` instead of `yarn run grunt`* The former form is shorter. *Don't define the `grunt` Yarn script* As opposed to npm, `yarn binName` invokes a binary named `binName` exposed by the respective package so the `grant` Yarn script is no longer needed. *Allow Node versions newer than 8; bump the minimum* Closes #16714
This commit is contained in:
committed by
GitHub
parent
bb5a7e39ba
commit
0a5e58dacb
+1
-1
@@ -26,7 +26,7 @@ env:
|
||||
- secure: oTBjhnOKhs0qDSKTf7fE4f6DYiNDPycvB7qfSF5QRIbJK/LK/J4UtFwetXuXj79HhUZG9qnoT+5e7lPaiaMlpsIKn9ann7ffqFWN1E8TMtpJF+AGigx3djYElwfgf5nEnFUFhwjFzvbfpZNnxVGgX5YbIZpe/WUbHkP4ffU0Wks=
|
||||
|
||||
before_install:
|
||||
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
|
||||
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.10.1
|
||||
- export PATH="$HOME/.yarn/bin:$PATH"
|
||||
|
||||
before_script:
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ if (!semver.satisfies(currentYarnVersion, expectedYarnVersion)) {
|
||||
}
|
||||
|
||||
// Grunt CLI version checks
|
||||
var expectedGruntVersion = pkg.engines.grunt;
|
||||
var expectedGruntVersion = pkg.engines['grunt-cli'];
|
||||
var currentGruntVersions = exec('grunt --version', {silent: true}).stdout;
|
||||
var match = /^grunt-cli v(.+)$/m.exec(currentGruntVersions);
|
||||
if (!match) {
|
||||
|
||||
+4
-5
@@ -9,15 +9,14 @@
|
||||
"url": "https://github.com/angular/angular.js.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^8.9.1",
|
||||
"yarn": ">=1.3.2",
|
||||
"grunt": "^1.2.0"
|
||||
"node": ">=8.12.0",
|
||||
"yarn": ">=1.10.1",
|
||||
"grunt-cli": "^1.2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"commit": "git-cz",
|
||||
"test-i18n": "jasmine-node i18n/spec",
|
||||
"test-i18n-ucd": "jasmine-node i18n/ucd/spec",
|
||||
"grunt": "grunt"
|
||||
"test-i18n-ucd": "jasmine-node i18n/ucd/spec"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-benchpress": "0.x.x",
|
||||
|
||||
@@ -21,21 +21,21 @@ rm -f angular.js.size
|
||||
|
||||
|
||||
# BUILD #
|
||||
yarn run grunt -- ci-checks package --no-color
|
||||
yarn grunt ci-checks package --no-color
|
||||
|
||||
mkdir -p test_out
|
||||
|
||||
# UNIT TESTS #
|
||||
yarn run grunt -- test:unit --browsers="$BROWSERS" --reporters=dots,junit --no-colors --no-color
|
||||
yarn grunt test:unit --browsers="$BROWSERS" --reporters=dots,junit --no-colors --no-color
|
||||
|
||||
# END TO END TESTS #
|
||||
yarn run grunt -- test:ci-protractor
|
||||
yarn grunt test:ci-protractor
|
||||
|
||||
# DOCS APP TESTS #
|
||||
yarn run grunt -- test:docs --browsers="$BROWSERS" --reporters=dots,junit --no-colors --no-color
|
||||
yarn grunt test:docs --browsers="$BROWSERS" --reporters=dots,junit --no-colors --no-color
|
||||
|
||||
# Promises/A+ TESTS #
|
||||
yarn run grunt -- test:promises-aplus --no-color
|
||||
yarn grunt test:promises-aplus --no-color
|
||||
|
||||
|
||||
# CHECK SIZE #
|
||||
|
||||
@@ -8,11 +8,11 @@ nvm install
|
||||
|
||||
# clean out and install yarn
|
||||
rm -rf ~/.yarn
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.10.1
|
||||
export PATH="$HOME/.yarn/bin:$PATH"
|
||||
|
||||
# Ensure that we have the local dependencies installed
|
||||
yarn install
|
||||
|
||||
echo testing grunt version
|
||||
yarn run grunt -- --version
|
||||
yarn grunt --version
|
||||
|
||||
@@ -37,7 +37,7 @@ function init {
|
||||
function build {
|
||||
cd ../..
|
||||
source scripts/jenkins/init-node.sh
|
||||
yarn run grunt -- ci-checks package --no-color
|
||||
yarn grunt ci-checks package --no-color
|
||||
|
||||
cd $SCRIPT_DIR
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
yarn global add grunt-cli@1.2.0
|
||||
|
||||
mkdir -p "$LOGS_DIR"
|
||||
|
||||
if [ "$JOB" != "ci-checks" ]; then
|
||||
@@ -13,13 +11,13 @@ fi
|
||||
|
||||
# ci-checks and unit tests do not run against the packaged code
|
||||
if [[ "$JOB" != "ci-checks" ]] && [[ "$JOB" != unit-* ]]; then
|
||||
grunt package
|
||||
yarn grunt package
|
||||
fi
|
||||
|
||||
# unit runs the docs tests too which need a built version of the code
|
||||
if [[ "$JOB" = unit-* ]]; then
|
||||
grunt validate-angular-files
|
||||
grunt build
|
||||
yarn grunt validate-angular-files
|
||||
yarn grunt build
|
||||
fi
|
||||
|
||||
# check this after the package, because at this point the browser_provider
|
||||
|
||||
@@ -29,7 +29,7 @@ case "$JOB" in
|
||||
# convert commit range to 2 dots, as commitplease uses `git log`.
|
||||
# See https://github.com/travis-ci/travis-ci/issues/4596 for more info
|
||||
echo "Validate commit messages in PR:"
|
||||
yarn run commitplease -- "${TRAVIS_COMMIT_RANGE/.../..}"
|
||||
yarn run commitplease "${TRAVIS_COMMIT_RANGE/.../..}"
|
||||
fi
|
||||
;;
|
||||
"unit-core")
|
||||
|
||||
Reference in New Issue
Block a user