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

Commit dcc80c1

Browse files
committed
Merge branch 'master' into ngRepeat-animations
2 parents d8320a1 + d96e58f commit dcc80c1

File tree

415 files changed

+24320
-33885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

415 files changed

+24320
-33885
lines changed

Diff for: .github/ISSUE_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222

23-
**Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.**
23+
**Which versions of AngularJS, and which browser / OS are affected by this issue? Did this work in previous versions of AngularJS? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.**
2424

2525

2626

Diff for: .nvmrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
4
2-
1+
6

Diff for: .travis.yml

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
sudo: false
33
node_js:
4-
- '4.4'
4+
- '6'
55

66
cache:
77
directories:
@@ -36,19 +36,12 @@ addons:
3636
packages:
3737
- g++-4.8
3838

39-
install:
40-
# Check the size of caches
41-
- du -sh ./node_modules ./bower_components/ ./docs/bower_components/ || true
42-
# - npm config set registry http://23.251.144.68
43-
# Disable the spinner, it looks bad on Travis
44-
- npm config set spin false
45-
# Log HTTP requests
46-
- npm config set loglevel http
47-
#- npm install -g [email protected]
48-
# Install npm dependencies and ensure that npm cache is not stale
49-
- npm install
39+
before_install:
40+
- curl -o- -L https://raw.githubusercontent.com/yarnpkg/yarn/2a0afc73210c7a82082585283e518eeb88ca19ae/scripts/install-latest.sh | bash -s -- --version 0.17.9
41+
- export PATH=$HOME/.yarn/bin:$PATH
5042

5143
before_script:
44+
- du -sh ./node_modules ./bower_components/ ./docs/bower_components/ || true
5245
- ./scripts/travis/before_build.sh
5346

5447
script:

Diff for: CHANGELOG.md

+3,219-32
Large diffs are not rendered by default.

Diff for: CONTRIBUTING.md

+20-13
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ today! Here are the guidelines we'd like you to follow:
1515

1616
## <a name="coc"></a> Code of Conduct
1717

18-
Help us keep Angular open and inclusive. Please read and follow our [Code of Conduct][coc].
18+
Help us keep AngularJS open and inclusive. Please read and follow our [Code of Conduct][coc].
1919

2020
## <a name="question"></a> Got a Question or Problem?
2121

@@ -29,7 +29,7 @@ If you find a bug in the source code or a mistake in the documentation, you can
2929
submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull Request
3030
with a fix.
3131

32-
**Localization Issues:** Angular.js uses the [Google Closure I18N library] to generate
32+
**Localization Issues:** AngularJS uses the [Google Closure I18N library] to generate
3333
its own I18N files (the ngLocale module). This means that any changes to these files would be lost
3434
the next time that we import the library.
3535
Since the Closure library i18n data is itself auto-generated from the data of the
@@ -81,7 +81,7 @@ quickly:
8181

8282
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
8383
* **Motivation for or Use Case** - explain why this is a bug for you
84-
* **Angular Version(s)** - is it a regression?
84+
* **AngularJS Version(s)** - is it a regression?
8585
* **Browsers and Operating System** - is this a problem with all browsers or only specific ones?
8686
* **Reproduce the Error** - provide a live example (using [Plunker][plunker] or
8787
[JSFiddle][jsfiddle]) or an unambiguous set of steps.
@@ -108,7 +108,7 @@ Before you submit your pull request consider the following guidelines:
108108

109109
* Create your patch, **including appropriate test cases**.
110110
* Follow our [Coding Rules](#rules).
111-
* Run the full Angular test suite, as described in the [developer documentation][dev-doc],
111+
* Run the full AngularJS test suite, as described in the [developer documentation][dev-doc],
112112
and ensure that all tests pass.
113113
* Commit your changes using a descriptive commit message that follows our
114114
[commit message conventions](#commit) and passes our commit message presubmit hook
@@ -132,11 +132,11 @@ Before you submit your pull request consider the following guidelines:
132132
git push origin my-fix-branch
133133
```
134134

135-
In GitHub, send a pull request to `angular:master`.
135+
In GitHub, send a pull request to `angular.js:master`.
136136
If we suggest changes, then:
137137

138138
* Make the required updates.
139-
* Re-run the Angular test suite to ensure tests are still passing.
139+
* Re-run the AngularJS test suite to ensure tests are still passing.
140140
* Commit your changes to your branch (e.g. `my-fix-branch`).
141141
* Push the changes to your GitHub repository (this will update your Pull Request).
142142

@@ -189,10 +189,10 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
189189
* All features or bug fixes **must be tested** by one or more [specs][unit-testing].
190190
* All public API methods **must be documented** with ngdoc, an extended version of jsdoc (we added
191191
support for markdown and templating via @ngdoc tag). To see how we document our APIs, please check
192-
out the existing ngdocs and see [this wiki page][ngDocs].
192+
out the existing source code and see [this wiki page][ngDocs].
193193
* With the exceptions listed below, we follow the rules contained in
194194
[Google's JavaScript Style Guide][js-style-guide]:
195-
* **Do not use namespaces**: Instead, wrap the entire angular code base in an anonymous closure and
195+
* **Do not use namespaces**: Instead, wrap the entire AngularJS code base in an anonymous closure and
196196
export our API explicitly rather than implicitly.
197197
* Wrap all code at **100 characters**.
198198
* Instead of complex inheritance hierarchies, we **prefer simple objects**. We use prototypal
@@ -209,7 +209,9 @@ We have very precise rules over how our git commit messages can be formatted. T
209209
readable messages** that are easy to follow when looking through the **project history**. But also,
210210
we use the git commit messages to **generate the AngularJS change log**.
211211

212-
The commit message formatting can be added using a typical git workflow or through the use of a CLI wizard ([Commitizen](https://github.com/commitizen/cz-cli)). To use the wizard, run `npm run commit` in your terminal after staging your changes in git.
212+
The commit message formatting can be added using a typical git workflow or through the use of a CLI
213+
wizard ([Commitizen](https://github.com/commitizen/cz-cli)). To use the wizard, run `yarn run commit`
214+
in your terminal after staging your changes in git.
213215

214216
### Commit Message Format
215217
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
@@ -229,7 +231,8 @@ Any line of the commit message cannot be longer 100 characters! This allows the
229231
to read on GitHub as well as in various git tools.
230232

231233
### Revert
232-
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
234+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
235+
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
233236

234237
### Type
235238
Must be one of the following:
@@ -241,14 +244,16 @@ Must be one of the following:
241244
semi-colons, etc)
242245
* **refactor**: A code change that neither fixes a bug nor adds a feature
243246
* **perf**: A code change that improves performance
244-
* **test**: Adding missing tests
247+
* **test**: Adding missing or correcting existing tests
245248
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
246249
generation
247250

248251
### Scope
249252
The scope could be anything specifying place of the commit change. For example `$location`,
250253
`$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, `ngView`, etc...
251254

255+
You can use `*` when the change affects more than a single scope.
256+
252257
### Subject
253258
The subject contains succinct description of the change:
254259

@@ -262,9 +267,10 @@ The body should include the motivation for the change and contrast this with pre
262267
263268
### Footer
264269
The footer should contain any information about **Breaking Changes** and is also the place to
265-
reference GitHub issues that this commit **Closes**.
270+
[reference GitHub issues that this commit closes][closing-issues].
266271
267-
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
272+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
273+
The rest of the commit message is then used for this.
268274
269275
A detailed explanation can be found in this [document][commit-message-format].
270276
@@ -285,6 +291,7 @@ You can find out more detailed information about contributing in the
285291
286292
[Google Closure I18N library]: https://github.com/google/closure-library/tree/master/closure/goog/i18n
287293
[angular-dev]: https://groups.google.com/forum/?fromgroups#!forum/angular-dev
294+
[closing-issues]: https://help.github.com/articles/closing-issues-via-commit-messages/
288295
[coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
289296
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
290297
[contribute]: http://docs.angularjs.org/misc/contribute

Diff for: Gruntfile.js

+62-14
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,64 @@ var versionInfo = require('./lib/versions/version-info');
99
var path = require('path');
1010
var e2e = require('./test/e2e/tools');
1111

12+
var semver = require('semver');
13+
var exec = require('shelljs').exec;
14+
var pkg = require(__dirname + '/package.json');
15+
16+
// Node.js version checks
17+
if (!semver.satisfies(process.version, pkg.engines.node)) {
18+
reportOrFail('Invalid node version (' + process.version + '). ' +
19+
'Please use a version that satisfies ' + pkg.engines.node);
20+
}
21+
22+
// Yarn version checks
23+
var expectedYarnVersion = pkg.engines.yarn;
24+
var currentYarnVersion = exec('yarn --version', {silent: true}).stdout.trim();
25+
if (!semver.satisfies(currentYarnVersion, expectedYarnVersion)) {
26+
reportOrFail('Invalid yarn version (' + currentYarnVersion + '). ' +
27+
'Please use a version that satisfies ' + expectedYarnVersion);
28+
}
29+
30+
// Grunt CLI version checks
31+
var expectedGruntVersion = pkg.engines.grunt;
32+
var currentGruntVersions = exec('grunt --version', {silent: true}).stdout;
33+
var match = /^grunt-cli v(.+)$/m.exec(currentGruntVersions);
34+
if (!match) {
35+
reportOrFail('Unable to compute the current grunt-cli version. We found:\n' +
36+
currentGruntVersions);
37+
} else {
38+
if (!semver.satisfies(match[1], expectedGruntVersion)) {
39+
reportOrFail('Invalid grunt-cli version (' + match[1] + '). ' +
40+
'Please use a version that satisfies ' + expectedGruntVersion);
41+
}
42+
}
43+
44+
// Ensure Node.js dependencies have been installed
45+
if (!process.env.TRAVIS && !process.env.JENKINS_HOME) {
46+
var yarnOutput = exec('yarn install');
47+
if (yarnOutput.code !== 0) {
48+
throw new Error('Yarn install failed: ' + yarnOutput.stderr);
49+
}
50+
}
51+
52+
1253
module.exports = function(grunt) {
13-
//grunt plugins
54+
55+
// this loads all the node_modules that start with `grunt-` as plugins
1456
require('load-grunt-tasks')(grunt);
1557

58+
// load additional grunt tasks
1659
grunt.loadTasks('lib/grunt');
1760
grunt.loadNpmTasks('angular-benchpress');
1861

62+
// compute version related info for this build
1963
var NG_VERSION = versionInfo.currentVersion;
2064
NG_VERSION.cdn = versionInfo.cdnVersion;
2165
var dist = 'angular-' + NG_VERSION.full;
2266

2367
if (versionInfo.cdnVersion == null) {
24-
throw new Error('Unable to read CDN version, are you offline or has the CDN not been properly pushed?');
68+
throw new Error('Unable to read CDN version, are you offline or has the CDN not been properly pushed?\n' +
69+
'Perhaps you want to set the NG1_BUILD_NO_REMOTE_VERSION_REQUESTS environment variable?');
2570
}
2671

2772
//config
@@ -284,17 +329,16 @@ module.exports = function(grunt) {
284329
},
285330

286331
shell: {
287-
'npm-install': {
288-
command: 'node scripts/npm/check-node-modules.js'
332+
'install-node-dependencies': {
333+
command: 'yarn'
289334
},
290-
291335
'promises-aplus-tests': {
292336
options: {
293337
stdout: false,
294338
stderr: true,
295339
failOnError: true
296340
},
297-
command: path.normalize('./node_modules/.bin/promises-aplus-tests tmp/promises-aplus-adapter++.js')
341+
command: path.normalize('./node_modules/.bin/promises-aplus-tests tmp/promises-aplus-adapter++.js --timeout 2000')
298342
}
299343
},
300344

@@ -314,13 +358,6 @@ module.exports = function(grunt) {
314358
}
315359
});
316360

317-
// global beforeEach task
318-
if (!process.env.TRAVIS) {
319-
grunt.task.run('shell:npm-install');
320-
}
321-
322-
323-
324361
//alias tasks
325362
grunt.registerTask('test', 'Run unit, docs and e2e tests with Karma', ['eslint', 'package', 'test:unit', 'test:promises-aplus', 'tests:docs', 'test:protractor']);
326363
grunt.registerTask('test:jqlite', 'Run the unit tests with Karma' , ['tests:jqlite']);
@@ -338,7 +375,18 @@ module.exports = function(grunt) {
338375

339376
grunt.registerTask('minify', ['bower', 'clean', 'build', 'minall']);
340377
grunt.registerTask('webserver', ['connect:devserver']);
341-
grunt.registerTask('package', ['bower', 'validate-angular-files', 'clean', 'buildall', 'minall', 'collect-errors', 'docs', 'copy', 'write', 'compress']);
378+
grunt.registerTask('package', ['bower', 'validate-angular-files', 'clean', 'buildall', 'minall', 'collect-errors', 'write', 'docs', 'copy', 'compress']);
342379
grunt.registerTask('ci-checks', ['ddescribe-iit', 'merge-conflict', 'eslint']);
343380
grunt.registerTask('default', ['package']);
344381
};
382+
383+
384+
function reportOrFail(message) {
385+
if (process.env.TRAVIS || process.env.JENKINS_HOME) {
386+
throw new Error(message);
387+
} else {
388+
console.log('===============================================================================');
389+
console.log(message);
390+
console.log('===============================================================================');
391+
}
392+
}

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
3+
Copyright (c) 2010-2017 Google, Inc. http://angularjs.org
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: README.closure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ in its `contrib/externs` directory.
77
The definitions contain externs for use with the Closure compiler (aka
88
JSCompiler). Passing these files to the --externs parameter of a compiler
99
pass allows using type annotations for AngularJS objects. For example,
10-
Angular's $scope objects can be annotated as:
10+
AngularJS's $scope objects can be annotated as:
1111
```js
1212
/** @type {angular.Scope} */
1313
var scope = $scope;

0 commit comments

Comments
 (0)