Skip to content

Commit dfced6a

Browse files
committed
chore(deps): upgrade
1 parent 7ba2f66 commit dfced6a

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

packages/config/src/types.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FilterPattern } from '@rollup/pluginutils'
22
import type { IClassGeneratorOptions } from '@tailwindcss-mangle/shared'
3-
3+
import type { PackageResolvingOptions } from 'local-pkg'
44
export interface ClassMapOutputOptions {
55
enable?: boolean
66
filename?: string
@@ -54,17 +54,21 @@ export interface TailwindcssUserConfig {
5454
v4?: TailwindcssV4PatchConfig
5555
}
5656

57-
export interface PatchUserConfig {
58-
output?: {
59-
filename?: string
57+
export interface OutputUserConfig {
58+
filename?: string
6059

61-
loose?: boolean
62-
/**
63-
* @description remove * in output json
64-
*/
65-
removeUniversalSelector?: boolean
66-
}
60+
loose?: boolean
61+
/**
62+
* @description remove * in output json
63+
*/
64+
removeUniversalSelector?: boolean
65+
}
66+
67+
export interface PatchUserConfig {
68+
packageName?: string
69+
output?: OutputUserConfig
6770
tailwindcss?: TailwindcssUserConfig
71+
resolve?: PackageResolvingOptions
6872
}
6973

7074
export interface UserConfig {

packages/tailwindcss-patch/src/core/patcher.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ export class TailwindcssPatcher {
3030

3131
this.cacheManager = new CacheManager(this.cacheOptions)
3232

33-
const packageInfo = getPackageInfoSync('tailwindcss')
33+
const packageInfo = getPackageInfoSync(
34+
this.patchOptions.packageName ?? 'tailwindcss',
35+
this.patchOptions.resolve,
36+
)
3437

3538
if (!packageInfo) {
3639
throw new Error('tailwindcss not found')

packages/tailwindcss-patch/src/defaults.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { defu } from '@tailwindcss-mangle/shared'
44

55
export function getDefaultPatchOptions(): DeepRequired<PatchOptions> {
66
return {
7+
packageName: 'tailwindcss',
78
applyPatches: {
89
exportContext: true,
910
extendLengthUnits: false,

packages/tailwindcss-patch/test/__snapshots__/defaults.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ exports[`defaults > getDefaultPatchOptions 1`] = `
77
"extendLengthUnits": false,
88
},
99
"overwrite": true,
10+
"packageName": "tailwindcss",
1011
}
1112
`;

0 commit comments

Comments
 (0)