Releases: MJuma/traverse
Releases · MJuma/traverse
Release list
Traverse v0.4.1
Patch Changes
-
Fix KQL syntax highlighting and autocomplete silently breaking in production builds. The
@kusto/monaco-kustoworker crashed at load withReferenceError: global is not definedbecause Vite only applies the mainpluginsarray to workers in dev — production worker bundles shipped without the Bridge.NETglobalshim and the Node polyfills.Consumers must now also re-apply
nodePolyfills+traverseVitePlugin()via Vite'sworker.plugins. This is documented in the quick-start guide and thetraverseVitePluginJSDoc, and applied to the bundled web and desktop apps.
Traverse v0.4.0
Minor Changes
-
240f4ba: Make consumer setup foot-gun-free and add a Vite plugin to reduce boilerplate.
New:
@mhjuma/traverse/vite-pluginsubpath export — a single Vite plugin that
bundles the Bridge.NET CJS shim and theoptimizeDeps.includeentries the
kusto worker's transitive deps need to pre-bundle. Replaces ~50 lines of
boilerplate in each consumer'svite.config.tswith one import + one
traverseVitePlugin()plugin entry. (Consumers still add
vite-plugin-node-polyfillsseparately — kept out of the plugin so its
config story stays orthogonal.)getMonacoWorkerConfigurationError()— sentinel-based assertion that
detects whenconfigureTraverseMonacoWorkershasn't been called or
getKustoWorkeris missing. A host-installed
globalThis.MonacoEnvironment.getWorkeris NOT enough — it might not route
the'kusto'label to a real kusto worker.<MonacoConfigErrorBanner>— actionable placeholder rendered by
<Explorer>when the assertion fails, with the exact code snippet the
consumer needs to copy. Pure inline styles so it works even without a host
<FluentProvider>. OptionalmonacoConfigErrorFallbackprop on<Explorer>
lets embedders supply their own fallback UI.- New
KustoClientConfig.fetch?injection point. Defaults to
globalThis.fetch. Resolved at call time so tests can stub
globalThis.fetchafter construction and so hosts can hot-swap their
transport (Tauri plugin-http) post-mount.
Improvements:
fetchWithRetryhonoursRetry-After(RFC 7231 — both delta-seconds
and HTTP-date) for both429and503. Capped at 60s to defend against
hostile servers / stale dates. Inter-retry sleep is now abort-aware via
the newabortableSleep()helper, so user-initiated cancels no longer have
to wait for an in-flight backoff to elapse.- MSAL popup post-back bridge handoff.
bootstrapExplorernow
dynamically imports@azure/msal-browser/redirect-bridgeand calls
broadcastResponseToMainFrame()before any normal app bootstrap. Without
this, MSAL.js 5.x popup interactions silently failed — the popup would load
the full SPA and the parent window'sacquireTokenPopupwould time out
waiting for aBroadcastChannelmessage that only the bridge knows how to
send. Gracefully degrades for embedders pinned to older MSAL versions. - MSAL recovery from stale URL fragments.
bootstrapExplorernow catches
no_token_request_cache_error,state_not_found, andno_state_in_hash
fromhandleRedirectPromise(), strips the auth fragments / params from the
URL, and falls through to the normal silent / loginRedirect flow. Prevents
the SPA from getting stuck in a loop after a popup that closed before
posting back. - XSS-hardened auth error banner. The startup auth-failure banner uses
safe DOM construction (createElement+textContent) instead of
innerHTMLinterpolation. MSAL / AAD error strings can carry
attacker-controlled content (viaerror_description); the old approach was
an XSS hazard. peerDependencies.monaco-editortightened to^0.52.0.
@kusto/monaco-kusto@14.xonly supports monaco-editor^0.52.0; newer
versions (0.55+) break the kusto plugin'screateWebWorkerintegration in
subtle ways. The peer pin makes pnpm warn at install time instead of
letting consumers silently install an incompatible version.
Docs:
- Rewrote
docs/guide/quick-start.mdwith a Vite-first three-step setup
(workers boilerplate → vite.config.ts withtraverseVitePlugin()→ mount
the Explorer). Documents the kusto worker setup explicitly so consumers
don't have to discover it through bug reports.
v0.1.0 — Initial Release
Initial release of Traverse — an open-source KQL query editor.