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

grunt-ng-annotate

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-ng-annotate - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

test/fixtures/multiple-1.js

12

Gruntfile.js

@@ -136,2 +136,14 @@ /**

},
multipleFileSources: {
options: {
add: false,
remove: true,
},
files: [{
expand: true,
cwd: 'test/fixtures',
src: ['multiple-1.js', 'multiple-2.js'],
dest: 'test/tmp',
}],
},
},

@@ -138,0 +150,0 @@

2

package.json
{
"name": "grunt-ng-annotate",
"version": "0.2.1",
"version": "0.2.2",
"description": "Add, remove and rebuild AngularJS dependency injection annotations.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/mzgol/grunt-ng-annotate",

@@ -25,33 +25,33 @@ /**

// Iterate over all specified file groups.
this.files.forEach(function (mapping) {
var tmpFilePath = mapping.dest; // use the destination file as a temporary source one
if (!options.ngAnnotateOptions) {
options.ngAnnotateOptions = {};
}
if (!options.ngAnnotateOptions) {
options.ngAnnotateOptions = {};
}
if (options.add != null) {
options.ngAnnotateOptions.add = options.add;
delete options.add;
} else {
options.ngAnnotateOptions.add = true;
}
if (options.add != null) {
options.ngAnnotateOptions.add = options.add;
delete options.add;
} else {
options.ngAnnotateOptions.add = true;
}
if (options.remove != null) {
options.ngAnnotateOptions.remove = options.remove;
delete options.remove;
} else {
options.ngAnnotateOptions.remove = false;
}
if (options.remove != null) {
options.ngAnnotateOptions.remove = options.remove;
delete options.remove;
} else {
options.ngAnnotateOptions.remove = false;
}
if (options.regexp != null) {
options.ngAnnotateOptions.regexp = options.regexp;
delete options.regexp;
}
if (options.regexp != null) {
options.ngAnnotateOptions.regexp = options.regexp;
delete options.regexp;
}
if (options.singleQuotes != null) {
options.ngAnnotateOptions.single_quotes = options.singleQuotes;
delete options.singleQuotes;
}
if (options.singleQuotes != null) {
options.ngAnnotateOptions.single_quotes = options.singleQuotes;
delete options.singleQuotes;
}
// Iterate over all specified file groups.
this.files.forEach(function (mapping) {
var tmpFilePath = mapping.dest; // use the destination file as a temporary source one

@@ -58,0 +58,0 @@ if (mapping.dest) {

@@ -62,2 +62,7 @@ // Note: we don't need to test full ngAnnotate functionality here as that's already

});
it('should pass the correct options when using multiple input sources', function () {
expect(readTmp('multiple-1.js')).to.be(readFix('not-annotated.js'));
expect(readTmp('multiple-2.js')).to.be(readFix('not-annotated.js'));
});
});

Sorry, the diff of this file is not supported yet

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