Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(*): update minimum Yarn version, do some Yarn-related cleanups #16714

Merged
merged 7 commits into from
Oct 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions scripts/jenkins/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ rm -f angular.js.size


# BUILD #
yarn run grunt -- ci-checks package --no-color
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That reminds me I can shorten it to yarn grunt instead of yarn run grunt... We already use the former form in a few places.

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 #
Expand Down
4 changes: 2 additions & 2 deletions scripts/jenkins/init-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion scripts/jenkins/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
8 changes: 3 additions & 5 deletions scripts/travis/before_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set -e

yarn global add [email protected]

mkdir -p "$LOGS_DIR"

if [ "$JOB" != "ci-checks" ]; then
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading