mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 08:09:22 +00:00
### **PR Type**
Enhancement, Tests
___
### **Description**
- Replace `rudder-sdk-js` with `@rudderstack/analytics-js`
- Update `segment_analytics.ts` import and initialization
- Adjust test mocks for new `RudderAnalytics` class
- Revise `vite.config.ts` chunk and `package.json` dependency
___
### Diagram Walkthrough
```mermaid
flowchart LR
A["segment_analytics.ts"] -- "update import & init" --> B["test mocks"]
B -- "mock class change" --> C["vite.config.ts"]
C -- "manualChunks path update" --> D["package.json"]
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>segment_analytics.ts</strong><dd><code>Import and
initialize RudderAnalytics class</code>
</dd></summary>
<hr>
web/src/services/segment_analytics.ts
<ul><li>Swapped import from <code>rudder-sdk-js</code> to
<code>@rudderstack/analytics-js</code><br> <li> Instantiated new
<code>RudderAnalytics</code> class<br> <li> Maintained
<code>load</code>, <code>track</code> usage under new instance</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10037/files#diff-b72b82ee59c576d6ea49107861b6a3f33c0bf187d376336e3258d80f96d1a11c">+4/-1</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>rudder-sdk.ts</strong><dd><code>Update analytics SDK
mock</code>
</dd></summary>
<hr>
web/src/test/__mocks__/rudder-sdk.ts
<ul><li>Changed mock target to
<code>@rudderstack/analytics-js</code><br> <li> Mocked
<code>RudderAnalytics</code> constructor returning spies<br> <li>
Updated methods: <code>ready</code>, <code>load</code>,
<code>track</code></ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10037/files#diff-31aaa0950c8e2b3e9063d20abb095bd9a73358afbc273c280651bfbf4a6ca57b">+6/-4</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>vite.config.ts</strong><dd><code>Revise Vite chunk
config</code>
</dd></summary>
<hr>
web/vite.config.ts
<ul><li>Updated manualChunks path to new package name<br> <li> Grouped
<code>@rudderstack/analytics-js</code> under
<code>o2cs-analytics</code></ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10037/files#diff-9430906049744cbbfe5d0b382b2466843a42cfebf755ff86fec850b0712258ef">+1/-1</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>package.json</strong><dd><code>Upgrade analytics SDK
dependency</code>
</dd></summary>
<hr>
web/package.json
<ul><li>Replaced <code>rudder-sdk-js</code> with
<code>@rudderstack/analytics-js</code><br> <li> Bumped analytics SDK
version to <code>^3.0.0</code></ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10037/files#diff-b861012a5dd72b8a9f3281b7cf09f5a779c98569d040b1bbc1db50f1b15e7cce">+1/-1</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
139 lines
4.7 KiB
JSON
139 lines
4.7 KiB
JSON
{
|
|
"name": "zinc-observe-web",
|
|
"version": "0.1.0",
|
|
"license": "AGPL-3.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite --base /web/",
|
|
"devcloud": "NODE_ENV=devcloud vite --mode=devcloud",
|
|
"build-alpha1": "run-p type-check build-only-alpha1",
|
|
"build-cloud-prod": "run-p type-check build-only-cloud-prod",
|
|
"build": "run-p type-check build-only",
|
|
"postbuild": "run-p copy",
|
|
"preview": "vite preview",
|
|
"copy": "cd dist && mkdir src && cd src && mkdir assets && cd .. && cd .. && cp -r src/assets/* dist/src/assets/",
|
|
"test:unit": "vitest --environment jsdom --root src/",
|
|
"test:unit:coverage": "vitest --coverage --run",
|
|
"test:coverage:check": "./coverage.sh check",
|
|
"test:e2e": "start-server-and-test preview :4173 'cypress run --e2e'",
|
|
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' :4173 'cypress open --e2e'",
|
|
"build-only": "vite build",
|
|
"build-only-alpha1": "vite build --mode=alpha1",
|
|
"build-only-cloud-prod": "vite build --mode=production",
|
|
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
|
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix"
|
|
},
|
|
"dependencies": {
|
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
"@joakimono/echarts-extension-leaflet": "^1.0.3",
|
|
"@openobserve/browser-logs": "0.3.1",
|
|
"@openobserve/browser-rum": "0.3.1",
|
|
"@openobserve/node-sql-parser": "^0.1.5",
|
|
"@openobserve/rrweb-player": "^0.2.1",
|
|
"@quasar/extras": "^1.17.0",
|
|
"@tanstack/vue-table": "^8.21.3",
|
|
"@tanstack/vue-virtual": "^3.13.16",
|
|
"@vue-flow/background": "^1.3.2",
|
|
"@vue-flow/controls": "^1.1.3",
|
|
"@vue-flow/core": "^1.48.1",
|
|
"acorn": "^8.15.0",
|
|
"acorn-walk": "^8.3.4",
|
|
"cron-parser": "^5.4.0",
|
|
"d3-force": "^3.0.0",
|
|
"d3-scale": "^4.0.2",
|
|
"date-fns": "^4.1.0",
|
|
"date-fns-tz": "^3.2.0",
|
|
"dompurify": "^3.3.1",
|
|
"echarts": "^5.6.0",
|
|
"echarts-gl": "^2.0.9",
|
|
"escodegen": "^2.1.0",
|
|
"flag-icons": "^7.5.0",
|
|
"gridstack": "^12.4.2",
|
|
"highlight.js": "^11.11.1",
|
|
"js-beautify": "^1.15.4",
|
|
"js-cookie": "^3.0.5",
|
|
"json-2-csv": "^5.5.10",
|
|
"jszip": "^3.10.1",
|
|
"leaflet": "^1.9.4",
|
|
"lodash-es": "^4.17.22",
|
|
"lucide-vue-next": "^0.562.0",
|
|
"luxon": "^3.7.2",
|
|
"marked": "^17.0.1",
|
|
"moment": "^2.30.1",
|
|
"moment-timezone": "^0.6.0",
|
|
"monaco-editor": "^0.52.2",
|
|
"node-polyfill-webpack-plugin": "^4.1.0",
|
|
"quasar": "^2.18.6",
|
|
"reodotdev": "^1.0.0",
|
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
"@rudderstack/analytics-js": "^3.0.0",
|
|
"sql-formatter": "^15.6.12",
|
|
"uuid": "^13.0.0",
|
|
"vue": "^3.5.26",
|
|
"vue-drag-resize": "^1.5.4",
|
|
"vue-draggable-next": "^2.3.0",
|
|
"vue-i18n": "^11.2.8",
|
|
"vue-router": "^4.6.4",
|
|
"vuex": "^4.1.0"
|
|
},
|
|
"devDependencies": {
|
|
"@cypress/vue": "^6.0.2",
|
|
"@cypress/webpack-dev-server": "^5.4.1",
|
|
"@quasar/vite-plugin": "^1.10.0",
|
|
"@rushstack/eslint-patch": "^1.15.0",
|
|
"@tailwindcss/postcss": "^4.1.18",
|
|
"@tailwindcss/typography": "^0.5.19",
|
|
"@tailwindcss/vite": "^4.1.18",
|
|
"@types/axios": "^0.14.4",
|
|
"@types/d3-force": "^3.0.10",
|
|
"@types/d3-scale": "^4.0.9",
|
|
"@types/fs-extra": "^11.0.4",
|
|
"@types/js-cookie": "^3.0.6",
|
|
"@types/jsdom": "^27.0.0",
|
|
"@types/leaflet": "^1.9.21",
|
|
"@types/lodash-es": "^4.17.12",
|
|
"@types/luxon": "^3.7.1",
|
|
"@types/node": "^25.0.3",
|
|
"@types/uuid": "^11.0.0",
|
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
"@vitejs/plugin-vue-jsx": "^5.1.3",
|
|
"@vitest/coverage-v8": "^4.0.16",
|
|
"@vitest/ui": "^4.0.16",
|
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
"@vue/test-utils": "^2.4.6",
|
|
"@vue/tsconfig": "^0.8.1",
|
|
"autoprefixer": "^10.4.23",
|
|
"c8": "^10.1.3",
|
|
"cypress": "^15.8.1",
|
|
"cypress-localstorage-commands": "^2.2.8",
|
|
"dotenv": "^17.2.3",
|
|
"eslint": "^9.39.2",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-cypress": "^5.2.0",
|
|
"eslint-plugin-vue": "^10.6.2",
|
|
"fs-extra": "^11.3.3",
|
|
"happy-dom": "^20.0.11",
|
|
"jsdom": "^27.4.0",
|
|
"msw": "^2.12.7",
|
|
"npm-run-all": "^4.1.5",
|
|
"postcss": "^8.5.6",
|
|
"prettier": "^3.7.4",
|
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
"sass": "^1.97.1",
|
|
"sass-loader": "^16.0.6",
|
|
"start-server-and-test": "^2.1.3",
|
|
"tailwindcss": "^4.1.18",
|
|
"typescript": "~5.9.3",
|
|
"vite": "^7.3.0",
|
|
"vite-plugin-istanbul": "^7.2.1",
|
|
"vite-plugin-monaco-editor": "^1.1.0",
|
|
"vitest": "^4.0.16",
|
|
"vitest-canvas-mock": "^1.1.3",
|
|
"vue-tsc": "^3.2.1"
|
|
}
|
|
}
|