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

@riotjs/compiler

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@riotjs/compiler - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

3

CHANGELOG.md
# Compiler Changes
### v4.2.1
- Fix css generation with `@media` queries
### v4.2.0

@@ -4,0 +7,0 @@ - Add support for `<a {href}/>` shortcut expressions

2

package.json
{
"name": "@riotjs/compiler",
"version": "4.2.0",
"version": "4.2.1",
"description": "Compiler for riot .tag files",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -7,2 +7,9 @@ import {builders, types} from '../../utils/build-types'

/**
* Matches valid, multiline JavaScript comments in almost all its forms.
* @const {RegExp}
* @static
*/
const R_MLCOMMS = /\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//g
/**
* Source for creating regexes matching valid quoted, single-line JavaScript strings.

@@ -68,2 +75,14 @@ * It recognizes escape characters, including nested quotes and line continuation.

/**
* Remove comments, compact and trim whitespace
* @param {RiotParser.Node} cssNode - css node
* @returns {RiotParser.Node} css node normalized
*/
function compactCss(cssNode) {
return {
...cssNode,
text: cssNode.text.replace(R_MLCOMMS, '').replace(/\s+/g, ' ').trim()
}
}
/**
* Generate the component css

@@ -79,3 +98,3 @@ * @param { Object } sourceNode - node generated by the riot compiler

const { options } = meta
const cssNode = sourceNode.text
const cssNode = compactCss(sourceNode.text)
const preprocessorOutput = preprocess('css', preprocessorName, meta, cssNode)

@@ -82,0 +101,0 @@ const cssCode = (options.scopedCss ?

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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