@linaria/postcss-linaria
Advanced tools
Comparing version 4.5.1 to 5.0.0
@@ -103,2 +103,25 @@ import Stringifier from 'postcss/lib/stringifier'; | ||
/** @inheritdoc */ | ||
raw(node, own, detect) { | ||
if (own === 'before' && node.raws.before && node.raws.linariaBefore) { | ||
return node.raws.linariaBefore; | ||
} | ||
if (own === 'after' && node.raws.after && node.raws.linariaAfter) { | ||
return node.raws.linariaAfter; | ||
} | ||
if (own === 'between' && node.raws.between && node.raws.linariaBetween) { | ||
return node.raws.linariaBetween; | ||
} | ||
return super.raw(node, own, detect); | ||
} | ||
/** @inheritdoc */ | ||
rawValue(node, prop) { | ||
const linariaProp = `linaria${prop[0]?.toUpperCase()}${prop.slice(1)}`; | ||
if (Object.prototype.hasOwnProperty.call(node.raws, linariaProp)) { | ||
return `${node.raws[linariaProp]}`; | ||
} | ||
return super.rawValue(node, prop); | ||
} | ||
/** @inheritdoc */ | ||
root(node) { | ||
@@ -127,25 +150,2 @@ this.builder(node.raws.codeBefore ?? '', node, 'start'); | ||
} | ||
/** @inheritdoc */ | ||
raw(node, own, detect) { | ||
if (own === 'before' && node.raws.before && node.raws.linariaBefore) { | ||
return node.raws.linariaBefore; | ||
} | ||
if (own === 'after' && node.raws.after && node.raws.linariaAfter) { | ||
return node.raws.linariaAfter; | ||
} | ||
if (own === 'between' && node.raws.between && node.raws.linariaBetween) { | ||
return node.raws.linariaBetween; | ||
} | ||
return super.raw(node, own, detect); | ||
} | ||
/** @inheritdoc */ | ||
rawValue(node, prop) { | ||
const linariaProp = `linaria${prop[0]?.toUpperCase()}${prop.slice(1)}`; | ||
if (Object.prototype.hasOwnProperty.call(node.raws, linariaProp)) { | ||
return `${node.raws[linariaProp]}`; | ||
} | ||
return super.rawValue(node, prop); | ||
} | ||
} | ||
@@ -152,0 +152,0 @@ export const stringify = (node, builder) => { |
@@ -111,2 +111,26 @@ "use strict"; | ||
/** @inheritdoc */ | ||
raw(node, own, detect) { | ||
if (own === 'before' && node.raws.before && node.raws.linariaBefore) { | ||
return node.raws.linariaBefore; | ||
} | ||
if (own === 'after' && node.raws.after && node.raws.linariaAfter) { | ||
return node.raws.linariaAfter; | ||
} | ||
if (own === 'between' && node.raws.between && node.raws.linariaBetween) { | ||
return node.raws.linariaBetween; | ||
} | ||
return super.raw(node, own, detect); | ||
} | ||
/** @inheritdoc */ | ||
rawValue(node, prop) { | ||
var _prop$; | ||
const linariaProp = `linaria${(_prop$ = prop[0]) === null || _prop$ === void 0 ? void 0 : _prop$.toUpperCase()}${prop.slice(1)}`; | ||
if (Object.prototype.hasOwnProperty.call(node.raws, linariaProp)) { | ||
return `${node.raws[linariaProp]}`; | ||
} | ||
return super.rawValue(node, prop); | ||
} | ||
/** @inheritdoc */ | ||
root(node) { | ||
@@ -136,26 +160,2 @@ var _node$raws$codeBefore, _node$raws$linariaAft, _node$raws$codeAfter; | ||
} | ||
/** @inheritdoc */ | ||
raw(node, own, detect) { | ||
if (own === 'before' && node.raws.before && node.raws.linariaBefore) { | ||
return node.raws.linariaBefore; | ||
} | ||
if (own === 'after' && node.raws.after && node.raws.linariaAfter) { | ||
return node.raws.linariaAfter; | ||
} | ||
if (own === 'between' && node.raws.between && node.raws.linariaBetween) { | ||
return node.raws.linariaBetween; | ||
} | ||
return super.raw(node, own, detect); | ||
} | ||
/** @inheritdoc */ | ||
rawValue(node, prop) { | ||
var _prop$; | ||
const linariaProp = `linaria${(_prop$ = prop[0]) === null || _prop$ === void 0 ? void 0 : _prop$.toUpperCase()}${prop.slice(1)}`; | ||
if (Object.prototype.hasOwnProperty.call(node.raws, linariaProp)) { | ||
return `${node.raws[linariaProp]}`; | ||
} | ||
return super.rawValue(node, prop); | ||
} | ||
} | ||
@@ -162,0 +162,0 @@ const stringify = (node, builder) => { |
{ | ||
"name": "@linaria/postcss-linaria", | ||
"version": "4.5.1", | ||
"version": "5.0.0", | ||
"description": "Blazing fast zero-runtime CSS in JS library", | ||
@@ -33,11 +33,11 @@ "keywords": [ | ||
"dependencies": { | ||
"@babel/generator": "^7.22.9", | ||
"@babel/parser": "^7.22.7", | ||
"@babel/traverse": "^7.22.8", | ||
"@babel/generator": "^7.22.15", | ||
"@babel/parser": "^7.22.15", | ||
"@babel/traverse": "^7.22.15", | ||
"stylelint": "^14.11.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/types": "^7.22.5", | ||
"@babel/types": "^7.22.15", | ||
"@types/babel__generator": "^7.6.4", | ||
"@types/babel__traverse": "^7.17.1", | ||
"@types/babel__traverse": "^7.20.1", | ||
"postcss": "^8.3.11" | ||
@@ -49,3 +49,3 @@ }, | ||
"engines": { | ||
"node": "^12.16.0 || >=13.7.0" | ||
"node": ">=16.0.0" | ||
}, | ||
@@ -52,0 +52,0 @@ "publishConfig": { |
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
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
146855
Updated@babel/generator@^7.22.15
Updated@babel/parser@^7.22.15
Updated@babel/traverse@^7.22.15