New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tailwindcss-patch

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwindcss-patch - npm Package Compare versions

Comparing version 1.2.5 to 1.2.6

25

dist/index.js

@@ -46,3 +46,3 @@ 'use strict';

for (const key of keys) {
classSet.add(key);
classSet.add(key.toString());
}

@@ -78,3 +78,4 @@ }

file,
filename
filename,
strategy: 'merge'
};

@@ -152,5 +153,21 @@ }

}
getClassSet(basedir) {
getClassSet(options) {
var _a;
if (options === void 0) { options = {
cacheStrategy: (_a = this.cacheOptions.strategy) !== null && _a !== void 0 ? _a : 'merge'
}; }
const { basedir, cacheStrategy } = options;
const set = getClassCacheSet(basedir);
set.size > 0 && this.setCache(set);
if (cacheStrategy === 'overwrite') {
set.size > 0 && this.setCache(set);
}
else if (cacheStrategy === 'merge') {
const cacheSet = this.getCache();
if (cacheSet) {
for (const x of cacheSet) {
set.add(x);
}
}
this.setCache(set);
}
return set;

@@ -157,0 +174,0 @@ }

7

dist/types/class.d.ts

@@ -1,2 +0,2 @@

import type { CacheOptions, InternalCacheOptions, InternalPatchOptions, TailwindcssPatcherOptions } from './type';
import type { CacheOptions, InternalCacheOptions, InternalPatchOptions, TailwindcssPatcherOptions, CacheStrategy } from './type';
export declare function getCacheOptions(options?: CacheOptions | boolean): InternalCacheOptions;

@@ -12,4 +12,7 @@ export declare class TailwindcssPatcher {

getCache(): Set<string> | undefined;
getClassSet(basedir?: string): Set<string>;
getClassSet(options?: {
basedir?: string;
cacheStrategy?: CacheStrategy;
}): Set<string>;
getContexts(basedir?: string): any[];
}

@@ -0,1 +1,2 @@

export type CacheStrategy = 'merge' | 'overwrite';
export interface CacheOptions {

@@ -5,2 +6,3 @@ dir?: string;

file?: string;
strategy?: CacheStrategy;
}

@@ -7,0 +9,0 @@ export type InternalCacheOptions = CacheOptions & {

{
"name": "tailwindcss-patch",
"version": "1.2.5",
"version": "1.2.6",
"description": "patch tailwindcss for exposing context",

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

"resolve": "^1.22.2",
"semver": "^7.5.1"
"semver": "^7.5.2"
},

@@ -45,0 +45,0 @@ "homepage": "https://github.com/sonofmagic/tailwindcss-mangle",

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