-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(auth-providers): switch to esbuild for some 'web' packages (#…
…11334) Continues switching over packages to use esbuild rather than babel. What this PR does: 1. Updates to auth-provider web packages to use esbuild over babel 2. Updates the tsconfig files to match the way we're doing things 3. Updates the imports with relative paths to have extensions. What this PR doesn't do but that will be followed up on: 1. The dbAuth web and firebase web packages aren't included here because they still use jest. 2. Switch the build related tsconfigs to use the modern module and module resolution settings. If you do so it will not build do a type inference issue which I am choosing not to deal with here.
- Loading branch information
1 parent
a9eaf54
commit 78f01a2
Showing
50 changed files
with
531 additions
and
124 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
import { buildCjs, buildEsm } from '@redwoodjs/framework-tools' | ||
import { | ||
generateTypesCjs, | ||
generateTypesEsm, | ||
insertCommonJsPackageJson, | ||
} from '@redwoodjs/framework-tools/generateTypes' | ||
|
||
// ESM build and type generation | ||
await buildEsm() | ||
await generateTypesEsm() | ||
|
||
// CJS build, type generation, and package.json insert | ||
await buildCjs() | ||
await generateTypesCjs() | ||
await insertCommonJsPackageJson({ | ||
buildFileUrl: import.meta.url, | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { createAuth } from './auth0' | ||
export { createAuth } from './auth0.js' |
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,15 @@ | ||
{ | ||
"extends": "../../../../tsconfig.compilerOption.json", | ||
"compilerOptions": { | ||
"strict": true, | ||
"rootDir": "src", | ||
"outDir": "dist", | ||
"tsBuildInfoFile": "./tsconfig.build.tsbuildinfo" | ||
}, | ||
"include": ["src"], | ||
"references": [ | ||
{ | ||
"path": "./../../../auth/tsconfig.build.json" | ||
} | ||
] | ||
} |
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,7 @@ | ||
{ | ||
"extends": "./tsconfig.build.json", | ||
"compilerOptions": { | ||
"outDir": "dist/cjs", | ||
"tsBuildInfoFile": "./tsconfig.cjs.tsbuildinfo" | ||
} | ||
} |
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 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,17 @@ | ||
import { buildCjs, buildEsm } from '@redwoodjs/framework-tools' | ||
import { | ||
generateTypesCjs, | ||
generateTypesEsm, | ||
insertCommonJsPackageJson, | ||
} from '@redwoodjs/framework-tools/generateTypes' | ||
|
||
// ESM build and type generation | ||
await buildEsm() | ||
await generateTypesEsm() | ||
|
||
// CJS build, type generation, and package.json insert | ||
await buildCjs() | ||
await generateTypesCjs() | ||
await insertCommonJsPackageJson({ | ||
buildFileUrl: import.meta.url, | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { createAuth } from './azureActiveDirectory' | ||
export { createAuth } from './azureActiveDirectory.js' |
15 changes: 15 additions & 0 deletions
15
packages/auth-providers/azureActiveDirectory/web/tsconfig.build.json
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,15 @@ | ||
{ | ||
"extends": "../../../../tsconfig.compilerOption.json", | ||
"compilerOptions": { | ||
"strict": true, | ||
"rootDir": "src", | ||
"outDir": "dist", | ||
"tsBuildInfoFile": "./tsconfig.build.tsbuildinfo" | ||
}, | ||
"include": ["src"], | ||
"references": [ | ||
{ | ||
"path": "./../../../auth/tsconfig.build.json" | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/auth-providers/azureActiveDirectory/web/tsconfig.cjs.json
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,7 @@ | ||
{ | ||
"extends": "./tsconfig.build.json", | ||
"compilerOptions": { | ||
"outDir": "dist/cjs", | ||
"tsBuildInfoFile": "./tsconfig.cjs.tsbuildinfo" | ||
} | ||
} |
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 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,17 @@ | ||
import { buildCjs, buildEsm } from '@redwoodjs/framework-tools' | ||
import { | ||
generateTypesCjs, | ||
generateTypesEsm, | ||
insertCommonJsPackageJson, | ||
} from '@redwoodjs/framework-tools/generateTypes' | ||
|
||
// ESM build and type generation | ||
await buildEsm() | ||
await generateTypesEsm() | ||
|
||
// CJS build, type generation, and package.json insert | ||
await buildCjs() | ||
await generateTypesCjs() | ||
await insertCommonJsPackageJson({ | ||
buildFileUrl: import.meta.url, | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { createAuth } from './clerk' | ||
export { createAuth } from './clerk.js' |
Oops, something went wrong.