@es-shims/api
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -157,4 +157,15 @@ { | ||
"allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] | ||
} | ||
}, | ||
"requireImportAlphabetized": false, | ||
"requireSpaceBeforeObjectValues": true, | ||
"requireSpaceBeforeDestructuredValues": true, | ||
"disallowSpacesInsideTemplateStringPlaceholders": true, | ||
"disallowArrayDestructuringReturn": false, | ||
"requireNewlineBeforeSingleStatementsInIf": false | ||
} | ||
20
api.js
@@ -13,8 +13,15 @@ #!/usr/bin/env node | ||
var argEqualsBound = function (arg) { return arg === '--bound'; }; | ||
var not = function (fn) { return function () { return !fn.apply(this, arguments); }; }; | ||
var argEqualsProperty = function (arg) { return arg === '--property'; }; | ||
var not = function (fn) { | ||
return function () { | ||
return !fn.apply(this, arguments); | ||
}; | ||
}; | ||
var isBound = args.some(argEqualsBound); | ||
var isProperty = args.some(argEqualsProperty); | ||
var makeEntries = function (name) { return [name, name]; }; | ||
var moduleNames = args | ||
.filter(not(argEqualsBound)) | ||
.filter(not(argEqualsProperty)) | ||
.map(makeEntries); | ||
@@ -67,3 +74,7 @@ | ||
st.equal(implementation, module.implementation, 'module.exports.implementaton === implementation.js'); | ||
st.equal(typeof implementation, 'function', 'implementation is a function'); | ||
if (isProperty) { | ||
st.comment('# SKIP implementation that is a data property need not be a function'); | ||
} else { | ||
st.equal(typeof implementation, 'function', 'implementation is a function'); | ||
} | ||
st.end(); | ||
@@ -86,6 +97,9 @@ }); | ||
}); | ||
return void 0; | ||
}; | ||
moduleNames.forEach(function (data) { | ||
var name = data[0], filePath = data[1]; | ||
var name = data[0]; | ||
var filePath = data[1]; | ||
test('es-shim API : testing module: ' + name, function (t) { | ||
@@ -92,0 +106,0 @@ t.comment('* ----------------------------- * #'); |
@@ -0,1 +1,8 @@ | ||
1.2.0 / 2016-03-29 | ||
================== | ||
* [New] Add `--property` to skip check that implementation is a function | ||
* [Deps] update `tape` | ||
* [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` | ||
* [Tests] up to `node` `v5.9`, `v4.4` | ||
1.1.0 / 2016-02-06 | ||
@@ -2,0 +9,0 @@ ================== |
{ | ||
"name": "@es-shims/api", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"author": "Jordan Harband", | ||
@@ -11,4 +11,6 @@ "description": "Loosely test a package's compliance with the es-shim API", | ||
"scripts": { | ||
"test": "npm run lint && npm run security", | ||
"lint": "npm run jscs && npm run eslint", | ||
"test": "npm run --silent lint", | ||
"posttest": "npm run --silent security", | ||
"tests-only": "npm run --silent lint", | ||
"lint": "npm run --silent jscs && npm run --silent eslint", | ||
"jscs": "jscs *.js", | ||
@@ -36,9 +38,9 @@ "eslint": "eslint *.js", | ||
"dependencies": { | ||
"tape": "^4.4.0" | ||
"tape": "^4.5.1" | ||
}, | ||
"devDependencies": { | ||
"jscs": "^2.9.0", | ||
"nsp": "^2.2.0", | ||
"eslint": "^1.10.3", | ||
"@ljharb/eslint-config": "^1.6.1", | ||
"jscs": "^2.11.0", | ||
"nsp": "^2.2.2", | ||
"eslint": "^2.5.3", | ||
"@ljharb/eslint-config": "^2.2.0", | ||
"make-arrow-function": "^1.1.0", | ||
@@ -45,0 +47,0 @@ "make-generator-function": "^1.1.0", |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
24332
206
0
Updatedtape@^4.5.1