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

Upgrade SolidStart to v1 #35

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Upgrade SolidStart to v1 #35

wants to merge 7 commits into from

Conversation

huseeiin
Copy link

No description provided.

Copy link

@ERmilburn02 ERmilburn02 left a comment

Choose a reason for hiding this comment

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

I mostly just have some issues with some changes to the packages that didn't need to be changed

Choose a reason for hiding this comment

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

Why was Typescript added as a dependency to the root project?

"@lucia-auth/adapter-sqlite": "^3.0.1",
"@solidjs/router": "^0.13.3",
"@solidjs/start": "^1.0.0",
"@types/better-sqlite3": "^7.6.10",

Choose a reason for hiding this comment

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

Why were types moved to regular dependencies?

"@lucia-auth/adapter-sqlite": "^3.0.1",
"@solidjs/router": "^0.13.3",
"@solidjs/start": "^1.0.0",
"@types/better-sqlite3": "^7.6.10",

Choose a reason for hiding this comment

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

Again, why are types in regular dependencies? They're not required at runtime, only during development.

return sendRedirect(event, "/");
const cookie = lucia.createSessionCookie(session.id);

setCookie(cookie.name, cookie.value, cookie.attributes);

Choose a reason for hiding this comment

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

You should be returning here, otherwise you throw an error because you try to add the user to the database again

const cookie = lucia.createSessionCookie(session.id);

setCookie(cookie.name, cookie.value, cookie.attributes);
return Response.redirect("/");

Choose a reason for hiding this comment

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

This is throwing a type error because it can't parse the URL. Instead you should probably use redirect from @solidjs/router

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants