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

@stylable/module-utils

Package Overview
Dependencies
Maintainers
6
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 5.10.0 to 5.11.0

1

dist/stylable-js-module-source.d.ts

@@ -38,2 +38,3 @@ import type { StylableExports } from '@stylable/core/dist/index-internal';

from: string;
defaultImport?: string;
}>;

@@ -40,0 +41,0 @@ /**

9

dist/stylable-js-module-source.js

@@ -36,4 +36,9 @@ "use strict";

function moduleRequest(moduleType) {
return (moduleRequest) => {
const request = JSON.stringify(moduleRequest.from);
return ({ from, defaultImport }) => {
const request = JSON.stringify(from);
if (defaultImport) {
return moduleType === 'esm'
? `import ${defaultImport} from ${request};`
: `const ${defaultImport} = require(${request});`;
}
return moduleType === 'esm' ? `import ${request};` : `require(${request});`;

@@ -40,0 +45,0 @@ };

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

@@ -10,3 +10,3 @@ "main": "dist/index.js",

"dependencies": {
"@stylable/core": "^5.10.0",
"@stylable/core": "^5.11.0",
"@tokey/core": "^1.3.0",

@@ -13,0 +13,0 @@ "vlq": "^2.0.4"

@@ -38,3 +38,3 @@ import type { StylableExports } from '@stylable/core/dist/index-internal';

*/
imports?: Array<{ from: string }>;
imports?: Array<{ from: string; defaultImport?: string }>;
/**

@@ -111,4 +111,9 @@ * Stylable transforms exports

function moduleRequest(moduleType: 'esm' | 'cjs') {
return (moduleRequest: { from: string }) => {
const request = JSON.stringify(moduleRequest.from);
return ({ from, defaultImport }: { from: string; defaultImport?: string }) => {
const request = JSON.stringify(from);
if (defaultImport) {
return moduleType === 'esm'
? `import ${defaultImport} from ${request};`
: `const ${defaultImport} = require(${request});`;
}
return moduleType === 'esm' ? `import ${request};` : `require(${request});`;

@@ -115,0 +120,0 @@ };

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