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

@stylable/build-tools

Package Overview
Dependencies
Maintainers
6
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/build-tools - npm Package Compare versions

Comparing version 4.2.1 to 4.2.2

2

dist/process-url-dependencies.d.ts
import { StylableMeta } from '@stylable/core';
export declare function processUrlDependencies(meta: StylableMeta, rootContext: string): string[];
export declare function processUrlDependencies(meta: StylableMeta, rootContext: string, filter?: (url: string, context: string) => boolean): string[];
//# sourceMappingURL=process-url-dependencies.d.ts.map

@@ -6,3 +6,6 @@ "use strict";

const path_1 = require("path");
function processUrlDependencies(meta, rootContext) {
function defaultFilter() {
return true;
}
function processUrlDependencies(meta, rootContext, filter = defaultFilter) {
const importerDir = path_1.dirname(meta.source);

@@ -12,3 +15,3 @@ const urls = [];

const { url } = node;
if (url && core_1.isAsset(url)) {
if (url && core_1.isAsset(url) && filter(url, importerDir)) {
node.stringType = '"';

@@ -15,0 +18,0 @@ delete node.innerSpacingBefore;

{
"name": "@stylable/build-tools",
"version": "4.2.1",
"version": "4.2.2",
"description": "Collection of helper functions for Stylable based tooling.",

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

"dependencies": {
"@stylable/core": "^4.2.1",
"@stylable/core": "^4.2.2",
"find-config": "^1.0.0"

@@ -13,0 +13,0 @@ },

@@ -5,3 +5,11 @@ import type { UrlNode } from 'css-selector-tokenizer';

export function processUrlDependencies(meta: StylableMeta, rootContext: string) {
function defaultFilter() {
return true;
}
export function processUrlDependencies(
meta: StylableMeta,
rootContext: string,
filter: (url: string, context: string) => boolean = defaultFilter
) {
const importerDir = dirname(meta.source);

@@ -11,3 +19,3 @@ const urls: string[] = [];

const { url } = node;
if (url && isAsset(url)) {
if (url && isAsset(url) && filter(url, importerDir)) {
node.stringType = '"';

@@ -14,0 +22,0 @@ delete node.innerSpacingBefore;

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