Skip to content

Commit 5c63890

Browse files
authored
bump: nuxt to 3.15.4 (#53)
1 parent 4b81254 commit 5c63890

13 files changed

+213
-205
lines changed

src/configs/droneCI.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ const droneCI: Config = {
3030
scripts: [],
3131
dependencies: [],
3232
nuxtConfig: {},
33-
files: [{
34-
path: '.drone.yml',
35-
content: DRONE_TEMPLATE
36-
}],
33+
files: [
34+
{
35+
path: '.drone.yml',
36+
content: DRONE_TEMPLATE
37+
}
38+
],
3739
}
3840

3941
export default droneCI

src/configs/eslint.ts

+33-33
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,13 @@ const ignores = [
1616
export default antfu({
1717
// .eslintignore is no longer supported in Flat config, use ignores instead
1818
ignores,
19-
20-
// Stylistic formatting rules
2119
stylistic: {
2220
indent: 2,
2321
quotes: 'single',
2422
},
25-
26-
// TypeScript and Vue are auto-detected, you can also explicitly enable them
27-
typescript: true,
2823
vue: true,
29-
30-
// Disable jsonc and yaml support
3124
jsonc: false,
3225
yaml: false,
33-
34-
// Overwrite certain rules to your preference
3526
rules: {
3627
'no-console': ['error', {
3728
allow: ['info', 'warn', 'trace', 'error', 'group', 'groupEnd'],
@@ -44,31 +35,40 @@ export default antfu({
4435
`
4536

4637
const eslint: Config = {
47-
scripts: [{
48-
name: 'lint',
49-
command: 'oxlint --deny-warnings -D correctness -D suspicious -D perf && eslint --max-warnings 0 .'
50-
}, {
51-
name: 'lint:fix',
52-
command: 'eslint . --fix',
53-
}],
54-
dependencies: [{
55-
name: 'eslint',
56-
version: '^8.57.0',
57-
isDev: true
58-
}, {
59-
name: '@antfu/eslint-config',
60-
version: '^2.26.0',
61-
isDev: true
62-
}, {
63-
name: 'oxlint',
64-
version: '^0.7.2',
65-
isDev: true
66-
}],
38+
scripts: [
39+
{
40+
name: 'lint',
41+
command: 'oxlint --deny-warnings -D correctness -D suspicious -D perf && eslint --max-warnings 0 .'
42+
},
43+
{
44+
name: 'lint:fix',
45+
command: 'eslint . --fix',
46+
}
47+
],
48+
dependencies: [
49+
{
50+
name: 'eslint',
51+
version: '^9.18.0',
52+
isDev: true
53+
},
54+
{
55+
name: '@antfu/eslint-config',
56+
version: '^3.15.0',
57+
isDev: true
58+
},
59+
{
60+
name: 'oxlint',
61+
version: '^0.15.7',
62+
isDev: true
63+
}
64+
],
6765
nuxtConfig: {},
68-
files: [{
69-
path: 'eslint.config.js',
70-
content: eslintConfig
71-
}],
66+
files: [
67+
{
68+
path: 'eslint.config.js',
69+
content: eslintConfig
70+
}
71+
],
7272
}
7373

7474
export default eslint

src/configs/github-actions.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ const githubActions: Config = {
5353
scripts: [],
5454
dependencies: [],
5555
nuxtConfig: {},
56-
files: [{
57-
path: '.github/workflows/ci.yaml',
58-
content: GITHUB_ACTIONS_TEMPLATE
59-
}],
56+
files: [
57+
{
58+
path: '.github/workflows/ci.yaml',
59+
content: GITHUB_ACTIONS_TEMPLATE
60+
}
61+
],
6062
}
6163

6264
export default githubActions

src/configs/i18n.ts

+26-19
Original file line numberDiff line numberDiff line change
@@ -47,37 +47,44 @@ const i18n: ModuleConfig = {
4747
humanReadableName: 'i18n',
4848
description: 'I18n (Internationalization) module for your Nuxt project powered by Vue I18n. See more: https://i18n.nuxtjs.org/',
4949
scripts: [],
50-
dependencies: [{
51-
name: '@nuxtjs/i18n',
52-
version: '^8.4.0',
53-
isDev: true
54-
}],
50+
dependencies: [
51+
{
52+
name: '@nuxtjs/i18n',
53+
version: '^9.2.1',
54+
isDev: true
55+
}
56+
],
5557
nuxtConfig: {
5658
modules: ['@nuxtjs/i18n'],
5759
// @ts-expect-error i18n is not set in default Nuxt Config, as the package is not installed
5860
i18n: {
59-
strategy: 'prefix_except_default',
60-
lazy: true,
61-
langDir: 'locales',
6261
defaultLocale: 'en',
6362
locales: [
6463
{ name: 'English', code: 'en', file: 'en.json' },
6564
],
65+
strategy: 'prefix_except_default',
66+
detectBrowserLanguage: false,
67+
lazy: true,
6668
experimental: {
67-
localeDetector: './localeDetector.ts'
69+
autoImportTranslationFunctions: true,
70+
localeDetector: 'localeDetector.ts'
6871
}
6972
}
7073
},
71-
files: [{
72-
path: 'localeDetector.ts',
73-
content: localeDetector
74-
}, {
75-
path: 'locales/en.json',
76-
content: englishLocaleFile
77-
}, {
78-
path: 'components/Welcome/I18nDemo.vue',
79-
content: i18nDemoComponent
80-
}],
74+
files: [
75+
{
76+
path: 'i18n/localeDetector.ts',
77+
content: localeDetector
78+
},
79+
{
80+
path: 'i18n/locales/en.json',
81+
content: englishLocaleFile
82+
},
83+
{
84+
path: 'components/Welcome/I18nDemo.vue',
85+
content: i18nDemoComponent
86+
}
87+
],
8188
tasksPostInstall: [],
8289
indexVue: generateModuleHTMLSnippet('WelcomeI18nDemo'),
8390
}

src/configs/naiveui.ts

+20-19
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,37 @@ const showModal = ref(false)
2828
`
2929

3030
const nuxtAppVueWithNaiveConfig = `<template>
31-
<naive-config>
31+
<NaiveConfig>
32+
<NuxtRouteAnnouncer />
3233
<NuxtPage />
33-
</naive-config>
34+
</NaiveConfig>
3435
</template>
3536
`
3637

3738
const naiveui: ModuleConfig = {
3839
humanReadableName: 'Naive UI',
3940
description: 'A Vue 3 Component Library. Complete, Customizable, Uses TypeScript, Fast. See more: https://www.naiveui.com/',
4041
scripts: [],
41-
dependencies: [{
42-
name: '@bg-dev/nuxt-naiveui',
43-
/*
44-
* Pinned to v1.0.0-edge.2 as naiveui was failing on typecheck.
45-
* replace this with the offical release, once it is out.
46-
* See: https://github.com/becem-gharbi/nuxt-naiveui/issues/76
47-
*/
48-
version: '1.0.0-edge.2',
49-
isDev: true
50-
}],
42+
dependencies: [
43+
{
44+
name: '@bg-dev/nuxt-naiveui',
45+
version: '2.0.0-rc.4',
46+
isDev: true
47+
}
48+
],
5149
nuxtConfig: {
5250
modules: ['@bg-dev/nuxt-naiveui'],
5351
},
54-
files: [{
55-
path: 'components/Welcome/NaiveDemo.vue',
56-
content: naiveDemoComponent
57-
}, {
58-
path: 'app.vue',
59-
content: nuxtAppVueWithNaiveConfig
60-
}],
52+
files: [
53+
{
54+
path: 'components/Welcome/NaiveDemo.vue',
55+
content: naiveDemoComponent
56+
},
57+
{
58+
path: 'app.vue',
59+
content: nuxtAppVueWithNaiveConfig
60+
}
61+
],
6162
tasksPostInstall: [],
6263
indexVue: generateModuleHTMLSnippet('WelcomeNaiveDemo'),
6364
}

src/configs/pnpm.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import type { Config } from '../types'
22

33
// nuxt 3 + pnpm needs to shamefully hoist + we want to auto-install required peer dependencies (last one taken from: https://github.com/antfu/vitesse/blob/main/.npmrc)
4-
const npmrc = `
5-
shamefully-hoist=true
4+
const npmrc = `shamefully-hoist=true
65
strict-peer-dependencies=false
76
`
87

98
const pnpm: Config = {
109
dependencies: [],
1110
scripts: [],
1211
nuxtConfig: {},
13-
files: [{
14-
path: '.npmrc',
15-
content: npmrc
16-
}],
12+
files: [
13+
{
14+
path: '.npmrc',
15+
content: npmrc
16+
}
17+
],
1718
}
1819

1920
export default pnpm

0 commit comments

Comments
 (0)