Skip to content

Commit 9988d4d

Browse files
committed
bump: versions of all configs
1 parent 4b81254 commit 9988d4d

File tree

13 files changed

+206
-198
lines changed

13 files changed

+206
-198
lines changed

src/configs/droneCI.ts

Lines changed: 6 additions & 4 deletions
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

Lines changed: 33 additions & 33 deletions
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

Lines changed: 6 additions & 4 deletions
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

Lines changed: 26 additions & 19 deletions
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

Lines changed: 20 additions & 19 deletions
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

Lines changed: 7 additions & 6 deletions
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

src/configs/prisma.ts

Lines changed: 34 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,6 @@ export default eventHandler((event) => {
6767
})
6868
`
6969

70-
const prismaUtils = `import { execSync } from 'node:child_process'
71-
72-
/**
73-
* Helper to reset the database via a programmatic prisma invocation. Helpful to add to \`beforeEach\` or \`beforeAll\` of your testing setup.
74-
*
75-
* WARNING: Never run this in production.
76-
*
77-
* Taken from https://github.com/prisma/prisma/issues/13549#issuecomment-1144883246
78-
*
79-
* @param databaseUrl Connection URL to database. Inferred from \`process.env.DATABASE_URL\` if not provided
80-
*/
81-
export function resetDatabase(databaseUrl?: string) {
82-
const url = databaseUrl || process.env.DATABASE_URL
83-
if (!url) {
84-
throw new Error('Cannot reset database - connection string could not be inferred.')
85-
}
86-
87-
if (process.env.NODE_ENV === 'production') {
88-
throw new Error('This utility should not be called in production. It is meant for testing and development')
89-
}
90-
91-
execSync(\`cd \${process.cwd()} && DATABASE_URL=\${url} npx prisma db push --force-reset\`, { stdio: 'inherit' })
92-
}
93-
`
94-
9570
const pglite = `/**
9671
* Script that starts a postgres database using pg-gateway (https://github.com/supabase-community/pg-gateway) and pglite (https://github.com/electric-sql/pglite).
9772
*
@@ -197,17 +172,17 @@ const prisma: ModuleConfig = {
197172
dependencies: [
198173
{
199174
name: 'prisma',
200-
version: '^5.18.0',
175+
version: '^5.22.0',
201176
isDev: true
202177
},
203178
{
204179
name: '@prisma/client',
205-
version: '^5.18.0',
180+
version: '^5.22.0',
206181
isDev: false
207182
},
208183
{
209184
name: '@electric-sql/pglite',
210-
version: '^0.2.9',
185+
version: '0.2.13',
211186
isDev: true,
212187
},
213188
{
@@ -217,36 +192,41 @@ const prisma: ModuleConfig = {
217192
},
218193
{
219194
name: 'vite-node',
220-
version: '^2.1.1',
195+
version: '^2.1.5',
221196
isDev: true,
222197
}
223198
],
224199
nuxtConfig: {},
225-
files: [{
226-
path: '.env',
227-
content: prismaEnvFile
228-
}, {
229-
path: 'prisma/schema/schema.prisma',
230-
content: prismaRootSchema
231-
}, {
232-
path: 'prisma/schema/example.prisma',
233-
content: prismaExampleSchema
234-
}, {
235-
path: 'server/api/examples.get.ts',
236-
content: prismaExampleEndpoint
237-
}, {
238-
path: 'server/middleware/0.prisma.ts',
239-
content: prismaServerMiddleware
240-
}, {
241-
path: 'prisma/utils.ts',
242-
content: prismaUtils
243-
}, {
244-
path: 'components/Welcome/PrismaDemo.vue',
245-
content: prismaDemoComponent,
246-
}, {
247-
path: 'prisma/pglite.ts',
248-
content: pglite,
249-
}],
200+
files: [
201+
{
202+
path: '.env',
203+
content: prismaEnvFile
204+
},
205+
{
206+
path: 'prisma/schema/schema.prisma',
207+
content: prismaRootSchema
208+
},
209+
{
210+
path: 'prisma/schema/example.prisma',
211+
content: prismaExampleSchema
212+
},
213+
{
214+
path: 'server/api/examples.get.ts',
215+
content: prismaExampleEndpoint
216+
},
217+
{
218+
path: 'server/middleware/0.prisma.ts',
219+
content: prismaServerMiddleware
220+
},
221+
{
222+
path: 'components/Welcome/PrismaDemo.vue',
223+
content: prismaDemoComponent,
224+
},
225+
{
226+
path: 'prisma/pglite.ts',
227+
content: pglite,
228+
}
229+
],
250230
tasksPostInstall: [
251231
'- [ ] Prisma: Edit your `prisma/prisma.schema` to your liking',
252232
`- [ ] Prisma: Start your local postgres database using \`${getUserPkgManager()} run db\``,

0 commit comments

Comments
 (0)