| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
feat(runtime): expose timers under the standard global names Register setTimeout/setInterval/clearTimeout/clearInterval directly on every global (workers included), keeping the __ns__-prefixed variants for backwards compatibility. The test app's NSTimer-based setTimeout polyfill is retired: the suite now runs on the native timers, and the event-loop tests that relied on the polyfill as a foreign timer source schedule NSTimers explicitly instead.
ci: report junit test results in the run summary Add an inline mikepenz/action-junit-report step (annotate_only + detailed_summary) to the test jobs of pull_request.yml and npm_release.yml, mirroring NativeScript/android#2017. annotate_only reports via workflow commands and the step summary, so it works with a read-only token — fork PRs included. The xcparse extraction moves out of Validate Test Results into its own !cancelled() step so a red test run still gets its junit report when the xcresult carries the attachments. junit-cli-report-viewer stays as the full per-test log and verify-junit-xml remains the gate. Also set explicit least-privilege permissions (contents: read) on pull_request.yml, the one workflow without a permissions block.
fix(runtime): lock process-global caches shared across isolates ParametrizedCall::callsCache_, FFICall::structInfosCache_, SymbolLoader::_cache, and the sample-instances map in member resolution are process-wide statics reached from the main thread and every Worker, but unlike the selector caches they had no lock, so concurrent lookups could race a rehash. The FFI caches take a SpinMutex (uncontended nanosecond sections, same as the selector caches); the loader and sample-instance caches take an UnfairMutex since building an entry can block. Locks cover only the find and the emplace: building a struct info recurses back into GetStructInfo for nested structs, dlopen runs image initializers, and [klass alloc] can trigger +initialize, so holding a lock across any build would risk self-deadlock. On a lost build race the first emplace wins and everyone returns the cached entry.
fix(runtime): loader callbacks throw TypeErrors on invalid input configureLoader accepted anything: a non-object argument was a silent no-op behind a trace category, a wrong-typed section was silently skipped, non-string array elements were silently filtered, and an unknown key (a typo like volatilePattens) did nothing at all. The platforms this runtime models never behave that way for imperative APIs - WebIDL throws TypeError on a wrong-typed argument and converts sequence elements rather than dropping them, and Node throws ERR_INVALID_ARG_TYPE with per-element validation. configureLoader now validates the whole config - unknown keys, section types, elements by index - before applying any of it, so a rejected call leaves every section untouched (the atomicity the importMap section already had, extended to the whole call). invalidateModules throws on a non-array and on non-string elements. canonicalizeHttpUrlKey throws instead of returning an empty string. require() of a non-string was worse than lenient: the specifier was cast unchecked, a hard V8 check-failure in debug builds and a reinterpret in release. It now throws Node's error - The "id" argument must be of type string. Received <description> - before any resolution, with the description ported from Node's determineSpecificType. Also drops the hoisted single-use trace gates (traceEsm, traceRegistry): TNS_DEBUG already gates lazily at the log site, so an entry-time bool is redundant and snapshots the category mask early. The one shared-prep gate (traceFetch, which also gates a timestamp capture) stays, per the facility's documented exception.
docs: rewrite ns-builtin-modules as a module reference The document had drifted into an HMR implementation guide: decorative v1 markers with no versioning scheme behind them, a reference to HMR_RUNTIME_BOUNDARY.md that exists in no commit, and an ns:module section framed as "consumed by development tooling" although half its surface (createRequire, createPumpingRequire) is general-purpose. It is now a module reference: resolution rules, a per-module section with surface tables and runnable examples for ns:util, ns:runtime, ns:module and the node: shims, and a consolidated "Loading ES modules" chapter - the require(esm) rule and interop cascade, pumping requires, the previously-undocumented module-response (MIME) contract with its error strings, and both app-entry bootstrap patterns with the runloop specifics tagged as platform notes. Every quoted string, member, and default is grep-verified against the tree; all fenced examples parse. The cross-runtime contract language survives in substance, dev-client narrative is restated as normative rules (reconfiguring vocabulary requires restarting workers), and the doc is now indexed in docs/README.md.
| Back | FazBrowse Home | New Git URL |