Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: next 15 #2000

Merged
merged 17 commits into from
Oct 26, 2024
Merged

feat: next 15 #2000

merged 17 commits into from
Oct 26, 2024

Conversation

ronanru
Copy link
Contributor

@ronanru ronanru commented Oct 22, 2024

✅ Checklist

  • I have followed every step in the contributing guide (updated 2022-10-06).
  • The PR title follows the convention we established conventional-commit
  • I performed a functional test on my final commit

Changelog

  1. Update to Next 15
  2. Update next-auth to v5 (beta)

Closes #1979
Closes #1999
Closes #1812

Copy link

changeset-bot bot commented Oct 22, 2024

🦋 Changeset detected

Latest commit: 1e0aa94

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-t3-app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
create-t3-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 26, 2024 2:54pm

Copy link

vercel bot commented Oct 22, 2024

@ronanru is attempting to deploy a commit to the t3-oss Team on Vercel.

A member of the Team first needs to authorize it.

@ronanru ronanru changed the title feat: use next.config.ts feat: next 15 Oct 22, 2024
@ronanru ronanru marked this pull request as ready for review October 22, 2024 12:50
@juliusmarminge
Copy link
Member

juliusmarminge commented Oct 22, 2024

How useful really is this (ts config) considering the cjs limitations?

@ronanru
Copy link
Contributor Author

ronanru commented Oct 22, 2024

How useful really is this (ts config) considering the cjs limitations?

I don't like seeing js files in my src folder. With ts next config env.js can be env.ts. I don't think it changes anything else.

next.config.ts should be more useful in create-t3-turbo. I think we can remove jiti dependency there, when we update to next 15 there.

@juliusmarminge
Copy link
Member

Are you sure this works? t3-env is an ESM only package which is called out to be incompatible image

@ronanru
Copy link
Contributor Author

ronanru commented Oct 22, 2024

Are you sure this works?

I tried multiple configurations, everything seems to work. Dev, Build, LSP all work. I get an error for missing env variables.

@juliusmarminge
Copy link
Member

Try doing something esm in it, it will crash

This works:

// app/env.js
import { createEnv } from "@t3-oss/env-nextjs";
import { vercel } from "@t3-oss/env-nextjs/presets"
import { z } from "zod";

console.log(import.meta.filename)

export const env = createEnv({
  extends: [vercel()],
  server: {
    FOO: z.string()
  },
  experimental__runtimeEnv: {
    FOO: "bar"
  }
});

// next.config.js
import "./app/env.js"

export default {
  /* config options here */
};

CleanShot 2024-10-22 at 17 06 27

Change file extensions to .ts. It crashes:

CleanShot 2024-10-22 at 17 06 51

@ronanru
Copy link
Contributor Author

ronanru commented Oct 22, 2024

oh, ok. I reverted the next config changes. We can add them later when the ESM thing is fixed.

@juliusmarminge
Copy link
Member

we could have it like turbo and use jiti to load the ts file ?

Copy link
Contributor

github-actions bot commented Oct 26, 2024

Hey t3-oss/translators!

This PR contains changes to your language. Please review the changes ❤️.

Copy link
Member

@juliusmarminge juliusmarminge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some more changes to get it more in line with Next Auth v5 standards.

I did some manual testing but would be nice with some more before merging. Can you look it over again @ronanru and make sure my additions are all good?

@TheCukitoDev
Copy link

Can @t3dotgg @c-ehrlich and @nexxeln please review the code please?? I think it would be useful to have it implemented already

@ronanru
Copy link
Contributor Author

ronanru commented Oct 26, 2024

Just tested your changes, everything looks good @juliusmarminge

Copy link

@lacymorrow lacymorrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM++

@juliusmarminge juliusmarminge merged commit 41de302 into t3-oss:main Oct 26, 2024
267 of 268 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants