chore: warn when loadCdn is used on the experimental backend#295
Open
mfazekas wants to merge 1 commit into
Open
chore: warn when loadCdn is used on the experimental backend#295mfazekas wants to merge 1 commit into
mfazekas wants to merge 1 commit into
Conversation
a64bb86 to
2f7bb20
Compare
The experimental backend ignores `loadCdn` — its CommandQueue file-load API (`RiveFile.fromSource(source, worker)`) has no CDN asset resolution, so the `loadCdn` argument on `RiveFileFactory.from*` is silently a no-op there. `loadCdn` is now optional (the effective default of `true` is applied only at the native call via `?? true`), and a one-time `console.warn` is emitted only when a caller *explicitly* passes `loadCdn: true` while on the experimental backend — so the common case (not passing `loadCdn`, e.g. `useRiveFile`) is never warned. JSDoc updated to note the option is ignored on experimental.
2f7bb20 to
e3e16ff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
loadCdnis silently ignored on the experimental backend (its CommandQueue file-load API has no CDN asset resolution). This makesloadCdnoptional and adds a one-timeconsole.warnonly when a caller explicitly passesloadCdn: trueon that backend, pointing them toreferencedAssets; the common case (noloadCdn, e.g.useRiveFile) is unaffected. Context: #15.