Comparing version 1.4.0 to 1.4.1
@@ -0,1 +1,10 @@ | ||
1.4.1 (July 9, 2016) | ||
==================== | ||
* Removes git+ prefix from git+https repository | ||
* Fix issue where license key (e.g. MIT) is at the very end of the file | ||
* Adds Public Domain license | ||
* Moved MIT license text into a separate LICENSE.md file | ||
* Sorts list of modules by name@version, not just name | ||
1.4.0 (January 16, 2016) | ||
@@ -2,0 +11,0 @@ ==================== |
@@ -11,3 +11,3 @@ /** | ||
* @@NLF-IGNORE@@ | ||
* | ||
* | ||
*/ | ||
@@ -17,6 +17,13 @@ | ||
var preRegex = '(?:^|\\s|"|\\()'; | ||
var postRegex ='(?:$|\\s|"|\\))'; | ||
function regexpBuilder(text, flags) { | ||
return new RegExp(preRegex + text + postRegex, flags); | ||
} | ||
var patterns = [ { | ||
'name': 'BSD', | ||
'regex': [ | ||
/(?:^|\s)BSD\s/ | ||
regexpBuilder('BSD'), | ||
] | ||
@@ -27,10 +34,16 @@ }, | ||
'regex': [ | ||
/(?:^|\s)GPL\s/, | ||
/(?:^|\s)GPLv\d\s/ | ||
regexpBuilder('GPL', 'i'), | ||
regexpBuilder('GPLv\\d') | ||
] | ||
}, | ||
{ | ||
'name': 'Public Domain', | ||
'regex': [ | ||
regexpBuilder('Public domain', 'i'), | ||
] | ||
}, | ||
{ | ||
'name': 'LGPL', | ||
'regex': [ | ||
/(?:^|\s)LGPL\s/ | ||
regexpBuilder('LGPL'), | ||
] | ||
@@ -41,4 +54,4 @@ }, | ||
'regex' : [ | ||
/(?:^|\s)MIT\s/, | ||
/(?:^|\s)\(MIT\)\s/ | ||
/(?:^|\s)MIT(?:$|\s)/, | ||
/(?:^|\s)\(MIT\)(?:$|\s)/ | ||
] | ||
@@ -49,3 +62,3 @@ }, | ||
'regex': [ | ||
/(?:^|\s)Apache\sLicen[cs]e\s/i | ||
regexpBuilder('Apache\\sLicen[cs]e', 'i') | ||
] | ||
@@ -56,3 +69,3 @@ }, | ||
'regex': [ | ||
/(?:^|\s)MPL\s/ | ||
regexpBuilder('MPL') | ||
] | ||
@@ -63,4 +76,7 @@ }, | ||
'regex': [ | ||
/(?:^|\s)WTFPL\s/, | ||
/(?:^|\s)DO\sWHAT\sTHE\sFUCK\sYOU\sWANT\sTO\sPUBLIC\sLICEN[CS]E\s/i | ||
regexpBuilder('WTFPL'), | ||
regexpBuilder( | ||
'DO\\sWHAT\\sTHE\\sFUCK\\sYOU\\sWANT\\sTO\\sPUBLIC\\sLICEN[CS]E', | ||
'i' | ||
) | ||
] | ||
@@ -71,4 +87,3 @@ }, | ||
'regex': [ | ||
/(?:^|\s)ISC\s/, | ||
/(?:^|\s)\(ISC\)\s/ | ||
regexpBuilder('ISC') | ||
] | ||
@@ -79,14 +94,14 @@ }, | ||
'regex': [ | ||
/(?:^|\s)Eclipse\sPublic\sLicen[cs]e\s/i, | ||
/(?:^|\s)EPL\s/, | ||
/(?:(?:^|\s)|\()EPL-1\.0(?:\)|\s)/ | ||
regexpBuilder('Eclipse\\sPublic\\sLicen[cs]e', 'i'), | ||
regexpBuilder('EPL'), | ||
regexpBuilder('EPL-1\\.0') | ||
] | ||
} | ||
], | ||
// pattern to deliberately exclude a file | ||
excludePattern = /@@NLF-IGNORE@@/; | ||
// pattern to deliberately exclude a file | ||
excludePattern = /@@NLF-IGNORE@@/; | ||
/** | ||
* Identifies potential license text | ||
* | ||
* | ||
* @param {String} text The text to scan | ||
@@ -96,3 +111,2 @@ * @return {Array} Array of potential license names | ||
function identifyLicense(text) { | ||
var licenseIndex, | ||
@@ -102,3 +116,3 @@ regexIndex, | ||
output = []; | ||
// ignore files that have the ignore flag - e.g. the nfl project itself | ||
@@ -120,2 +134,2 @@ if (!excludePattern.test(text)) { | ||
module.exports = identifyLicense; | ||
module.exports = identifyLicense; |
@@ -41,3 +41,4 @@ | ||
.replace('git://', 'http://') | ||
.replace('.git', ''); | ||
.replace('.git', '') | ||
.replace(/^git\+/, ''); | ||
this.directory = directory; | ||
@@ -44,0 +45,0 @@ this.type = type || '(none)'; |
@@ -13,13 +13,14 @@ /** | ||
var readInstalled = require('read-installed'), | ||
Module = require('./module'), | ||
path = require('path'), | ||
fs = require('fs'), | ||
glob = require('glob-all'), | ||
FileSource = require('./file-source'), | ||
PackageSource = require('./package-source'), | ||
csvFormatter = require('./formatters/csv'), | ||
standardFormatter = require('./formatters/standard'), | ||
LicenseCollection = require('./license-collection'), | ||
licenseFind = require('./license-find'); | ||
var readInstalled = require('read-installed'); | ||
var compareModuleNames = require('./compare-module-names'); | ||
var Module = require('./module'); | ||
var path = require('path'); | ||
var fs = require('fs'); | ||
var glob = require('glob-all'); | ||
var FileSource = require('./file-source'); | ||
var PackageSource = require('./package-source'); | ||
var csvFormatter = require('./formatters/csv'); | ||
var standardFormatter = require('./formatters/standard'); | ||
var LicenseCollection = require('./license-collection'); | ||
var licenseFind = require('./license-find'); | ||
@@ -357,3 +358,3 @@ /** | ||
/** | ||
* Convert an object to an array | ||
* Convert the module list object to an array | ||
* | ||
@@ -374,12 +375,3 @@ * @param {Object} object The object | ||
// sort the array | ||
output.sort(function(a, b) { | ||
if (a.name < b.name) { | ||
return -1; | ||
} | ||
if (a.name > b.name) { | ||
return 1; | ||
} | ||
return 0; | ||
}); | ||
output.sort(compareModuleNames); | ||
@@ -422,3 +414,3 @@ return output; | ||
} | ||
processOptionSummaryMode(options); | ||
@@ -477,3 +469,3 @@ | ||
console.error('Error in reading node_module dependencies, error was:', | ||
output, details); | ||
output, details); | ||
} | ||
@@ -480,0 +472,0 @@ |
@@ -6,3 +6,3 @@ { | ||
"author": "Ian Kelly <iandotkelly@gmail.com>", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"license": "MIT", | ||
@@ -20,4 +20,5 @@ "bin": { | ||
"commander": "2.9.0", | ||
"glob-all": "3.0.1", | ||
"read-installed": "^4.0.1" | ||
"compare-versions": "2.0.2", | ||
"glob-all": "3.0.3", | ||
"read-installed": "4.0.3" | ||
}, | ||
@@ -30,3 +31,3 @@ "devDependencies": { | ||
"gulp-mocha": "^2.1.3", | ||
"should": "^8.1.1", | ||
"should": "^9.0.2", | ||
"jshint": "^2.9.1" | ||
@@ -33,0 +34,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3880484
30
135100
5
187
+ Addedcompare-versions@2.0.2
+ Addedcompare-versions@2.0.2(transitive)
+ Addedglob-all@3.0.3(transitive)
+ Addedminimist@0.1.0(transitive)
+ Addedyargs@1.2.6(transitive)
- Removedglob-all@3.0.1(transitive)
Updatedglob-all@3.0.3
Updatedread-installed@4.0.3