Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(npm/js-api): Lazy load backend implementations #3652

Merged
merged 2 commits into from
Nov 10, 2022

Conversation

MichaReiser
Copy link
Contributor

The wasm and backendjsonrpc dependencies are both marked as optional but the implementation loads packages statically, making the js-api fail immediately if one of the two isn't installed.

This PR moves the imports into lazy async calls.

The wasm and backendjsonrpc dependencies are both marked as optional but the implementation loads packages statically, making the `js-api` fail immediately if one of the two isn't installed.

This PR moves the imports into lazy async calls.
@MichaReiser MichaReiser requested a review from a team November 10, 2022 16:15
@netlify
Copy link

netlify bot commented Nov 10, 2022

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit 1d8739a
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/636d23f7d5b2e3000afde2d7

@MichaReiser MichaReiser linked an issue Nov 10, 2022 that may be closed by this pull request
1 task
@MichaReiser MichaReiser merged commit b0828f1 into main Nov 10, 2022
@MichaReiser MichaReiser deleted the fix/lazy-load-js-api-dependencies branch November 10, 2022 16:48
jeysal added a commit to jeysal/rometools that referenced this pull request Nov 10, 2022
* upstream/main:
  fix(npm/js-api): Import type from @rometools/backend-jsonrpc (rome#3647)
  doc(npm/js-api): Add experimental warning to README
  fix(npm/js-api): Lazy load backend implementations (rome#3652)
  feat(rome_lsp): stop the daemon after the last client disconnects (rome#3643)
  fix(npm/js_api): Ensure JS API build contains `dist` folder (rome#3648)
  fix(rome_cli): ensures the service only connects to compatible versions (rome#3642)
  feat(playground): add settings button and group IR (rome#3559)
  release: v10.0.1 (rome#3649)
  fix(rome_js_analyze): False positives for interactive elements in `useKeyWithClickEvents` (rome#3644)
  fix(rome_js_semantic): support for object and array bindings when exporting (rome#3620)
  doc(editors): Clarify Rome discovery (rome#3639)
  fix(rome_js_analyze): improve the detection of `ReactDOM.render` calls in `noRenderReturnValue` (rome#3626)
  chore(npm): add license (rome#3629)
  Add rustdocs index
  Add environment
  Change rust docs to use Netlify
  fix(rome_js_analyze): useValidAnchor considering all possible expressions (rome#3599)
  fix(rome_js_formatter): Trailing comma inside import rome#3600 (rome#3624)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 @rometools/js-api has no exported members
2 participants