Comparing version 1.2.0 to 2.0.0
10
cli.js
@@ -35,9 +35,7 @@ #!/usr/bin/env node | ||
fs.readFile(file, (error, data) => { | ||
if (error) { | ||
fs.promises.readFile(file) | ||
.then(data => console.log(oust(data, type).join('\n'))) | ||
.catch(error => { | ||
console.error('Error opening file:', error.message); | ||
process.exit(1); | ||
} | ||
console.log(oust(data, type).join('\n')); | ||
}); | ||
}); |
18
index.js
@@ -26,28 +26,28 @@ /*! | ||
selector: 'link[rel*="stylesheet"]', | ||
attribute: 'href' | ||
attribute: 'href', | ||
}, | ||
scripts: { | ||
selector: 'script', | ||
attribute: 'src' | ||
attribute: 'src', | ||
}, | ||
imports: { | ||
selector: 'link[rel="import"]', | ||
attribute: 'href' | ||
attribute: 'href', | ||
}, | ||
preload: { | ||
selector: 'link[rel*="preload"][as="style"]', | ||
attribute: 'href' | ||
attribute: 'href', | ||
}, | ||
links: { | ||
selector: 'a', | ||
attribute: 'href' | ||
attribute: 'href', | ||
}, | ||
images: { | ||
selector: 'img', | ||
attribute: 'src' | ||
attribute: 'src', | ||
}, | ||
styles: { | ||
selector: 'style', | ||
method: 'text' | ||
} | ||
method: 'text', | ||
}, | ||
}; | ||
@@ -89,3 +89,3 @@ | ||
type: chosenType.type, | ||
value | ||
value, | ||
}; | ||
@@ -92,0 +92,0 @@ } |
{ | ||
"name": "oust", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"author": "Addy Osmani <addyosmani@gmail.com> (https://addyosmani.com/)", | ||
@@ -29,3 +29,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"cheerio": "^0.22.0", | ||
"cheerio": "^1.0.0-rc.12", | ||
"minimist": "^1.2.5" | ||
@@ -35,3 +35,3 @@ }, | ||
"mocha": "^7.2.0", | ||
"xo": "^0.25.4" | ||
"xo": "^0.52.3" | ||
}, | ||
@@ -46,7 +46,11 @@ "keywords": [ | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=12" | ||
}, | ||
"xo": { | ||
"space": 4 | ||
"space": 4, | ||
"rules": { | ||
"unicorn/prefer-module": "off", | ||
"n/prefer-global/process": "off" | ||
} | ||
} | ||
} |
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
18833
114
+ Addedcheerio@1.0.0(transitive)
+ Addedcheerio-select@2.1.0(transitive)
+ Addedcss-select@5.1.0(transitive)
+ Addedcss-what@6.1.0(transitive)
+ Addeddom-serializer@2.0.0(transitive)
+ Addeddomelementtype@2.3.0(transitive)
+ Addeddomhandler@5.0.3(transitive)
+ Addeddomutils@3.1.0(transitive)
+ Addedencoding-sniffer@0.2.0(transitive)
+ Addedentities@4.5.0(transitive)
+ Addedhtmlparser2@9.1.0(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addednth-check@2.1.1(transitive)
+ Addedparse5@7.1.2(transitive)
+ Addedparse5-htmlparser2-tree-adapter@7.0.0(transitive)
+ Addedparse5-parser-stream@7.1.2(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedundici@6.19.8(transitive)
+ Addedwhatwg-encoding@3.1.1(transitive)
+ Addedwhatwg-mimetype@4.0.0(transitive)
- Removedcheerio@0.22.0(transitive)
- Removedcss-select@1.2.0(transitive)
- Removedcss-what@2.1.3(transitive)
- Removeddom-serializer@0.1.1(transitive)
- Removeddomelementtype@1.3.1(transitive)
- Removeddomhandler@2.4.2(transitive)
- Removeddomutils@1.5.1(transitive)
- Removedentities@1.1.2(transitive)
- Removedhtmlparser2@3.10.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedlodash.assignin@4.2.0(transitive)
- Removedlodash.bind@4.2.1(transitive)
- Removedlodash.defaults@4.2.0(transitive)
- Removedlodash.filter@4.6.0(transitive)
- Removedlodash.flatten@4.4.0(transitive)
- Removedlodash.foreach@4.5.0(transitive)
- Removedlodash.map@4.6.0(transitive)
- Removedlodash.merge@4.6.2(transitive)
- Removedlodash.pick@4.4.0(transitive)
- Removedlodash.reduce@4.6.0(transitive)
- Removedlodash.reject@4.6.0(transitive)
- Removedlodash.some@4.6.0(transitive)
- Removednth-check@1.0.2(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
Updatedcheerio@^1.0.0-rc.12