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

polylint

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polylint - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0

58

bin/polylint.js

@@ -20,3 +20,8 @@ #!/usr/bin/env node

var path = require('path');
// jshint -W079
var Promise = global.Promise || require('es6-promise').Promise;
// jshint +W079
console.log(process.argv);
var cli = cliArgs([

@@ -61,4 +66,4 @@ {

description: (
"Root directory against which URLs in inputs are resolved."
+ " If not specified, then the current working directory is used."
"Root directory against which URLs in inputs are resolved." +
" If not specified, then the current working directory is used."
)

@@ -74,7 +79,14 @@ },

"Polymer source files."
+ " If a directory is specified, it is used as the root"
+ " for resolving relative URLs in the next input."
)
},
{
name: "stdin",
type: Boolean,
defaultValue: false,
description: (
"If true, the file from `input` will be replaced by the contents of stdin." +
" If true, only one value will be accepted for input."
)
},
{
name: "no-recursion",

@@ -111,2 +123,7 @@ type: Boolean,

if (options.stdin && inputs.length !== 1) {
console.error('Only one input supported in stdin mode');
inputsOk = false;
}
if (!inputsOk) {

@@ -207,2 +224,26 @@ console.log(usage);

var lintPromise = Promise.resolve(true);
var content;
if (options.stdin) {
content = "";
lintPromise = lintPromise.then(function(){
return new Promise(function(resolve, reject) {
process.stdin.setEncoding('utf8');
process.stdin.on('readable', function() {
var chunk = process.stdin.read();
if (chunk !== null) {
content += chunk;
}
});
process.stdin.on('end', function() {
console.log("Read stdin!");
resolve(true);
});
});
});
} else {
content = undefined;
}
/*jshint -W083 */
for(var i = 0; i < inputs.length; i++) {

@@ -221,2 +262,3 @@ // Check whether input is a root directory before picking a root and

lintPromise = lintPromise.then(function() {
console.log("after stdin promise");
return polylint(

@@ -227,5 +269,6 @@ input,

jsconfPolicy: jsconfPolicyPromise,
redirect: options.bowerdir
redirect: options.bowerdir,
content: content
}
)
);
})

@@ -246,7 +289,8 @@ .then(function(lintWarnings){

}
/*jshint +W083 */
var exit = function(){
process.exit(fatalFailureOccurred ? 1 : 0);
}
};
lintPromise.then(exit).catch(exit);

2

bower.json
{
"name": "polylint",
"private": true,
"version": "2.6.0",
"version": "2.7.0",
"homepage": "https://github.com/PolymerLabs/polylint",

@@ -6,0 +6,0 @@ "authors": [

{
"name": "polylint",
"version": "2.6.0",
"version": "2.7.0",
"description": "Keeps your Polymer Elements clean and functional!",

@@ -8,3 +8,3 @@ "main": "polylint.js",

"scripts": {
"test": "node_modules/.bin/jshint polylint.js lib test && node_modules/.bin/mocha test/test.js"
"test": "node_modules/.bin/jshint polylint.js bin lib test && node_modules/.bin/mocha test/test.js"
},

@@ -25,3 +25,3 @@ "repository": {

"dom5": "^1.0.2",
"hydrolysis": "^1.19.2",
"hydrolysis": "^1.20.0",
"optimist": "^0.6.1",

@@ -28,0 +28,0 @@ "path-is-absolute": "^1.0.0",

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