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

css-coverage

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-coverage - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

6

package.json
{
"name": "css-coverage",
"version": "2.0.2",
"version": "2.0.3",
"scripts": {
"pretest": "sass --source-map ./test/test.scss ./test/test.css",
"test": "./bin/css-coverage.js --html ./test/test.html --css ./test/test.css --lcov ./test/test.lcov --ignore-declarations 'move-to,move-foobar'",
"test-debug": "node --inspect-brk ./bin/css-coverage.js --cover-declarations --html ./test/test.html --css ./test/test.css --lcov ./test/test.lcov --ignore-declarations 'move-to,move-foobar'",
"test": "./bin/css-coverage.js --html ./test/test.html --css ./test/test.css --lcov ./test/test.lcov --ignore-declarations 'move-to,move-foobar'",
"test:debug": "node --inspect-brk ./bin/css-coverage.js --html ./test/test.html --css ./test/test.css --lcov ./test/test.lcov --ignore-declarations 'move-to,move-foobar'",
"posttest": "standard --fix"

@@ -9,0 +9,0 @@ },

@@ -38,15 +38,12 @@ # CSS Coverage!

Generate coverage info for a CSS file against an HTML file.
This supports loading sourcemaps by using the sourceMappingURL=FILENAME.map CSS comment
Generate coverage info for a CSS file against an HTML file. This supports loading sourcemaps by using the sourceMappingURL=FILENAME.map CSS comment
Options:
-h, --help output usage information
--html [path/to/file.html] path to a local HTML file
--css [path/to/file.css] path to a local CSS file
--lcov [path/to/output.lcov] the LCOV output file
--verbose verbose/debugging output
--ignore-source-map disable loading the sourcemap if one is found
--cover-declarations try to cover CSS declarations as well as selectors
(best-effort, difficult with sourcemaps)
--html [path/to/file.html] path to a local HTML file
--css [path/to/file.css] path to a local CSS file
--lcov [path/to/output.lcov] the LCOV output file
--verbose verbose/debugging output
--ignore-source-map disable loading the sourcemap if one is found
--ignore-declarations [move-to,content] A comma-separated list of declarations to ignore
-h, --help output usage information
```

@@ -278,6 +278,10 @@ const fs = require('fs')

function getStartInfo (origStart, origEnd) {
const startInfo = sourceMapConsumer.originalPositionFor({ line: origStart.line, column: origStart.column - 1 })
let startInfo = sourceMapConsumer.originalPositionFor({ line: origStart.line, column: origStart.column - 1 })
// const endInfo = sourceMapConsumer.originalPositionFor({line: origEnd.line, column: origEnd.column - 2})
// When there is no match, startInfo.source is null
// When there is no match, startInfo.source is null.
// Try fiddling with the column
if (!startInfo.source) {
startInfo = sourceMapConsumer.originalPositionFor({ line: origStart.line, column: origStart.column })
}
if (!startInfo.source /* || startInfo.source !== endInfo.source */) {

@@ -284,0 +288,0 @@ console.error('cssStart', JSON.stringify(origStart))

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