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

@stylable/module-utils

Package Overview
Dependencies
Maintainers
5
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/module-utils - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

27

cjs/module-factory.js
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -22,3 +35,3 @@ var core_1 = require("@stylable/core");

var res = stylable.transform(source, path);
return module_source_1.generateModuleSource(res, runtimeStylesheetId === 'module' ? 'module.id' : res.meta.namespace, __spreadArrays(staticImports.map(function (request) { return "import " + JSON.stringify(request); }), [
return module_source_1.generateModuleSource(res, runtimeStylesheetId === 'module' ? 'module.id' : res.meta.namespace, __spread(staticImports.map(function (request) { return "import " + JSON.stringify(request); }), [
"const runtime = require(" + JSON.stringify(runtimePath) + ")"

@@ -25,0 +38,0 @@ ]), "runtime.$", "runtime.create", "runtime.createRenderable", injectCSS ? JSON.stringify(res.meta.outputAst.toString()) : '""', '-1', // ToDo: calc depth for node as well

"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -40,8 +53,8 @@ function generateModuleSource(stylableResult, moduleId, beforeModule, renderer, createFunction, createRenderableFunction, css, depth, exportsArgument, afterModule, renderableOnly) {

var importKey = renderableOnly ? 'createRenderable' : 'create';
return generateModuleSource(stylableResult, moduleId, __spreadArrays(staticRequests.map(function (request) { return "import " + JSON.stringify(request); }), [
return generateModuleSource(stylableResult, moduleId, __spread(staticRequests.map(function (request) { return "import " + JSON.stringify(request); }), [
"import { $, " + importKey + " } from " + JSON.stringify(runtimeRequest)
]), "$", "create", "createRenderable", includeCSSInJS ? JSON.stringify(stylableResult.meta.outputAst.toString()) : '""', depth, 'const { classes, keyframes, vars, stVars, cssStates, style, st, $depth, $id, $css }', // = $
__spreadArrays(["export { classes, keyframes, vars, stVars, cssStates, style, st, $depth, $id, $css };"], afterModule).join('\n'), renderableOnly);
__spread(["export { classes, keyframes, vars, stVars, cssStates, style, st, $depth, $id, $css };"], afterModule).join('\n'), renderableOnly);
case 'cjs':
return generateModuleSource(stylableResult, moduleId, __spreadArrays(staticRequests.map(function (request) { return "require(" + JSON.stringify(request) + ")"; }), [
return generateModuleSource(stylableResult, moduleId, __spread(staticRequests.map(function (request) { return "require(" + JSON.stringify(request) + ")"; }), [
"const runtime = require(" + JSON.stringify(runtimeRequest) + ")"

@@ -48,0 +61,0 @@ ]), "runtime.$", "runtime.create", "runtime.createRenderable", includeCSSInJS ? JSON.stringify(stylableResult.meta.outputAst.toString()) : '""', depth, 'module.exports', afterModule.join('\n'), renderableOnly);

{
"name": "@stylable/module-utils",
"version": "2.3.1",
"version": "2.3.2",
"description": "Stylable module creation utilities",

@@ -14,8 +14,7 @@ "main": "cjs/index.js",

"dependencies": {
"@stylable/core": "^2.3.1"
"@stylable/core": "^2.3.2"
},
"files": [
"cjs",
"src",
"!src/tsconfig.json"
"src"
],

@@ -28,3 +27,3 @@ "publishConfig": {

"license": "BSD-3-Clause",
"gitHead": "f28edefa3aa4a1276789b206e9e9f25d7869447f"
"gitHead": "aa79998a8378f074a431aeea44c60d0e33531293"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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