Skip to content

Fix idb loading issues#28

Merged
robertmclaws merged 3 commits intoCloudNimble:mainfrom
ingweland:main
Apr 3, 2026
Merged

Fix idb loading issues#28
robertmclaws merged 3 commits intoCloudNimble:mainfrom
ingweland:main

Conversation

@ingweland
Copy link
Copy Markdown
Contributor

@ingweland ingweland commented Apr 2, 2026

  1. Moved from Skypack to JsDelivr. Skypack suddenly stopped serving CORS headers. Does not feel reliable.
  2. Fallback location resolution was completely wrong. This result in complete failure when loading idb js. Provided solution should load it from correct location. NOTE: i cannot test it right now. If it fails, you should probably hardcode it to ../BlazorEssentials.IndexedDb/lib/index.js

Copy link
Copy Markdown
Contributor

@robertmclaws robertmclaws left a comment

Choose a reason for hiding this comment

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

Both changes are solid fixes for real problems. The CDN migration from Skypack to jsDelivr addresses known CORS/reliability issues, and the import.meta.url fix correctly resolves the broken fallback path that was relative to the TypeScript source rather than the compiled output.

Only minor suggestion: add a comment noting that the CDN version (@8.0.3) must stay in sync with the version in package.json to prevent drift.

LGTM — nice contribution!


Generated by Claude Code

@ingweland
Copy link
Copy Markdown
Contributor Author

Version const is a good approval. Forgot to mention that - good spot.

ingweland and others added 3 commits April 3, 2026 03:51
Skypack suddently stopped serving correct CORS headers.
…o ensure compatibility across deployment locations.

Fixes failure to load fallback idb js file.
…ration

The idb version was hardcoded in both package.json and the CDN import URL.
Add a prebuild script that reads the version from package.json and generates
a TypeScript constant, so the version is defined in one place only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@robertmclaws robertmclaws merged commit 0915f97 into CloudNimble:main Apr 3, 2026
1 check passed
@robertmclaws
Copy link
Copy Markdown
Contributor

I made an adjustment based on Claude Code's suggestion that the pinned version be dynamically generated based on the package.json file. Now we get the best of both worlds, and we don't have to manually keep both files in sync.

Amazing contribution, thanks so much!

@robertmclaws
Copy link
Copy Markdown
Contributor

The 4.0.1 release is out, and it's all you man! Thanks so much for your contribution!

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.

2 participants