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

refactor: rewrite core to TypeScript #2552

Merged
merged 65 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
8c915d1
chore(deps): upgrade TS packages
balazsorban44 Aug 17, 2021
094f870
build(ts): use tsc to compile
balazsorban44 Aug 17, 2021
d9af235
refactor(ts): move some files to TS
balazsorban44 Aug 17, 2021
fcfa07a
chore: implement SkyPack check suggestions
balazsorban44 Aug 17, 2021
8bc510d
chore(ci): temprarily disable tests
balazsorban44 Aug 17, 2021
201613e
chore: add PR comment action
balazsorban44 Aug 17, 2021
2e2e3ae
chore: add determine version github action
balazsorban44 Aug 18, 2021
d9e4981
chore: prefix with env.
balazsorban44 Aug 18, 2021
c278039
chore: add runs to action
balazsorban44 Aug 18, 2021
e303f17
chore: change runs.using to node12
balazsorban44 Aug 18, 2021
97bfc48
chore: fix typo
balazsorban44 Aug 18, 2021
6d31d34
chore: install @actions/core as dev dependency
balazsorban44 Aug 18, 2021
e592d0f
chore: move env var, remove old script
balazsorban44 Aug 18, 2021
2533862
chore: change version comment message
balazsorban44 Aug 18, 2021
b0e35f4
refactor(ts): convert server/index.js to TS
balazsorban44 Aug 18, 2021
489071d
chore: fix `types` path
balazsorban44 Aug 18, 2021
4ef041c
chore: fix paths
balazsorban44 Aug 18, 2021
d142f54
refactor(ts): convert `next-auth/react`
balazsorban44 Aug 18, 2021
c11fbc4
refactor(ts): convert `next-auth/jwt` to TS
balazsorban44 Aug 18, 2021
fb28cce
chore: fix import
balazsorban44 Aug 18, 2021
ad59f51
refactor: move `types` into `src`
balazsorban44 Aug 18, 2021
416b377
refactor(ts): fix types imports
balazsorban44 Aug 18, 2021
e3969be
chore: add cleanup script
balazsorban44 Aug 18, 2021
abae4bb
chore: exclude all `tests` folder from compilation
balazsorban44 Aug 18, 2021
7560f3b
refactor: rename types/index.d.ts to types/index.ts
balazsorban44 Aug 18, 2021
6956ed2
refactor(ts): move `next-auth/jwt`
balazsorban44 Aug 18, 2021
493fc45
refactor(ts): move `next-auth/providers`
balazsorban44 Aug 18, 2021
c821b84
chore(ts): fix `next-auth` types
balazsorban44 Aug 18, 2021
7ee12f3
refactor(ts): change internal import paths
balazsorban44 Aug 18, 2021
0fd7018
test(ts): remove type tests
balazsorban44 Aug 24, 2021
5fc1dab
chore: remove test:types script
balazsorban44 Aug 24, 2021
4025519
refactor(ts): move more code to TypeScript
balazsorban44 Aug 24, 2021
0274bb2
refactor: fix some imports
balazsorban44 Aug 24, 2021
fc85e39
refactor(ts): move error module into server
balazsorban44 Aug 24, 2021
aef779d
fix(ts): add type to .js providers
balazsorban44 Aug 24, 2021
c22316d
chore: rename adapters.ts to adapters.d.ts
balazsorban44 Aug 24, 2021
53cdaff
fix: update exports field
balazsorban44 Aug 24, 2021
c8aeae2
chore: add files that should end up on npm
balazsorban44 Aug 24, 2021
367eb91
chore: add stricter lib checking
balazsorban44 Aug 24, 2021
14b6d22
refactor(ts): remove unnecessary files, fix imports
balazsorban44 Aug 24, 2021
b0c9c6c
chore: autocomplete env variables
balazsorban44 Aug 24, 2021
8c84def
fix: add css folder to npm files
balazsorban44 Aug 24, 2021
fbd2d36
fix: fix CSS import/generation
balazsorban44 Aug 24, 2021
9fdf617
feat: log provider when authorization url error happens
balazsorban44 Aug 24, 2021
c313316
Merge branch 'next' into feat/typescript
balazsorban44 Aug 24, 2021
4ad7ec5
refactor(ts): turn pages into .tsx
balazsorban44 Aug 24, 2021
66048eb
chore: compile differently for client/server
balazsorban44 Aug 24, 2021
2a0f282
refactor(ts): move server file to TS
balazsorban44 Aug 24, 2021
7e1635c
chore: add back node target
balazsorban44 Aug 24, 2021
4388600
chore: add back comment removal
balazsorban44 Aug 24, 2021
3d16a66
chore: re-enable tests
balazsorban44 Aug 25, 2021
530cf63
chore: ignore test files when building
balazsorban44 Aug 25, 2021
c8deeb5
chore(ts): refactor files to TS
balazsorban44 Aug 25, 2021
2d86731
chore(ts): fix imports
balazsorban44 Aug 25, 2021
ddf5ae2
chore(ts): more ts
balazsorban44 Aug 25, 2021
ec41d96
fix(ts): correctly type _NEXTAUTH_DEBUG env var
balazsorban44 Aug 25, 2021
23aeeba
chore: don't generate internals module iwth babel
balazsorban44 Aug 25, 2021
7248a6b
Merge branch 'next'
balazsorban44 Aug 27, 2021
ffa512e
fix(ts): better `clientId`, `clientSecret` constraints
balazsorban44 Aug 27, 2021
011843d
refactor(ts): move facebook provider to TS
balazsorban44 Aug 27, 2021
1b5b5f8
refactor(ts): apply suggested changes
balazsorban44 Aug 28, 2021
10badfd
chore(ts): strip internal types from compilation
balazsorban44 Aug 28, 2021
d203b0a
refactor(ts): move server types to server folder
balazsorban44 Aug 29, 2021
1f95be1
refactor(ts): rename internals to types
balazsorban44 Aug 29, 2021
76ab39f
Merge branch 'next'
balazsorban44 Aug 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build(ts): use tsc to compile
  • Loading branch information
balazsorban44 committed Aug 17, 2021
commit 094f870c0b156489fc7a214062cad56a42e8a42e
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"scripts": {
"build": "npm run build:js && npm run build:css",
"build:js": "node ./config/build.js && babel --config-file ./config/babel.config.js src --out-dir dist",
"build:js": "rm -rf dist && tsc",
"build:css": "postcss --config config/postcss.config.js src/**/*.css --base src --dir dist && node config/wrap-css.js",
"dev:setup": "npm i && npm run build:css && cd app && npm i",
"dev": "cd app && npm run dev",
Expand Down
33 changes: 16 additions & 17 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,33 @@
"compilerOptions": {
"strictNullChecks": true,
"baseUrl": ".",
"outDir": "dist",
"paths": {
"types": ["./types"],
"next-auth": ["./src/server"],
"next-auth/adapters": ["./src/adapters"],
"next-auth/react": ["./src/client/react"],
"next-auth/jwt": ["./src/lib/jwt"],
"next-auth/providers/*": ["./src/providers/*"],
"next-auth": ["dist/server"],
"next-auth/providers/*": ["dist/providers/*"],
"next-auth/react": ["dist/client/react"]
},
"target": "es5",
"target": "es2019",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we can switch to strict: true and rely on // @ts-expect-error for the errors we don't want to fix just yet? 💭

"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
"jsx": "react-jsx",
"declaration": true,
"declarationDir": "dist/types"
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"**/*.js",
".eslintrc.js"
],
"exclude": ["node_modules"]
"exclude": [
"app",
"types",
"tests",
"**/__tests__",
"config",
"www"
]
}