Skip to content

Commit 46ef08a

Browse files
committedDec 28, 2023
chore: update deps
1 parent e808d1f commit 46ef08a

File tree

9 files changed

+1465
-2760
lines changed

9 files changed

+1465
-2760
lines changed
 

Diff for: ‎docs/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
"typecheck": "nuxt typecheck"
1313
},
1414
"dependencies": {
15-
"@iconify-json/heroicons": "^1.1.13",
16-
"@iconify-json/ph": "^1.1.6",
17-
"@iconify-json/simple-icons": "^1.1.77",
15+
"@iconify-json/heroicons": "^1.1.19",
16+
"@iconify-json/ph": "^1.1.9",
17+
"@iconify-json/simple-icons": "^1.1.86",
1818
"@nuxt/ui-pro": "npm:@nuxt/ui-pro-edge@latest",
1919
"@nuxtjs/fontaine": "^0.4.1",
20-
"@nuxtjs/google-fonts": "^3.0.2",
21-
"@nuxtjs/plausible": "^0.2.3",
20+
"@nuxtjs/google-fonts": "^3.1.3",
21+
"@nuxtjs/plausible": "^0.2.4",
2222
"nuxt-og-image": "^2.2.4"
2323
},
2424
"devDependencies": {
25-
"@nuxthq/studio": "^1.0.4"
25+
"@nuxthq/studio": "^1.0.6"
2626
}
2727
}

Diff for: ‎nuxt2-playground/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
},
1010
"dependencies": {
1111
"nuxt": "2.17.2",
12-
"postcss": "8.4.31",
13-
"vue": "2.7.15",
12+
"vue": "2.7.16",
1413
"vue-router": "3.6.5"
1514
},
1615
"keywords": []

Diff for: ‎nuxt2-playground/pnpm-lock.yaml

+40-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎package.json

+15-16
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
"scripts": {
2525
"dev": "nuxi dev playground",
2626
"play": "pnpm dev",
27+
"prepare": "nuxt-module-build prepare",
2728
"dev:build": "nuxi build playground",
2829
"dev:generate": "nuxi generate playground",
2930
"dev:nuxt2": "nuxi dev nuxt2-playground",
30-
"dev:prepare": "nuxt-module-build prepare && nuxt-module-build build --stub && nuxi prepare playground && nuxi prepare docs",
31+
"dev:prepare": "pnpm prepare && nuxt-module-build build --stub && nuxi prepare playground && nuxi prepare docs",
3132
"build": "nuxt-module-build build",
3233
"prepack": "pnpm build",
3334
"release": "pnpm lint && pnpm test && pnpm prepack && pnpm changelogen --release --push && pnpm publish",
@@ -41,7 +42,7 @@
4142
"test:types": "pnpm dev:prepare && tsc --noEmit && nuxi typecheck playground"
4243
},
4344
"dependencies": {
44-
"@nuxt/kit": "^3.8.2",
45+
"@nuxt/kit": "^3.9.0",
4546
"autoprefixer": "^10.4.16",
4647
"chokidar": "^3.5.3",
4748
"clear-module": "^4.1.2",
@@ -51,33 +52,31 @@
5152
"h3": "^1.9.0",
5253
"micromatch": "^4.0.5",
5354
"pathe": "^1.1.1",
54-
"postcss": "^8.4.31",
55-
"postcss-custom-properties": "^13.3.2",
56-
"postcss-nesting": "^12.0.1",
55+
"postcss": "^8.4.32",
56+
"postcss-custom-properties": "^13.3.3",
57+
"postcss-nesting": "^12.0.2",
5758
"tailwind-config-viewer": "^1.7.3",
5859
"tailwindcss": "~3.4.0",
5960
"ufo": "^1.3.2"
6061
},
6162
"devDependencies": {
62-
"@fontsource/inter": "^5.0.15",
63-
"@nuxt/content": "^2.9.0",
64-
"@nuxt/devtools": "^1.0.3",
63+
"@fontsource/inter": "^5.0.16",
64+
"@nuxt/content": "^2.10.0",
65+
"@nuxt/devtools": "^1.0.6",
6566
"@nuxt/eslint-config": "latest",
66-
"@nuxt/module-builder": "^0.5.4",
67-
"@nuxt/test-utils": "^3.8.1",
67+
"@nuxt/module-builder": "^0.5.5",
68+
"@nuxt/test-utils": "^3.9.0",
6869
"@tailwindcss/typography": "^0.5.10",
6970
"@types/micromatch": "^4.0.6",
7071
"changelogen": "^0.5.5",
7172
"destr": "^2.0.2",
7273
"eslint": "latest",
7374
"happy-dom": "^12.10.3",
74-
"jsdom": "^22.1.0",
75-
"nuxt": "^3.8.2",
76-
"typescript": "^5.2.2",
77-
"vitest": "0.33.0",
78-
"vue-tsc": "^1.8.22"
75+
"nuxt": "^3.9.0",
76+
"typescript": "^5.3.3",
77+
"vitest": "1.1.0"
7978
},
80-
"packageManager": "pnpm@8.9.2",
79+
"packageManager": "pnpm@8.13.1",
8180
"resolutions": {
8281
"@nuxtjs/tailwindcss": "link:."
8382
}

Diff for: ‎pnpm-lock.yaml

+1,362-2,693
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎src/module.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ import vitePlugin from './vite-hmr'
3333
import { setupViewer, exportViewer } from './viewer'
3434
import { name, version, configKey, compatibility } from '../package.json'
3535

36-
import type { ModuleOptions, TWConfig } from './types'
36+
import type { ModuleHooks, ModuleOptions, TWConfig } from './types'
3737
import { withTrailingSlash } from 'ufo'
38-
export type { ModuleOptions } from './types'
38+
export type { ModuleOptions, ModuleHooks } from './types'
3939

4040
const defaults = (nuxt = useNuxt()): ModuleOptions => ({
4141
configPath: 'tailwind.config',
@@ -170,6 +170,7 @@ export default defineNuxtModule<ModuleOptions>({
170170
const viewerConfig = resolveViewerConfig(moduleOptions.viewer)
171171
setupViewer(tailwindConfig, viewerConfig, nuxt)
172172

173+
// @ts-ignore
173174
nuxt.hook('devtools:customTabs', (tabs) => {
174175
tabs.push({
175176
title: 'TailwindCSS',
@@ -193,10 +194,10 @@ export default defineNuxtModule<ModuleOptions>({
193194
}
194195
})
195196

197+
declare module 'nuxt/schema' {
198+
interface NuxtHooks extends ModuleHooks {}
199+
}
200+
196201
declare module '@nuxt/schema' {
197-
interface NuxtHooks {
198-
'tailwindcss:config': (tailwindConfig: Partial<TWConfig>) => void;
199-
'tailwindcss:loadConfig': (tailwindConfig: Partial<TWConfig> | undefined, configPath: string, index: number, configPaths: string[]) => void;
200-
'tailwindcss:resolvedConfig': (tailwindConfig: ReturnType<typeof resolveConfig<TWConfig>>) => void;
201-
}
202+
interface NuxtHooks extends ModuleHooks {}
202203
}

Diff for: ‎src/types.ts

+27
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,30 @@ export interface ModuleOptions {
104104
*/
105105
addTwUtil: boolean;
106106
}
107+
108+
export interface ModuleHooks {
109+
/**
110+
* Passes any Tailwind configuration read by the module for each (extended) [layer](https://nuxt.com/docs/getting-started/layers) and [path](https://tailwindcss.nuxtjs.org/getting-started/options#configpath) before merging all of them.
111+
*
112+
* @param tailwindConfig
113+
* @returns
114+
*/
115+
'tailwindcss:config': (tailwindConfig: Partial<TWConfig>) => void;
116+
/**
117+
* Passes the resolved vanilla configuration read from all layers and paths with merging using [defu](https://github.com/unjs/defu).
118+
*
119+
* @param tailwindConfig
120+
* @param configPath
121+
* @param index
122+
* @param configPaths
123+
* @returns
124+
*/
125+
'tailwindcss:loadConfig': (tailwindConfig: Partial<TWConfig> | undefined, configPath: string, index: number, configPaths: string[]) => void;
126+
/**
127+
* Passes the complete resolved configuration with all defaults from [the full Tailwind config](https://github.com/tailwindlabs/tailwindcss/blob/master/stubs/config.full.js) using resolveConfig.
128+
*
129+
* @param tailwindConfig
130+
* @returns
131+
*/
132+
'tailwindcss:resolvedConfig': (tailwindConfig: ResolvedTwConfig) => void;
133+
}

Diff for: ‎test/sink.test.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ describe.skipIf(!existsSync(fixturePath))('nuxt.com', async () => {
1515

1616
// eslint-disable-next-line no-constant-condition
1717
while (true) {
18-
if (existsSync(`${fixturePath}.output/public/index.html`)) {
18+
if (
19+
existsSync(`${fixturePath}.output/public/index.html`)
20+
&& readFileSync(`${fixturePath}.output/public/index.html`, 'utf-8').includes('<style>/*! tailwindcss')
21+
) {
1922
setTimeout(() => generateCommand.kill(), 5000)
2023
break
2124
}

Diff for: ‎vitest.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { defineConfig } from 'vitest/config'
1+
import { defineVitestConfig } from '@nuxt/test-utils/config'
22

3-
export default defineConfig({})
3+
export default defineVitestConfig({})

0 commit comments

Comments
 (0)
Please sign in to comment.