diff --git a/lib/github_changelog_generator.rb b/lib/github_changelog_generator.rb index a57226d..e571e78 100755 --- a/lib/github_changelog_generator.rb +++ b/lib/github_changelog_generator.rb @@ -8,6 +8,7 @@ require 'benchmark' require_relative 'github_changelog_generator/parser' require_relative 'github_changelog_generator/generator' require_relative 'github_changelog_generator/version' +require_relative 'github_changelog_generator/reader' module GitHubChangelogGenerator class ChangelogGenerator diff --git a/lib/github_changelog_generator/reader.rb b/lib/github_changelog_generator/reader.rb new file mode 100644 index 0000000..fe1f61a --- /dev/null +++ b/lib/github_changelog_generator/reader.rb @@ -0,0 +1,87 @@ +# +# Author:: Enrico Stahn +# +# Copyright 2014, Zanui, +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +module GitHubChangelogGenerator + # A Reader to read an existing ChangeLog file and return a structured object + # + # Example: + # reader = GitHubChangelogGenerator::Reader.new + # content = reader.read('./CHANGELOG.md') + class Reader + def initialize(options = {}) + defaults = { + heading_level: '##', + heading_structures: [ + /^## \[(?.+?)\]\((?.+?)\)( \((?.+?)\))?$/, + /^## (?.+?)( \((?.+?)\))?$/ + ] + } + + @options = options.merge(defaults) + + @heading_level = @options[:heading_level] + @heading_structures = @options[:heading_structures] + end + + # Parse a single heading and return a Hash + # + # The following heading structures are currently valid: + # - ## [v1.0.2](https://github.com/zanui/chef-thumbor/tree/v1.0.1) (2015-03-24) + # - ## [v1.0.2](https://github.com/zanui/chef-thumbor/tree/v1.0.1) + # - ## v1.0.2 (2015-03-24) + # - ## v1.0.2 + # + # @param [String] heading Heading from the ChangeLog File + # @return [Hash] Returns a structured Hash with version, url and date + def parse_heading(heading) + captures = { 'version' => nil, 'url' => nil, 'date' => nil } + + @heading_structures.each do |regexp| + matches = Regexp.new(regexp).match(heading) + captures.merge!(Hash[matches.names.map.zip(matches.captures)]) unless matches.nil? + + # Try Regular Expressions until you find one that delivers results + break unless matches.nil? + end + + captures + end + + # Parse the given ChangeLog data into a Hash + # + # @param [String] data File data from the ChangeLog.md + # @return [Hash] Parsed data, e.g. [{ 'version' => ..., 'url' => ..., 'date' => ..., 'content' => ...}, ...] + def parse(data) + sections = data.split(/^## .+?$/) + headings = data.scan(/^## .+?$/) + changelog = [] + + headings.each_with_index do |heading, index| + captures = parse_heading(heading) + captures['content'] = sections.at(index + 1) + changelog.push captures + end + + changelog + end + + def read(file_path) + parse File.read(file_path) + end + end +end diff --git a/spec/files/angular.js.md b/spec/files/angular.js.md new file mode 100644 index 0000000..898ef13 --- /dev/null +++ b/spec/files/angular.js.md @@ -0,0 +1,9395 @@ + +# 1.4.0-beta.6 cookie-liberation (2015-03-17) + + +## Bug Fixes + +- **$animate:** call `applyStyles` from options on `leave` + ([4374f892](https://github.com/angular/angular.js/commit/4374f892c6fa4af6ba1f2ed47c5f888fdb5fadc5), + [#10068](https://github.com/angular/angular.js/issues/10068)) +- **$browser:** don't crash if `history.state` access causes error in IE + ([3b8163b7](https://github.com/angular/angular.js/commit/3b8163b7b664f24499e75460ab50c066eaec0f78), + [#10367](https://github.com/angular/angular.js/issues/10367), [#10369](https://github.com/angular/angular.js/issues/10369)) +- **$sanitize:** disallow unsafe svg animation tags + ([67688d5c](https://github.com/angular/angular.js/commit/67688d5ca00f6de4c7fe6084e2fa762a00d25610), + [#11290](https://github.com/angular/angular.js/issues/11290)) +- **Angular:** properly compare RegExp with other objects for equality + ([f22e1fc9](https://github.com/angular/angular.js/commit/f22e1fc9610ae111a3ea8746a3a57169c99ce142), + [#11204](https://github.com/angular/angular.js/issues/11204), [#11205](https://github.com/angular/angular.js/issues/11205)) +- **date filter:** display localised era for `G` format codes + ([2b4dfa9e](https://github.com/angular/angular.js/commit/2b4dfa9e2b63d7ebb78f3b0fd3439d18f932e1cd), + [#10503](https://github.com/angular/angular.js/issues/10503), [#11266](https://github.com/angular/angular.js/issues/11266)) +- **filterFilter:** + - fix filtering using an object expression when the filter value is undefined + ([c62fa6bd](https://github.com/angular/angular.js/commit/c62fa6bd898e1048d4690d41034489dc60ba6ac2), + [#10419](https://github.com/angular/angular.js/issues/10419), [#10424](https://github.com/angular/angular.js/issues/10424)) + - do not throw an error if property is null when comparing objects + ([2c4ffd6a](https://github.com/angular/angular.js/commit/2c4ffd6af4eb012c4054fe7c096267bbc5510af0), + [#10991](https://github.com/angular/angular.js/issues/10991), [#10992](https://github.com/angular/angular.js/issues/10992), [#11116](https://github.com/angular/angular.js/issues/11116)) +- **form:** allow dynamic form names which initially evaluate to blank + ([410f7c68](https://github.com/angular/angular.js/commit/410f7c682633c681be641cd2a321f9e51671d474)) +- **jqLite:** attr should ignore comment, text and attribute nodes + ([bb5bf7f8](https://github.com/angular/angular.js/commit/bb5bf7f8162d11610a53428e630b47030bdc38e5)) +- **ng/$locale:** add ERA info in generic locale + ([4acb0af2](https://github.com/angular/angular.js/commit/4acb0af24c7fb3705a197ca96adc532de4766a7a)) +- **ngJq:** don't rely on existence of jqlite + ([342e5f3c](https://github.com/angular/angular.js/commit/342e5f3ce38d2fd10c5d5a98ca66f864286a7922), + [#11044](https://github.com/angular/angular.js/issues/11044)) +- **ngMessages:** ensure that multi-level transclusion works with `ngMessagesInclude` + ([d7ec5f39](https://github.com/angular/angular.js/commit/d7ec5f392e1550658ddf271a30627b1749eccb69), + [#11196](https://github.com/angular/angular.js/issues/11196)) +- **ngOptions:** fix model<->option interaction when using `track by` + ([6a03ca27](https://github.com/angular/angular.js/commit/6a03ca274314352052c3082163367a146bb11c2d), + [#10869](https://github.com/angular/angular.js/issues/10869), [#10893](https://github.com/angular/angular.js/issues/10893)) +- **rootScope:** prevent memory leak when destroying scopes + ([fb7db4a0](https://github.com/angular/angular.js/commit/fb7db4a07bd1b0b67824d3808fe315419b272689), + [#11173](https://github.com/angular/angular.js/issues/11173), [#11169](https://github.com/angular/angular.js/issues/11169)) + + +## Features + +- **$cookies:** + - allow passing cookie options + ([92c366d2](https://github.com/angular/angular.js/commit/92c366d205da36ec26502aded23db71a6473dad7), + [#8324](https://github.com/angular/angular.js/issues/8324), [#3988](https://github.com/angular/angular.js/issues/3988), [#1786](https://github.com/angular/angular.js/issues/1786), [#950](https://github.com/angular/angular.js/issues/950)) + - move logic into $cookies and deprecate $cookieStore + ([38fbe3ee](https://github.com/angular/angular.js/commit/38fbe3ee8370fc449b82d80df07b5c2ed2cd5fbe), + [#6411](https://github.com/angular/angular.js/issues/6411), [#7631](https://github.com/angular/angular.js/issues/7631)) +- **$cookiesProvider:** provide path, domain, expires and secure options + ([53c66369](https://github.com/angular/angular.js/commit/53c663699126815eabc2a3bc1e3bafc8b3874268)) +- **$interval:** pass additional arguments to the callback + ([4f1f9cfd](https://github.com/angular/angular.js/commit/4f1f9cfdb721cf308ca1162b2227836dc1d28388), + [#10632](https://github.com/angular/angular.js/issues/10632)) +- **$timeout:** pass additional arguments to the callback + ([3a4b6b83](https://github.com/angular/angular.js/commit/3a4b6b83efdb8051e5c4803c0892c19ceb2cba50), + [#10631](https://github.com/angular/angular.js/issues/10631)) +- **angular.merge:** provide an alternative to `angular.extend` that merges 'deeply' + ([c0498d45](https://github.com/angular/angular.js/commit/c0498d45feb913c318224ea70b5adf7112df6bac), + [#10507](https://github.com/angular/angular.js/issues/10507), [#10519](https://github.com/angular/angular.js/issues/10519)) +- **filterFilter:** compare object with custom `toString()` to primitive + ([f8c42161](https://github.com/angular/angular.js/commit/f8c421617096a8d613f4eb6d0f5b098ee149c029), + [#10464](https://github.com/angular/angular.js/issues/10464), [#10548](https://github.com/angular/angular.js/issues/10548)) +- **ngAria:** + - add `button` role to `ngClick` + ([bb365070](https://github.com/angular/angular.js/commit/bb365070a3ed7c2d26056d378ab6a8ef493b23cc), + [#9254](https://github.com/angular/angular.js/issues/9254), [#10318](https://github.com/angular/angular.js/issues/10318)) + - add roles to custom inputs + ([29cdaee2](https://github.com/angular/angular.js/commit/29cdaee2b6e853bc3f8882a00661698d146ecd18), + [#10012](https://github.com/angular/angular.js/issues/10012), [#10318](https://github.com/angular/angular.js/issues/10318)) +- **ngLocale:** Add FIRSTDAYOFWEEK and WEEKENDRANGE from google data + ([3d149c7f](https://github.com/angular/angular.js/commit/3d149c7f20ffabab5a635af9ddcfc7105112ab4a)) +- **ngMock:** + - allow mock $controller service to set up controller bindings + ([d02d0585](https://github.com/angular/angular.js/commit/d02d0585a086ecd2e1de628218b5a6d85c8fc7bd), + [#9425](https://github.com/angular/angular.js/issues/9425), [#11239](https://github.com/angular/angular.js/issues/11239)) + - add `they` helpers for testing multiple specs + ([e650c458](https://github.com/angular/angular.js/commit/e650c45894abe6314a806e6b3e32c908df5c00fd), + [#10864](https://github.com/angular/angular.js/issues/10864)) +- **ngModel:** support conversion to timezone other than UTC + ([0413bee8](https://github.com/angular/angular.js/commit/0413bee8cc563a6555f8d42d5f183f6fbefc7350), + [#11005](https://github.com/angular/angular.js/issues/11005)) + + +## Breaking Changes + +- **$cookies:** due to [38fbe3ee](https://github.com/angular/angular.js/commit/38fbe3ee8370fc449b82d80df07b5c2ed2cd5fbe), + + +`$cookies` no longer exposes properties that represent the current browser cookie +values. Now you must explicitly the methods described above to access the cookie +values. This also means that you can no longer watch the `$cookies` properties for +changes to the browser's cookies. + +This feature is generally only needed if a 3rd party library was programmatically +changing the cookies at runtime. If you rely on this then you must either write code that +can react to the 3rd party library making the changes to cookies or implement your own polling +mechanism. + + + + + +# 1.3.15 locality-filtration (2015-03-17) + +## Bug Fixes + +- **$animate:** call `applyStyles` with options on `leave` + ([ebd84e80](https://github.com/angular/angular.js/commit/ebd84e8008f45ccaa84290f6da8c2a114fcfa8cd), + [#10068](https://github.com/angular/angular.js/issues/10068)) +- **$browser:** don't crash if history.state access causes error in IE + ([92767c09](https://github.com/angular/angular.js/commit/92767c098feaf8c58faf2d67f882305019d8160e), + [#10367](https://github.com/angular/angular.js/issues/10367), [#10369](https://github.com/angular/angular.js/issues/10369)) +- **Angular:** properly compare RegExp with other objects for equality + ([b8e8f9af](https://github.com/angular/angular.js/commit/b8e8f9af78f4ef3e556dd3cef6bfee35ad4cb82a), + [#11204](https://github.com/angular/angular.js/issues/11204), [#11205](https://github.com/angular/angular.js/issues/11205)) +- **date filter:** display localised era for `G` format codes + ([f2683f95](https://github.com/angular/angular.js/commit/f2683f956fcd3216eaa263db20b31e0d46338800), + [#10503](https://github.com/angular/angular.js/issues/10503), [#11266](https://github.com/angular/angular.js/issues/11266)) +- **filterFilter:** + - fix filtering using an object expression when the filter value is `undefined` + ([63b9956f](https://github.com/angular/angular.js/commit/63b9956faf4c3679c88a9401b8ccbb111c0294ee), + [#10419](https://github.com/angular/angular.js/issues/10419), [#10424](https://github.com/angular/angular.js/issues/10424)) + - do not throw an error if property is null when comparing objects + ([01161a0e](https://github.com/angular/angular.js/commit/01161a0e9fb1af93e9f06535aed8392ed7f116a4), + [#10991](https://github.com/angular/angular.js/issues/10991), [#10992](https://github.com/angular/angular.js/issues/10992), [#11116](https://github.com/angular/angular.js/issues/11116)) +- **form:** allow dynamic form names which initially evaluate to blank + ([190ea883](https://github.com/angular/angular.js/commit/190ea883c588d63f8b900a8de1d45c6c9ebb01ec), + [#11096](https://github.com/angular/angular.js/issues/11096)) +- **ng/$locale:** add ERA info in generic locale + ([57842530](https://github.com/angular/angular.js/commit/578425303f2480959da80f31920d08f277d42010)) +- **rootScope:** prevent memory leak when destroying scopes + ([528cf09e](https://github.com/angular/angular.js/commit/528cf09e3f78ad4e3bb6a329ebe315c4f29b4cdb), + [#11173](https://github.com/angular/angular.js/issues/11173), [#11169](https://github.com/angular/angular.js/issues/11169)) +- **templateRequest:** avoid throwing syntax error in Android 2.3 + ([75abbd52](https://github.com/angular/angular.js/commit/75abbd525f07866fdcc6fb311802b8fe700af174), + [#11089](https://github.com/angular/angular.js/issues/11089), [#11051](https://github.com/angular/angular.js/issues/11051), [#11088](https://github.com/angular/angular.js/issues/11088)) + + +## Features + +- **ngAria:** + - add `button` role to `ngClick` + ([b9ad91cf](https://github.com/angular/angular.js/commit/b9ad91cf1e86310a2d2bf13b29fa13a9b835e1ce), + [#9254](https://github.com/angular/angular.js/issues/9254), [#10318](https://github.com/angular/angular.js/issues/10318)) + - add roles to custom inputs + ([21369943](https://github.com/angular/angular.js/commit/21369943fafd577b36827a641b021b1c14cefb57), + [#10012](https://github.com/angular/angular.js/issues/10012), [#10318](https://github.com/angular/angular.js/issues/10318)) +- **ngMock:** + - allow mock $controller service to set up controller bindings + ([b3878a36](https://github.com/angular/angular.js/commit/b3878a36d9f8e56ad7be1eedb9691c9bd12568cb), + [#9425](https://github.com/angular/angular.js/issues/9425), [#11239](https://github.com/angular/angular.js/issues/11239)) + - add `they` helpers for testing multiple specs + ([7288be25](https://github.com/angular/angular.js/commit/7288be25a75d6ca6ac7eca05a7d6b12ccb3a22f8), + [#10864](https://github.com/angular/angular.js/issues/10864)) + + + + +# 1.4.0-beta.5 karmic-stabilization (2015-02-24) + + +## Bug Fixes + +- **$http:** properly access request headers with mixed case + ([5da1256f](https://github.com/angular/angular.js/commit/5da1256fc2812d5b28fb0af0de81256054856369), + [#10881](https://github.com/angular/angular.js/issues/10881), [#10883](https://github.com/angular/angular.js/issues/10883)) +- **input:** create max and/or min validator regardless of initial value + ([c211e7a5](https://github.com/angular/angular.js/commit/c211e7a5ad5f1fb8748125f14912aa8715081925), + [#10307](https://github.com/angular/angular.js/issues/10307), [#10327](https://github.com/angular/angular.js/issues/10327)) +- **ngAria:** correctly set "checked" attr for checkboxes and radios + ([d6eba217](https://github.com/angular/angular.js/commit/d6eba21733c6e67e90e3a4763d8d41ad89a73a0c), + [#10389](https://github.com/angular/angular.js/issues/10389), [#10212](https://github.com/angular/angular.js/issues/10212)) +- **ngModel:** fix issues when parserName is same as validator key + ([056a3170](https://github.com/angular/angular.js/commit/056a31700803c0a6014b43cfcc36c5c500cc596e), + [#10698](https://github.com/angular/angular.js/issues/10698), [#10850](https://github.com/angular/angular.js/issues/10850), [#11046](https://github.com/angular/angular.js/issues/11046)) +- **ngOptions:** ngModel is optional + ([ef894c87](https://github.com/angular/angular.js/commit/ef894c87eaead76d90169113ab6acc9287654ea3)) +- **ngSanitize:** Do not ignore white-listed svg camelCased attributes + ([46b80654](https://github.com/angular/angular.js/commit/46b80654cae9105642909cd55f73f7c26d2fbd80), + [#10779](https://github.com/angular/angular.js/issues/10779), [#10990](https://github.com/angular/angular.js/issues/10990), [#11124](https://github.com/angular/angular.js/issues/11124)) +- **select:** remove unknown option when model is undefined and empty option is available + ([30b48132](https://github.com/angular/angular.js/commit/30b48132e0fb92ea8dd25a9794b4c41a3a81a951), + [#11078](https://github.com/angular/angular.js/issues/11078), [#11092](https://github.com/angular/angular.js/issues/11092)) +- **templateRequest:** avoid throwing syntax error in Android 2.3 + ([f6272333](https://github.com/angular/angular.js/commit/f6272333127d908b19da23f9cd8a74052711795b), + [#11089](https://github.com/angular/angular.js/issues/11089), [#11051](https://github.com/angular/angular.js/issues/11051), [#11088](https://github.com/angular/angular.js/issues/11088)) + + +## Features + +- **CommonJS:** - angular modules are now packaged for npm with helpful exports + +- **limitTo:** extend the filter to take a beginning index argument + ([aaae3cc4](https://github.com/angular/angular.js/commit/aaae3cc4160417e6dad802ed9d9f6d5471821a87), + [#5355](https://github.com/angular/angular.js/issues/5355), [#10899](https://github.com/angular/angular.js/issues/10899)) +- **ngMessages:** provide support for dynamic message resolution + ([c9a4421f](https://github.com/angular/angular.js/commit/c9a4421fc3c97448527eadef1f42eb2f487ec2e0), + [#10036](https://github.com/angular/angular.js/issues/10036), [#9338](https://github.com/angular/angular.js/issues/9338)) +- **ngOptions:** add support for disabling an option + ([da9eac86](https://github.com/angular/angular.js/commit/da9eac8660343b1cd9fdcf9d2d1bda06067142d7), + [#638](https://github.com/angular/angular.js/issues/638), [#11017](https://github.com/angular/angular.js/issues/11017)) + + +## Performance Improvements + +- **$compile:** + - replace forEach(controller) with plain loops + ([5b522867](https://github.com/angular/angular.js/commit/5b5228675f67c8f5e04c7183c3ef5e71cb2bf08b), + [#11084](https://github.com/angular/angular.js/issues/11084)) + - avoid .data when fetching required controllers + ([fa0aa839](https://github.com/angular/angular.js/commit/fa0aa83937378cf8fc720c38bcc5c78fc923624e)) +- **ngOptions:** only watch labels if a display expression is specified + ([51faaffd](https://github.com/angular/angular.js/commit/51faaffdbcc734c55d52ff6c42b386d5c90207ea)) + + +## Breaking Changes + +- **ngMessages:** due to [c9a4421f](https://github.com/angular/angular.js/commit/c9a4421fc3c97448527eadef1f42eb2f487ec2e0), + + +The `ngMessagesInclude` attribute is now its own directive and that must +be placed as a **child** element within the element with the ngMessages +directive. (Keep in mind that the former behaviour of the +ngMessageInclude attribute was that all **included** ngMessage template +code was placed at the **bottom** of the element containing the +ngMessages directive; therefore to make this behave in the same way, +place the element containing the ngMessagesInclude directive at the +end of the container containing the ngMessages directive). + +```html + +
+
Your message is required
+
+ + +
+
Your message is required
+
+
+``` + + + +# 1.3.14 instantaneous-browserification (2015-02-24) + + +## Features + +- **CommonJS:** - angular modules are now packaged for npm with helpful exports + +## Bug Fixes + +- **input:** create max and/or min validator regardless of initial value + ([abfce532](https://github.com/angular/angular.js/commit/abfce5327ce6fd29c33c62d2edf3600674a6b4c0), + [#10307](https://github.com/angular/angular.js/issues/10307), [#10327](https://github.com/angular/angular.js/issues/10327)) +- **ngAria:** correctly set "checked" attr for checkboxes and radios + ([944c150e](https://github.com/angular/angular.js/commit/944c150e6c3001e51d4bf5e2d8149ae4c565d1e3), + [#10389](https://github.com/angular/angular.js/issues/10389), [#10212](https://github.com/angular/angular.js/issues/10212)) +- **ngModel:** fix issues when parserName is same as validator key + ([6b7625a0](https://github.com/angular/angular.js/commit/6b7625a09508c4b5355121a9d4206a734b07b2e1), + [#10698](https://github.com/angular/angular.js/issues/10698), [#10850](https://github.com/angular/angular.js/issues/10850), [#11046](https://github.com/angular/angular.js/issues/11046)) + + + + +# 1.4.0-beta.4 overlyexplosive-poprocks (2015-02-09) + + +## Bug Fixes + +- **$location:** prevent page reload if initial url has empty hash at the end + ([a509e9aa](https://github.com/angular/angular.js/commit/a509e9aa149d0f88cc39f703d539f7ffd4cd6103), + [#10397](https://github.com/angular/angular.js/issues/10397), [#10960](https://github.com/angular/angular.js/issues/10960)) +- **$parse:** Initialize elements in an array from left to right + ([966f6d83](https://github.com/angular/angular.js/commit/966f6d831f9469a917601f9a10604612cd7bd792)) +- **ngAria:** ensure native controls fire a single click + ([9d53e5a3](https://github.com/angular/angular.js/commit/9d53e5a38dd369dec82d82e13e078df3d6054c8a), + [#10388](https://github.com/angular/angular.js/issues/10388), [#10766](https://github.com/angular/angular.js/issues/10766)) +- **ngMock:** handle cases where injector is created before tests + ([898714df](https://github.com/angular/angular.js/commit/898714df9ea38f9ef700015ced5ddea52f096b77), + [#10967](https://github.com/angular/angular.js/issues/10967)) +- **sanitize:** handle newline characters inside special tags + ([cc8755cd](https://github.com/angular/angular.js/commit/cc8755cda6efda0b52954388e8a8d5306e4bfbca), + [030a42e7](https://github.com/angular/angular.js/commit/030a42e79dec8a4bb73053762f7a54d797a058f6) + [#10943](https://github.com/angular/angular.js/issues/10943)) + + +## Features + +- **ng-jq:** adds the ability to force jqLite or a specific jQuery version + ([09ee82d8](https://github.com/angular/angular.js/commit/09ee82d84dcbea4a6e8d85903af82dcd087a78a7)) + + + + +# 1.3.13 meticulous-riffleshuffle (2015-02-09) + + +## Bug Fixes + +- **$location:** prevent page reload if initial url has empty hash at the end + ([4b3a590b](https://github.com/angular/angular.js/commit/4b3a590b009d7fdceda7f52e7ba0352a271b3256), + [#10397](https://github.com/angular/angular.js/issues/10397), [#10960](https://github.com/angular/angular.js/issues/10960)) +- **ngAria:** ensure native controls fire a single click + ([69ee593f](https://github.com/angular/angular.js/commit/69ee593fd2cb5f1d7757efbe6b256e4458752fd7), + [#10388](https://github.com/angular/angular.js/issues/10388), [#10766](https://github.com/angular/angular.js/issues/10766)) +- **ngMock:** handle cases where injector is created before tests + ([39ddef68](https://github.com/angular/angular.js/commit/39ddef682971d3b7282bf9d08f6eaf97b7f4bca4), + [#10967](https://github.com/angular/angular.js/issues/10967)) +- **sanitize:** handle newline characters inside special tags + ([11aedbd7](https://github.com/angular/angular.js/commit/11aedbd741ccddba060a9805adba1779391731da), + [ce49d4d6](https://github.com/angular/angular.js/commit/ce49d4d61bd02464b6c6376af8048f6eb09330a8) + [#10943](https://github.com/angular/angular.js/issues/10943)) + + + + + + +# 1.4.0-beta.3 substance-mimicry (2015-02-02) + + +## Bug Fixes + +- **$compile:** + - do not initialize optional '&' binding if attribute not specified + ([6a38dbfd](https://github.com/angular/angular.js/commit/6a38dbfd3c34c8f9efff503d17eb3cbeb666d422), + [#6404](https://github.com/angular/angular.js/issues/6404), [#9216](https://github.com/angular/angular.js/issues/9216)) + - respect return value from controller constructor + ([62d514b0](https://github.com/angular/angular.js/commit/62d514b06937cc7dd86e973ea11165c88343b42d)) +- **$controller:** throw better error when controller expression is bad + ([dda65e99](https://github.com/angular/angular.js/commit/dda65e992b72044c0fa0c8f5f33184028c0e3ad7), + [#10875](https://github.com/angular/angular.js/issues/10875), [#10910](https://github.com/angular/angular.js/issues/10910)) +- **$parse:** + - handle null targets at assign + ([2e5a7e52](https://github.com/angular/angular.js/commit/2e5a7e52a0385575bbb55a801471b009afafeca3)) + - remove references to last arguments to a fn call + ([e61eae1b](https://github.com/angular/angular.js/commit/e61eae1b1f2351c51bcfe4142749a4e68a2806ff), + [#10894](https://github.com/angular/angular.js/issues/10894)) +- **a:** don't reload if there is only a name attribute + ([d729fcf0](https://github.com/angular/angular.js/commit/d729fcf030be1d3ef37196d36ea3bf3249ee3318), + [#6273](https://github.com/angular/angular.js/issues/6273), [#10880](https://github.com/angular/angular.js/issues/10880)) +- **angular.copy:** support copying `TypedArray`s + ([aa0f6449](https://github.com/angular/angular.js/commit/aa0f64496a66d2a5d1a4d033f2eb075a8b084a78), + [#10745](https://github.com/angular/angular.js/issues/10745)) +- **filter:** format timezone correctly in the case that UTC timezone is used + ([8c469191](https://github.com/angular/angular.js/commit/8c46919199090a05634789774124b38983430c76), + [#9359](https://github.com/angular/angular.js/issues/9359)) +- **ngRoute:** dont duplicate optional params into query + ([27bf2ce4](https://github.com/angular/angular.js/commit/27bf2ce40c5adfb1494d69c9d0ac9cf433834a12), + [#10689](https://github.com/angular/angular.js/issues/10689)) +- **ngScenario:** allow ngScenario to handle lazy-loaded and manually bootstrapped applications + ([c69caa7b](https://github.com/angular/angular.js/commit/c69caa7beee4e920f8f587eb3e943be99864a14f), + [#10723](https://github.com/angular/angular.js/issues/10723)) +- **validators:** maxlength should use viewValue for $isEmpty + ([bfcf9946](https://github.com/angular/angular.js/commit/bfcf9946e16d21b55dde50d4d21c71c898b10215), + [#10898](https://github.com/angular/angular.js/issues/10898)) + + +## Features + +- **$compile:** allow using bindToController as object, support both new/isolate scopes + ([35498d70](https://github.com/angular/angular.js/commit/35498d7045ba9138016464a344e2c145ce5264c1), + [#10420](https://github.com/angular/angular.js/issues/10420), [#10467](https://github.com/angular/angular.js/issues/10467)) +- **filter:** support conversion to timezone other than UTC + ([c6d8512a](https://github.com/angular/angular.js/commit/c6d8512a1d7345516d1bd9a039d81821b9518bff), + [#10858](https://github.com/angular/angular.js/issues/10858)) +- **ngMocks:** cleanup $inject annotations after each test + ([0baa17a3](https://github.com/angular/angular.js/commit/0baa17a3b7ad2b242df2b277b81cebdf75b04287)) + + +## Performance Improvements + +- **$scope:** Add a property $$watchersCount to scope + ([c1500ea7](https://github.com/angular/angular.js/commit/c1500ea775c4cb130088b7d5bb5fb872bda50bae)) +- **$parse** new and more performant parser + ([0d42426](https://github.com/angular/angular.js/commit/0d424263ead16635afb582affab2b147f8e71626)) + + +## Breaking Changes + +- **$compile:** due to [6a38dbfd](https://github.com/angular/angular.js/commit/6a38dbfd3c34c8f9efff503d17eb3cbeb666d422), +Previously, '&' expressions would always set up a function in the isolate scope. Now, if the binding +is marked as optional and the attribute is not specified, no function will be added to the isolate scope. + + + +# 1.3.12 outlandish-knitting (2015-02-02) + + +## Bug Fixes + +- **$controller:** throw better error when controller expression is bad + ([632b2ddd](https://github.com/angular/angular.js/commit/632b2ddd34c07b3b5a207bd83ca3a5e6e613e63b), + [#10875](https://github.com/angular/angular.js/issues/10875), [#10910](https://github.com/angular/angular.js/issues/10910)) +- **$parse:** remove references to last arguments to a fn call + ([7caad220](https://github.com/angular/angular.js/commit/7caad2205a6e9927890192a3638f55532bdaaf75), + [#10894](https://github.com/angular/angular.js/issues/10894)) +- **ngRoute:** dont duplicate optional params into query + ([f41ca4a5](https://github.com/angular/angular.js/commit/f41ca4a53ed53f172fb334911be56e42aad58794), + [#10689](https://github.com/angular/angular.js/issues/10689)) +- **ngScenario:** Allow ngScenario to handle lazy-loaded and manually bootstrapped applications + ([0bcd0872](https://github.com/angular/angular.js/commit/0bcd0872d8d2e37e6cb7aa5bc5cb0c742b4294f9), + [#10723](https://github.com/angular/angular.js/issues/10723)) +- **validators:** maxlength should use viewValue for $isEmpty + ([abd8e2a9](https://github.com/angular/angular.js/commit/abd8e2a9eb2d21ac67989c2f7b64c4c6547a1585), + [#10898](https://github.com/angular/angular.js/issues/10898)) + + +## Features + +- **ngMocks:** cleanup $inject annotations after each test + ([6ec59460](https://github.com/angular/angular.js/commit/6ec5946094ee92b820bbacc886fa2367715e60b4)) + + + + + +# 1.4.0-beta.2 holographic-rooster (2015-01-26) + + +## Bug Fixes + +- **$location:** don't rewrite when link is shift-clicked + ([8b33de6f](https://github.com/angular/angular.js/commit/8b33de6fd0ec0eb785fed697f062763b5c1d8d23), + [#9904](https://github.com/angular/angular.js/issues/9904), [#9906](https://github.com/angular/angular.js/issues/9906)) +- **$templateRequest:** cache downloaded templates as strings + ([b3a9bd3a](https://github.com/angular/angular.js/commit/b3a9bd3ae043e3042ea7ccfe08e3b36a84feb35e), + [#10630](https://github.com/angular/angular.js/issues/10630), [#10646](https://github.com/angular/angular.js/issues/10646)) +- **filterFilter:** throw error if input is not an array + ([cea8e751](https://github.com/angular/angular.js/commit/cea8e75144e6910b806b63a6ec2a6d118316fddd), + [#9992](https://github.com/angular/angular.js/issues/9992), [#10352](https://github.com/angular/angular.js/issues/10352)) +- **htmlAnchorDirective:** + - remove "element !== target element" check + ([2958cd30](https://github.com/angular/angular.js/commit/2958cd308b5ebaf223a3e5df3fb5bf0f23408447), + [#10866](https://github.com/angular/angular.js/issues/10866)) + - don't add event listener if replaced, ignore event if target is different element + ([b146af11](https://github.com/angular/angular.js/commit/b146af11271de8fa4c51c6db87df104269f41a33), + [#4262](https://github.com/angular/angular.js/issues/4262), [#10849](https://github.com/angular/angular.js/issues/10849)) +- **ngPluralize:** fix wrong text content when count is null/undefined + ([3228d3b4](https://github.com/angular/angular.js/commit/3228d3b4991af681e57de5ab079c1e1c11cf35cb), + [#10836](https://github.com/angular/angular.js/issues/10836), [#10841](https://github.com/angular/angular.js/issues/10841)) + +## Breaking Changes + +- **filterFilter:** due to [cea8e751](https://github.com/angular/angular.js/commit/cea8e75144e6910b806b63a6ec2a6d118316fddd), + Previously, the filter was not applied if used with a non array. +Now, it throws an error. This can be worked around by converting an object to an array, using +a filter such as https://github.com/petebacondarwin/angular-toArrayFilter + +Closes #9992 +Closes #10352 + + + +# 1.3.11 spiffy-manatee (2015-01-26) + + +## Bug Fixes + +- **$location:** don't rewrite when link is shift-clicked + ([939ca37c](https://github.com/angular/angular.js/commit/939ca37cfe5f6fc35b09b6705caabd1fcc3cf9d3), + [#9904](https://github.com/angular/angular.js/issues/9904), [#9906](https://github.com/angular/angular.js/issues/9906)) +- **htmlAnchorDirective:** + - remove "element !== target element" check + ([779e3f6b](https://github.com/angular/angular.js/commit/779e3f6b5f8d2550e758cb0c5f64187ba8e00e29), + [#10866](https://github.com/angular/angular.js/issues/10866)) + - don't add event listener if replaced, ignore event if target is different element + ([837a0775](https://github.com/angular/angular.js/commit/837a077578081bbd07863bef85241537d19fa652), + [#4262](https://github.com/angular/angular.js/issues/4262), [#10849](https://github.com/angular/angular.js/issues/10849)) + + + +# 1.4.0-beta.1 trepidatious-salamander (2015-01-20) + + +## Bug Fixes + +- **$animate:** ensure no transitions are applied when an empty inline style object is provided + ([0db5b21b](https://github.com/angular/angular.js/commit/0db5b21b1d09431535e0c0bf8ac63d4b5b24d349), + [#10613](https://github.com/angular/angular.js/issues/10613), [#10770](https://github.com/angular/angular.js/issues/10770)) +- **$compile:** support class directives on SVG elements + ([23c8a90d](https://github.com/angular/angular.js/commit/23c8a90d22f7c7b41b5a756b89498ffac828980a), + [#10736](https://github.com/angular/angular.js/issues/10736), [#10756](https://github.com/angular/angular.js/issues/10756)) +- **form:** clean up success state of controls when they are removed + ([2408f2de](https://github.com/angular/angular.js/commit/2408f2ded5ead6e678c241e38ef474c1fadff92b), + [#10509](https://github.com/angular/angular.js/issues/10509)) +- **ngController:** allow bound constructor fns as controllers + ([d17fbc38](https://github.com/angular/angular.js/commit/d17fbc3862e0a2e646db1222f184dbe663da4a1f), + [#10784](https://github.com/angular/angular.js/issues/10784), [#10790](https://github.com/angular/angular.js/issues/10790)) +- **ngRepeat:** do not sort object keys alphabetically + ([c260e738](https://github.com/angular/angular.js/commit/c260e7386391877625eda086480de73e8a0ba921), + [#6210](https://github.com/angular/angular.js/issues/6210), [#10538](https://github.com/angular/angular.js/issues/10538)) + + +## Features + +- **$http:** provide a config object as an argument to header functions + ([d435464c](https://github.com/angular/angular.js/commit/d435464c51d3912f56cfc830d86bfc64a1578327), + [#7235](https://github.com/angular/angular.js/issues/7235), [#10622](https://github.com/angular/angular.js/issues/10622)) + + +## Breaking Changes + +- **ngRepeat:** due to [c260e738](https://github.com/angular/angular.js/commit/c260e7386391877625eda086480de73e8a0ba921), + + +Previously, the order of items when using ngRepeat to iterate +over object properties was guaranteed to be consistent by sorting the +keys into alphabetic order. + +Now, the order of the items is browser dependent based on the order returned +from iterating over the object using the `for key in obj` syntax. + +It seems that browsers generally follow the strategy of providing +keys in the order in which they were defined, although there are exceptions +when keys are deleted and reinstated. See +https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_issues + +The best approach is to convert Objects into Arrays by a filter such as +https://github.com/petebacondarwin/angular-toArrayFilter +or some other mechanism, and then sort them manually in the order you need. + +Closes #6210 +Closes #10538 + + + + +# 1.3.10 heliotropic-sundial (2015-01-20) + + +## Bug Fixes + +- **$animate:** ensure no transitions are applied when an empty inline style object is provided + ([9b8df52a](https://github.com/angular/angular.js/commit/9b8df52aa960b9b6288fc150d55ea2e35f56555e), + [#10613](https://github.com/angular/angular.js/issues/10613), [#10770](https://github.com/angular/angular.js/issues/10770)) +- **$compile:** support class directives on SVG elements + ([7a9e3360](https://github.com/angular/angular.js/commit/7a9e3360284d58197a1fe34de57f5e0f6d1f4a76), + [#10736](https://github.com/angular/angular.js/issues/10736), [#10756](https://github.com/angular/angular.js/issues/10756)) +- **form:** clean up success state of controls when they are removed + ([cdc7280d](https://github.com/angular/angular.js/commit/cdc7280dd3d5a2ded784c06dd55fe36c2053fb6f), + [#10509](https://github.com/angular/angular.js/issues/10509)) +- **ngController:** allow bound constructor fns as controllers + ([d015c8a8](https://github.com/angular/angular.js/commit/d015c8a80b28754633c846fc50d11c9437519486), + [#10784](https://github.com/angular/angular.js/issues/10784), [#10790](https://github.com/angular/angular.js/issues/10790)) + + + + +# 1.4.0-beta.0 photonic-umbrakinesis (2015-01-13) + + +## Bug Fixes + +- **$location:** support right button click on anchors in firefox + ([aa798f12](https://github.com/angular/angular.js/commit/aa798f123658cb78b5581513d26577016195cafe), + [#7984](https://github.com/angular/angular.js/issues/7984)) +- **$templateRequest:** propagate HTTP status on failed requests + ([e24f22bd](https://github.com/angular/angular.js/commit/e24f22bdb1740388938d58778aa24d307a79a796), + [#10514](https://github.com/angular/angular.js/issues/10514), [#10628](https://github.com/angular/angular.js/issues/10628)) +- **dateFilter:** ignore invalid dates + ([1334b8c8](https://github.com/angular/angular.js/commit/1334b8c8326b93e0ca016c85516627900c7a9fd3), + [#10640](https://github.com/angular/angular.js/issues/10640)) +- **filterFilter:** use isArray() to determine array type + ([a01ce6b8](https://github.com/angular/angular.js/commit/a01ce6b81c197b0a4a1057981e8e9c1b74f37587), + [#10621](https://github.com/angular/angular.js/issues/10621)) +- **ngChecked:** ensure that ngChecked doesn't interfere with ngModel + ([e079111b](https://github.com/angular/angular.js/commit/e079111b33bf36be21c0941718b41cc9ca67bea0), + [#10662](https://github.com/angular/angular.js/issues/10662), [#10664](https://github.com/angular/angular.js/issues/10664)) +- **ngClass:** handle multi-class definitions as an element of an array + ([e1132f53](https://github.com/angular/angular.js/commit/e1132f53b03a5a71aa9b6eded24d64e3bc83929b), + [#8578](https://github.com/angular/angular.js/issues/8578), [#10651](https://github.com/angular/angular.js/issues/10651)) +- **ngModelOptions:** allow sharing options between multiple inputs + ([9c9c6b3f](https://github.com/angular/angular.js/commit/9c9c6b3fe4edfe78ae275c413ee3eefb81f1ebf6), + [#10667](https://github.com/angular/angular.js/issues/10667)) +- **ngOptions:** + - support one-time binding on the option values + ([ba90261b](https://github.com/angular/angular.js/commit/ba90261b7586b519483883800ea876510faf5c21), + [#10687](https://github.com/angular/angular.js/issues/10687), [#10694](https://github.com/angular/angular.js/issues/10694)) + - prevent infinite digest if track by expression is stable + ([fc21db8a](https://github.com/angular/angular.js/commit/fc21db8a15545fad53124fc941b3c911a8d57067), + [#9464](https://github.com/angular/angular.js/issues/9464)) + - update model if selected option is removed + ([933591d6](https://github.com/angular/angular.js/commit/933591d69cee2c5580da1d8522ba90a7d924da0e), + [#7736](https://github.com/angular/angular.js/issues/7736)) + - ensure that the correct option is selected when options are loaded async + ([7fda214c](https://github.com/angular/angular.js/commit/7fda214c4f65a6a06b25cf5d5aff013a364e9cef), + [#8019](https://github.com/angular/angular.js/issues/8019), [#9714](https://github.com/angular/angular.js/issues/9714), [#10639](https://github.com/angular/angular.js/issues/10639)) +- **ngPluralize:** generate a warning when using a not defined rule + ([c66b4b6a](https://github.com/angular/angular.js/commit/c66b4b6a133f7215d50c23db516986cfc1f0a985)) + + +## Features + +- **$filter:** display Infinity symbol when number is Infinity + ([51d67742](https://github.com/angular/angular.js/commit/51d6774286202b55ade402ca097e417e70fd546b), + [#10421](https://github.com/angular/angular.js/issues/10421)) +- **$timeout:** allow `fn` to be an optional parameter + ([5a603023](https://github.com/angular/angular.js/commit/5a60302389162c6ef45f311c1aaa65a00d538c66), + [#9176](https://github.com/angular/angular.js/issues/9176)) +- **limitTo:** ignore limit when invalid + ([a3c3bf33](https://github.com/angular/angular.js/commit/a3c3bf3332e5685dc319c46faef882cb6ac246e1), + [#10510](https://github.com/angular/angular.js/issues/10510)) +- **ngMock/$exceptionHandler:** log errors when rethrowing + ([deb3cb4d](https://github.com/angular/angular.js/commit/deb3cb4daef0054457bd9fb8995829fff0e8f1e4), + [#10540](https://github.com/angular/angular.js/issues/10540), [#10564](https://github.com/angular/angular.js/issues/10564)) + + +## Performance Improvements + +- **ngStyleDirective:** use $watchCollection + ([8928d023](https://github.com/angular/angular.js/commit/8928d0234551a272992d0eccef73b3ad6cb8bfd1), + [#10535](https://github.com/angular/angular.js/issues/10535)) + + +## Breaking Changes + +- **limitTo:** due to [a3c3bf33](https://github.com/angular/angular.js/commit/a3c3bf3332e5685dc319c46faef882cb6ac246e1), + limitTo changed behavior when limit value is invalid. +Instead of returning empty object/array it returns unchanged input. + + +- **ngOptions:** due to [7fda214c](https://github.com/angular/angular.js/commit/7fda214c4f65a6a06b25cf5d5aff013a364e9cef), + + +When using `ngOptions`: the directive applies a surrogate key as the value of the `