@nativescript/ios 9.1.0-alpha.17 → 9.1.0-alpha.19

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.
@@ -312,7 +312,7 @@
312
312
  ALWAYS_SEARCH_USER_PATHS = NO;
313
313
  ARCHS = "$(ARCHS_STANDARD)";
314
314
  CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
315
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
315
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
316
316
  CLANG_CXX_LIBRARY = "libc++";
317
317
  CLANG_ENABLE_MODULES = YES;
318
318
  CLANG_ENABLE_OBJC_ARC = YES;
@@ -342,7 +342,7 @@
342
342
  ENABLE_STRICT_OBJC_MSGSEND = YES;
343
343
  ENABLE_TESTABILITY = YES;
344
344
  ENABLE_USER_SCRIPT_SANDBOXING = NO;
345
- GCC_C_LANGUAGE_STANDARD = gnu99;
345
+ GCC_C_LANGUAGE_STANDARD = gnu17;
346
346
  GCC_DYNAMIC_NO_PIC = NO;
347
347
  GCC_NO_COMMON_BLOCKS = YES;
348
348
  GCC_OPTIMIZATION_LEVEL = 0;
@@ -369,7 +369,7 @@
369
369
  ALWAYS_SEARCH_USER_PATHS = NO;
370
370
  ARCHS = "$(ARCHS_STANDARD)";
371
371
  CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
372
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
372
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
373
373
  CLANG_CXX_LIBRARY = "libc++";
374
374
  CLANG_ENABLE_MODULES = YES;
375
375
  CLANG_ENABLE_OBJC_ARC = YES;
@@ -399,7 +399,7 @@
399
399
  ENABLE_NS_ASSERTIONS = NO;
400
400
  ENABLE_STRICT_OBJC_MSGSEND = YES;
401
401
  ENABLE_USER_SCRIPT_SANDBOXING = NO;
402
- GCC_C_LANGUAGE_STANDARD = gnu99;
402
+ GCC_C_LANGUAGE_STANDARD = gnu17;
403
403
  GCC_NO_COMMON_BLOCKS = YES;
404
404
  GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
405
405
  GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
@@ -505,7 +505,7 @@
505
505
  repositoryURL = "https://github.com/NativeScript/ios-spm.git";
506
506
  requirement = {
507
507
  kind = exactVersion;
508
- version = "9.1.0-alpha.17";
508
+ version = "9.1.0-alpha.19";
509
509
  };
510
510
  };
511
511
  /* End XCRemoteSwiftPackageReference section */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nativescript/ios",
3
3
  "description": "NativeScript Runtime for iOS",
4
- "version": "9.1.0-alpha.17",
4
+ "version": "9.1.0-alpha.19",
5
5
  "keywords": [
6
6
  "NativeScript",
7
7
  "iOS",
@@ -16,14 +16,13 @@
16
16
  "email": "oss@nativescript.org"
17
17
  },
18
18
  "directories": {},
19
+ "types": "./types/index.d.ts",
19
20
  "files": [
20
21
  "**/*"
21
22
  ],
22
23
  "scripts": {
23
24
  "prepare": "husky",
24
25
  "apply-patches": "./apply_patches.sh",
25
- "build-v8-source": "./build_v8_source.sh",
26
- "build-v8-source-catalyst": "./build_v8_source_catalyst.sh",
27
26
  "build-ios": "node prepare-target ios && ./build_all_ios.sh",
28
27
  "build-vision": "node prepare-target visionos && ./build_all_vision.sh",
29
28
  "setup-ci": "./build_metadata_generator.sh",
@@ -35,13 +34,19 @@
35
34
  "devDependencies": {
36
35
  "conventional-changelog-cli": "^2.1.1",
37
36
  "dayjs": "^1.11.7",
37
+ "esbuild": "0.28.1",
38
+ "eslint": "10.8.0",
39
+ "globals": "17.8.0",
38
40
  "husky": "^9.0.11",
39
41
  "lint-staged": "^15.2.7",
40
42
  "semver": "^7.5.0"
41
43
  },
42
44
  "lint-staged": {
43
45
  "{NativeScript,metadata-generator/src,TestFixtures}/**/*.{h,hpp,c,cpp,mm,m}": [
44
- "clang-format -i"
46
+ "tools/format-staged-native.sh"
47
+ ],
48
+ "NativeScript/runtime/js/**/*.js": [
49
+ "eslint"
45
50
  ]
46
51
  }
47
52
  }
@@ -0,0 +1,27 @@
1
+ // Type declarations for the runtime's public `ns:` builtin modules — one
2
+ // .d.ts per module, mirroring @types/node's layout and the "one module, one
3
+ // source file" rule in docs/ns-builtin-modules.md. The declared surfaces must
4
+ // stay in sync with that document (NsRuntimeTests.js / NsUtilTests.js /
5
+ // HttpEsmLoaderTests.js assert the export sets at runtime).
6
+ //
7
+ // `ns:` is not a resolvable package specifier, so these are ambient
8
+ // declarations: they apply program-wide once this file is in the TypeScript
9
+ // program. Pull it in with either
10
+ //
11
+ // /// <reference types="@nativescript/ios" />
12
+ //
13
+ // or a tsconfig entry:
14
+ //
15
+ // { "include": ["node_modules/@nativescript/ios/types/index.d.ts"] }
16
+ //
17
+ // These files are the source of truth for `ns:*` types. Downstream type
18
+ // packages must reference them, not redeclare the modules — two
19
+ // `declare module` blocks for the same specifier conflict.
20
+ //
21
+ // The `node:util` compatibility shim is deliberately not declared here:
22
+ // programs that include @types/node already have a `node:util` declaration,
23
+ // and a second one would clash with it.
24
+
25
+ /// <reference path="./ns-module.d.ts" />
26
+ /// <reference path="./ns-runtime.d.ts" />
27
+ /// <reference path="./ns-util.d.ts" />
@@ -0,0 +1,78 @@
1
+ declare module "ns:module" {
2
+ /**
3
+ * An import map in the WHATWG shape the dev server emits: bare specifier →
4
+ * absolute URL. Consulted inside the engine's synchronous module resolver,
5
+ * which is why it must be handed to the runtime ahead of time rather than
6
+ * resolved on demand.
7
+ */
8
+ export interface ImportMap {
9
+ imports: Record<string, string>;
10
+ }
11
+
12
+ /**
13
+ * The URL vocabulary the runtime's canonical-key function applies when
14
+ * keying its module registry. The mechanism (fragment strip, cache-buster
15
+ * param drop, param sort) is native; this vocabulary is server policy and
16
+ * is supplied by the development tooling.
17
+ */
18
+ export interface CanonicalizationConfig {
19
+ /**
20
+ * Query param names that are pure cache busters and are dropped for dev
21
+ * endpoints (e.g. `t`, `v`, `import`).
22
+ */
23
+ stripParams?: string[];
24
+ /**
25
+ * Path prefixes (starts-with) identifying dev endpoints whose query may
26
+ * be normalized (e.g. `/ns/`, `/@id/`).
27
+ */
28
+ forPathPrefixes?: string[];
29
+ /**
30
+ * Path substrings whose query IS the module identity and must be
31
+ * preserved verbatim (e.g. `/@ng/component`).
32
+ */
33
+ preserveQueryFor?: string[];
34
+ }
35
+
36
+ /**
37
+ * Loader policy, installed before the dev session imports anything. Every
38
+ * section is optional; each present section replaces its native state
39
+ * wholesale.
40
+ */
41
+ export interface LoaderConfig {
42
+ importMap?: ImportMap;
43
+ /** URL substrings identifying modules that are always re-fetched, never cached. */
44
+ volatilePatterns?: string[];
45
+ canonicalization?: CanonicalizationConfig;
46
+ }
47
+
48
+ /**
49
+ * Installs loader policy — the sole channel by which server/framework URL
50
+ * policy enters the runtime's module loader.
51
+ */
52
+ export function configureLoader(config: LoaderConfig): void;
53
+
54
+ /**
55
+ * Evicts the given URLs (canonicalized) from the module registry and marks
56
+ * them bust-next-fetch, so the next network fetch bypasses every HTTP
57
+ * cache layer.
58
+ */
59
+ export function invalidateModules(urls: string[]): void;
60
+
61
+ /**
62
+ * The URL-like keys currently in the module registry (used to compute
63
+ * full-reload eviction sets).
64
+ */
65
+ export function getLoadedModuleUrls(): string[];
66
+
67
+ /**
68
+ * Flips the dev-boot-complete signal (defaults to `true`); disarms
69
+ * cold-boot-only behaviors.
70
+ */
71
+ export function setDevBootComplete(value?: boolean): void;
72
+
73
+ // Debug builds additionally carry `canonicalizeHttpUrlKey(url)`, a pure
74
+ // test diagnostic; release builds omit the member entirely. It is
75
+ // deliberately not declared here: it is not public API, and declaring it
76
+ // unconditionally would misrepresent release builds, where feature checks
77
+ // must observe it as absent.
78
+ }
@@ -0,0 +1,46 @@
1
+ declare module "ns:runtime" {
2
+ /**
3
+ * Controls what happens when JS touches a wrapper whose native counterpart
4
+ * has already been released:
5
+ *
6
+ * - `"report"` (default): the operation no-ops and a cancelable
7
+ * `releasednativeaccess` event fires on `globalThis`.
8
+ * - `"throw"`: the touch throws a catchable `ReferenceError` synchronously,
9
+ * and no event fires.
10
+ */
11
+ export type ReleasedObjectPolicy = "report" | "throw";
12
+
13
+ /**
14
+ * The config keys these types know about, mapped to their value domains.
15
+ *
16
+ * Keys are registered and validated natively, and other runtimes (or newer
17
+ * runtime versions) may register keys not listed here — `setConfig` and
18
+ * `getConfig` therefore accept any string key, falling back to `unknown`
19
+ * for the value. A runtime's own types can merge additional keys into this
20
+ * interface via declaration merging.
21
+ */
22
+ export interface RuntimeConfig {
23
+ releasedObjectPolicy: ReleasedObjectPolicy;
24
+ }
25
+
26
+ /**
27
+ * Sets a runtime config key.
28
+ *
29
+ * Throws `TypeError` on an unknown key, an invalid value, or — for
30
+ * process-wide keys such as `releasedObjectPolicy` — when called from a
31
+ * worker isolate.
32
+ */
33
+ export function setConfig<K extends keyof RuntimeConfig | (string & {})>(
34
+ key: K,
35
+ value: K extends keyof RuntimeConfig ? RuntimeConfig[K] : unknown
36
+ ): void;
37
+
38
+ /**
39
+ * Returns the current value of a config key. Readable from any isolate.
40
+ *
41
+ * Throws `TypeError` on an unknown key.
42
+ */
43
+ export function getConfig<K extends keyof RuntimeConfig | (string & {})>(
44
+ key: K
45
+ ): K extends keyof RuntimeConfig ? RuntimeConfig[K] : unknown;
46
+ }
@@ -0,0 +1,26 @@
1
+ declare module "ns:util" {
2
+ export interface InspectOptions {
3
+ /** Recursion depth for nested objects. Default: `2`. */
4
+ depth?: number;
5
+ }
6
+
7
+ /**
8
+ * Formats any value for human consumption: depth-limited, output-capped,
9
+ * cycle-safe, and never invokes getters (except a guarded `error.stack`
10
+ * read and custom `toString` overrides, which are honored).
11
+ *
12
+ * The output may change between runtime versions for readability; it is
13
+ * intended for humans and must not be parsed programmatically.
14
+ */
15
+ export function inspect(value: unknown, options?: InspectOptions): string;
16
+
17
+ /**
18
+ * Node-style printf formatting: `%s`, `%d`, `%i`, `%f`, `%j`, `%o`, `%O`,
19
+ * `%%`. Extra arguments are appended space-separated, objects rendered via
20
+ * {@link inspect}. When `format` is not a string or contains no
21
+ * substitutions, all arguments are formatted and joined with spaces.
22
+ *
23
+ * `console.*` routes its arguments through this.
24
+ */
25
+ export function format(format?: unknown, ...args: unknown[]): string;
26
+ }