From 45fb70abeca3abc4e3ed63e4624eaf5a6c7e0c56 Mon Sep 17 00:00:00 2001 From: Scott Trinh Date: Mon, 11 Mar 2024 16:35:23 -0400 Subject: [PATCH] Fix imports for auth-* packages (#903) --- packages/auth-core/package.json | 6 +++--- packages/auth-nextjs/src/app/index.ts | 2 +- packages/auth-nextjs/src/pages/client.ts | 4 ++-- packages/auth-nextjs/src/pages/server.ts | 2 +- packages/auth-nextjs/tsconfig.json | 3 +-- packages/auth-remix/src/server.ts | 2 +- packages/auth-sveltekit/src/server.ts | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/auth-core/package.json b/packages/auth-core/package.json index 274ddf780..a885306e2 100644 --- a/packages/auth-core/package.json +++ b/packages/auth-core/package.json @@ -15,9 +15,9 @@ "types": "./dist/index.d.ts", "default": "./dist/index.js" }, - "./webauthn": { - "types": "./dist/webauthn.d.ts", - "default": "./dist/webauthn.js" + "./*": { + "types": "./dist/*.d.ts", + "default": "./dist/*.js" } }, "license": "Apache-2.0", diff --git a/packages/auth-nextjs/src/app/index.ts b/packages/auth-nextjs/src/app/index.ts index 7b6412cf8..ef33a9c75 100644 --- a/packages/auth-nextjs/src/app/index.ts +++ b/packages/auth-nextjs/src/app/index.ts @@ -17,7 +17,7 @@ import { _extractParams, } from "../shared"; -export * from "@edgedb/auth-core/dist/errors"; +export * from "@edgedb/auth-core/errors"; export { NextAuthSession, type NextAuthOptions, diff --git a/packages/auth-nextjs/src/pages/client.ts b/packages/auth-nextjs/src/pages/client.ts index e20862ce3..33bac5e70 100644 --- a/packages/auth-nextjs/src/pages/client.ts +++ b/packages/auth-nextjs/src/pages/client.ts @@ -4,9 +4,9 @@ import { NextAuthHelpers, type NextAuthOptions, } from "../shared.client"; -import { errorMapping } from "@edgedb/auth-core/dist/utils"; +import { errorMapping } from "@edgedb/auth-core/utils"; -export * from "@edgedb/auth-core/dist/errors"; +export * from "@edgedb/auth-core/errors"; export { type NextAuthOptions, type BuiltinProviderNames }; export default function createNextPagesClientAuth(options: NextAuthOptions) { diff --git a/packages/auth-nextjs/src/pages/server.ts b/packages/auth-nextjs/src/pages/server.ts index 9a904275e..6c6c01b50 100644 --- a/packages/auth-nextjs/src/pages/server.ts +++ b/packages/auth-nextjs/src/pages/server.ts @@ -8,7 +8,7 @@ import { NextAuthSession, } from "../shared"; -export * from "@edgedb/auth-core/dist/errors"; +export * from "@edgedb/auth-core/errors"; export { NextAuthSession, type NextAuthOptions, diff --git a/packages/auth-nextjs/tsconfig.json b/packages/auth-nextjs/tsconfig.json index f42b194ef..49b8be699 100644 --- a/packages/auth-nextjs/tsconfig.json +++ b/packages/auth-nextjs/tsconfig.json @@ -6,8 +6,7 @@ "ESNext" ], "target": "ESNext", - "module": "CommonJS", - "moduleResolution": "node", + "module": "Node16", "declaration": true, "strict": true, "downlevelIteration": true, diff --git a/packages/auth-remix/src/server.ts b/packages/auth-remix/src/server.ts index d25aacf46..3f5095323 100644 --- a/packages/auth-remix/src/server.ts +++ b/packages/auth-remix/src/server.ts @@ -17,7 +17,7 @@ import { } from "@edgedb/auth-core"; import { type RemixAuthOptions, RemixClientAuth } from "./client.js"; -export * from "@edgedb/auth-core/dist/errors.js"; +export * from "@edgedb/auth-core/errors"; export type { TokenData, RemixAuthOptions }; export type BuiltinProviderNames = diff --git a/packages/auth-sveltekit/src/server.ts b/packages/auth-sveltekit/src/server.ts index 3779b9d6d..3ae94ab7e 100644 --- a/packages/auth-sveltekit/src/server.ts +++ b/packages/auth-sveltekit/src/server.ts @@ -25,7 +25,7 @@ import { type AuthOptions, } from "./client.js"; -export * from "@edgedb/auth-core/dist/errors.js"; +export * from "@edgedb/auth-core/errors"; export type { TokenData, AuthOptions, Client }; export type BuiltinProviderNames =