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

@stylable/core

Package Overview
Dependencies
Maintainers
6
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/core - npm Package Compare versions

Comparing version 5.3.0-rc.1 to 5.3.0

8

dist/helpers/import.d.ts

@@ -93,10 +93,4 @@ import { Diagnostics } from '../diagnostics';

declare type ImportPatch = Partial<Pick<Imported, 'defaultExport' | 'named' | 'keyframes'>> & Pick<Imported, 'request'>;
declare type ImportEvent = {
context: string;
request: string;
resolved: string;
depth: number;
};
export declare function tryCollectImportsDeep(stylable: Stylable, meta: StylableMeta, imports?: Set<string>, onImport?: undefined | ((e: ImportEvent) => void), depth?: number): Set<string>;
export declare function tryCollectImportsDeep(stylable: Stylable, meta: StylableMeta, imports?: Set<string>): Set<string>;
export {};
//# sourceMappingURL=import.d.ts.map

5

dist/helpers/import.js

@@ -434,10 +434,9 @@ "use strict";

}
function tryCollectImportsDeep(stylable, meta, imports = new Set(), onImport = undefined, depth = 0) {
function tryCollectImportsDeep(stylable, meta, imports = new Set()) {
for (const { context, request } of meta.getImportStatements()) {
try {
const resolved = stylable.resolver.resolvePath(context, request);
onImport === null || onImport === void 0 ? void 0 : onImport({ context, request, resolved, depth });
if (!imports.has(resolved)) {
imports.add(resolved);
tryCollectImportsDeep(stylable, stylable.analyze(resolved), imports, onImport, depth + 1);
tryCollectImportsDeep(stylable, stylable.analyze(resolved), imports);
}

@@ -444,0 +443,0 @@ }

{
"name": "@stylable/core",
"version": "5.3.0-rc.1",
"version": "5.3.0",
"description": "CSS for Components",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -583,15 +583,6 @@ import path from 'path';

type ImportEvent = {
context: string;
request: string;
resolved: string;
depth: number;
};
export function tryCollectImportsDeep(
stylable: Stylable,
meta: StylableMeta,
imports = new Set<string>(),
onImport: undefined | ((e: ImportEvent) => void) = undefined,
depth = 0
imports = new Set<string>()
) {

@@ -601,13 +592,6 @@ for (const { context, request } of meta.getImportStatements()) {

const resolved = stylable.resolver.resolvePath(context, request);
onImport?.({ context, request, resolved, depth });
if (!imports.has(resolved)) {
imports.add(resolved);
tryCollectImportsDeep(
stylable,
stylable.analyze(resolved),
imports,
onImport,
depth + 1
);
tryCollectImportsDeep(stylable, stylable.analyze(resolved), imports);
}

@@ -614,0 +598,0 @@ } catch (e) {

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