Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(ci): set up bundle analysis for the client using CodeCov
Elian Dorana5b1371e2ba3
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.ymlindex 964b0f564c..8c997985a5 100644--- a/.github/workflows/dev.yml+++ b/.github/workflows/dev.yml@@ -142,6 +142,8 @@ jobs:run: pnpm run chore:update-build-info- name: Trigger client buildrun: pnpm client:build+ env:+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}- name: Send client bundle stats to RelativeCIif: falseuses: relative-ci/agent-action@v3diff --git a/apps/client/package.json b/apps/client/package.jsonindex 52d04900e7..c123fcafb4 100644--- a/apps/client/package.json+++ b/apps/client/package.json@@ -79,6 +79,7 @@},"devDependencies": {"@ckeditor/ckeditor5-inspector": "5.0.0",+ "@codecov/vite-plugin": "2.0.1","@prefresh/vite": "3.0.1","@types/bootstrap": "5.2.10","@types/jquery": "4.0.0",diff --git a/apps/client/vite.config.mts b/apps/client/vite.config.mtsindex b34aedd8ad..fa7f34085d 100644--- a/apps/client/vite.config.mts+++ b/apps/client/vite.config.mts@@ -1,4 +1,5 @@/// <reference types='vitest' />+import { codecovVitePlugin } from '@codecov/vite-plugin';import prefresh from '@prefresh/vite';import { join } from 'path';import webpackStatsPlugin from 'rollup-plugin-webpack-stats';@@ -32,7 +33,13 @@ if (isDev) {}]}),- webpackStatsPlugin()+ webpackStatsPlugin(),+ // Put the Codecov vite plugin after all other plugins+ codecovVitePlugin({+ enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,+ bundleName: "client",+ uploadToken: process.env.CODECOV_TOKEN+ })]}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 19a846c6eb..fc55ce65cb 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -380,6 +380,9 @@ importers:'@ckeditor/ckeditor5-inspector':specifier: 5.0.0version: 5.0.0+ '@codecov/vite-plugin':+ specifier: 2.0.1+ version: 2.0.1([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))'@prefresh/vite':specifier: 3.0.1version: 3.0.1([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))@@ -1717,6 +1720,24 @@ packages:'@1natsu/[email protected]':resolution: {integrity: sha512-Om0Q+WE9mNrpY4AwMTvkFiYHv8VM7TML3PvOqXy+w6kAjLjKhGYHYX+305+a6J8RVpds9s7IF2Z5aOPYwULFNw==}+ '@actions/[email protected]':+ resolution: {integrity: sha512-a6d/Nwahm9fliVGRhdhofo40HjHQasUPusmc7vBfyky+7Z+P2A1J68zyFVaNcEclc/Se+eO595oAr5nwEIoIUA==}++ '@actions/[email protected]':+ resolution: {integrity: sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==}++ '@actions/[email protected]':+ resolution: {integrity: sha512-tL5JbYOBZHc0ngEnCsaDcryUizIUIlQyIMwy1Wkx93H5HzbBJ7TbiPx2PnFjBwZW0Vh05JmfFZhecE6gglYegA==}++ '@actions/[email protected]':+ resolution: {integrity: sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==}++ '@actions/[email protected]':+ resolution: {integrity: sha512-+Nvd1ImaOZBSoPbsUtEhv+1z99H12xzncCkz0a3RuehINE81FZSe2QTj3uvAPTcJX/SCzUQHQ0D1GrPMbrPitg==}++ '@actions/[email protected]':+ resolution: {integrity: sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==}+'@adobe/[email protected]':resolution: {integrity: sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg==}@@ -2213,6 +2234,16 @@ packages:'@ckeditor/[email protected]':resolution: {integrity: sha512-+Yo99dggxgNTOvKqGqnyafOeYwcZaON17jIghPF8bL/8ZKSekF6MS0ZSl7gtM0BlOQWNSmiDa9F/y5AluJPjqA==}+ '@codecov/[email protected]':+ resolution: {integrity: sha512-TkdKn/rEwZQ723M7DDUmHe5r0IJa23rUT4TAx5jXmg12wGZGAHGWWU7LKeQsYCsKdLMxK7bLaGk9M++4wSRD5w==}+ engines: {node: '>=20.0.0'}++ '@codecov/[email protected]':+ resolution: {integrity: sha512-w7nGA9SSc0WECzn05yRrw3uN8293I620Kd9x97I0kyyxUjtWxCMmlgmAbS364gJZYvljd0A6iQyAigVV2dOX9A==}+ engines: {node: '>=20.0.0'}+ peerDependencies:+ vite: 4.x || 5.x || 6.x+'@codemirror/[email protected]':resolution: {integrity: sha512-G5FPkgIiLjOgZMjqVjvuKQ1rGPtHogLldJr33eFJdVLtmwY+giGrlv/ewljLz6b9BSQLkjxuwBc6g6omDM+YxQ==}@@ -3990,6 +4021,48 @@ packages:engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}deprecated: This functionality has been moved to @npmcli/fs+ '@octokit/[email protected]':+ resolution: {integrity: sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==}+ engines: {node: '>= 20'}++ '@octokit/[email protected]':+ resolution: {integrity: sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==}+ engines: {node: '>= 20'}++ '@octokit/[email protected]':+ resolution: {integrity: sha512-FWFlNxghg4HrXkD3ifYbS/IdL/mDHjh9QcsNyhQjN8dplUoZbejsdpmuqdA76nxj2xoWPs7p8uX2SNr9rYu0Ag==}+ engines: {node: '>= 20'}++ '@octokit/[email protected]':+ resolution: {integrity: sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==}+ engines: {node: '>= 20'}++ '@octokit/[email protected]':+ resolution: {integrity: sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==}++ '@octokit/[email protected]':+ resolution: {integrity: sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==}+ engines: {node: '>= 20'}+ peerDependencies:+ '@octokit/core': '>=6'++ '@octokit/[email protected]':+ resolution: {integrity: sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==}+ engines: {node: '>= 20'}+ peerDependencies:+ '@octokit/core': '>=6'++ '@octokit/[email protected]':+ resolution: {integrity: sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==}+ engines: {node: '>= 20'}++ '@octokit/[email protected]':+ resolution: {integrity: sha512-KxNC2pTqqhszMNrf12ZRd4PonRgyJdsM4F/jySiddQK+DsRcfBtUvqn8t7UsyZhnRJHvX46OohDt5N3VqIWC2w==}+ engines: {node: '>= 20'}++ '@octokit/[email protected]':+ resolution: {integrity: sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==}+'@opentelemetry/[email protected]':resolution: {integrity: sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==}engines: {node: '>=8.0.0'}@@ -6763,6 +6836,9 @@ packages:resolution: {integrity: sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==}engines: {node: '>=10.0.0'}+ resolution: {integrity: sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==}+resolution: {integrity: sha512-t1vxUP+vYKsaYi/BbKo2K98nEAZmfi4sjwvmRT8aOPDzPJeAtLurfoIDazVkLILxO4K+Sw4YrLYnBQ46l6pePg==}engines: {node: '>= 18.20.6'}@@ -9673,6 +9749,9 @@ packages:resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==}+ resolution: {integrity: sha512-eq/4KP6K34kwa7TcFdtvnftvHCD9KvHOGGICWwMFc4dOOKF5t4iYqnfLK8otCRCRv06FXOzGGyqE8h8ElMvvdw==}+resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}engines: {node: '>=6'}@@ -12697,6 +12776,10 @@ packages:resolution: {integrity: sha512-lR5VHmkPhzdhrM092lI2nACsLO4QubF0/yoOhzX7c+wIpbN1GjHNzCc91QlpxBi+cnx8vVJ+Ur6vL5cEoQPFpQ==}+ resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}+ engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}+resolution: {integrity: sha512-I8yFsfRzmzK0WV1pNNOA4A7y4RDfFxPRxb3t+e3ui14qSGOxGtiSP6GjeX+Y6CHb7HYaFj7ECUD7VE5kQMZWGQ==}engines: {node: '>=18', npm: '>=9'}@@ -12931,6 +13014,9 @@ packages:resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==}+ resolution: {integrity: sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==}+resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==}engines: {node: '>= 4.0.0'}@@ -12959,6 +13045,10 @@ packages:resolution: {integrity: sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==}engines: {node: '>=20.19.0'}+ resolution: {integrity: sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==}+ engines: {node: '>=14.0.0'}+resolution: {integrity: sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg==}engines: {node: ^20.19.0 || >=22.12.0}@@ -13650,6 +13740,37 @@ snapshots:defu: 6.1.7many-keys-map: 3.0.3+ '@actions/[email protected]':+ dependencies:+ '@actions/exec': 3.0.0+ '@actions/http-client': 4.0.1++ '@actions/[email protected]':+ dependencies:+ '@actions/io': 3.0.2++ '@actions/[email protected]':+ dependencies:+ '@actions/http-client': 3.0.2+ '@octokit/core': 7.0.6+ '@octokit/plugin-paginate-rest': 14.0.0(@octokit/[email protected])+ '@octokit/plugin-rest-endpoint-methods': 17.0.0(@octokit/[email protected])+ '@octokit/request': 10.0.10+ '@octokit/request-error': 7.1.0+ undici: 6.25.0++ '@actions/[email protected]':+ dependencies:+ tunnel: 0.0.6+ undici: 6.25.0++ '@actions/[email protected]':+ dependencies:+ tunnel: 0.0.6+ undici: 6.25.0++ '@actions/[email protected]': {}+'@adobe/[email protected]': {}'@ai-sdk/[email protected]([email protected])':@@ -14813,6 +14934,21 @@ snapshots:'@ckeditor/ckeditor5-utils': 48.1.1es-toolkit: 1.45.1+ '@codecov/[email protected]':+ dependencies:+ '@actions/core': 3.0.1+ '@actions/github': 9.1.1+ chalk: 4.1.2+ semver: 7.8.0+ unplugin: 1.16.1+ zod: 4.4.3++ '@codecov/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':+ dependencies:+ '@codecov/bundler-plugin-core': 2.0.1+ unplugin: 1.16.1+ vite: 8.0.14(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+'@codemirror/[email protected]':dependencies:'@codemirror/language': 6.12.3@@ -17082,6 +17218,58 @@ snapshots:mkdirp: 1.0.4rimraf: 3.0.2+ '@octokit/[email protected]': {}++ '@octokit/[email protected]':+ dependencies:+ '@octokit/auth-token': 6.0.0+ '@octokit/graphql': 9.0.3+ '@octokit/request': 10.0.10+ '@octokit/request-error': 7.1.0+ '@octokit/types': 16.0.0+ before-after-hook: 4.0.0+ universal-user-agent: 7.0.3++ '@octokit/[email protected]':+ dependencies:+ '@octokit/types': 16.0.0+ universal-user-agent: 7.0.3++ '@octokit/[email protected]':+ dependencies:+ '@octokit/request': 10.0.10+ '@octokit/types': 16.0.0+ universal-user-agent: 7.0.3++ '@octokit/[email protected]': {}++ '@octokit/[email protected](@octokit/[email protected])':+ dependencies:+ '@octokit/core': 7.0.6+ '@octokit/types': 16.0.0++ '@octokit/[email protected](@octokit/[email protected])':+ dependencies:+ '@octokit/core': 7.0.6+ '@octokit/types': 16.0.0++ '@octokit/[email protected]':+ dependencies:+ '@octokit/types': 16.0.0++ '@octokit/[email protected]':+ dependencies:+ '@octokit/endpoint': 11.0.3+ '@octokit/request-error': 7.1.0+ '@octokit/types': 16.0.0+ content-type: 2.0.0+ json-with-bigint: 3.5.8+ universal-user-agent: 7.0.3++ '@octokit/[email protected]':+ dependencies:+ '@octokit/openapi-types': 27.0.0+'@opentelemetry/[email protected]':dependencies:'@opentelemetry/api': 1.9.1@@ -20836,6 +21024,8 @@ snapshots:+ [email protected]: {}+[email protected](@redocly/[email protected]):dependencies:'@babel/code-frame': 7.29.0@@ -24287,6 +24477,8 @@ snapshots:optional: true+ [email protected]: {}+@@ -27851,6 +28043,8 @@ snapshots:- immer- react+ [email protected]: {}+dependencies:'@mixmark-io/domino': 2.2.0@@ -28096,6 +28290,8 @@ snapshots:unist-util-is: 6.0.1unist-util-visit-parents: 6.0.2+ [email protected]: {}+@@ -28114,6 +28310,11 @@ snapshots:pathe: 2.0.3picomatch: 4.0.4+ dependencies:+ acorn: 8.16.0+ webpack-virtual-modules: 0.6.2+dependencies:'@jridgewell/remapping': 2.3.5