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.2.6 to 2.2.7-alpha.0

9

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;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -15,3 +22,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, staticImports.map(function (request) { return "import " + JSON.stringify(request); }).concat([
return module_source_1.generateModuleSource(res, runtimeStylesheetId === 'module' ? 'module.id' : res.meta.namespace, __spreadArrays(staticImports.map(function (request) { return "import " + JSON.stringify(request); }), [
"const runtime = require(" + JSON.stringify(runtimePath) + ")"

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

13

cjs/module-source.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;
};
Object.defineProperty(exports, "__esModule", { value: true });

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

var importKey = renderableOnly ? 'createRenderable' : 'create';
return generateModuleSource(stylableResult, moduleId, staticRequests.map(function (request) { return "import " + JSON.stringify(request); }).concat([
return generateModuleSource(stylableResult, moduleId, __spreadArrays(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 }', // = $
["export { classes, keyframes, vars, stVars, cssStates, style, st, $depth, $id, $css };"].concat(afterModule).join('\n'), renderableOnly);
__spreadArrays(["export { classes, keyframes, vars, stVars, cssStates, style, st, $depth, $id, $css };"], afterModule).join('\n'), renderableOnly);
case 'cjs':
return generateModuleSource(stylableResult, moduleId, staticRequests.map(function (request) { return "require(" + JSON.stringify(request) + ")"; }).concat([
return generateModuleSource(stylableResult, moduleId, __spreadArrays(staticRequests.map(function (request) { return "require(" + JSON.stringify(request) + ")"; }), [
"const runtime = require(" + JSON.stringify(runtimeRequest) + ")"

@@ -41,0 +48,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.2.6",
"version": "2.2.7-alpha.0",
"description": "Stylable module creation utilities",

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

"dependencies": {
"@stylable/core": "^2.1.4"
"@stylable/core": "^2.1.5-alpha.0"
},

@@ -28,3 +28,3 @@ "files": [

"license": "BSD-3-Clause",
"gitHead": "c0a682c5acd5f54f96bddf10f3c3f18e81552603"
"gitHead": "afc507c97909ce8d221ca4dc90344fadbc0e385a"
}

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