Repository navigation
Comparing changes
Open a pull request
base repository: NativeScript/NativeScript
base: main
head repository: NativeScript/NativeScript
compare: refs/pull/11682/head
- 6 commits
- 31 files changed
- 1 contributor
Commits on Nov 25, 2026
-
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.
Configuration menu - View commit details
-
Copy full SHA for 33f6682 - Browse repository at this point
Copy the full SHA 33f6682View commit details -
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).
Configuration menu - View commit details
-
Copy full SHA for 5f2f9a9 - Browse repository at this point
Copy the full SHA 5f2f9a9View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 0930972 - Browse repository at this point
Copy the full SHA 0930972View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 5c5da05 - Browse repository at this point
Copy the full SHA 5c5da05View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 783f90d - Browse repository at this point
Copy the full SHA 783f90dView commit details
Commits on Nov 28, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 6a1f00f - Browse repository at this point
Copy the full SHA 6a1f00fView 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 main...refs/pull/11682/head