Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng-annotate

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-annotate - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

4

build/es5/ng-annotate-main.js

@@ -57,3 +57,3 @@ "use strict";

var matchAngularModule = (obj.$chained || isShortDef(obj, re) || isLongDef(obj)) &&
is.someof(prop.name, ["provider", "value", "config", "factory", "directive", "filter", "run", "controller", "service"]);
is.someof(prop.name, ["provider", "value", "constant", "config", "factory", "directive", "filter", "run", "controller", "service", "decorator"]);
if (!matchAngularModule) {

@@ -64,3 +64,3 @@ return false;

if (is.someof(prop.name, ["provider", "value"])) {
if (is.someof(prop.name, ["provider", "value", "constant"])) {
return false; // affects matchAngularModule because of chaining

@@ -67,0 +67,0 @@ }

@@ -6,3 +6,3 @@ "use strict";

var ngAnnotate = require("./ng-annotate-main");
var version = "0.3.1";
var version = "0.3.2";
var optimist = require("optimist")

@@ -9,0 +9,0 @@ .usage("ng-annotate v" + version + "\n\nUsage: ng-annotate OPTIONS file.js")

@@ -114,2 +114,3 @@ "use strict";

}).value("foo", "bar")
.constant("foo", "bar")
.factory("foo", function() {

@@ -122,1 +123,11 @@ b;

});
// $provide
angular.module("MyMod").directive("foo", function($a, $b) {
$provide.decorator("foo", function($scope, $timeout) {
a;
});
$provide.factory("bar", function($timeout, $scope) {
b;
});
});

@@ -114,2 +114,3 @@ "use strict";

}).value("foo", "bar")
.constant("foo", "bar")
.factory("foo", function() {

@@ -122,1 +123,11 @@ b;

}]);
// $provide
angular.module("MyMod").directive("foo", ["$a","$b", function($a, $b) {
$provide.decorator("foo", ["$scope","$timeout", function($scope, $timeout) {
a;
}]);
$provide.factory("bar", ["$timeout","$scope", function($timeout, $scope) {
b;
}]);
}]);

@@ -0,1 +1,5 @@

## v0.3.2 2013-09-30
* bugfix angular.module("MyMod").constant("foo", "bar") disrupting chaining
* match $provide.decorator (in addition to other $provide methods)
## v0.3.1 2013-09-30

@@ -2,0 +6,0 @@ * bugfix angular.module("MyMod").value("foo", "bar") disrupting chaining

@@ -57,3 +57,3 @@ "use strict";

const matchAngularModule = (obj.$chained || isShortDef(obj, re) || isLongDef(obj)) &&
is.someof(prop.name, ["provider", "value", "config", "factory", "directive", "filter", "run", "controller", "service"]);
is.someof(prop.name, ["provider", "value", "constant", "config", "factory", "directive", "filter", "run", "controller", "service", "decorator"]);
if (!matchAngularModule) {

@@ -64,3 +64,3 @@ return false;

if (is.someof(prop.name, ["provider", "value"])) {
if (is.someof(prop.name, ["provider", "value", "constant"])) {
return false; // affects matchAngularModule because of chaining

@@ -67,0 +67,0 @@ }

{
"name": "ng-annotate",
"version": "0.3.1",
"version": "0.3.2",
"description": "add, remove and rebuild angularjs dependency injection annotations",

@@ -5,0 +5,0 @@ "main": "build/es5/ng-annotate-main.js",

@@ -76,8 +76,11 @@ # ng-annotate

ng-annotate understands `this.$get = function($scope)` and
`{.., $get: function($scope), ..}` inside a `provider`.
ng-annotate understands `this.$get = function($scope) ..` and
`{.., $get: function($scope) ..}` inside a `provider`.
ng-annotate understands `return {.., controller: function($scope), ..}` inside a
ng-annotate understands `return {.., controller: function($scope) ..}` inside a
`directive`.
ng-annotate understands `$provide.decorator("bar", function($scope) ..)` and other methods
on `provide` such as `factory`.
ng-annotate understands chaining.

@@ -84,0 +87,0 @@

@@ -114,2 +114,3 @@ "use strict";

}).value("foo", "bar")
.constant("foo", "bar")
.factory("foo", function() {

@@ -122,1 +123,11 @@ b;

});
// $provide
angular.module("MyMod").directive("foo", function($a, $b) {
$provide.decorator("foo", function($scope, $timeout) {
a;
});
$provide.factory("bar", function($timeout, $scope) {
b;
});
});

@@ -114,2 +114,3 @@ "use strict";

}).value("foo", "bar")
.constant("foo", "bar")
.factory("foo", function() {

@@ -122,1 +123,11 @@ b;

}]);
// $provide
angular.module("MyMod").directive("foo", ["$a","$b", function($a, $b) {
$provide.decorator("foo", ["$scope","$timeout", function($scope, $timeout) {
a;
}]);
$provide.factory("bar", ["$timeout","$scope", function($timeout, $scope) {
b;
}]);
}]);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc