Skip to content

Commit 221f566

Browse files
committed
chore(deps): upgrade
1 parent c871ede commit 221f566

File tree

14 files changed

+325
-324
lines changed

14 files changed

+325
-324
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
"@changesets/cli": "^2.26.2",
2323
"@tailwindcss-mangle/core": "workspace:*",
2424
"@tailwindcss-mangle/shared": "workspace:*",
25-
"@tsconfig/recommended": "^1.0.2",
25+
"@tsconfig/recommended": "^1.0.3",
2626
"@types/lodash-es": "^4.17.9",
27-
"@types/node": "^20.6.1",
28-
"@vitest/coverage-v8": "^0.34.4",
27+
"@types/node": "^20.6.3",
28+
"@vitest/coverage-v8": "^0.34.5",
2929
"bumpp": "^9.2.0",
3030
"cross-env": "^7.0.3",
3131
"dedent": "^1.5.1",
@@ -38,15 +38,15 @@
3838
"lodash-es": "^4.17.21",
3939
"only-allow": "^1.1.1",
4040
"prettier": "^3.0.3",
41-
"rollup": "^3.29.1",
41+
"rollup": "^3.29.2",
4242
"tailwindcss-patch": "workspace:*",
4343
"ts-node": "^10.9.1",
4444
"tslib": "^2.6.2",
4545
"tsup": "^7.2.0",
4646
"typescript": "^5.2.2",
4747
"unbuild": "^2.0.0",
4848
"unplugin-tailwindcss-mangle": "workspace:*",
49-
"vitest": "^0.34.4"
49+
"vitest": "^0.34.5"
5050
},
5151
"engines": {
5252
"node": ">=16.6.0"

packages/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"dependencies": {
4646
"@ast-core/escape": "^1.0.1",
47-
"@babel/core": "^7.22.19",
47+
"@babel/core": "^7.22.20",
4848
"@babel/helper-plugin-utils": "^7.22.5",
4949
"@babel/preset-typescript": "^7.22.15",
5050
"@babel/types": "^7.22.19",
@@ -54,12 +54,12 @@
5454
"magic-string": "^0.30.3",
5555
"micromatch": "^4.0.5",
5656
"parse5": "^7.1.2",
57-
"postcss": "^8.4.29",
57+
"postcss": "^8.4.30",
5858
"postcss-selector-parser": "^6.0.13"
5959
},
6060
"devDependencies": {
6161
"@parse5/tools": "^0.3.0",
62-
"@types/babel__core": "^7.20.1",
62+
"@types/babel__core": "^7.20.2",
6363
"@types/micromatch": "^4.0.2",
6464
"@vue/compiler-core": "^3.3.4",
6565
"@vue/compiler-sfc": "^3.3.4"

packages/tailwindcss-patch/src/cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cac from 'cac'
2-
import { createPatch, getPatchOptions, TailwindcssPatcher, getConfig, initConfig, configName } from './core'
2+
import { getConfig, initConfig, configName } from './config'
3+
import { createPatch, getPatchOptions, TailwindcssPatcher } from './core'
34

45
function init() {
56
const cwd = process.cwd()

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import fs from 'node:fs'
33
import type { TailwindcssClassCache, TailwindcssRuntimeContext } from '@/types'
44
import { requireResolve } from '@/utils'
55

6-
export function getTailwindcssEntry(basedir: string = process.cwd()) {
7-
return requireResolve('tailwindcss')
6+
export function getTailwindcssEntry(basedir?: string) {
7+
return requireResolve('tailwindcss', {
8+
basedir
9+
})
810
}
911

1012
export function getContexts(basedir?: string): TailwindcssRuntimeContext[] {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ export * from './exposeContext'
33
export * from './inspector'
44
export * from './runtime-patcher'
55
export * from './cache'
6-
export * from './config'

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { dirname } from 'node:path'
33
import { getClassCacheSet, getContexts, getTailwindcssEntry } from './exposeContext'
44
import { CacheManager, getCacheOptions } from './cache'
55
import { createPatch, getPatchOptions } from './runtime-patcher'
6-
import { UserConfig } from './config'
76
import { processTailwindcss } from './postcss'
7+
import { UserConfig } from '@/config'
88
import { ensureDir } from '@/utils'
99
import type { InternalCacheOptions, InternalPatchOptions, TailwindcssPatcherOptions, CacheStrategy } from '@/types'
1010
export class TailwindcssPatcher {
@@ -67,7 +67,7 @@ export class TailwindcssPatcher {
6767
return getContexts(basedir)
6868
}
6969

70-
async extract(options: UserConfig['patch']) {
70+
async extract(options?: UserConfig['patch']) {
7171
const { output, tailwindcss } = options ?? {}
7272
if (output && tailwindcss) {
7373
const { removeUniversalSelector, filename, loose } = output
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from './core'
22
export * from './utils'
33
export * from './types'
4+
export { defineConfig } from './config'

packages/tailwindcss-patch/test/cache.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import fs from 'node:fs'
33
import { getCss } from './utils'
44
import { pkgName } from '@/constants'
55
import { TailwindcssPatcher, CacheManager } from '@/core'
6+
import { getCacheOptions } from '@/core/cache'
67

78
describe('cache', () => {
89
let cm: CacheManager
@@ -12,6 +13,12 @@ describe('cache', () => {
1213
it('getCacheOptions', () => {
1314
expect(cm.getOptions).toBeDefined()
1415
expect(cm.getOptions().dir).toBe(path.resolve(process.cwd(), './node_modules/.cache', pkgName))
16+
expect(getCacheOptions(false)).toEqual({
17+
enable: false
18+
})
19+
expect(getCacheOptions(true)).toEqual({
20+
enable: true
21+
})
1522
})
1623

1724
it('mkCacheDirectory', () => {

packages/tailwindcss-patch/test/config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { resolve } from 'node:path'
22
import { existsSync } from 'node:fs'
33
import { deleteAsync } from 'del'
44
import { fixturesRoot } from './utils'
5-
import { initConfig, getConfig, getDefaultUserConfig, getDefaultMangleUserConfig } from '@/core/config'
5+
import { initConfig, getConfig, getDefaultUserConfig, getDefaultMangleUserConfig } from '@/config'
66

77
describe('config', () => {
88
it('0.default', async () => {

0 commit comments

Comments
 (0)