Permalink
Comparing changes
Open a pull request
- 15 commits
- 18 files changed
- 0 commit comments
- 4 contributors
Commits on Dec 15, 2015
Commits on Dec 16, 2015
Previously, ddescribe, merge-conflicts, jshint, and jscs would run after unit & e2e tests ran. The order was orginally changed as part of #9792. While the logic is sound that style errors shouldn't block tests from running, ddescribe should always run. This was not guaraneteed; when Travis exits with a warning after some browsers have run, ddescribe doesn't get run and it doesn't become apparent that not all tests have run. Additionally, a separate job clearly separates style from test errors, which e.g. means you can open a PR that includes an iit to speed up the job, and see immediately if the test passes, because the ddescribe error is in another job.
Commits on Dec 17, 2015
Closes #13568
This prevents errors when checking `validate-angular-files`
Closes #13553
Closes #13569
Commits on Dec 18, 2015
Commits on Jan 05, 2016
Due to recent changes in Chrome, Firefox and Webkit use of the event.timeStamp value will lead to unpredictable behaviour due to precision changes. Therefore it's best to stick entirely to use `Date.now()` when it comes to confirming the end of transition- ending values. See #13494 for more info. Applies to 1.2, 1.3, 1.4 and 1.5. Closes #13494 Closes #13495
Unified
Split
Showing
with
943 additions
and 421 deletions.
- +14 −20 .travis.yml
- +13 −11 Gruntfile.js
- +2 −1 angularFiles.js
- +28 −0 docs/content/error/ngModel/nopromise.ngdoc
- +58 −0 lib/grunt/validate-angular-files.js
- +240 −74 npm-shrinkwrap.clean.json
- +544 −290 npm-shrinkwrap.json
- +1 −0 package.json
- +3 −0 jenkins_build.sh → scripts/jenkins/build.sh
- +2 −11 scripts/jenkins/master.sh
- +2 −0 scripts/jenkins/release.sh
- +7 −0 scripts/jenkins/set-node-version.sh
- +18 −0 scripts/travis/before_build.sh
- +4 −3 scripts/travis/build.sh
- +3 −7 src/ng/directive/form.js
- +1 −1 src/ng/directive/ngModel.js
- +2 −2 src/ngAnimate/animate.js
- +1 −1 test/ng/directive/ngModelSpec.js
| @@ -1,7 +1,7 @@ | ||
| language: node_js | ||
| sudo: false | ||
| node_js: | ||
| - '0.10' | ||
| - '4.2' | ||
|
|
||
| cache: | ||
| directories: | ||
| @@ -15,28 +15,26 @@ branches: | ||
|
|
||
| env: | ||
| matrix: | ||
| - JOB=ci-checks | ||
| - JOB=unit BROWSER_PROVIDER=saucelabs | ||
| - JOB=docs-e2e BROWSER_PROVIDER=saucelabs | ||
| - JOB=e2e TEST_TARGET=jqlite BROWSER_PROVIDER=saucelabs | ||
| - JOB=e2e TEST_TARGET=jquery BROWSER_PROVIDER=saucelabs | ||
| - JOB=unit BROWSER_PROVIDER=browserstack | ||
| - JOB=docs-e2e BROWSER_PROVIDER=browserstack | ||
| - JOB=e2e TEST_TARGET=jqlite BROWSER_PROVIDER=browserstack | ||
| - JOB=e2e TEST_TARGET=jquery BROWSER_PROVIDER=browserstack | ||
| global: | ||
| - CXX=g++-4.8 # node 4 likes the G++ v4.8 compiler | ||
| - SAUCE_USERNAME=angular-ci | ||
| - SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987 | ||
| - BROWSER_STACK_USERNAME=VojtaJina | ||
| - BROWSER_STACK_ACCESS_KEY=QCQJ1ZpWXpBkSwEdD8ev | ||
| - LOGS_DIR=/tmp/angular-build/logs | ||
| - BROWSER_PROVIDER_READY_FILE=/tmp/browsersprovider-tunnel-ready | ||
|
|
||
| matrix: | ||
| allow_failures: | ||
| - env: "JOB=unit BROWSER_PROVIDER=browserstack" | ||
| - env: "JOB=docs-e2e BROWSER_PROVIDER=browserstack" | ||
| - env: "JOB=e2e TEST_TARGET=jqlite BROWSER_PROVIDER=browserstack" | ||
| - env: "JOB=e2e TEST_TARGET=jquery BROWSER_PROVIDER=browserstack" | ||
| # node 4 likes the G++ v4.8 compiler | ||
| # see https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements | ||
| addons: | ||
| apt: | ||
| sources: | ||
| - ubuntu-toolchain-r-test | ||
| packages: | ||
| - g++-4.8 | ||
|
|
||
| install: | ||
| # Check the size of caches | ||
| @@ -46,16 +44,12 @@ install: | ||
| - npm config set spin false | ||
| # Log HTTP requests | ||
| - npm config set loglevel http | ||
| - npm install -g npm@2.5 | ||
| # Instal npm dependecies and ensure that npm cache is not stale | ||
| #- npm install -g npm@2.5 | ||
| # Install npm dependencies and ensure that npm cache is not stale | ||
| - npm install | ||
|
|
||
| before_script: | ||
| - mkdir -p $LOGS_DIR | ||
| - ./scripts/travis/start_browser_provider.sh | ||
| - npm install -g grunt-cli | ||
| - grunt package | ||
| - ./scripts/travis/wait_for_browser_provider.sh | ||
| - ./scripts/travis/before_build.sh | ||
|
|
||
| script: | ||
| - ./scripts/travis/build.sh | ||
| @@ -155,7 +155,7 @@ module.exports = function(grunt) { | ||
| jscs: { | ||
| src: ['src/**/*.js', 'test/**/*.js'], | ||
| options: { | ||
| config: ".jscsrc" | ||
| config: '.jscsrc' | ||
| } | ||
| }, | ||
|
|
||
| @@ -220,9 +220,9 @@ module.exports = function(grunt) { | ||
| dest: 'build/angular-aria.js', | ||
| src: util.wrap(files['angularModules']['ngAria'], 'module') | ||
| }, | ||
| "promises-aplus-adapter": { | ||
| 'promises-aplus-adapter': { | ||
| dest:'tmp/promises-aplus-adapter++.js', | ||
| src:['src/ng/q.js','lib/promises-aplus/promises-aplus-test-adapter.js'] | ||
| src:['src/ng/q.js', 'lib/promises-aplus/promises-aplus-test-adapter.js'] | ||
| } | ||
| }, | ||
|
|
||
| @@ -241,7 +241,7 @@ module.exports = function(grunt) { | ||
| }, | ||
|
|
||
|
|
||
| "ddescribe-iit": { | ||
| 'ddescribe-iit': { | ||
| files: [ | ||
| 'src/**/*.js', | ||
| 'test/**/*.js', | ||
| @@ -262,7 +262,7 @@ module.exports = function(grunt) { | ||
| } | ||
| }, | ||
|
|
||
| "merge-conflict": { | ||
| 'merge-conflict': { | ||
| files: [ | ||
| 'src/**/*', | ||
| 'test/**/*', | ||
| @@ -292,11 +292,11 @@ module.exports = function(grunt) { | ||
| }, | ||
|
|
||
| shell: { | ||
| "npm-install": { | ||
| 'npm-install': { | ||
| command: 'node scripts/npm/check-node-modules.js' | ||
| }, | ||
|
|
||
| "promises-aplus-tests": { | ||
| 'promises-aplus-tests': { | ||
| options: { | ||
| stdout: false, | ||
| stderr: true, | ||
| @@ -327,8 +327,10 @@ module.exports = function(grunt) { | ||
| grunt.task.run('shell:npm-install'); | ||
| } | ||
|
|
||
|
|
||
|
|
||
| //alias tasks | ||
| grunt.registerTask('test', 'Run unit, docs and e2e tests with Karma', ['jshint', 'jscs', 'package','test:unit','test:promises-aplus', 'tests:docs', 'test:protractor']); | ||
| grunt.registerTask('test', 'Run unit, docs and e2e tests with Karma', ['jshint', 'jscs', 'package', 'test:unit', 'test:promises-aplus', 'tests:docs', 'test:protractor']); | ||
| grunt.registerTask('test:jqlite', 'Run the unit tests with Karma' , ['tests:jqlite']); | ||
| grunt.registerTask('test:jquery', 'Run the jQuery unit tests with Karma', ['tests:jquery']); | ||
| grunt.registerTask('test:modules', 'Run the Karma module tests with Karma', ['build', 'tests:modules']); | ||
| @@ -338,11 +340,11 @@ module.exports = function(grunt) { | ||
| grunt.registerTask('test:travis-protractor', 'Run the end to end tests with Protractor for Travis CI builds', ['connect:testserver', 'protractor:travis']); | ||
| grunt.registerTask('test:ci-protractor', 'Run the end to end tests with Protractor for Jenkins CI builds', ['webdriver', 'connect:testserver', 'protractor:jenkins']); | ||
| grunt.registerTask('test:e2e', 'Alias for test:protractor', ['test:protractor']); | ||
| grunt.registerTask('test:promises-aplus',['build:promises-aplus-adapter','shell:promises-aplus-tests']); | ||
| grunt.registerTask('test:promises-aplus',['build:promises-aplus-adapter', 'shell:promises-aplus-tests']); | ||
|
|
||
| grunt.registerTask('minify', ['bower','clean', 'build', 'minall']); | ||
| grunt.registerTask('minify', ['bower', 'clean', 'build', 'minall']); | ||
| grunt.registerTask('webserver', ['connect:devserver']); | ||
| grunt.registerTask('package', ['bower','clean', 'buildall', 'minall', 'collect-errors', 'docs', 'copy', 'write', 'compress']); | ||
| grunt.registerTask('package', ['bower', 'validate-angular-files', 'clean', 'buildall', 'minall', 'collect-errors', 'docs', 'copy', 'write', 'compress']); | ||
| grunt.registerTask('ci-checks', ['ddescribe-iit', 'merge-conflict', 'jshint', 'jscs']); | ||
| grunt.registerTask('default', ['package']); | ||
| }; | ||
| @@ -32,6 +32,7 @@ var angularFiles = { | ||
| 'src/ng/q.js', | ||
| 'src/ng/raf.js', | ||
| 'src/ng/rootScope.js', | ||
| 'src/ng/rootElement.js', | ||
| 'src/ng/sanitizeUri.js', | ||
| 'src/ng/sce.js', | ||
| 'src/ng/sniffer.js', | ||
| @@ -78,7 +79,7 @@ var angularFiles = { | ||
| ], | ||
|
|
||
| 'angularLoader': [ | ||
| 'stringify.js', | ||
| 'src/stringify.js', | ||
| 'src/minErr.js', | ||
| 'src/loader.js' | ||
| ], | ||
| @@ -0,0 +1,28 @@ | ||
| @ngdoc error | ||
| @name ngModel:nopromise | ||
| @fullName No promise | ||
| @description | ||
|
|
||
| The return value of an async validator, must always be a promise. If you want to return a | ||
| non-promise value, you can convert it to a promise using {@link ng.$q#resolve `$q.resolve()`} or | ||
| {@link ng.$q#reject `$q.reject()`}. | ||
|
|
||
| Example: | ||
|
|
||
| ``` | ||
| .directive('asyncValidator', function($q) { | ||
| return { | ||
| require: 'ngModel', | ||
| link: function(scope, elem, attrs, ngModel) { | ||
| ngModel.$asyncValidators.myAsyncValidation = function(modelValue, viewValue) { | ||
| if (/* I don't need to hit the backend API */) { | ||
| return $q.resolve(); // to mark as valid or | ||
| // return $q.reject(); // to mark as invalid | ||
| } else { | ||
| // ...send a request to the backend and return a promise | ||
| } | ||
| }; | ||
| } | ||
| }; | ||
| }) | ||
| ``` |
| @@ -0,0 +1,58 @@ | ||
| 'use strict'; | ||
|
|
||
| var path = require('path'); | ||
| var fs = require('fs'); | ||
| var glob = require("glob"); | ||
| var _ = require('lodash'); | ||
| var files = require('../../angularFiles').files; | ||
|
|
||
| module.exports = function(grunt) { | ||
|
|
||
| grunt.registerTask('validate-angular-files', function() { | ||
| var combinedFiles = _.clone(files.angularModules); | ||
| combinedFiles.ng = files.angularSrc; | ||
| combinedFiles.angularLoader = files.angularLoader; | ||
|
|
||
| var errorsDetected = false; | ||
| var directories = []; | ||
| var detectedFiles = {}; | ||
|
|
||
| for (var section in combinedFiles) { | ||
| var sectionFiles = combinedFiles[section]; | ||
|
|
||
| if (section != 'angularLoader') { | ||
| directories.push('src/' + section); | ||
| } | ||
|
|
||
| grunt.log.debug('Validating ' + sectionFiles.length + ' files from the "' + section + '" module.'); | ||
|
|
||
| sectionFiles.forEach(function(file) { | ||
| detectedFiles[file] = true; | ||
|
|
||
| if (!fs.existsSync(file)) { | ||
| grunt.log.error(file + ' does not exist in the local file structure.'); | ||
| errorsDetected = true; | ||
| } | ||
| }); | ||
| } | ||
|
|
||
| directories.forEach(function(directory) { | ||
| glob.sync(directory + '/**/*').forEach(function(filePath) { | ||
| if (!fs.lstatSync(filePath).isDirectory()) { | ||
| var fileName = path.basename(filePath); | ||
| var isHiddenFile = fileName[0] == '.'; | ||
| if (!isHiddenFile && !detectedFiles[filePath]) { | ||
| grunt.log.error(filePath + ' exists in the local file structure but isn\'t used by any module.'); | ||
| errorsDetected = true; | ||
| } | ||
| } | ||
| }); | ||
| }); | ||
|
|
||
| if (errorsDetected) { | ||
| throw new Error('Not all files were properly detected in the local file structure.'); | ||
| } else { | ||
| grunt.log.ok('All files were detected successfully!'); | ||
| } | ||
| }); | ||
| }; |
Oops, something went wrong.