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

@vanilla-extract/integration

Package Overview
Dependencies
Maintainers
4
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vanilla-extract/integration - npm Package Compare versions

Comparing version 0.0.0-inline-prototype-20233215256 to 0.0.0-inline-prototype-2023322105512

19

dist/vanilla-extract-integration.cjs.dev.js

@@ -962,2 +962,3 @@ 'use strict';

const vanillaExtractMacroIdentifier = babel.types.identifier('css$');
const globalApis = ['createGlobalTheme', 'globalFontFace', 'globalKeyframes', 'globalLayer', 'globalStyle'];
function vanillaBabelPlugin () {

@@ -968,2 +969,3 @@ return {

this.identifierOwners = new DefaultMap(() => new Set());
this.globalVanillaApiStatements = new Set();
this.depGraph = new DependencyGraph$1();

@@ -1052,2 +1054,11 @@ this.macroOwners = new DefaultMap(() => new Set());

}
} else if (isCssFile && statement.isExpressionStatement()) {
const expression = statement.node.expression;
invariant__default["default"](babel.types.isCallExpression(expression), 'Can only extract call expressions at the global level in `.css.ts` files');
if (babel.types.isIdentifier(expression.callee) &&
// TODO: Use a list of global APIs
globalApis.includes(expression.callee.name)) {
statement.get('expression').replaceWith(babel.types.callExpression(vanillaExtractMacroIdentifier, [expression]));
this.globalVanillaApiStatements.add(statementIndex);
}
}

@@ -1084,2 +1095,9 @@ const opts = {

for (const statementIndex of Array.from(bodyPath.keys()).reverse()) {
const statement = bodyPath[statementIndex];
if (isCssFile && this.globalVanillaApiStatements.has(statementIndex)) {
store.buildTimeStatements.unshift(statement.node);
statement.remove();
continue;
}
// Should keep index if it creates/modifies an essential identifier

@@ -1092,3 +1110,2 @@ // or it depends on a macro

const mutatesEssentialIdentifier = hasIntersection(mutatedIdents, essentialIdentifiers);
const statement = bodyPath[statementIndex];
const statementMacros = Array.from(this.macroOwners.get(statementIndex));

@@ -1095,0 +1112,0 @@ const isExportStatement = this.exportStatements.has(statementIndex);

@@ -962,2 +962,3 @@ 'use strict';

const vanillaExtractMacroIdentifier = babel.types.identifier('css$');
const globalApis = ['createGlobalTheme', 'globalFontFace', 'globalKeyframes', 'globalLayer', 'globalStyle'];
function vanillaBabelPlugin () {

@@ -968,2 +969,3 @@ return {

this.identifierOwners = new DefaultMap(() => new Set());
this.globalVanillaApiStatements = new Set();
this.depGraph = new DependencyGraph$1();

@@ -1052,2 +1054,11 @@ this.macroOwners = new DefaultMap(() => new Set());

}
} else if (isCssFile && statement.isExpressionStatement()) {
const expression = statement.node.expression;
invariant__default["default"](babel.types.isCallExpression(expression), 'Can only extract call expressions at the global level in `.css.ts` files');
if (babel.types.isIdentifier(expression.callee) &&
// TODO: Use a list of global APIs
globalApis.includes(expression.callee.name)) {
statement.get('expression').replaceWith(babel.types.callExpression(vanillaExtractMacroIdentifier, [expression]));
this.globalVanillaApiStatements.add(statementIndex);
}
}

@@ -1084,2 +1095,9 @@ const opts = {

for (const statementIndex of Array.from(bodyPath.keys()).reverse()) {
const statement = bodyPath[statementIndex];
if (isCssFile && this.globalVanillaApiStatements.has(statementIndex)) {
store.buildTimeStatements.unshift(statement.node);
statement.remove();
continue;
}
// Should keep index if it creates/modifies an essential identifier

@@ -1092,3 +1110,2 @@ // or it depends on a macro

const mutatesEssentialIdentifier = hasIntersection(mutatedIdents, essentialIdentifiers);
const statement = bodyPath[statementIndex];
const statementMacros = Array.from(this.macroOwners.get(statementIndex));

@@ -1095,0 +1112,0 @@ const isExportStatement = this.exportStatements.has(statementIndex);

4

package.json
{
"name": "@vanilla-extract/integration",
"version": "0.0.0-inline-prototype-20233215256",
"version": "0.0.0-inline-prototype-2023322105512",
"description": "Zero-runtime Stylesheets-in-TypeScript",

@@ -23,3 +23,3 @@ "main": "dist/vanilla-extract-integration.cjs.js",

"@vanilla-extract/babel-plugin-debug-ids": "^1.0.2",
"@vanilla-extract/css": "^0.0.0-inline-prototype-20233215256",
"@vanilla-extract/css": "^0.0.0-inline-prototype-2023322105512",
"esbuild": "0.17.6",

@@ -26,0 +26,0 @@ "eval": "0.1.6",

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