From 4b2a084713504facdf599d7b54f13aab656a20c7 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Mon, 24 Jun 2024 13:28:41 -0400 Subject: [PATCH] fix coverage see: https://github.com/vitest-dev/vitest/discussions/5964 --- .gitignore | 2 +- examples/vite.config.ts | 5 ----- package.json | 19 ++++++++++++------- vitest.config.ts | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index fdcdc48..bffeb4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ node_modules -dist +build coverage custom-elements.json diff --git a/examples/vite.config.ts b/examples/vite.config.ts index 80981f7..999de97 100644 --- a/examples/vite.config.ts +++ b/examples/vite.config.ts @@ -8,11 +8,6 @@ const __dirname = fileURLToPath(new URL('.', import.meta.url)); export default defineConfig({ root: 'examples', - resolve: { - alias: { - '@carto/api-client': resolve(__dirname, '../'), - }, - }, plugins: [ vue({ template: { diff --git a/package.json b/package.json index f18239f..d40b83b 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,14 @@ "type": "module", "sideEffects": false, "source": "src/index.ts", - "types": "./dist/index.d.ts", - "main": "./dist/api-client.cjs", - "module": "./dist/api-client.modern.js", + "types": "./build/index.d.ts", + "main": "./build/api-client.cjs", + "module": "./build/api-client.modern.js", "exports": { ".": { - "types": "./dist/index.d.ts", - "require": "./dist/api-client.cjs", - "default": "./dist/api-client.modern.js" + "types": "./build/index.d.ts", + "require": "./build/api-client.cjs", + "default": "./build/api-client.modern.js" } }, "browserslist": [ @@ -31,8 +31,13 @@ "coverage": "vitest run --coverage", "lint": "prettier \"**/*.{cjs,html,js,json,md,ts}\" --ignore-path ./.eslintignore --check", "format": "prettier \"**/*.{cjs,html,js,json,md,ts}\" --ignore-path ./.eslintignore --write", - "clean": "rimraf dist/*" + "clean": "rimraf build/*" }, + "files": [ + "build", + "src", + "README.md" + ], "devDependencies": { "@deck.gl/aggregation-layers": "^9.0.14", "@deck.gl/carto": "^9.0.14", diff --git a/vitest.config.ts b/vitest.config.ts index 337fd76..04d9240 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -4,7 +4,7 @@ export default defineConfig({ test: { coverage: { provider: 'istanbul', - include: ['src/**/*.ts'], + include: ['src/**/*.ts', 'build/**/*'], }, }, });