Skip to content

Commit

Permalink
downgraded nuxt auth to 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser committed Oct 12, 2023
1 parent 7c4a6bb commit 28ea759
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/steps/2.addModules/moduleConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,13 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
dependencies: [
{
name: "@sidebase/nuxt-auth",
version: "^0.6.0-beta.7",
version: "^0.5.0",
isDev: true
},
{
name: "next-auth",
version: "4.21.1",
isDev: false,
isPeer: true
}
],
nuxtConfig: {
Expand Down
7 changes: 1 addition & 6 deletions src/utils/addPackageDependency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export interface Dependency {
name: string
version: string
isDev: boolean
isPeer?: boolean
}

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

for (const { name, version, isDev, isPeer } of dependencies) {
for (const { name, version, isDev } 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 28ea759

Please sign in to comment.