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

ng-annotate-patched

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-annotate-patched - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

ng-annotate-patched/build/es5/traverse.js

2

ng-annotate-patched/build/es5/lut.js

@@ -8,3 +8,3 @@ // lut.js

var assert = require("assert");
var traverse = require("ordered-ast-traverse");
var traverse = require("./traverse");
var is = require("simple-is");

@@ -11,0 +11,0 @@

@@ -9,3 +9,3 @@ // ng-annotate-main.js

var alter = require("alter");
var traverse = require("ordered-ast-traverse");
var traverse = require("./traverse");
var EOL = require("os").EOL;

@@ -799,2 +799,5 @@ var assert = require("assert");

node = node.init; // var foo = ___;
} else if (is.someof(node.type, ["ExportDefaultDeclaration", "ExportNamedDeclaration"])) {
onode = node;
node = node.declaration;
} else {

@@ -1028,3 +1031,5 @@ onode = node;

function isFunctionDeclarationWithArgs(node) {
return node.type === "FunctionDeclaration" && node.params.length >= 1;
// For `export default function() {...}`, `id` is null, which means
// we cannot inject it. So ignore that.
return node.type === "FunctionDeclaration" && node.params.length >= 1 && node.id !== null;
}

@@ -1031,0 +1036,0 @@ function isGenericProviderName(node) {

@@ -12,3 +12,3 @@ // ng-annotate.js

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

@@ -15,0 +15,0 @@ .usage("ng-annotate v" + version + "\n\nUsage: ng-annotate OPTIONS <file>\n\n" +

@@ -8,3 +8,3 @@ // scopetools.js

var assert = require("assert");
var traverse = require("ordered-ast-traverse");
var traverse = require("./traverse");
var Scope = require("./scope");

@@ -11,0 +11,0 @@ var is = require("simple-is");

@@ -1019,1 +1019,10 @@ "use strict";

myMod.service("a", MyCtrl);
import "foo";
export const bar = "";
/* @ngInject */
export default function exportDefaultFunction($scope) {}
/* @ngInject */
export function exportFunction($scope) {}

@@ -1062,1 +1062,12 @@ "use strict";

myMod.service("a", MyCtrl);
import "foo";
export const bar = "";
/* @ngInject */
export default function exportDefaultFunction($scope) {}
exportDefaultFunction.$inject = ["$scope"];
/* @ngInject */
export function exportFunction($scope) {}
exportFunction.$inject = ["$scope"];

@@ -8,3 +8,3 @@ // lut.js

const assert = require("assert");
const traverse = require("ordered-ast-traverse");
const traverse = require("./traverse");
const is = require("simple-is");

@@ -11,0 +11,0 @@

@@ -9,3 +9,3 @@ // ng-annotate-main.js

const alter = require("alter");
const traverse = require("ordered-ast-traverse");
const traverse = require("./traverse");
let EOL = require("os").EOL;

@@ -799,2 +799,5 @@ const assert = require("assert");

node = node.init; // var foo = ___;
} else if (is.someof(node.type, ["ExportDefaultDeclaration", "ExportNamedDeclaration"])) {
onode = node;
node = node.declaration;
} else {

@@ -1028,3 +1031,5 @@ onode = node;

function isFunctionDeclarationWithArgs(node) {
return node.type === "FunctionDeclaration" && node.params.length >= 1;
// For `export default function() {...}`, `id` is null, which means
// we cannot inject it. So ignore that.
return node.type === "FunctionDeclaration" && node.params.length >= 1 && node.id !== null;
}

@@ -1031,0 +1036,0 @@ function isGenericProviderName(node) {

{
"name": "ng-annotate-patched",
"version": "1.3.0",
"version": "1.4.0",
"description": "add, remove and rebuild angularjs dependency injection annotations",

@@ -15,3 +15,2 @@ "main": "build/es5/ng-annotate-main.js",

"optimist": "~0.6.1",
"ordered-ast-traverse": "~1.1.1",
"simple-fmt": "~0.1.0",

@@ -18,0 +17,0 @@ "simple-is": "~0.2.0",

@@ -20,2 +20,5 @@ # Fork details

- Added support for ngInject comments on `export [default] function functionName() {...}`
declarations.
- Published to npm under the name `ng-annotate-patched`.

@@ -22,0 +25,0 @@

@@ -8,3 +8,3 @@ // scopetools.js

const assert = require("assert");
const traverse = require("ordered-ast-traverse");
const traverse = require("./traverse");
const Scope = require("./scope");

@@ -11,0 +11,0 @@ const is = require("simple-is");

@@ -1019,1 +1019,10 @@ "use strict";

myMod.service("a", MyCtrl);
import "foo";
export const bar = "";
/* @ngInject */
export default function exportDefaultFunction($scope) {}
/* @ngInject */
export function exportFunction($scope) {}

@@ -1062,1 +1062,12 @@ "use strict";

myMod.service("a", MyCtrl);
import "foo";
export const bar = "";
/* @ngInject */
export default function exportDefaultFunction($scope) {}
exportDefaultFunction.$inject = ["$scope"];
/* @ngInject */
export function exportFunction($scope) {}
exportFunction.$inject = ["$scope"];
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