Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove next-auth checks for node 18 and next 13 (#673)
* remove next-auth checks for node 18 and next 13 * require next-auth ^4.16 * chore: add changeset * fix next-auth version Co-authored-by: Julius Marminge <julius0216@outlook.com>
- Loading branch information
1 parent
7eb5e87
commit 44a107b
Showing
7 changed files
with
9 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-t3-app": minor | ||
--- | ||
|
||
remove node 18 and next 13 checks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,19 @@ | ||
import chalk from "chalk"; | ||
import { execa } from "execa"; | ||
import ora from "ora"; | ||
import { PkgInstallerMap } from "~/installers/index.js"; | ||
import { getUserPkgManager } from "~/utils/getUserPkgManager.js"; | ||
import { logger } from "~/utils/logger.js"; | ||
|
||
type Options = { | ||
projectDir: string; | ||
packages: PkgInstallerMap; | ||
}; | ||
|
||
export const installDependencies = async ({ | ||
projectDir, | ||
packages, | ||
}: Options) => { | ||
export const installDependencies = async ({ projectDir }: Options) => { | ||
logger.info("Installing dependencies..."); | ||
const pkgManager = getUserPkgManager(); | ||
const spinner = ora(`Running ${pkgManager} install...\n`).start(); | ||
let flags: string[] = []; | ||
|
||
// FIXME: temp fix for NextAuth.js with node 18/19 | ||
// see: https://github.com/nextauthjs/next-auth/issues/4575 | ||
if ( | ||
process.versions.node.startsWith("18") || | ||
process.versions.node.startsWith("19") | ||
) { | ||
flags = [ | ||
...flags, | ||
...(pkgManager === "yarn" | ||
? ["--ignore-engines", "true"] | ||
: ["--engine-strict", "false"]), | ||
]; | ||
} | ||
|
||
// FIXME: temp fix for NextAuth.js with Next.js 13 | ||
if (packages.nextAuth.inUse) { | ||
flags = [ | ||
...flags, | ||
...(pkgManager === "pnpm" | ||
? ["--strict-peer-dependencies", "false"] | ||
: pkgManager === "npm" | ||
? ["--legacy-peer-deps", "true"] | ||
: []), | ||
]; | ||
} | ||
|
||
await execa(pkgManager, ["install", ...flags], { cwd: projectDir }); | ||
await execa(pkgManager, ["install"], { cwd: projectDir }); | ||
|
||
spinner.succeed(chalk.green("Successfully installed dependencies!\n")); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
44a107b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
create-t3-app – ./
create-t3-app-t3-oss.vercel.app
create-t3-app-git-next-t3-oss.vercel.app
beta.create.t3.gg
create-t3-app-nu.vercel.app