Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NativeScript/NativeScript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b5da6e2
Choose a base ref
...
head repository: NativeScript/NativeScript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6a1f00f
Choose a head ref
  • 6 commits
  • 31 files changed
  • 1 contributor

Commits on Nov 25, 2026

  1. refactor(core): convert vendored fetch and easysax to strict TypeScript

    Stronger type checking for two vendored JavaScript libraries core already
    imports directly (`globals/index.ts` -> `fetch`, `xml/index.ts` -> `easysax`),
    with zero behavior change under V8/JSC (net -61 lines).
    
    - fetch/index.ts replaces fetch/index.mjs and its 4-line .d.mts: whatwg-fetch
      as typed classes over core's XMLHttpRequest, Blob, FileReader and FormData
      (MIT notice kept; LICENSE in the folder). Verified against the original over
      216 scenarios (headers, requests and responses of every body type, each body
      read twice, each status, network errors, aborts) with identical results. One
      micro-difference: `bodyUsed` is each body's own property. globals imports it
      without the extension.
    - js-libs/easysax/easysax.ts replaces easysax.js and its 8-line .d.ts as a
      typed class with identical parsing, events, entities, namespaces and errors,
      verified against the original over 49,724 inputs and parser setups with
      identical event logs. xml/index.ts imports it without the extension, and
      ParserEvent's prefix and namespace are typed `string | undefined`, matching
      what they already hold at runtime for an element without a prefix.
    NathanWalker committed Nov 25, 2026
    Configuration menu
    Copy the full SHA
    33f6682 View commit details
    Browse the repository at this point in the history
  2. fix(core): types that say what runs

    The compiler type-checks core strictly and spells every type in Swift or
    Kotlin, so a declared type must hold every value the code gives it. No
    behaviour change, except where noted.
    
    - module-name-resolver: resolveModuleName returns `string | null` (null when
      nothing resolves, which callers already test for).
    - properties: shorthand converters take any value (getCssShorthandLonghands
      probes them with unsetValue); the style-symbol map holds CSS animation
      properties as well as CSS properties.
    - style: PropertyBag holds converted longhand values as well as strings.
    - background.ios: the clip-path helpers return a CGPath (UIBezierPath.CGPath),
      not the UIBezierPath they were declared to.
    - view.android: _getFragmentManager walks ViewBase ancestors (a TabViewItem is
      one, and has fragments of its own) and reads _dialogFragment only on a View.
    - native-helper-for-android: dismissSoftInput's modal owner is read untyped.
    - xhr: XMLHttpRequestResponseType is a plain object (what the namespace
      compiled to); Blob's internal accessor is a named class.
    - http-request-internal.ios: sessions are typed NSURLSession; the user agent
      and the session configuration are made on the first request instead of when
      the module loads (creating an NSURLSessionConfiguration costs a few
      milliseconds of every app's launch).
    NathanWalker committed Nov 25, 2026
    Configuration menu
    Copy the full SHA
    5f2f9a9 View commit details
    Browse the repository at this point in the history
  3. fix(core): deprecated iOS APIs and four bugs found by strict typing

    Compiling core to Swift rejects deprecated APIs and calls whose arguments do not
    match; each of these is a fix under the JavaScript runtime too.
    
    - image-source.ios: dispatch_get_current_queue (deprecated) gives way to the
      caller's operation queue, else main; base64Encoding to
      base64EncodedStringWithOptions(0).
    - dialogs.ios: presentModalViewControllerAnimated to
      presentViewControllerAnimatedCompletion.
    - tab-view.ios: UITextAttributeTextColor to NSForegroundColorAttributeName.
    - gestures.ios: TouchGestureEventData.getX/getY read contentOffset only from a
      UIScrollView (other views have none).
    - animation.ios: generateShadowLayerPaths takes the box shadow its layer draws;
      the animation called it without one (background.d.ts declares the parameter).
    - background-common: Background.equals compared the backgrounds, never
      gradients, instead of their images: gradient images now compare by value.
    - text-base.ios: clearing a text shadow sets a CGColor, not a UIColor, as the
      layer's shadowColor.
    NathanWalker committed Nov 25, 2026
    Configuration menu
    Copy the full SHA
    0930972 View commit details
    Browse the repository at this point in the history
  4. feat(core): opt-in hooks for compiled XML pages and bindings

    Two registries a compiled build fills; nothing in core registers anything, so
    under V8 and JavaScriptCore both stay empty and the Builder behaves as before.
    
    - Builder: registerPageFactory(xmlModule, factory, codeModule?, codeExports?)
      registers a function that builds an XML file's view tree instead of parsing
      it, and optionally the code-behind's exports, which the Builder then takes
      instead of loading the module. The module name resolver still picks the
      file, so qualified variants (.ios.xml, .land.xml) keep their own factories.
    - Bindings: registerCompiledBinding(key, binding) registers an expression
      compiled ahead of time for the attribute at `file:line:column:attribute`;
      BindingOptions.compiled carries it, and Binding evaluates its closures in
      place of parsing the expression. The ComponentParser passes each element's
      key down (xmlModule, its start-tag position).
    - The component builder holds whatever element it creates (ViewBase: an
      ActionItem, a Span), and a dotted attribute sets a member of any object, as
      the code already did; the types say so now.
    - CompiledBinding is exported from ui.
    NathanWalker committed Nov 25, 2026
    Configuration menu
    Copy the full SHA
    5c5da05 View commit details
    Browse the repository at this point in the history
  5. feat(core): export IConfigPlatform for plugin config augmentation

    Export `IConfigPlatform` alongside `NativeScriptConfig` from `config.interface.ts`
    and `index.d.ts` so external CLI plugins (such as `@nstudio/nativescript-compiler`)
    can cleanly augment `NativeScriptConfig` and per-platform `ios`/`android` config
    via TypeScript module augmentation without adding plugin-specific options to core.
    Types only.
    NathanWalker committed Nov 25, 2026
    Configuration menu
    Copy the full SHA
    783f90d View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2026

  1. Configuration menu
    Copy the full SHA
    6a1f00f View commit details
    Browse the repository at this point in the history
Loading