create-octane-xplat 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +2 -144
  2. package/compatibility.json +97 -19
  3. package/compatibility.ts +141 -72
  4. package/dist/compatibility.js +66 -26
  5. package/dist/index.js +127 -64
  6. package/dist/package-manager.js +62 -0
  7. package/dist/scaffold.js +377 -127
  8. package/index.ts +256 -154
  9. package/library-template/AGENTS.md +6 -4
  10. package/library-template/README.md +22 -18
  11. package/library-template/bunfig +4 -0
  12. package/library-template/package.json +115 -18
  13. package/library-template/patches/@nativescript-community__octane@0.2.5.patch +1018 -0
  14. package/library-template/patches/@nativescript-community__sqlite-bridge@4.1.1.patch +30 -0
  15. package/library-template/patches/@nativescript-community__vite-octane@0.2.1.patch +72 -0
  16. package/library-template/patches/@nativescript__core@9.1.3.patch +1280 -0
  17. package/library-template/patches/@nativescript__doctor@2.0.18.patch +13 -0
  18. package/library-template/patches/@nativescript__vite@8.0.20.patch +2019 -0
  19. package/library-template/patches/@octane-xplat__nativescript-mason-core@1.0.0-beta.7.patch +65 -0
  20. package/library-template/patches/@octanejs__tiptap@0.0.62.patch +12 -0
  21. package/library-template/patches/@sveltejs__acorn-typescript@1.0.13.patch +16 -0
  22. package/library-template/patches/css@3.0.0.patch +52 -0
  23. package/library-template/patches/octane@0.16.3.patch +1479 -0
  24. package/library-template/src/Badge.tsx +7 -6
  25. package/library-template/src/Badge.web.tsx +7 -6
  26. package/library-template/src/Welcome.stories.tsx +12 -0
  27. package/library-template/src/normalizeBadgeLabel.ts +1 -1
  28. package/library-template/src/props.ts +11 -11
  29. package/library-template/tests/normalizeBadgeLabel.test.ts +1 -1
  30. package/library-template/tests/packed-consumer.mjs +140 -123
  31. package/library-template/tsconfig.envs.json +1 -0
  32. package/library-template/tsconfig.json +1 -0
  33. package/library-template/tsconfig.types.json +15 -1
  34. package/library-template/tsrx-typegen.json +1 -1
  35. package/library-template/workshop.config.ts +3 -0
  36. package/package-manager.ts +93 -0
  37. package/package.json +70 -58
  38. package/scaffold.ts +1056 -526
  39. package/template/.agents/skills/xplat/SKILL.md +6 -6
  40. package/template/.agents/skills/xplat/references/components.md +1 -1
  41. package/template/.agents/skills/xplat/references/navigation.md +1 -1
  42. package/template/.agents/skills/xplat/references/styling.md +14 -14
  43. package/template/AGENTS.md +10 -10
  44. package/template/bunfig +4 -0
  45. package/template/gitignore +1 -0
  46. package/template/nativescript.config.ts +13 -16
  47. package/template/package.json +119 -10
  48. package/template/patches/@nativescript-community__octane@0.2.5.patch +1018 -0
  49. package/template/patches/@nativescript-community__sqlite-bridge@4.1.1.patch +30 -0
  50. package/template/patches/@nativescript-community__vite-octane@0.2.1.patch +72 -0
  51. package/template/patches/@nativescript__core@9.1.3.patch +1280 -0
  52. package/template/patches/@nativescript__doctor@2.0.18.patch +13 -0
  53. package/template/patches/@nativescript__vite@8.0.20.patch +2019 -0
  54. package/template/patches/@octane-xplat__nativescript-mason-core@1.0.0-beta.7.patch +65 -0
  55. package/template/patches/@octanejs__tiptap@0.0.62.patch +12 -0
  56. package/template/patches/@sveltejs__acorn-typescript@1.0.13.patch +16 -0
  57. package/template/patches/css@3.0.0.patch +52 -0
  58. package/template/patches/octane@0.16.3.patch +1479 -0
  59. package/template/src/App.tsrx +77 -42
  60. package/template/src/Welcome.stories.tsx +22 -0
  61. package/template/src/app.spec.tsrx +169 -163
  62. package/template/src/app.web.test.tsx +18 -13
  63. package/template/src/failure-reporting.spec.ts +3 -3
  64. package/template/src/main.ts +14 -13
  65. package/template/src/main.tsrx +2 -0
  66. package/template/src/main.web.tsrx +5 -5
  67. package/template/src/native-runtime.spec.ts +13 -11
  68. package/template/src/test-setup.web.ts +9 -8
  69. package/template/src/test.ts +6 -6
  70. package/template/tsconfig.json +17 -1
  71. package/template/vite.config.native.mts +1 -2
  72. package/template/vite.config.ts +29 -23
  73. package/template/vitest.config.mts +18 -18
  74. package/template/vitest.web.config.mts +7 -7
  75. package/template/workshop.config.ts +3 -0
  76. package/library-template/pnpm-workspace.yaml +0 -171
  77. package/template/pnpm-workspace.yaml +0 -192
@@ -4,15 +4,17 @@ import { Device, isAndroid, isIOS, knownFolders } from '@nativescript/core'
4
4
  // This executes NativeScript's filesystem bridge in the actual mobile host.
5
5
  // Only this test's uniquely named temporary file is written and removed.
6
6
  describe('native runtime', () => {
7
- it('round-trips a file through the native bridge', () => {
8
- expect(isAndroid || isIOS).toBe(true)
9
- expect(Device.os).toBe(isAndroid ? 'Android' : 'iOS')
10
- const file = knownFolders.temp().getFile(`xplat-native-test-${Date.now()}.txt`)
11
- try {
12
- file.writeTextSync('octane-xplat')
13
- expect(file.readTextSync()).toBe('octane-xplat')
14
- } finally {
15
- file.removeSync()
16
- }
17
- })
7
+ it('round-trips a file through the native bridge', () => {
8
+ expect(isAndroid || isIOS).toBe(true)
9
+ expect(Device.os).toBe(isAndroid ? 'Android' : 'iOS')
10
+
11
+ const file = knownFolders.temp().getFile(`xplat-native-test-${Date.now()}.txt`)
12
+
13
+ try {
14
+ file.writeTextSync('octane-xplat')
15
+ expect(file.readTextSync()).toBe('octane-xplat')
16
+ } finally {
17
+ file.removeSync()
18
+ }
19
+ })
18
20
  })
@@ -2,16 +2,17 @@ import { vi } from 'vitest'
2
2
 
3
3
  // jsdom has no system color-scheme producer. Keep component tests in light mode.
4
4
  globalThis.matchMedia ??= (query: string) => ({
5
- media: query,
6
- matches: false,
7
- onchange: null,
8
- addListener() {},
9
- removeListener() {},
10
- addEventListener() {},
11
- removeEventListener() {},
12
- dispatchEvent: () => true,
5
+ media: query,
6
+ matches: false,
7
+ onchange: null,
8
+ addListener() {},
9
+ removeListener() {},
10
+ addEventListener() {},
11
+ removeEventListener() {},
12
+ dispatchEvent: () => true,
13
13
  })
14
14
 
15
15
  // Node 26 also exposes a host localStorage getter. Use jsdom's window storage.
16
16
  declare const jsdom: { window: Window }
17
+
17
18
  vi.stubGlobal('localStorage', jsdom.window.localStorage)
@@ -4,17 +4,17 @@
4
4
  import '@valor/nativescript-websockets'
5
5
  import { Application } from '@nativescript/core'
6
6
  import {
7
- NativeScriptVitestCoordinator,
8
- createNativeScriptTestRegistry,
7
+ NativeScriptVitestCoordinator,
8
+ createNativeScriptTestRegistry,
9
9
  } from '@nativescript/unit-test-runner/runtime'
10
10
 
11
11
  import { createVitestHostPage } from '@nativescript/unit-test-runner/testing'
12
12
 
13
13
  const coordinator = new NativeScriptVitestCoordinator({
14
- // Every spec matched by vitest.config.mts `include` must also match this
15
- // glob — vite statically bundles each as a lazily imported chunk that the
16
- // registry loads on demand.
17
- registry: createNativeScriptTestRegistry(import.meta.glob('./**/*.spec.{ts,tsx,tsrx}')),
14
+ // Every spec matched by vitest.config.mts `include` must also match this
15
+ // glob — vite statically bundles each as a lazily imported chunk that the
16
+ // registry loads on demand.
17
+ registry: createNativeScriptTestRegistry(import.meta.glob('./**/*.spec.{ts,tsx,tsrx}')),
18
18
  })
19
19
 
20
20
  void coordinator.start()
@@ -1,4 +1,12 @@
1
1
  {
2
+ "contentMappers": [
3
+ {
4
+ "package": "octane-xplat",
5
+ "extensions": [
6
+ ".tsrx"
7
+ ]
8
+ }
9
+ ],
2
10
  "compilerOptions": {
3
11
  "strict": true,
4
12
  "target": "ESNext",
@@ -28,7 +36,15 @@
28
36
  ],
29
37
  "noEmit": true,
30
38
  "skipLibCheck": true,
31
- "allowImportingTsExtensions": true
39
+ "allowImportingTsExtensions": true,
40
+ "paths": {
41
+ "@nativescript/core": [
42
+ "./node_modules/@nativescript/core"
43
+ ],
44
+ "@nativescript/core/*": [
45
+ "./node_modules/@nativescript/core/*"
46
+ ]
47
+ }
32
48
  },
33
49
  "include": [
34
50
  "src/**/*"
@@ -1,5 +1,4 @@
1
- import { defineConfig } from 'vite'
2
- import { xplatNative } from '@octane-xplat/cli/vite'
1
+ import { defineConfig, xplatNative } from 'octane-xplat/vite'
3
2
 
4
3
  // The shared preset owns the renderer rules, octane→universal/native alias,
5
4
  // suffix extension chain, deps-bundle plugin exclusions, the HMR watchdog,
@@ -1,30 +1,36 @@
1
- import { defineConfig } from 'vite'
2
- import { octane } from '@octanejs/vite-plugin'
3
- import { xplatCss, xplatBoundary, xplatDevBridge, xplatNodeEnvDefine } from '@octane-xplat/cli/vite'
1
+ import {
2
+ defineConfig,
3
+ octane,
4
+ xplatCss,
5
+ xplatBoundary,
6
+ xplatDevBridge,
7
+ xplatNodeEnvDefine,
8
+ } from 'octane-xplat/vite'
4
9
 
5
10
  // The web build. For native (iOS/Android), the same source runs through
6
11
  // @nativescript-community/vite-octane with `conditions: ['native']`, the
7
12
  // .ios/.android/.mobile suffix chain, and the unsuffixed native default — see
8
13
  // the octane-xplat repo's apps/mobile/vite.config.mts.
9
14
  export default defineConfig(({ mode }) => ({
10
- plugins: [xplatCss('web'), ...octane(), xplatBoundary('web'), xplatDevBridge()],
11
- define: xplatNodeEnvDefine(mode),
12
- server: { port: 5200 },
13
- resolve: {
14
- conditions: ['web'],
15
- // Suffix chain (first match wins): .web → shared → fallback.
16
- extensions: [
17
- '.web.tsrx',
18
- '.tsrx',
19
- '.web.tsx',
20
- '.tsx',
21
- '.web.ts',
22
- '.mjs',
23
- '.mts',
24
- '.ts',
25
- '.jsx',
26
- '.js',
27
- '.json',
28
- ],
29
- },
15
+ plugins: [xplatCss('web'), ...octane(), xplatBoundary('web'), xplatDevBridge()],
16
+ define: xplatNodeEnvDefine(mode),
17
+ server: { port: 5200 },
18
+ resolve: {
19
+ conditions: ['web'],
20
+ // Suffix chain (first match wins): .web → shared → fallback.
21
+ // xplatBoundary also uses this order for dependency optimization in dev.
22
+ extensions: [
23
+ '.web.tsrx',
24
+ '.tsrx',
25
+ '.web.tsx',
26
+ '.tsx',
27
+ '.web.ts',
28
+ '.mjs',
29
+ '.mts',
30
+ '.ts',
31
+ '.jsx',
32
+ '.js',
33
+ '.json',
34
+ ],
35
+ },
30
36
  }))
@@ -1,7 +1,7 @@
1
1
  import { defineConfig } from 'vitest/config'
2
2
  import { nativeScript } from '@nativescript/unit-test-runner'
3
3
 
4
- // `pnpm test:ios` / `pnpm test:android` (ns test) drive this config: the
4
+ // `bun run test:ios` / `bun run test:android` (ns test) drive this config: the
5
5
  // plugin launches `ns run <platform> --no-hmr --env.unitTesting` and
6
6
  // orchestrates spec execution on-device over a loopback WebSocket — Vitest
7
7
  // stays the orchestrator on the host.
@@ -10,21 +10,21 @@ import { nativeScript } from '@nativescript/unit-test-runner'
10
10
  // already-booted simulator: `xcrun simctl boot <udid>` first, then pass
11
11
  // `--device <udid>` (or NS_DEVICE).
12
12
  export default defineConfig({
13
- plugins: [
14
- nativeScript({
15
- platform: process.env.NS_PLATFORM || 'ios', // 'android' | 'ios' | 'visionos'
16
- device: process.env.NS_DEVICE || undefined,
17
- // Keep this in sync with the import.meta.glob in src/test.ts —
18
- // the device can only run files that made it into the bundle.
19
- include: ['src/**/*.spec.{ts,tsx,tsrx}'],
20
- // The connect clock starts when the host session opens and covers
21
- // `ns run`'s native build + install + boot — a cold build easily
22
- // exceeds the 120s default.
23
- connectTimeout: 600_000,
24
- }),
25
- ],
26
- test: {
27
- // Device runs include app startup and real layout passes.
28
- testTimeout: 30_000,
29
- },
13
+ plugins: [
14
+ nativeScript({
15
+ platform: process.env.NS_PLATFORM || 'ios', // 'android' | 'ios' | 'visionos'
16
+ device: process.env.NS_DEVICE || undefined,
17
+ // Keep this in sync with the import.meta.glob in src/test.ts —
18
+ // the device can only run files that made it into the bundle.
19
+ include: ['src/**/*.spec.{ts,tsx,tsrx}'],
20
+ // The connect clock starts when the host session opens and covers
21
+ // `ns run`'s native build + install + boot — a cold build easily
22
+ // exceeds the 120s default.
23
+ connectTimeout: 600_000,
24
+ }),
25
+ ],
26
+ test: {
27
+ // Device runs include app startup and real layout passes.
28
+ testTimeout: 30_000,
29
+ },
30
30
  })
@@ -3,11 +3,11 @@ import appConfig from './vite.config.ts'
3
3
 
4
4
  // Reuse the app's compiler, web platform resolution and aliases.
5
5
  export default defineConfig(async (env) =>
6
- mergeConfig(await (typeof appConfig === 'function' ? appConfig(env) : appConfig), {
7
- test: {
8
- environment: 'jsdom',
9
- include: ['src/**/*.web.test.{ts,tsx,tsrx}'],
10
- setupFiles: ['src/test-setup.web.ts'],
11
- },
12
- }),
6
+ mergeConfig(await (typeof appConfig === 'function' ? appConfig(env) : appConfig), {
7
+ test: {
8
+ environment: 'jsdom',
9
+ include: ['src/**/*.web.test.{ts,tsx,tsrx}'],
10
+ setupFiles: ['src/test-setup.web.ts'],
11
+ },
12
+ }),
13
13
  )
@@ -0,0 +1,3 @@
1
+ import { defineWorkshopConfig } from '@octane-xplat/workshop'
2
+
3
+ export default defineWorkshopConfig({ stories: { include: 'src/**/*.stories.{tsx,tsrx}' } })
@@ -1,171 +0,0 @@
1
- # NativeScript's bundler resolves dependencies from the flat package tree.
2
- nodeLinker: hoisted
3
- allowBuilds:
4
- esbuild: true
5
- '@parcel/watcher': true
6
- '@nativescript/core': false
7
- catalogs:
8
- xplat:
9
- "@nativescript-community/octane": 0.2.5
10
- "@nativescript/core": 9.1.3
11
- "@nativescript/types": 9.1.4
12
- "@octane-xplat/cli": 0.18.0
13
- "@octane-xplat/jsx": 0.18.0
14
- "@octane-xplat/ui": 0.18.0
15
- "@octanejs/vite-plugin": 0.1.61
16
- "@tsrx/oxc": 0.20.0
17
- "@tsrx/typescript-plugin": 0.4.11
18
- octane: 0.14.0
19
- tsrx-typegen: 0.2.2
20
- typescript: 5.9.3
21
- vite: 8.3.0
22
- vitest: 4.1.11
23
- overrides:
24
- "@nativescript/vite>esbuild": 0.27.7
25
- "@nativescript-community/vite-octane>esbuild": 0.27.7
26
- vite>esbuild: 0.27.7
27
- configDependencies:
28
- "@octane-xplat/patches": 0.18.0
29
- allowUnusedPatches: true
30
- # Framework patches are supplied by the @octane-xplat/patches config dependency and
31
- # applied via pnpm patchedDependencies. Managed upstream by @octane-xplat/cli (`xplat
32
- # patches apply` refreshes, `xplat patches check` verifies); do not edit by hand.
33
- patchedDependencies:
34
- # Published 0.14.0 still requires renderer-owned Children.toArray/map with explicit
35
- # universal-native re-exports for older runtimes, the 0.15.0 universal compiler allowlist
36
- # entries and identity runtime export for Children and descriptorChildren (so native .tsrx
37
- # modules importing them compile), universal signal-read tracking and local hooks, root
38
- # event-error forwarding, the complete universal imperative-ref lifecycle, the Descriptor
39
- # declaring-owner reader fallback, and the signal-owner/enclosingOwner chain so child
40
- # reads reuse instance declarations. Rebased against the registry 0.14.0 tarball,
41
- # including local signal-hook registration in the split runtime/hooks modules. Provider
42
- # null/undefined descendant cleanup is now upstream and no longer patched. Marks generic
43
- # binding bags from bagOf so fragment commit rehomes their DOM parent references,
44
- # preventing stale fragment parents, namespace recursion, and invalid insertion during
45
- # typeahead updates. Preserves keyed component ownership through compiler-generated
46
- # transparent root slots so native map reorders retain host identity, state, and portal
47
- # content.
48
- octane@0.14.0: node_modules/.pnpm-config/@octane-xplat/patches/patches/octane@0.14.0.patch
49
- # Published 9.1.3 ships the #11446 nested-tab-frame lifecycle fix and iOS explicit-size
50
- # flex alignment, so those hunks are removed. Retains the unshipped parent-padding
51
- # measure-spec fix and Android explicit-size flex alignment, iOS continuous corner
52
- # clipping, CSS @layer cascade support, custom Android variable-font weight mapping, and
53
- # percentage translate parsing, native view, and animation support. Verified against the
54
- # registry 9.1.3 tarball; it has no Windows implementation, so the separate Windows
55
- # preview patch remains.
56
- "@nativescript/core@9.1.3": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript__core@9.1.3.patch
57
- # @nativescript/vite serializes bundled CSS and dev app.css through reworkcss `css`@3.0.0,
58
- # which mis-parses @layer into garbage selectors — rules die before reaching
59
- # _populateRules. Adds atlayer() covering block and statement forms. Applies to a
60
- # transitive dep — no app declares it directly.
61
- css@3.0.0: node_modules/.pnpm-config/@octane-xplat/patches/patches/css@3.0.0.patch
62
- # Remaining dev-server fixes on @nativescript/vite 8.0.20: classify only the requested
63
- # vendor entry under active native ESM conditions, keeping mixed
64
- # source-root/compiled-subpath packages on the Vite transform path; collect re-export
65
- # specifiers in the .vite/deps rewrite; route outside-roots /@fs paths through /ns/m;
66
- # probe non-active platform and native suffixes; redirect bare octane to
67
- # octane/universal/native in deps-bundle esbuild passes; give library files served
68
- # per-module on first boot static /ns/m vendor imports so ESM evaluation order and live
69
- # bindings hold, keeping package-internal non-entry files concrete instead of folding them
70
- # onto the package root (first-boot `Class extends value …` in gesturehandler);
71
- # canonicalize /@fs pnpm virtual-store paths onto the vendor route's
72
- # `/ns/m/node_modules/<pkg>` spelling when the store and root-resolved package share a
73
- # realpath, so a package's modules can't split into two registries (first-boot `is not a
74
- # registered element` in octane's element registry); add .mobile to tsconfig-paths and
75
- # generated checker suffixes; scan the app-local pnpm virtual store for served
76
- # node_modules URLs; ignore per-package turbo.json as workspace markers; resolve #
77
- # package-imports specifiers in served-module rewrites; preserve, compile, and hot-update
78
- # virtual stylesheets (NativeScript#11551); and inspect ESM export declarations/specifiers
79
- # for native default-import validation instead of matching comments, strings, or a narrow
80
- # export syntax (NativeScript#11566). Shared-source graph and hot-context IDs now use the
81
- # same app/workspace/@fs paths as served imports, preserving distinct roots
82
- # (NativeScript#11569); extensionless workspace requests probe filesystem-anchored
83
- # extension/platform candidates so hot reimports can fetch shared modules
84
- # (NativeScript#11570). Linked-checkout discovery and candidate anchoring shipped in
85
- # 8.0.20 (NativeScript#11559), so those local hunks are removed. Vite `resolve.alias`
86
- # entries are captured in configResolved and replayed inside the NativeScript esbuild
87
- # passes (deps bundle, vendor bundle) via an esbuild alias plugin with
88
- # @rollup/plugin-alias semantics, so Vite resolve.alias redirects for packages that are
89
- # not installed (e.g. the renderer's full-MasonKit imports mapped to Mason core) resolve
90
- # to real files instead of throw-on-evaluate optional-dependency stubs, while installed
91
- # packages keep their default resolution; the deps-bundle disk cache key fingerprints the
92
- # captured aliases. The runtime-plugin bare-specifier fold locates a package's
93
- # package.json through Node's node_modules ancestor chain instead of a literal
94
- # projectRoot/node_modules join, so deep `pkg/dist/...` specifiers fold back to the bare
95
- # vendor id in hoisted workspaces where the app's own node_modules is empty (a missed fold
96
- # leaves the vendor registry without the specifier and device require resolves a module
97
- # missing the vendored exports).
98
- "@nativescript/vite@8.0.20": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript__vite@8.0.20.patch
99
- # Retains the workspace's NativeScript driver fixes when upgrading to 0.2.5 for portal
100
- # support: a prop dropped from an update's complete prop bag — or set to
101
- # `undefined`/`null` — is a removal that restores the documented default
102
- # (Property/CssProperty setters get `unsetValue`, plain fields the captured pre-prop
103
- # value, `style` keys diff per key); a never-applied `undefined` still skips the write.
104
- # Synced with PR #14: registered setters are identified before resetting (ordinary fields
105
- # never receive the sentinel), inline removal refreshes matching class CSS through the
106
- # isolated core 9.1 `_cssState.onChange` hook, CSS variables use public removal, strings
107
- # use the core CSS parser, and replacement views capture fresh defaults. Also advertises
108
- # the implemented visibility capability, carries Octane callback ref types, and preserves
109
- # authored Grid row/col/span metadata. Hosts custom-layout containers (e.g. MasonKit
110
- # ViewBase) that own child lists via insertChild/removeChild/getChildrenCount without
111
- # subclassing LayoutBase. Additionally, the masonry cutover: masonview resolves to
112
- # MasonKit View and scrollview to MasonKit Scroll as the only layout containers, with zero
113
- # layout props — every former prop name warns-and-drops and all CSS semantics arrive
114
- # through the style bag; foreign native leaves mirror resolved class and inline layout
115
- # styles through Style.fromView, observe longhand changes and native recreation, and
116
- # explicitly clear removed placement — removal restores the CSS cascade, so a later
117
- # sibling attachment cannot resurrect removed tracks. Container alignment uses the core
118
- # stretch default without a local style override, allowing class-authored centering.
119
- # Inline style resets reapply the matching CSS cascade. Re-exports Octane's ClassValue
120
- # unchanged and stringifies truthy numeric class values while omitting 0 and NaN, matching
121
- # Octane 0.11. Maps collapsed foreign native leaves to Mason display:none, restoring
122
- # effective display on visibility changes so both layout hosts omit the same item (#45).
123
- "@nativescript-community/octane@0.2.5": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript-community__octane@0.2.5.patch
124
- # octaneServerStrategy's SCRIPT_FILE_RE only covers [jt]sx? — .tsrx edits never emit the
125
- # deferred ns:hmr-delta broadcast, so component HMR silently never reaches the device.
126
- # Also counts open /ns-hmr sockets so the update summary stops reporting recipients=0 for
127
- # delivered updates. Includes shared script sources in transaction ordering while
128
- # excluding dependencies, tests and declarations. External-source edits use the absolute
129
- # source for graph identity and a Vite /@fs transform URL instead of treating
130
- # parent-relative paths as app URLs.
131
- "@nativescript-community/vite-octane@0.2.1": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript-community__vite-octane@0.2.1.patch
132
- # Enables `resolveHiddenExtensions` on the language plugin's typescript facet so
133
- # extensionless specifiers (e.g. './Text') probe `.tsrx` after moduleSuffixes — required
134
- # for a single extensionless shared barrel to resolve per-platform leaves under tsrx-tsc
135
- # and the IDE plugin.
136
- "@tsrx/typescript-plugin@0.4.11": node_modules/.pnpm-config/@octane-xplat/patches/patches/@tsrx__typescript-plugin@0.4.11.patch
137
- # linkifyjs declares /\p{L}/u and /\p{Emoji}/u as regex literals at module scope;
138
- # NativeScript's embedded V8 builds without ICU, so the literals throw SyntaxError at
139
- # parse time and poison the whole bundle (any bundled app importing @tiptap/extension-link
140
- # dies on boot). Rewrites them as try/catch new RegExp builds with ASCII-range fallbacks —
141
- # same behavior where ICU exists, graceful degradation where it doesn't.
142
- linkifyjs@4.3.3: node_modules/.pnpm-config/@octane-xplat/patches/patches/linkifyjs@4.3.3.patch
143
- # useEditor.ts reads bare process.env.NODE_ENV — no node global exists in the harness
144
- # typecheck program. Adds a module-local process declaration for typecheck. (The
145
- # './Context' self-import half of the 0.0.51 patch shipped upstream in 0.0.52 via
146
- # octanejs/octane#1502.)
147
- "@octanejs/tiptap@0.0.52": node_modules/.pnpm-config/@octane-xplat/patches/patches/@octanejs__tiptap@0.0.52.patch
148
- # @lexical/link declares a /\p{L}\p{N}/u URL matcher as a regex literal at module scope;
149
- # NativeScript's embedded V8 builds without ICU, so the literal throws SyntaxError at
150
- # parse time and poisons the whole bundle (any bundled app importing @lexical/link dies on
151
- # boot). Same fix as linkifyjs: try/catch new RegExp with an ASCII-range fallback — the
152
- # matcher only feeds autolink, which native doesn't use.
153
- "@lexical/link@0.51.0": node_modules/.pnpm-config/@octane-xplat/patches/patches/@lexical__link@0.51.0.patch
154
- # @nativescript/doctor's Android runtime check reads the app's raw devDependencies
155
- # specifier and npm dist-tag resolves anything that isn't a semver range — a pnpm
156
- # `catalog:` pin throws 'The determined Android runtime version ... is not valid' and
157
- # kills `ns build android` before toolchain checks. Resolve catalog specifiers through the
158
- # installed package's manifest, reusing the existing tgz-branch mechanism.
159
- "@nativescript/doctor@2.0.18": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript__doctor@2.0.18.patch
160
- # shaders@4.0.0 inlines TypeGPU 0.12.3 into dist/core/std-ClftfWpF.js, which declares
161
- # /\p{XID_Start}/ and /\p{XID_Continue}/ regex literals at module scope (WGSL identifier
162
- # validation, external prop-chain matching, minify separator check). NativeScript's
163
- # embedded V8 on iOS (@nativescript/ios 9.1.0) and Android (@nativescript/android 9.1.1,
164
- # V8 14.9.207.39) is built without ICU — every \p{…} escape is a SyntaxError, even in a
165
- # never-called function, so a literal fails the whole module at parse time and any bundled
166
- # app importing `shaders/js` dies on boot. Rewriting to \p{ID_Start}/\p{L} would not help
167
- # — all property escapes are rejected. The patch builds the regexes via try/catch new
168
- # RegExp with ASCII/non-ASCII-range fallbacks — byte-identical .source where ICU exists.
169
- # dist/js/bundle.js, react/bundle.js, and cli.js carry the same escapes but are
170
- # unreachable from `shaders/js` and left unpatched.
171
- shaders@4.0.0: node_modules/.pnpm-config/@octane-xplat/patches/patches/shaders@4.0.0.patch
@@ -1,192 +0,0 @@
1
- # pnpm 11 settings live here, not in package.json.
2
- #
3
- # nodeLinker hoisted: Node ESM resolves package imports relative to the
4
- # symlink path (node_modules/octane/...), not the realpath — so octane's
5
- # transitive deps (@tsrx/core etc.) must sit at top-level node_modules.
6
- # NativeScript's bundler wants a flat tree for the same reason.
7
- nodeLinker: hoisted
8
- #
9
- # esbuild + @parcel/watcher need install scripts to place binaries;
10
- # nativescript's postinstall sets up the local CLI. @nativescript/core's
11
- # scripts are native toolchain prep the ns CLI does itself.
12
- allowBuilds:
13
- esbuild: true
14
- '@parcel/watcher': true
15
- nativescript: true
16
- '@nativescript/core': false
17
- # The patch set covers optional leaf deps (tiptap, linkifyjs, …) the starter
18
- # doesn't install — tolerate entries that apply to nothing.
19
- allowUnusedPatches: true
20
- # Framework patches are supplied by the @octane-xplat/patches config dependency and
21
- # applied via pnpm patchedDependencies. Managed upstream by @octane-xplat/cli (`xplat
22
- # patches apply` refreshes, `xplat patches check` verifies); do not edit by hand.
23
- patchedDependencies:
24
- # Published 0.14.0 still requires renderer-owned Children.toArray/map with explicit
25
- # universal-native re-exports for older runtimes, the 0.15.0 universal compiler allowlist
26
- # entries and identity runtime export for Children and descriptorChildren (so native .tsrx
27
- # modules importing them compile), universal signal-read tracking and local hooks, root
28
- # event-error forwarding, the complete universal imperative-ref lifecycle, the Descriptor
29
- # declaring-owner reader fallback, and the signal-owner/enclosingOwner chain so child
30
- # reads reuse instance declarations. Rebased against the registry 0.14.0 tarball,
31
- # including local signal-hook registration in the split runtime/hooks modules. Provider
32
- # null/undefined descendant cleanup is now upstream and no longer patched. Marks generic
33
- # binding bags from bagOf so fragment commit rehomes their DOM parent references,
34
- # preventing stale fragment parents, namespace recursion, and invalid insertion during
35
- # typeahead updates. Preserves keyed component ownership through compiler-generated
36
- # transparent root slots so native map reorders retain host identity, state, and portal
37
- # content.
38
- octane@0.14.0: node_modules/.pnpm-config/@octane-xplat/patches/patches/octane@0.14.0.patch
39
- # Published 9.1.3 ships the #11446 nested-tab-frame lifecycle fix and iOS explicit-size
40
- # flex alignment, so those hunks are removed. Retains the unshipped parent-padding
41
- # measure-spec fix and Android explicit-size flex alignment, iOS continuous corner
42
- # clipping, CSS @layer cascade support, custom Android variable-font weight mapping, and
43
- # percentage translate parsing, native view, and animation support. Verified against the
44
- # registry 9.1.3 tarball; it has no Windows implementation, so the separate Windows
45
- # preview patch remains.
46
- "@nativescript/core@9.1.3": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript__core@9.1.3.patch
47
- # @nativescript/vite serializes bundled CSS and dev app.css through reworkcss `css`@3.0.0,
48
- # which mis-parses @layer into garbage selectors — rules die before reaching
49
- # _populateRules. Adds atlayer() covering block and statement forms. Applies to a
50
- # transitive dep — no app declares it directly.
51
- css@3.0.0: node_modules/.pnpm-config/@octane-xplat/patches/patches/css@3.0.0.patch
52
- # Remaining dev-server fixes on @nativescript/vite 8.0.20: classify only the requested
53
- # vendor entry under active native ESM conditions, keeping mixed
54
- # source-root/compiled-subpath packages on the Vite transform path; collect re-export
55
- # specifiers in the .vite/deps rewrite; route outside-roots /@fs paths through /ns/m;
56
- # probe non-active platform and native suffixes; redirect bare octane to
57
- # octane/universal/native in deps-bundle esbuild passes; give library files served
58
- # per-module on first boot static /ns/m vendor imports so ESM evaluation order and live
59
- # bindings hold, keeping package-internal non-entry files concrete instead of folding them
60
- # onto the package root (first-boot `Class extends value …` in gesturehandler);
61
- # canonicalize /@fs pnpm virtual-store paths onto the vendor route's
62
- # `/ns/m/node_modules/<pkg>` spelling when the store and root-resolved package share a
63
- # realpath, so a package's modules can't split into two registries (first-boot `is not a
64
- # registered element` in octane's element registry); add .mobile to tsconfig-paths and
65
- # generated checker suffixes; scan the app-local pnpm virtual store for served
66
- # node_modules URLs; ignore per-package turbo.json as workspace markers; resolve #
67
- # package-imports specifiers in served-module rewrites; preserve, compile, and hot-update
68
- # virtual stylesheets (NativeScript#11551); and inspect ESM export declarations/specifiers
69
- # for native default-import validation instead of matching comments, strings, or a narrow
70
- # export syntax (NativeScript#11566). Shared-source graph and hot-context IDs now use the
71
- # same app/workspace/@fs paths as served imports, preserving distinct roots
72
- # (NativeScript#11569); extensionless workspace requests probe filesystem-anchored
73
- # extension/platform candidates so hot reimports can fetch shared modules
74
- # (NativeScript#11570). Linked-checkout discovery and candidate anchoring shipped in
75
- # 8.0.20 (NativeScript#11559), so those local hunks are removed. Vite `resolve.alias`
76
- # entries are captured in configResolved and replayed inside the NativeScript esbuild
77
- # passes (deps bundle, vendor bundle) via an esbuild alias plugin with
78
- # @rollup/plugin-alias semantics, so Vite resolve.alias redirects for packages that are
79
- # not installed (e.g. the renderer's full-MasonKit imports mapped to Mason core) resolve
80
- # to real files instead of throw-on-evaluate optional-dependency stubs, while installed
81
- # packages keep their default resolution; the deps-bundle disk cache key fingerprints the
82
- # captured aliases. The runtime-plugin bare-specifier fold locates a package's
83
- # package.json through Node's node_modules ancestor chain instead of a literal
84
- # projectRoot/node_modules join, so deep `pkg/dist/...` specifiers fold back to the bare
85
- # vendor id in hoisted workspaces where the app's own node_modules is empty (a missed fold
86
- # leaves the vendor registry without the specifier and device require resolves a module
87
- # missing the vendored exports).
88
- "@nativescript/vite@8.0.20": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript__vite@8.0.20.patch
89
- # Retains the workspace's NativeScript driver fixes when upgrading to 0.2.5 for portal
90
- # support: a prop dropped from an update's complete prop bag — or set to
91
- # `undefined`/`null` — is a removal that restores the documented default
92
- # (Property/CssProperty setters get `unsetValue`, plain fields the captured pre-prop
93
- # value, `style` keys diff per key); a never-applied `undefined` still skips the write.
94
- # Synced with PR #14: registered setters are identified before resetting (ordinary fields
95
- # never receive the sentinel), inline removal refreshes matching class CSS through the
96
- # isolated core 9.1 `_cssState.onChange` hook, CSS variables use public removal, strings
97
- # use the core CSS parser, and replacement views capture fresh defaults. Also advertises
98
- # the implemented visibility capability, carries Octane callback ref types, and preserves
99
- # authored Grid row/col/span metadata. Hosts custom-layout containers (e.g. MasonKit
100
- # ViewBase) that own child lists via insertChild/removeChild/getChildrenCount without
101
- # subclassing LayoutBase. Additionally, the masonry cutover: masonview resolves to
102
- # MasonKit View and scrollview to MasonKit Scroll as the only layout containers, with zero
103
- # layout props — every former prop name warns-and-drops and all CSS semantics arrive
104
- # through the style bag; foreign native leaves mirror resolved class and inline layout
105
- # styles through Style.fromView, observe longhand changes and native recreation, and
106
- # explicitly clear removed placement — removal restores the CSS cascade, so a later
107
- # sibling attachment cannot resurrect removed tracks. Container alignment uses the core
108
- # stretch default without a local style override, allowing class-authored centering.
109
- # Inline style resets reapply the matching CSS cascade. Re-exports Octane's ClassValue
110
- # unchanged and stringifies truthy numeric class values while omitting 0 and NaN, matching
111
- # Octane 0.11. Maps collapsed foreign native leaves to Mason display:none, restoring
112
- # effective display on visibility changes so both layout hosts omit the same item (#45).
113
- "@nativescript-community/octane@0.2.5": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript-community__octane@0.2.5.patch
114
- # octaneServerStrategy's SCRIPT_FILE_RE only covers [jt]sx? — .tsrx edits never emit the
115
- # deferred ns:hmr-delta broadcast, so component HMR silently never reaches the device.
116
- # Also counts open /ns-hmr sockets so the update summary stops reporting recipients=0 for
117
- # delivered updates. Includes shared script sources in transaction ordering while
118
- # excluding dependencies, tests and declarations. External-source edits use the absolute
119
- # source for graph identity and a Vite /@fs transform URL instead of treating
120
- # parent-relative paths as app URLs.
121
- "@nativescript-community/vite-octane@0.2.1": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript-community__vite-octane@0.2.1.patch
122
- # Enables `resolveHiddenExtensions` on the language plugin's typescript facet so
123
- # extensionless specifiers (e.g. './Text') probe `.tsrx` after moduleSuffixes — required
124
- # for a single extensionless shared barrel to resolve per-platform leaves under tsrx-tsc
125
- # and the IDE plugin.
126
- "@tsrx/typescript-plugin@0.4.11": node_modules/.pnpm-config/@octane-xplat/patches/patches/@tsrx__typescript-plugin@0.4.11.patch
127
- # linkifyjs declares /\p{L}/u and /\p{Emoji}/u as regex literals at module scope;
128
- # NativeScript's embedded V8 builds without ICU, so the literals throw SyntaxError at
129
- # parse time and poison the whole bundle (any bundled app importing @tiptap/extension-link
130
- # dies on boot). Rewrites them as try/catch new RegExp builds with ASCII-range fallbacks —
131
- # same behavior where ICU exists, graceful degradation where it doesn't.
132
- linkifyjs@4.3.3: node_modules/.pnpm-config/@octane-xplat/patches/patches/linkifyjs@4.3.3.patch
133
- # useEditor.ts reads bare process.env.NODE_ENV — no node global exists in the harness
134
- # typecheck program. Adds a module-local process declaration for typecheck. (The
135
- # './Context' self-import half of the 0.0.51 patch shipped upstream in 0.0.52 via
136
- # octanejs/octane#1502.)
137
- "@octanejs/tiptap@0.0.52": node_modules/.pnpm-config/@octane-xplat/patches/patches/@octanejs__tiptap@0.0.52.patch
138
- # @lexical/link declares a /\p{L}\p{N}/u URL matcher as a regex literal at module scope;
139
- # NativeScript's embedded V8 builds without ICU, so the literal throws SyntaxError at
140
- # parse time and poisons the whole bundle (any bundled app importing @lexical/link dies on
141
- # boot). Same fix as linkifyjs: try/catch new RegExp with an ASCII-range fallback — the
142
- # matcher only feeds autolink, which native doesn't use.
143
- "@lexical/link@0.51.0": node_modules/.pnpm-config/@octane-xplat/patches/patches/@lexical__link@0.51.0.patch
144
- # @nativescript/doctor's Android runtime check reads the app's raw devDependencies
145
- # specifier and npm dist-tag resolves anything that isn't a semver range — a pnpm
146
- # `catalog:` pin throws 'The determined Android runtime version ... is not valid' and
147
- # kills `ns build android` before toolchain checks. Resolve catalog specifiers through the
148
- # installed package's manifest, reusing the existing tgz-branch mechanism.
149
- "@nativescript/doctor@2.0.18": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript__doctor@2.0.18.patch
150
- # shaders@4.0.0 inlines TypeGPU 0.12.3 into dist/core/std-ClftfWpF.js, which declares
151
- # /\p{XID_Start}/ and /\p{XID_Continue}/ regex literals at module scope (WGSL identifier
152
- # validation, external prop-chain matching, minify separator check). NativeScript's
153
- # embedded V8 on iOS (@nativescript/ios 9.1.0) and Android (@nativescript/android 9.1.1,
154
- # V8 14.9.207.39) is built without ICU — every \p{…} escape is a SyntaxError, even in a
155
- # never-called function, so a literal fails the whole module at parse time and any bundled
156
- # app importing `shaders/js` dies on boot. Rewriting to \p{ID_Start}/\p{L} would not help
157
- # — all property escapes are rejected. The patch builds the regexes via try/catch new
158
- # RegExp with ASCII/non-ASCII-range fallbacks — byte-identical .source where ICU exists.
159
- # dist/js/bundle.js, react/bundle.js, and cli.js carry the same escapes but are
160
- # unreachable from `shaders/js` and left unpatched.
161
- shaders@4.0.0: node_modules/.pnpm-config/@octane-xplat/patches/patches/shaders@4.0.0.patch
162
- configDependencies:
163
- "@octane-xplat/patches": 0.18.0
164
- catalogs:
165
- xplat:
166
- "@nativescript-community/octane": 0.2.5
167
- "@nativescript-community/vite-octane": 0.2.1
168
- "@nativescript/android": 9.1.1
169
- "@nativescript/core": 9.1.3
170
- "@nativescript/ios": 9.1.0
171
- "@nativescript/types": 9.1.4
172
- "@nativescript/unit-test-runner": 5.0.0
173
- "@nativescript/vite": 8.0.20
174
- "@octane-xplat/cli": 0.18.0
175
- "@octane-xplat/jsx": 0.18.0
176
- "@octane-xplat/nativescript-mason-core": 1.0.0-beta.5
177
- "@octane-xplat/platform": 0.18.0
178
- "@octane-xplat/ui": 0.18.0
179
- "@octanejs/vite-plugin": 0.1.61
180
- "@tsrx/oxc": 0.20.0
181
- "@tsrx/typescript-plugin": 0.4.11
182
- "@valor/nativescript-websockets": 2.0.3
183
- jsdom: 30.1.1
184
- nativescript: 9.1.1
185
- octane: 0.14.0
186
- typescript: 5.9.3
187
- vite: 8.3.0
188
- vitest: 4.1.11
189
- overrides:
190
- "@nativescript/vite>esbuild": 0.27.7
191
- "@nativescript-community/vite-octane>esbuild": 0.27.7
192
- vite>esbuild: 0.27.7