Skip to content

feat: convert dgrid-shim to self extracting resources#4531

Merged
GordonSmith merged 1 commit intohpcc-systems:mainfrom
GordonSmith:COMPOSITE_DGRID
Feb 27, 2026
Merged

feat: convert dgrid-shim to self extracting resources#4531
GordonSmith merged 1 commit intohpcc-systems:mainfrom
GordonSmith:COMPOSITE_DGRID

Conversation

@GordonSmith
Copy link
Member

@GordonSmith GordonSmith commented Feb 24, 2026

similar to what we do for wasm files

Checklist:

  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit message includes a "fixes" reference if appropriate.
    • The commit is signed.
  • The change has been fully tested:
    • I have viewed all related gallery items
    • I have viewed all related dermatology items
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised new issues to address them separately

Testing:

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR converts the dgrid-shim dependency from an external script tag requirement to a self-extracting resource that is bundled directly into the code, similar to how WASM files are handled in the project.

Changes:

  • Implemented a new sfxJS plugin to wrap JavaScript bundles as self-extracting resources
  • Removed external dgrid-shim script tag dependencies from HTML files across multiple packages
  • Eliminated test setup code that manually loaded dgrid-shim before running tests

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/esbuild-plugins/src/sfx-wrapper.ts Added wrapJS and sfxJS functions to create self-extracting JavaScript bundles
packages/dgrid/src/dgrid-shim.ts Modified to inline dgrid-shim bundle and evaluate it at runtime instead of expecting external script
packages/dgrid/vite.config.ts Updated build configuration to exclude dgrid-shim from external dependencies
packages/dgrid/tests/index.ts Removed helper function that manually loaded dgrid-shim
packages/dgrid/tests/dgrid.browser.spec.ts Removed dgrid-shim loading test setup and assertions
packages/dgrid2/vite.config.ts Added production environment configuration
packages/dgrid2/index.html Removed external dgrid-shim script tag and changed import to local source
packages/dgrid2/index-preview.html New preview HTML file created
packages/eclwatch/tests/eclwatch.browser.spec.ts Removed manual dgrid-shim loading and related test assertions
packages/composite/tests/composite.browser.spec.ts Removed dgrid-shim loading setup
packages/timeline/tests/timeline.browser.spec.ts Removed dgrid-shim loading setup
packages/other/tests/other.browser.spec.ts Removed dgrid-shim loading setup
packages/map/tests/map.browser.spec.ts Removed dgrid-shim loading setup
packages/util/tests/debounce.spec.ts Adjusted timing thresholds in debounce tests
Multiple HTML files Removed external dgrid-shim script tags from index.html and index-preview.html files
packages/composite/index.html Modified setTimeout intervals for chart type changes

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
@GordonSmith
Copy link
Member Author

@jchambers-ln - this PR fixes one of the blockers preventing you from using the 3.x.x versions.

@GordonSmith GordonSmith merged commit 88ca7be into hpcc-systems:main Feb 27, 2026
3 checks passed
@github-actions github-actions bot mentioned this pull request Feb 27, 2026
GordonSmith added a commit that referenced this pull request Feb 27, 2026
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants