From 4b4cbba3e6f739ea776fa37b0128c4955849f2f6 Mon Sep 17 00:00:00 2001 From: Andres Morey Date: Sat, 13 Apr 2024 14:22:11 +0300 Subject: [PATCH] Adds types to package.json, bumps version number (#29) * added types to package.json, bumped version number * fixed linting config issue --- .eslintrc.json | 3 +-- package.json | 10 +++++++++- vite.config.ts | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index ad0a936..5c54f8c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,8 +12,7 @@ "parserOptions": { "project": "./tsconfig.json" }, - "ignorePatterns": [ - ], + "ignorePatterns": [], "rules": { "max-classes-per-file": "off", "max-len": "off", diff --git a/package.json b/package.json index b4aeb26..507f5f7 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,21 @@ { "name": "edge-csrf", "description": "CSRF protection for Next.js middleware", - "version": "1.0.10", + "version": "1.0.11", "author": "Andres Morey", "license": "MIT", "repository": "kubetail-org/edge-csrf", "type": "module", + "sideEffects": false, "main": "dist/index.cjs", "module": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.cjs" + } + }, "files": [ "/dist" ], diff --git a/vite.config.ts b/vite.config.ts index 11582c9..2486184 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -18,7 +18,8 @@ export default defineConfig({ sourceMap: false, declaration: true, outDir: "dist", - include: ['src/**/*'] + include: ['src/**/*'], + exclude: ['src/**/*.test.ts'] }), ], external: [],