-
-
Notifications
You must be signed in to change notification settings - Fork 144
Comparing changes
Open a pull request
base repository: NativeScript/android
base: 72fce99
head repository: NativeScript/android
compare: c19b80b
- 13 commits
- 35 files changed
- 2 contributors
Commits on Jun 16, 2026
-
feat: HMR dev-sessions, ESM resolver hardening, dev-mode runtime globals
Adds the Hot Module Replacement runtime layer plus the supporting ESM resolver hardening and dev-session globals that make hot reload viable on Android. * `import.meta.hot`: `data`, `accept`, `dispose`, `prune`, `decline`, `invalidate`, `on`/`off`/`send` event surface. * Dev-session globals (`__nsStartDevSession`, `__nsReloadDevApp`, `__nsInvalidateModules`, `__nsRunHmrDispose`, `__nsRunHmrPrune`, `__nsHasDeclinedModule`, `__nsKickstartHmrPrefetch`, `__nsGetLoadedModuleUrls`, `__nsApplyStyleUpdate`, `__nsConfigureDevRuntime`/`__nsConfigureRuntime`, `__nsTerminateAllWorkers`). * Speculative HTTP module prefetch (opt-in) with canonical-key normalization so `__ns_hmr__/v<N>` and `__ns_boot__/b<N>` tag prefixes share `hot.data` identity across reload cycles. * ESM resolver hardening in `ModuleInternalCallbacks.cpp` to: - Preserve synthetic-namespace identity (`ns-vendor://`, `optional:`, `node:`, `blob:`) — these are NOT filesystem paths. - Handle HTTP/HTTPS module URLs end-to-end (resolution, fetch, canonical-key collapse, dynamic import). - Compile `.json` imports into synthetic ES modules. * Android runtime-dex support for `.extend()` classes created during HMR that the static binding generator can't see at build time: runtime DEX generation with `$`/`_` inner-class normalization (`DexFactory`), dev/HMR class-resolution fallback (`ClassResolver`), and dev-flag / `logScriptLoading` plumbing (`AppConfig`, `DevFlags`).Configuration menu - View commit details
-
Copy full SHA for 6c9e8b1 - Browse repository at this point
Copy the full SHA 6c9e8b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 708fecd - Browse repository at this point
Copy the full SHA 708fecdView commit details -
feat: reloadApplication for JS bundle restart without restarting app …
…process Helpful for programmatic reset of JS isolate for clean restart of JS application as well as OTA (over-the-air) updates without restarting the entire app process.
Configuration menu - View commit details
-
Copy full SHA for 15db855 - Browse repository at this point
Copy the full SHA 15db855View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3cadab - Browse repository at this point
Copy the full SHA e3cadabView commit details
Commits on Jul 4, 2026
-
fix: anchor relative dynamic imports at the file:// referrer's direct…
…ory (#1976) A dynamic import() with a relative specifier from a module loaded over file:// resolved against the application root instead of the importing module's own directory, so a module outside the app root could not resolve its relative dependencies. ImportModuleDynamicallyCallback only used the referrer URL for http(s) referrers; for file:// it passed an empty referrer and the resolver fell back to the app root. Anchor the specifier at the referrer's directory from resource_name and pass the resolver an absolute file:// URL. Static imports are unaffected. Adds test-app specs for ./ and ../ dynamic imports from subdirectories plus an app-root control.
Configuration menu - View commit details
-
Copy full SHA for a0859d4 - Browse repository at this point
Copy the full SHA a0859d4View commit details -
fix: normalize "." and ".." in resolved module paths to dedupe modules (
#1977) ResolveModuleCallback builds the on-disk path for a relative specifier without collapsing "." and ".." segments, so the same file imported as "./x" from /a/b and as "../x" from /a/b/c lands under two different registry keys. stat() resolves the segments so both locate the file, but the differing keys make V8 compile and evaluate the module twice: two instances with separate state, and import.meta.dirname becomes "/a/b/c/.." for the ".." spelling. Normalize the resolved path before it becomes the registry key, the same way the HTTP branch canonicalizes through CanonicalizeHttpUrlKey. The pass is lexical and runs for every on-disk candidate kind, and is a no-op for already-canonical paths.
Configuration menu - View commit details
-
Copy full SHA for 9504213 - Browse repository at this point
Copy the full SHA 9504213View commit details -
refactor(runtime): reduce surface to a mechanism-only dev-loader cont…
…ract The runtime explicitly does not implement HMR policy. import.meta.hot, the hot-data/accept/dispose/prune registries, and dev-session state move to the JS HMR clients (eg, @nativescript/vite); native keeps only the sync HTTP module fetch, prewarm cache + list-mode kickstart, eviction plumbing, and the dev-boot-complete signal. Dev helpers are consolidated under __NS_DEV__. Also fixes dynamic import() error propagation: with top-level-await enabled, Module::Evaluate() returns a promise instead of an empty MaybeLocal on throw, so the previous empty-check never fired and import() resolved a half-evaluated namespace, silently swallowing module evaluation errors. The callback now checks Module::GetStatus() for kErrored (HTTP, blob, and generic paths) and rejects with the module's real exception, matching iOS. Removes the httpModulePrefetch app-config flag and speculative prefetching; list-mode kickstart remains.
Configuration menu - View commit details
-
Copy full SHA for 3c95a3e - Browse repository at this point
Copy the full SHA 3c95a3eView commit details
Commits on Jul 5, 2026
-
test: bump shared runtime tests submodule for structured-clone worker…
… guards The V8 ValueSerializer worker messaging on this branch legitimately does not throw for circular objects; the suite at 3a262b9 gates the legacy JSON-serializer expectation to JSC and runs structured-clone round-trip specs instead.
Configuration menu - View commit details
-
Copy full SHA for 7b87797 - Browse repository at this point
Copy the full SHA 7b87797View commit details -
feat(runtime): __NS_DEV__.seedModuleBodies for batch prewarm seeding …
…from the boot archive The JS bootstrap downloads the dev server's /__ns_dev__/boot-archive (NDJSON of {url, body} entries) and seeds them directly into the one-shot prewarm cache consumed by HttpFetchText during V8's synchronous module walk — replacing hundreds of serial kickstart fetches with one payload. Mechanism only: the server computes the closure and bodies; the runtime stores them behind the same gates as kickstart prefetch. Returns { ok, seeded, bytes } so callers can fall back to kickstartPrefetch. [skip ci]Configuration menu - View commit details
-
Copy full SHA for ef02f07 - Browse repository at this point
Copy the full SHA ef02f07View commit details
Commits on Jul 6, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 32edd29 - Browse repository at this point
Copy the full SHA 32edd29View commit details
Commits on Jul 16, 2026
-
Configuration menu - View commit details
-
Copy full SHA for c35584b - Browse repository at this point
Copy the full SHA c35584bView commit details -
Merge remote-tracking branch 'origin/main' into feat/hmr-dev-sessions…
…-integrated # Conflicts: # package.json # test-app/runtime/src/main/cpp/ModuleInternalCallbacks.cpp
Configuration menu - View commit details
-
Copy full SHA for 2d519e5 - Browse repository at this point
Copy the full SHA 2d519e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for c19b80b - Browse repository at this point
Copy the full SHA c19b80bView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 72fce99...c19b80b