diff --git a/libs/build-vite/index.js b/libs/build-vite/index.js index 6c4fcae3..62b3aa78 100644 --- a/libs/build-vite/index.js +++ b/libs/build-vite/index.js @@ -2,6 +2,7 @@ import path from 'node:path'; import customTsConfig from 'vite-plugin-custom-tsconfig'; import {mergeConfig} from 'vite'; import vue from '@vitejs/plugin-vue'; +import {codecovVitePlugin} from '@codecov/vite-plugin'; // eslint-disable-next-line no-underscore-dangle const __dirname = path.dirname(new URL(import.meta.url).pathname); @@ -11,7 +12,15 @@ const createCommonViteConfig = (env) => { const isProd = env.mode === 'production'; return { - plugins: [vue(), customTsConfig({tsConfigPath: 'tsconfig.build.json'})], + plugins: [ + codecovVitePlugin({ + enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, + bundleName: 'vue-form-builder', + uploadToken: process.env.CODECOV_TOKEN, + }), + vue(), + customTsConfig({tsConfigPath: 'tsconfig.build.json'}), + ], resolve: { alias: [ diff --git a/libs/build-vite/package.json b/libs/build-vite/package.json index 61f83504..d4355b15 100755 --- a/libs/build-vite/package.json +++ b/libs/build-vite/package.json @@ -12,6 +12,7 @@ "exports": "./index.js", "types": "./index.d.ts", "devDependencies": { + "@codecov/vite-plugin": "^0.0.1-beta.10", "@myparcel/ts-utils": "^1.9.0", "@vitejs/plugin-vue": "^5.0.0", "@vitest/coverage-v8": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 4e84dcc2..21c803dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -254,6 +254,30 @@ __metadata: languageName: node linkType: hard +"@codecov/bundler-plugin-core@npm:^0.0.1-beta.11": + version: 0.0.1-beta.11 + resolution: "@codecov/bundler-plugin-core@npm:0.0.1-beta.11" + dependencies: + chalk: "npm:4.1.2" + semver: "npm:^7.5.4" + unplugin: "npm:^1.10.1" + zod: "npm:^3.22.4" + checksum: 10c0/765742723401cb178015f16ae7d401e50f2a512a7a16143dae9609868b1da887a74e4fb4b6af68fa44001bc8ecd92f869f4456ccdfb1e7e4c6a81d64d49ed975 + languageName: node + linkType: hard + +"@codecov/vite-plugin@npm:^0.0.1-beta.10": + version: 0.0.1-beta.11 + resolution: "@codecov/vite-plugin@npm:0.0.1-beta.11" + dependencies: + "@codecov/bundler-plugin-core": "npm:^0.0.1-beta.11" + unplugin: "npm:^1.10.1" + peerDependencies: + vite: 4.x || 5.x + checksum: 10c0/7998fd808bfe26e10e093d8dd08f7d56fe6237253825cc222bb848bafb1ae4b29beaa9787a44081dfda12ebf9d880261a992dae0a3ff67d983953b8a8f108f95 + languageName: node + linkType: hard + "@emnapi/core@npm:^1.1.0": version: 1.2.0 resolution: "@emnapi/core@npm:1.2.0" @@ -972,6 +996,7 @@ __metadata: version: 0.0.0-use.local resolution: "@myparcel-vfb/build-vite@workspace:libs/build-vite" dependencies: + "@codecov/vite-plugin": "npm:^0.0.1-beta.10" "@myparcel/ts-utils": "npm:^1.9.0" "@vitejs/plugin-vue": "npm:^5.0.0" "@vitest/coverage-v8": "npm:^2.0.0" @@ -3106,7 +3131,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.9.0": +"acorn@npm:^8.12.1, acorn@npm:^8.9.0": version: 8.12.1 resolution: "acorn@npm:8.12.1" bin: @@ -3668,6 +3693,16 @@ __metadata: languageName: node linkType: hard +"chalk@npm:4.1.2, chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10c0/4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 + languageName: node + linkType: hard + "chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -3689,16 +3724,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: "npm:^4.1.0" - supports-color: "npm:^7.1.0" - checksum: 10c0/4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 - languageName: node - linkType: hard - "chalk@npm:~5.3.0": version: 5.3.0 resolution: "chalk@npm:5.3.0" @@ -3713,7 +3738,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.5.3": +"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.5.3, chokidar@npm:^3.6.0": version: 3.6.0 resolution: "chokidar@npm:3.6.0" dependencies: @@ -9335,6 +9360,18 @@ __metadata: languageName: node linkType: hard +"unplugin@npm:^1.10.1": + version: 1.12.0 + resolution: "unplugin@npm:1.12.0" + dependencies: + acorn: "npm:^8.12.1" + chokidar: "npm:^3.6.0" + webpack-sources: "npm:^3.2.3" + webpack-virtual-modules: "npm:^0.6.2" + checksum: 10c0/d4ca9508adbc3724fbafe0eec50e346b3772d3bca7881f20b29d403c576fae5ac2f1224cc84481913396e9c52cba5e934d2815d1b2a206c439fdc52ec39889b8 + languageName: node + linkType: hard + "update-browserslist-db@npm:^1.1.0": version: 1.1.0 resolution: "update-browserslist-db@npm:1.1.0" @@ -9662,6 +9699,20 @@ __metadata: languageName: node linkType: hard +"webpack-sources@npm:^3.2.3": + version: 3.2.3 + resolution: "webpack-sources@npm:3.2.3" + checksum: 10c0/2ef63d77c4fad39de4a6db17323d75eb92897b32674e97d76f0a1e87c003882fc038571266ad0ef581ac734cbe20952912aaa26155f1905e96ce251adbb1eb4e + languageName: node + linkType: hard + +"webpack-virtual-modules@npm:^0.6.2": + version: 0.6.2 + resolution: "webpack-virtual-modules@npm:0.6.2" + checksum: 10c0/5ffbddf0e84bf1562ff86cf6fcf039c74edf09d78358a6904a09bbd4484e8bb6812dc385fe14330b715031892dcd8423f7a88278b57c9f5002c84c2860179add + languageName: node + linkType: hard + "whatwg-mimetype@npm:^3.0.0": version: 3.0.0 resolution: "whatwg-mimetype@npm:3.0.0" @@ -9914,3 +9965,10 @@ __metadata: checksum: 10c0/e4c812cfe6468c19b2a21d07d4ff8fb70359062d33400b45f89017eaa3efe9d51e85963f2b115eaaa99a16b451782249bf9b1fa8b31d35cc473e7becb3e44264 languageName: node linkType: hard + +"zod@npm:^3.22.4": + version: 3.23.8 + resolution: "zod@npm:3.23.8" + checksum: 10c0/8f14c87d6b1b53c944c25ce7a28616896319d95bc46a9660fe441adc0ed0a81253b02b5abdaeffedbeb23bdd25a0bf1c29d2c12dd919aef6447652dd295e3e69 + languageName: node + linkType: hard