diff --git a/.jscs.json b/.jscs.json index 0fc84a6639e5..440737e1f2a9 100644 --- a/.jscs.json +++ b/.jscs.json @@ -1,5 +1,6 @@ { "disallowKeywords": ["with"], "disallowTrailingWhitespace": true, - "requireRightStickedOperators": ["!"] + "requireRightStickedOperators": ["!"], + "requireLeftStickedOperators": [","] } diff --git a/.jscs.json.todo b/.jscs.json.todo index 96326dce1082..1fb8c28d9018 100644 --- a/.jscs.json.todo +++ b/.jscs.json.todo @@ -8,7 +8,6 @@ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], "disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], "disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], - "requireLeftStickedOperators": [","], "disallowImplicitTypeConversion": ["string"], "disallowMultipleLineBreaks": true, "disallowKeywordsOnNewLine": ["else"], diff --git a/CHANGELOG.md b/CHANGELOG.md index 41c85115a801..6f3150b0b482 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,135 @@ + +# 1.3.0-beta.2 silent-ventriloquism (2014-03-14) + + +## Bug Fixes + +- **$$rAF:** always fallback to a $timeout in case native rAF isn't supported + ([7b5e0199](https://github.com/angular/angular.js/commit/7b5e019981f352add88be2984de68e553d1bfa93), + [#6654](https://github.com/angular/angular.js/issues/6654)) +- **$http:** don't convert 0 status codes to 404 for non-file protocols + ([56e73ea3](https://github.com/angular/angular.js/commit/56e73ea355c851fdfd574d6d2a9e2fcb75677945), + [#6074](https://github.com/angular/angular.js/issues/6074), [#6155](https://github.com/angular/angular.js/issues/6155)) +- **ngAnimate:** setting classNameFilter disables animation inside ng-if + ([129e2e02](https://github.com/angular/angular.js/commit/129e2e021ab1d773874428cd1fb329eae72797c4), + [#6539](https://github.com/angular/angular.js/issues/6539)) + + +## Features + +- whitelist blob urls for sanitization of data-bound image urls + ([47ab8df4](https://github.com/angular/angular.js/commit/47ab8df455df1f1391b760e1fbcc5c21645512b8), + [#4623](https://github.com/angular/angular.js/issues/4623)) + + + + +# 1.3.0-beta.1 retractable-eyebrow (2014-03-07) + + +## Bug Fixes + +- **$compile:** support templates with thead and tfoot root elements + ([53ec5e13](https://github.com/angular/angular.js/commit/53ec5e13e5955830b6751019eef232bd2125c0b6), + [#6289](https://github.com/angular/angular.js/issues/6289)) +- **style:** expressions in style tags + ([0609453e](https://github.com/angular/angular.js/commit/0609453e1f9ae074f8d786df903096a6eadb6aa0), + [#2387](https://github.com/angular/angular.js/issues/2387), [#6492](https://github.com/angular/angular.js/issues/6492)) + + +## Features + +- **input:** support types date, time, datetime-local, month, week + ([46bd6dc8](https://github.com/angular/angular.js/commit/46bd6dc88de252886d75426efc2ce8107a5134e9), + [#5864](https://github.com/angular/angular.js/issues/5864)) + + +## Breaking Changes + +- **build:** due to [eaa1d00b](https://github.com/angular/angular.js/commit/eaa1d00b24008f590b95ad099241b4003688cdda), + As communicated before, IE8 is no longer supported. +- **input:** types date, time, datetime-local, month, week now always + require a `Date` object as model ([46bd6dc8](https://github.com/angular/angular.js/commit/46bd6dc88de252886d75426efc2ce8107a5134e9), + [#5864](https://github.com/angular/angular.js/issues/5864)) + +For more info: http://blog.angularjs.org/2013/12/angularjs-13-new-release-approaches.html + + + + +# 1.2.14 feisty-cryokinesis (2014-03-01) + + +## Bug Fixes + +- **$animate:** + - delegate down to addClass/removeClass if setClass is not found + ([18c41af0](https://github.com/angular/angular.js/commit/18c41af065006a804a3d38eecca7ae184103ece9), + [#6463](https://github.com/angular/angular.js/issues/6463)) + - ensure all comment nodes are removed during a leave animation + ([f4f1f43d](https://github.com/angular/angular.js/commit/f4f1f43d5140385bbf070510975f72b65196e08a), + [#6403](https://github.com/angular/angular.js/issues/6403)) + - only block keyframes if a stagger is set to occur + ([e71e7b6c](https://github.com/angular/angular.js/commit/e71e7b6cae57f25c5837dda98551c8e0a5cb720d), + [#4225](https://github.com/angular/angular.js/issues/4225)) + - ensure that animateable directives cancel expired leave animations + ([e9881991](https://github.com/angular/angular.js/commit/e9881991ca0a5019d3a4215477738ed247898ba0), + [#5886](https://github.com/angular/angular.js/issues/5886)) + - ensure all animated elements are taken care of during the closing timeout + ([99720fb5](https://github.com/angular/angular.js/commit/99720fb5ab7259af37f708bc4eeda7cbbe790a69), + [#6395](https://github.com/angular/angular.js/issues/6395)) + - fix for TypeError Cannot call method 'querySelectorAll' in cancelChildAnimations + ([c914cd99](https://github.com/angular/angular.js/commit/c914cd99b3aaf932e3c0e2a585eead7b76621f1b), + [#6205](https://github.com/angular/angular.js/issues/6205)) +- **$http:** + - do not add trailing question + ([c8e03e34](https://github.com/angular/angular.js/commit/c8e03e34b27a8449d8e1bfe0e3801d6a67ae2c49), + [#6342](https://github.com/angular/angular.js/issues/6342)) + - send GET requests by default + ([267b2173](https://github.com/angular/angular.js/commit/267b217376ed466e9f260ecfdfa15a8227c103ff), + [#5985](https://github.com/angular/angular.js/issues/5985), [#6401](https://github.com/angular/angular.js/issues/6401)) +- **$parse:** reduce false-positives in isElement tests + ([5fe1f39f](https://github.com/angular/angular.js/commit/5fe1f39f027c6f2c6a530975dd5389d788d3c0eb), + [#4805](https://github.com/angular/angular.js/issues/4805), [#5675](https://github.com/angular/angular.js/issues/5675)) +- **input:** use ValidityState to determine validity + ([c2d447e3](https://github.com/angular/angular.js/commit/c2d447e378dd72d1b955f476bd5bf249625b4dab), + [#4293](https://github.com/angular/angular.js/issues/4293), [#2144](https://github.com/angular/angular.js/issues/2144), [#4857](https://github.com/angular/angular.js/issues/4857), [#5120](https://github.com/angular/angular.js/issues/5120), [#4945](https://github.com/angular/angular.js/issues/4945), [#5500](https://github.com/angular/angular.js/issues/5500), [#5944](https://github.com/angular/angular.js/issues/5944)) +- **isElement:** reduce false-positives in isElement tests + ([75515852](https://github.com/angular/angular.js/commit/75515852ea9742d3d84a0f463c2a2c61ef2b7323)) +- **jqLite:** + - properly toggle multiple classes + ([4e73c80b](https://github.com/angular/angular.js/commit/4e73c80b17bd237a8491782bcf9e19f1889e12ed), + [#4467](https://github.com/angular/angular.js/issues/4467), [#6448](https://github.com/angular/angular.js/issues/6448)) + - make jqLite('').contents() return iframe document, as in jQuery + ([05fbed57](https://github.com/angular/angular.js/commit/05fbed5710b702c111c1425a9e241c40d13b0a54), + [#6320](https://github.com/angular/angular.js/issues/6320), [#6323](https://github.com/angular/angular.js/issues/6323)) +- **numberFilter:** convert all non-finite/non-numbers/non-numeric strings to the empty string + ([cceb455f](https://github.com/angular/angular.js/commit/cceb455fb167571e26341ded6b595dafd4d92bc6), + [#6188](https://github.com/angular/angular.js/issues/6188), [#6261](https://github.com/angular/angular.js/issues/6261)) +- **$parse:** support trailing commas in object & array literals + ([6b049c74](https://github.com/angular/angular.js/commit/6b049c74ccc9ee19688bb9bbe504c300e61776dc)) +- **ngHref:** bind ng-href to xlink:href for SVGAElement + ([2bce71e9](https://github.com/angular/angular.js/commit/2bce71e9dc10c8588f9eb599a0cd2e831440fc48), + [#5904](https://github.com/angular/angular.js/issues/5904)) + + +## Features + +- **$animate:** animate dirty, pristine, valid, invalid for form/fields + ([33443966](https://github.com/angular/angular.js/commit/33443966c8e8cac85a863bb181d4a4aff00baab4), + [#5378](https://github.com/angular/angular.js/issues/5378)) + + +## Performance Improvements + +- **$animate:** use rAF instead of timeouts to issue animation callbacks + ([4c4537e6](https://github.com/angular/angular.js/commit/4c4537e65e6cf911c9659b562d89e3330ce3ffae)) +- **$cacheFactory:** skip LRU bookkeeping for caches with unbound capacity + ([a4078fca](https://github.com/angular/angular.js/commit/a4078fcae4a33295675d769a1cd067837029da2f), + [#6193](https://github.com/angular/angular.js/issues/6193), [#6226](https://github.com/angular/angular.js/issues/6226)) + + + # 1.2.13 romantic-transclusion (2014-02-14) @@ -202,11 +334,11 @@ The animation mock module has been renamed from `mock.animate` to `ngAnimateMock - **$http:** due to [e1cfb195](https://github.com/angular/angular.js/commit/e1cfb1957feaf89408bccf48fae6f529e57a82fe), it is now necessary to separately specify default HTTP headers for PUT, POST and PATCH requests, as these no longer share a single object. - + To migrate your code, follow the example below: - + Before: - + // Will apply to POST, PUT and PATCH methods $httpProvider.defaults.headers.post = { "X-MY-CSRF-HEADER": "..." diff --git a/Gruntfile.js b/Gruntfile.js index 01dbb952c66e..5ec05f702f6d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,6 @@ var files = require('./angularFiles').files; var util = require('./lib/grunt/utils.js'); +var versionInfo = require('./lib/versions/version-info'); var path = require('path'); module.exports = function(grunt) { @@ -8,10 +9,10 @@ module.exports = function(grunt) { grunt.loadTasks('lib/grunt'); - var NG_VERSION = util.getVersion(); + var NG_VERSION = versionInfo.currentVersion; + NG_VERSION.cdn = versionInfo.currentPackage.cdnVersion; var dist = 'angular-'+ NG_VERSION.full; - //global beforeEach util.init(); diff --git a/compare-master-to-stable.js b/compare-master-to-stable.js index 404383b01d9c..278926d7346e 100755 --- a/compare-master-to-stable.js +++ b/compare-master-to-stable.js @@ -1,4 +1,4 @@ -#!/usr/local/bin/node +#!/usr/bin/env node var util = require('util'); var cp = require('child_process'); @@ -121,9 +121,12 @@ then(function (tags) { value(); }). then(function (tags) { + var master = tags.pop(); + var stable = tags.pop(); + return [ - { name: 'v1.0.x', tag: tags[0] }, - { name: 'master', tag: tags[1] } + { name: stable.replace(/\d+$/, 'x'), tag: stable }, + { name: 'master', tag: master} ]; }). then(allInSeries(function (branch) { diff --git a/docs/app/assets/Error404.html b/docs/app/assets/Error404.html new file mode 100644 index 000000000000..abfc4d13a37d --- /dev/null +++ b/docs/app/assets/Error404.html @@ -0,0 +1,11 @@ +Oops! + +The page you requested does not exist. Perhaps you were looking for something else... + + + + + {{ key }} + {{ item.name }} + + diff --git a/docs/app/assets/css/docs.css b/docs/app/assets/css/docs.css index 64f2e4b76ed4..98c0bec677f3 100644 --- a/docs/app/assets/css/docs.css +++ b/docs/app/assets/css/docs.css @@ -501,10 +501,6 @@ h4 { padding-top:20px; } -.improve-docs { - float:right; -} - .btn { color:#428bca; position: relative; @@ -538,10 +534,17 @@ h4 { background:white!important; } +.view-source, .improve-docs { + position:relative; + z-index:100; +} + .view-source { margin-right:10px; - padding-right:10px; - border-right:1px solid #999; +} + +.improve-docs { + float:right; } .return-arguments, diff --git a/docs/app/src/directives.js b/docs/app/src/directives.js index 15bef69be43e..99a751c0f995 100644 --- a/docs/app/src/directives.js +++ b/docs/app/src/directives.js @@ -10,9 +10,10 @@ angular.module('directives', []) * * @description Ensure that the browser scrolls when the anchor is clicked */ -.directive('backToTop', ['$anchorScroll', function($anchorScroll) { +.directive('backToTop', ['$anchorScroll', '$location', function($anchorScroll, $location) { return function link(scope, element) { element.on('click', function(event) { + $location.hash(''); scope.$apply($anchorScroll); }); }; diff --git a/docs/app/src/docs.js b/docs/app/src/docs.js index 5163e98225eb..74d78136fc15 100644 --- a/docs/app/src/docs.js +++ b/docs/app/src/docs.js @@ -87,7 +87,7 @@ angular.module('DocsController', []) breadcrumbPath += '/'; }); } else { - $scope.currentArea = null; + $scope.currentArea = NG_NAVIGATION['api']; $scope.breadcrumb = []; } }); diff --git a/docs/app/src/search.js b/docs/app/src/search.js index 9ae18ff6fcb4..49d73343bab6 100644 --- a/docs/app/src/search.js +++ b/docs/app/src/search.js @@ -45,6 +45,10 @@ angular.module('search', []) }; }]) +.controller('Error404SearchCtrl', ['$scope', '$location', 'docsSearch', function($scope, $location, docsSearch) { + $scope.results = docsSearch($location.path().split(/[\/\.:]/).pop()); +}]) + .factory('lunrSearch', function() { return function(properties) { if (window.RUNNING_IN_NG_TEST_RUNNER) return null; diff --git a/docs/app/src/tutorials.js b/docs/app/src/tutorials.js index 2f46494c55d3..7f86546f9f5a 100644 --- a/docs/app/src/tutorials.js +++ b/docs/app/src/tutorials.js @@ -21,10 +21,10 @@ angular.module('tutorials', []) element.addClass('btn-group'); element.addClass('tutorial-nav'); element.append(templateMerge( - ' Previous\n' + - ' Live Demo\n' + - ' Code Diff\n' + - 'Next ', props)); + ' Previous\n' + + ' Live Demo\n' + + ' Code Diff\n' + + 'Next ', props)); } }; }) diff --git a/docs/config/index.js b/docs/config/index.js index 9dfa4abf710f..5aca987a4298 100644 --- a/docs/config/index.js +++ b/docs/config/index.js @@ -25,6 +25,10 @@ module.exports = function(config) { require('./tag-defs/tutorial-step') ]); + config.append('processing.inlineTagDefinitions', [ + require('./inline-tag-defs/type') + ]); + config.set('processing.search.ignoreWordsFile', path.resolve(packagePath, 'ignore.words')); config.prepend('rendering.templateFolders', [ diff --git a/docs/config/inline-tag-defs/type.js b/docs/config/inline-tag-defs/type.js new file mode 100644 index 000000000000..b0a11b5a63ac --- /dev/null +++ b/docs/config/inline-tag-defs/type.js @@ -0,0 +1,12 @@ +var typeClassFilter = require('dgeni-packages/ngdoc/rendering/filters/type-class'); +var encoder = new require('node-html-encoder').Encoder(); + +module.exports = { + name: 'type', + description: 'Replace with markup that displays a nice type', + handlerFactory: function() { + return function(doc, tagName, tagDescription) { + return ''+encoder.htmlEncode(tagDescription) + ''; + }; + } +}; diff --git a/docs/config/processors/error-docs.js b/docs/config/processors/error-docs.js index 3fed96c578d5..2543190d1d8e 100644 --- a/docs/config/processors/error-docs.js +++ b/docs/config/processors/error-docs.js @@ -22,6 +22,12 @@ module.exports = { _.forEach(docs, function(doc) { if ( doc.docType === 'error' ) { + // Parse out the error info from the id + parts = doc.name.split(':'); + doc.namespace = parts[0]; + doc.name = parts[1]; + + var namespaceDoc = errorNamespaces[doc.namespace]; if ( !namespaceDoc ) { // First time we came across this namespace, so create a new one diff --git a/docs/config/processors/git-data.js b/docs/config/processors/git-data.js index 229864bb920f..16bbef43c67d 100644 --- a/docs/config/processors/git-data.js +++ b/docs/config/processors/git-data.js @@ -1,4 +1,5 @@ var gruntUtils = require('../../../lib/grunt/utils'); +var versionInfo = require('../../../lib/versions/version-info'); module.exports = { name: 'git-data', @@ -6,9 +7,9 @@ module.exports = { description: 'This processor adds information from the local git repository to the extraData injectable', init: function(config, injectables) { injectables.value('gitData', { - version: gruntUtils.getVersion(), - versions: gruntUtils.getPreviousVersions(), - info: gruntUtils.getGitRepoInfo() + version: versionInfo.currentVersion, + versions: versionInfo.previousVersions, + info: versionInfo.gitRepoInfo }); }, process: function(extraData, gitData) { diff --git a/docs/config/processors/pages-data.js b/docs/config/processors/pages-data.js index 43fdc9ddb747..1b93b021a2b7 100644 --- a/docs/config/processors/pages-data.js +++ b/docs/config/processors/pages-data.js @@ -145,6 +145,9 @@ module.exports = { _(docs) .filter(function(doc) { return doc.area === 'api'; }) .filter(function(doc) { return doc.docType === 'module'; }) + .forEach(function(doc) { if ( !doc.path ) { + log.warn('Missing path property for ', doc.id); + }}) .map(function(doc) { return _.pick(doc, ['id', 'module', 'docType', 'area']); }) .tap(function(docs) { log.debug(docs); @@ -188,12 +191,6 @@ module.exports = { area.navGroups = navGroupMapper(pages, area); }); - _.forEach(docs, function(doc) { - if ( !doc.path ) { - log.warn('Missing path property for ', doc.id); - } - }); - // Extract a list of basic page information for mapping paths to paritals and for client side searching var pages = _(docs) .map(function(doc) { diff --git a/docs/config/templates/indexPage.template.html b/docs/config/templates/indexPage.template.html index 28128ba03635..b5ec7122e015 100644 --- a/docs/config/templates/indexPage.template.html +++ b/docs/config/templates/indexPage.template.html @@ -175,7 +175,7 @@ {{ key }} - @@ -219,14 +219,14 @@ {{ key }} Loading... - +
The page you requested does not exist. Perhaps you were looking for something else...