fix: Sourcemaps out of sync#4399
Conversation
| }, | ||
| plugins: [ | ||
| cssInjectedByJsPlugin() | ||
| cssInjectedByJsPlugin({ |
There was a problem hiding this comment.
A reasonable comment; I think you could take it even further and say (almost?) all of these config files are exactly the same, completely. So, maybe pull the whole thing out into something, maybe in that esbuild-plugins package? Not now, just saying for future reference.
7cd8424 to
77a8966
Compare
|
Tests all passed, but seems to have stalled on that step... |
jeclrsg
left a comment
There was a problem hiding this comment.
@GordonSmith noticed a few of the config.ts files that had specific differences from all the others
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This pull request addresses sourcemap synchronization issues by refactoring the individual Vite configuration files across packages to use the new createHpccViteConfig helper from @hpcc-js/esbuild-plugins and by standardizing test setups. Key changes include:
- Replacing custom Vite configurations in nearly all packages with the createHpccViteConfig function.
- Setting test files’ urlSearch variables to an empty string.
- Updating dependency versions and related configuration details in package.json and the esbuild-plugins package.
Reviewed Changes
Copilot reviewed 47 out of 48 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/util/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/tree/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/tree/tests/tree.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/timeline/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/timeline/tests/timeline.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/react/vite.config.ts | Refactored to use createHpccViteConfig with preact plugin integration |
| packages/react/tests/react.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/phosphor/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/phosphor/tests/phosphor.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/other/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/other/tests/other.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/other/src/Comms.ts | Removed obsolete self-assignment workaround comment |
| packages/observablehq-compiler/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/markdown-it-plugins/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/map/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/map/tests/map.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/layout/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/layout/tests/layout.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/html/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/html/tests/html.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/graph/vite.config.ts | Refactored to use createHpccViteConfig with external overrides |
| packages/graph/tests/graph.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/form/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/form/tests/form.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/esbuild-plugins/src/vite-utils.ts | Enhanced createHpccViteConfig functionality and options support |
| packages/esbuild-plugins/package.json | Updated dependency versions for Vite and related plugins |
| packages/eclwatch/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/eclwatch/tests/eclwatch.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/dgrid2/vite.config.ts | Refactored to use createHpccViteConfig with react plugin integration |
| packages/dgrid2/tests/dgrid2.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/dgrid/vite.config.ts | Refactored to use createHpccViteConfig with configOverrides |
| packages/dgrid-shim/src/loaderConfig.js | Minor whitespace adjustment |
| packages/ddl-shim/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/dataflow/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/composite/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/composite/tests/composite.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/comms/vite.config.ts | Refactored to use createHpccViteConfig with a custom entry point |
| packages/common/vite.config.ts | Refactored to use createHpccViteConfig with font-awesome integration |
| packages/common/tests/common.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/codemirror/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/codemirror/tests/codemirror.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/chart/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/chart/tests/chart.browser.spec.ts | Changed urlSearch assignment to an empty string |
| packages/api/vite.config.ts | Refactored to use createHpccViteConfig |
| packages/api/src/Tooltip.ts | Removed redundant eslint-disable comments |
| package.json | Upgraded vitest and updated dependency versions |
| demos/gallery/vite.config.ts | Tweaked cssInjectedByJsPlugin configuration |
Comments suppressed due to low confidence (1)
packages/tree/tests/tree.browser.spec.ts:7
- The extraction of URL query parameters has been replaced with an empty string. Please verify that tests which depended on non-empty URL search values are still adequately covered.
const urlSearch: string = "";
Checklist:
Testing: