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

css-slam

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-slam - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

3

CHANGELOG.md

@@ -11,3 +11,6 @@ # Change Log

<!-- New PRs should document their changes here. -->
## [2.0.1] - 2017-09-29
* Make sure `@apply` always has a semicolon at the end
## [2.0.0] - 2017-09-11

@@ -14,0 +17,0 @@

@@ -51,3 +51,10 @@ /**

const APPLY_NO_SEMI = /@apply \(?--[\w-]+\)?[^;]/g;
function addSemi(match) {
return match + ';';
}
function css(text) {
text = text.replace(APPLY_NO_SEMI, addSemi);
return stringifier.stringify(parser.parse(text));

@@ -54,0 +61,0 @@ }

4

package.json
{
"name": "css-slam",
"version": "2.0.0",
"version": "2.0.1",
"description": "Minimal CSS, fast",

@@ -20,3 +20,3 @@ "main": "index.js",

"chai": "^4.1.2",
"eslint": "^4.6.1",
"eslint": "^4.7.2",
"mocha": "^3.5.3",

@@ -23,0 +23,0 @@ "vinyl": "^2.1.0"

@@ -76,2 +76,13 @@ /**

});
test('@apply missing semicolon is fixed', () => {
const text =
`:host {
@apply --foo
}
:root {
@apply(--bar)
}`;
const expected = `:host{@apply --foo;}:root{@apply (--bar);}`;
assert.equal(slam.css(text), expected);
})
});

@@ -78,0 +89,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