tailwindcss-patch
Advanced tools
Comparing version 3.1.0-alpha.1 to 4.0.0-alpha.0
@@ -5,4 +5,2 @@ import { Rule, Node } from 'postcss'; | ||
export { defineConfig } from '@tailwindcss-mangle/config'; | ||
import { SyncOpts } from 'resolve'; | ||
import { PackageJson } from 'pkg-types'; | ||
import * as consola from 'consola'; | ||
@@ -23,5 +21,5 @@ | ||
} | ||
type InternalCacheOptions = CacheOptions & { | ||
interface InternalCacheOptions extends CacheOptions { | ||
enable?: boolean; | ||
}; | ||
} | ||
interface PatchOptions { | ||
@@ -31,6 +29,5 @@ overwrite?: boolean; | ||
basedir?: string; | ||
custom?: (dir: string, ctx: Record<string, any>) => void; | ||
applyPatches?: { | ||
exportContext?: boolean; | ||
extendLengthUnits?: boolean; | ||
extendLengthUnits?: boolean | ILengthUnitsPatchOptions; | ||
}; | ||
@@ -105,3 +102,2 @@ } | ||
constructor(options?: CacheOptions); | ||
mkdir(cacheDirectory: string): string; | ||
getOptions(options?: CacheOptions): Required<CacheOptions> & { | ||
@@ -140,28 +136,13 @@ filename: string; | ||
declare function monkeyPatchForExposingContextV3(twDir: string, opt: InternalPatchOptions): { | ||
processTailwindFeatures?: string; | ||
plugin?: string; | ||
} & Record<string, any>; | ||
declare function monkeyPatchForExposingContextV2(twDir: string, opt: InternalPatchOptions): { | ||
processTailwindFeatures?: string; | ||
plugin?: string; | ||
} & Record<string, any>; | ||
declare function monkeyPatchForExposingContextV3(twDir: string, opt: InternalPatchOptions): Record<string, any> | undefined; | ||
declare function monkeyPatchForExposingContextV2(twDir: string, opt: InternalPatchOptions): Record<string, any>; | ||
declare function monkeyPatchForSupportingCustomUnit(rootDir: string, options?: Partial<ILengthUnitsPatchOptions>): string | undefined; | ||
declare function monkeyPatchForSupportingCustomUnit(rootDir: string, options?: Partial<ILengthUnitsPatchOptions>): { | ||
[x: string]: string; | ||
} | undefined; | ||
declare function internalPatch(pkgJsonPath: string | undefined, options: InternalPatchOptions): any | undefined; | ||
declare function internalPatch(pkgJsonPath: string | undefined, options: InternalPatchOptions): Record<string, any> | undefined; | ||
declare function ensureFileContent(filepaths: string | string[]): string | undefined; | ||
declare function requireResolve(id: string, opts?: SyncOpts): string; | ||
declare function getPackageInfoSync(name: string, options?: SyncOpts): { | ||
name: string; | ||
version: string | undefined; | ||
rootPath: string; | ||
packageJsonPath: string; | ||
packageJson: PackageJson; | ||
} | undefined; | ||
declare function isObject(val: any): boolean; | ||
declare const logger: consola.ConsolaInstance; | ||
export { CacheManager, type CacheOptions, type CacheStrategy, type DeepRequired, type ILengthUnitsPatchOptions, type InternalCacheOptions, type InternalPatchOptions, type PackageInfo, type PatchOptions, type TailwindcssClassCache, TailwindcssPatcher, type TailwindcssPatcherOptions, type TailwindcssRuntimeContext, ensureFileContent, getCacheOptions, getPackageInfoSync, internalPatch, isObject, logger, monkeyPatchForExposingContextV2, monkeyPatchForExposingContextV3, monkeyPatchForSupportingCustomUnit, requireResolve }; | ||
export { CacheManager, type CacheOptions, type CacheStrategy, type DeepRequired, type ILengthUnitsPatchOptions, type InternalCacheOptions, type InternalPatchOptions, type PackageInfo, type PatchOptions, type TailwindcssClassCache, TailwindcssPatcher, type TailwindcssPatcherOptions, type TailwindcssRuntimeContext, getCacheOptions, internalPatch, logger, monkeyPatchForExposingContextV2, monkeyPatchForExposingContextV3, monkeyPatchForSupportingCustomUnit }; |
{ | ||
"name": "tailwindcss-patch", | ||
"version": "3.1.0-alpha.1", | ||
"version": "4.0.0-alpha.0", | ||
"description": "patch tailwindcss for exposing context and extract classes", | ||
@@ -32,2 +32,9 @@ "author": "SonOfMagic <qq1324318532@gmail.com>", | ||
], | ||
"scripts": { | ||
"dev": "unbuild --sourcemap", | ||
"build": "unbuild", | ||
"test": "vitest run --coverage.enabled", | ||
"test:dev": "vitest", | ||
"patch": "node bin/tw-patch.js install" | ||
}, | ||
"publishConfig": { | ||
@@ -50,2 +57,3 @@ "access": "public", | ||
"@babel/types": "^7.24.9", | ||
"@tailwindcss-mangle/config": "workspace:^", | ||
"cac": "^6.7.14", | ||
@@ -58,25 +66,4 @@ "consola": "^3.2.3", | ||
"resolve": "^1.22.8", | ||
"semver": "^7.6.3", | ||
"@tailwindcss-mangle/config": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/babel__generator": "^7.6.8", | ||
"@types/babel__traverse": "^7.20.6", | ||
"@types/resolve": "^1.20.6", | ||
"@types/semver": "^7.5.8", | ||
"pkg-types": "^1.1.3", | ||
"postcss7": "npm:postcss@7", | ||
"tailwindcss": "^3.4.6", | ||
"tailwindcss2": "npm:@tailwindcss/postcss7-compat@^2.2.17" | ||
}, | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"dev": "unbuild --sourcemap", | ||
"build": "unbuild", | ||
"test": "vitest run --coverage.enabled", | ||
"test:dev": "vitest", | ||
"patch": "node bin/tw-patch.js install" | ||
"semver": "^7.6.3" | ||
} | ||
} | ||
} |
@@ -15,5 +15,2 @@ # tailwindcss-patch | ||
- [Init Config File](#init-config-file) | ||
- [Migration form v1 to v2](#migration-form-v1-to-v2) | ||
- [0. cli command change](#0-cli-command-change) | ||
- [1. default remove `*` in json array result](#1-default-remove--in-json-array-result) | ||
- [What's next?](#whats-next) | ||
@@ -116,23 +113,2 @@ | ||
## Migration form v1 to v2 | ||
### 0. cli command change | ||
```diff | ||
{ | ||
- "tw-patch" | ||
+ "tw-patch install" | ||
} | ||
``` | ||
### 1. default remove `*` in json array result | ||
```diff | ||
[ | ||
- "*", | ||
"text-[99px]", | ||
"text-[100px]" | ||
] | ||
``` | ||
## What's next? | ||
@@ -139,0 +115,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
87813
1951
119
1
- Removed@tailwindcss-mangle/config@3.0.0(transitive)
- Removed@tailwindcss-mangle/shared@3.0.0(transitive)
- Removedacorn@8.14.0(transitive)
- Removedanymatch@3.1.3(transitive)
- Removedbinary-extensions@2.3.0(transitive)
- Removedbraces@3.0.3(transitive)
- Removedc12@1.11.2(transitive)
- Removedchokidar@3.6.0(transitive)
- Removedchownr@2.0.0(transitive)
- Removedcitty@0.1.6(transitive)
- Removedconfbox@0.1.8(transitive)
- Removeddefu@6.1.4(transitive)
- Removeddestr@2.0.3(transitive)
- Removeddotenv@16.4.7(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedfs-minipass@2.1.0(transitive)
- Removedfsevents@2.3.3(transitive)
- Removedgiget@1.2.4(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedis-binary-path@2.1.0(transitive)
- Removedis-css-request@1.0.1(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedminipass@3.3.65.0.0(transitive)
- Removedminizlib@2.1.2(transitive)
- Removedmkdirp@1.0.4(transitive)
- Removedmlly@1.7.4(transitive)
- Removednode-fetch-native@1.6.6(transitive)
- Removednormalize-path@3.0.0(transitive)
- Removednypm@0.5.2(transitive)
- Removedohash@1.1.4(transitive)
- Removedpathe@1.1.22.0.3(transitive)
- Removedperfect-debounce@1.0.0(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedpkg-types@1.3.1(transitive)
- Removedrc9@2.1.2(transitive)
- Removedreaddirp@3.6.0(transitive)
- Removedtar@6.2.1(transitive)
- Removedtinyexec@0.3.2(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedufo@1.5.4(transitive)
- Removedyallist@4.0.0(transitive)