Skip to content

Commit

Permalink
chore: Updated all modules (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser authored Jan 9, 2024
1 parent 24d0c65 commit 84c9cf7
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/steps/2.addModules/moduleConfigs/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,14 @@ const auth: ModuleConfig = {
dependencies: [
{
name: "@sidebase/nuxt-auth",
version: "^0.5.0",
version: "^0.6.4",
isDev: true
},
{
name: "next-auth",
version: "4.21.1",
isDev: false,
isPeer: true,
}
],
nuxtConfig: {
Expand Down
2 changes: 1 addition & 1 deletion src/steps/2.addModules/moduleConfigs/naiveui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const naiveui: ModuleConfig = {
description: "A Vue 3 Component Library. Complete, Customizable, Uses TypeScript, Fast. See more: https://www.naiveui.com/",
dependencies: [{
name: "@bg-dev/nuxt-naiveui",
version: "^1.5.1",
version: "^1.8.1",
isDev: true
}],
nuxtConfig: {
Expand Down
4 changes: 2 additions & 2 deletions src/steps/2.addModules/moduleConfigs/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ const prisma: ModuleConfig = {
dependencies: [
{
name: "prisma",
version: "^5.4.1",
version: "^5.7.1",
isDev: true
},
{
name: "@prisma/client",
version: "^5.4.1",
version: "^5.7.1",
isDev: false
}
],
Expand Down
2 changes: 1 addition & 1 deletion src/steps/2.addModules/moduleConfigs/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const tailwind: ModuleConfig = {
description: "A utility-first CSS framework packed with classes that can be composed to build any design, directly in your markup. See more: https://tailwindcss.com/",
dependencies: [{
name: "@nuxtjs/tailwindcss",
version: "^6.8.0",
version: "^6.10.4",
isDev: true
}],
nuxtConfig: {
Expand Down
8 changes: 4 additions & 4 deletions src/steps/2.addModules/moduleConfigs/trpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,23 @@ const trpc: ModuleConfig = {
description: "Build end-to-end typesafe APIs in Nuxt applications. See more: https://trpc.io/",
dependencies: [{
name: "@trpc/server",
version: "^10.40.0",
version: "^10.45.0",
isDev: false
}, {
name: "@trpc/client",
version: "^10.40.0",
version: "^10.45.0",
isDev: false
}, {
name: "trpc-nuxt",
version: "^0.10.12",
version: "^0.10.15",
isDev: false
}, {
name: "zod",
version: "^3.22.4",
isDev: false
}, {
name: "superjson",
version: "^1.12.2",
version: "^2.2.1",
isDev: false
}],
nuxtConfig: {
Expand Down
7 changes: 6 additions & 1 deletion src/utils/addPackageDependency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface Dependency {
name: string
version: string
isDev: boolean
isPeer?: boolean
}

export const addPackageDependencies = async (opts: {
Expand All @@ -17,11 +18,15 @@ export const addPackageDependencies = async (opts: {
const pathToPackageJson = resolve(`./${projectDir}/package.json`)
const packageJson = await readPackageJSON(pathToPackageJson)

for (const { name, version, isDev } of dependencies) {
for (const { name, version, isDev, isPeer } of dependencies) {
if (isDev) {
packageJson.devDependencies = defu(packageJson.devDependencies, {
[name]: version
})
} else if (isPeer) {
packageJson.peerDependencies = defu(packageJson.peerDependencies, {
[name]: version
})
} else {
packageJson.dependencies = defu(packageJson.dependencies, {
[name]: version
Expand Down

0 comments on commit 84c9cf7

Please sign in to comment.