[ENHANCEMENT] Build ESM Peer Dependency, Typing & Configs (#27)

* 👷 Switch to ESM build

* 🔧 Use `module` instead of `main` config fields

* 📌 Reinstall sk-auth

* 🏷️ Fix type errors

* 🔧 Create separate Vite config JS according to https://github.com/sveltejs/kit/issues/928

* Revert "🔧 Create separate Vite config JS according to https://github.com/sveltejs/kit/issues/928"

This reverts commit 83d23a5a4b.

*  Add `build-esm` as dev and peer dependency

* 👷 Compile CJS module

* 📌 Reinstall deps

* 🔧 Switch to ESM build

* Revert "🔧 Switch to ESM build"

This reverts commit c908a57df3.

* 🔧 Use `main` instead of `module` in `package.json`
This commit is contained in:
Dan6erbond 2021-05-25 23:24:32 +02:00 committed by GitHub
parent b2d3995896
commit 9a5cd3dc8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2829 additions and 20 deletions

View File

@ -14,6 +14,7 @@
"@typescript-eslint/eslint-plugin": "^4.19.0",
"@typescript-eslint/parser": "^4.19.0",
"autoprefixer": "^10.2.5",
"build-esm": "^4.2.2",
"cssnano": "^5.0.1",
"eslint": "^7.22.0",
"eslint-config-prettier": "^8.1.0",

View File

@ -33,8 +33,8 @@ export const appAuth = new SvelteKitAuth({
apiKey: import.meta.env.VITE_REDDIT_API_KEY,
apiSecret: import.meta.env.VITE_REDDIT_API_SECRET,
profile(profile) {
profile = RedditOAuth2Provider.profileHandler(profile);
return { ...profile, provider: "reddit" };
const slim = RedditOAuth2Provider.profileHandler(profile);
return { ...slim, provider: "reddit" };
},
}),
],

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,8 @@
"exports": {
".": "./dist/index.js",
"./client": "./dist/client/index.js",
"./providers": "./dist/providers/index.js"
"./providers": "./dist/providers/index.js",
"./package.json": "./package.json"
},
"files": [
"dist",
@ -49,6 +50,7 @@
"@types/jsonwebtoken": "^8.5.1",
"@typescript-eslint/eslint-plugin": "^4.23.0",
"@typescript-eslint/parser": "^4.23.0",
"build-esm": "^4.2.2",
"esbuild": "^0.12.1",
"eslint": "^7.26.0",
"eslint-config-prettier": "^8.3.0",
@ -61,6 +63,7 @@
"typescript": "^4.2.4"
},
"peerDependencies": {
"@sveltejs/kit": "next"
"@sveltejs/kit": "next",
"build-esm": "^4.2.2"
}
}

1436
yarn.lock

File diff suppressed because it is too large Load Diff