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

doiuse

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doiuse - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

6

cli.js

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

out = through.obj(function(usage, enc, next) {
next(null, usage.message);
next(null, usage.message + '\n');
});

@@ -94,3 +94,3 @@ }

fs.createReadStream(file)
.pipe(doiuse(argv.browsers, options))
.pipe(doiuse(argv.browsers))
.pipe(out);

@@ -100,3 +100,3 @@ });

process.stdin
.pipe(doiuse(argv.browsers, options))
.pipe(doiuse(argv.browsers))
.pipe(out);
{
"name": "doiuse",
"version": "0.2.4",
"version": "0.2.5",
"description": "Lint CSS for browser support against caniuse database.",

@@ -30,3 +30,3 @@ "main": "dist/index.js",

"concat-stream": "^1.4.6",
"css-rule-stream": "^1.0.0",
"css-rule-stream": "^1.0.3",
"duplexer2": "0.0.2",

@@ -40,2 +40,3 @@ "jsonfilter": "^1.1.2",

"devDependencies": {
"chai": "^1.10.0",
"coffee-script": "^1.8.0",

@@ -47,5 +48,4 @@ "del": "^0.1.3",

"gulp-util": "^3.0.1",
"postcss": "^3.0.0",
"should": "^4.3.0"
"postcss": "^3.0.0"
}
}
}

@@ -22,2 +22,3 @@

processor.process(rule.content);
next();
}

@@ -24,0 +25,0 @@ catch(e) {

var exec = require('child_process').exec,
path = require('path');
var should = require('should');
var should = require('chai').should();
describe('the cli', function() {
it('should take piped input', function () {
it('should take piped input', function (done) {
var cmd = [

@@ -14,7 +14,9 @@ 'cat', path.join(__dirname,'/cases/resize.css'),

exec(cmd,function(error, stdout, stderr) {
stdout.should.be.equal('<input css 1>:7:3: CSS resize property not supported by: IE (8,9,10,11), Opera (12.1), iOS Safari (8,7.1,8.1), Opera Mini (8.0), Android Browser (4.1,4.3,4.4), IE Mobile (10,11), UC Browser for Android (9.9)')
var expected = '<input css 1>:2:3: CSS resize property not supported by: IE (8,9,10,11), Opera (12.1), iOS Safari (8,7.1,8.1), Opera Mini (8.0), Android Browser (4.1,4.3,4.4), IE Mobile (10,11), UC Browser for Android (9.9)\n';
stdout.should.be.equal(expected);
done()
});
})
it('should take filename as input', function () {
it('should take filename as input', function (done) {
var cmd = [

@@ -25,7 +27,8 @@ 'node', path.join(__dirname, '../cli.js'),

exec(cmd,function(error, stdout, stderr) {
stdout.should.be.equal('<input css 1>:7:3: CSS resize property not supported by: IE (8,9,10,11), Opera (12.1), iOS Safari (8,7.1,8.1), Opera Mini (8.0), Android Browser (4.1,4.3,4.4), IE Mobile (10,11), UC Browser for Android (9.9)')
stdout.should.be.equal('<input css 1>:2:3: CSS resize property not supported by: IE (8,9,10,11), Opera (12.1), iOS Safari (8,7.1,8.1), Opera Mini (8.0), Android Browser (4.1,4.3,4.4), IE Mobile (10,11), UC Browser for Android (9.9)\n')
done()
});
})
it('--json option should work', function () {
it('--json option should work', function (done) {
var cmd = [

@@ -38,6 +41,7 @@ 'node', path.join(__dirname, '../cli.js'), '--json',

JSON.parse(stdout).feature.should.be.equal('css-resize')
done()
});
})
it('--list-only should work', function () {
it('--list-only should work', function (done) {
var cmd = [

@@ -50,2 +54,3 @@ 'node', path.join(__dirname, '../cli.js'),

stdout.trim().should.be.equal('[doiuse] Browsers: IE 9, IE 11, IE 10');
done()
});

@@ -52,0 +57,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

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