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

gulp-angular-esmodules-filesort

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-angular-esmodules-filesort - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

30

index.js

@@ -68,17 +68,10 @@ 'use strict';

if(file.babel && file.babel.modules.imports.length > 0){
var importedPaths = _.uniq(file.babel.modules.imports
var importPaths = file.babel.modules.imports
.map(function (anImport) {
return path.join(path.dirname(file.path), anImport.source + options.defaultExtension);
}));
});
importedPaths
.map(function(importedPath){
return files.find(function(file){
return file.path === importedPath;
});
})
.forEach(function(importedFile){
if(importedFile){
esModuleToSort.push([file, importedFile]);
}
_.uniq(importPaths)
.forEach(function(importPath){
esModuleToSort.push([file, importPath]);
});

@@ -106,2 +99,15 @@ }

}
// Convert all module names to actual files with declarations:
esModuleToSort = esModuleToSort.map(function (sortItem) {
var importedFile = files.find(function(file){
return file.path === sortItem[1];
});
if (importedFile) {
return [sortItem[0], importedFile];
} else {
// importing a module outside stream (possibly a 3rd party one),
// don't care when sorting:
return undefined;
}
}).filter(_.identity);

@@ -108,0 +114,0 @@ // Sort files alphabetically first to prevent random reordering.

2

package.json
{
"name": "gulp-angular-esmodules-filesort",
"version": "1.2.2",
"version": "1.2.3",
"description": "Automatically sort AngularJS app files depending on module definitions and usage and also ES6 import/exports",

@@ -5,0 +5,0 @@ "main": "index.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