@depup/react-native 0.87.0-depup.0 → 0.87.1-depup.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.
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +6 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -2
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/README.md +3 -3
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +1 -1
- package/changes.json +2 -2
- package/package.json +12 -12
- package/scripts/cocoapods/rndependencies.rb +31 -25
- package/scripts/replace-rncore-version.js +18 -2
- package/scripts/setup-apple-spm.js +28 -12
- package/scripts/spm/autolinking-plugins.js +80 -0
- package/scripts/spm/download-spm-artifacts.js +64 -6
- package/scripts/spm/expand-spm-dependencies.js +249 -30
- package/scripts/spm/generate-spm-autolinking.js +157 -40
- package/scripts/spm/generate-spm-package.js +30 -18
- package/scripts/spm/generate-spm-xcodeproj.js +595 -71
- package/scripts/spm/scaffold-package-swift.js +65 -24
- package/scripts/spm/spm-pbxproj.js +158 -28
- package/scripts/spm/spm-types.js +29 -3
- package/scripts/spm/spm-utils.js +117 -2
- package/sdks/.hermesv1version +1 -1
- package/sdks/hermes-engine/version.properties +1 -1
- package/types_generated/Libraries/Animated/AnimatedImplementation.d.ts +2 -2
- package/types_generated/Libraries/Animated/nodes/AnimatedNode.d.ts +4 -1
- package/types_generated/Libraries/Animated/nodes/AnimatedValue.d.ts +3 -3
- package/scripts/spm/__doc__/rfc-spm-xcframework.md +0 -707
- package/scripts/spm/__doc__/spm-autolinking-plugins.md +0 -244
- package/scripts/spm/__doc__/spm-header-paths-contract.md +0 -97
- package/scripts/spm/__doc__/spm-plugins-assessment.md +0 -128
- package/scripts/spm/__doc__/spm-scripts.md +0 -486
package/scripts/spm/spm-utils.js
CHANGED
|
@@ -14,6 +14,67 @@ const fs = require('fs');
|
|
|
14
14
|
const os = require('os');
|
|
15
15
|
const path = require('path');
|
|
16
16
|
|
|
17
|
+
// The package and product names React Native's own generated manifests use. A
|
|
18
|
+
// dependency whose Swift name lands on one of them surfaces as a duplicate-name
|
|
19
|
+
// error from inside SPM's resolution, far from the react-native.config.js that
|
|
20
|
+
// caused it, so the autolinker rejects the collision up front instead.
|
|
21
|
+
//
|
|
22
|
+
// These cover the emitters in this directory and the collision guard. Adding a
|
|
23
|
+
// React Native SPM product also touches, depending on what the product is:
|
|
24
|
+
// - scripts/codegen/templates/Package.swift.spm-template — if the per-app
|
|
25
|
+
// codegen package must depend on it (a static Swift file, patched by
|
|
26
|
+
// string replacement, not generated from these constants)
|
|
27
|
+
// - flavored-frameworks.js INVARIANT_BINARY_TARGETS — if it is
|
|
28
|
+
// xcframework-backed
|
|
29
|
+
// - download-spm-artifacts.js REQUIRED_ARTIFACTS — if it ships as its own
|
|
30
|
+
// downloadable artifact (that list names ARTIFACTS, which overlap with
|
|
31
|
+
// product names without being the same set)
|
|
32
|
+
const REACT_NATIVE_PACKAGE_NAME /*: string */ = 'ReactNative';
|
|
33
|
+
const REACT_CODEGEN_PACKAGE_NAME /*: string */ = 'React-GeneratedCode';
|
|
34
|
+
// The autolinking aggregator package, whose single product shares its name.
|
|
35
|
+
const AUTOLINKED_PACKAGE_NAME /*: string */ = 'Autolinked';
|
|
36
|
+
// React Native's products by KIND, so no consumer has to infer the kind from a
|
|
37
|
+
// position in a flat list. The umbrella is a Clang target over the staged
|
|
38
|
+
// headers that re-exports the pure-RN namespaces; the rest are each backed by
|
|
39
|
+
// an xcframework of the same name.
|
|
40
|
+
const REACT_NATIVE_UMBRELLA_PRODUCT /*: string */ = 'ReactHeaders';
|
|
41
|
+
const REACT_NATIVE_HEADERS_PRODUCT /*: string */ = 'ReactNativeHeaders';
|
|
42
|
+
const REACT_NATIVE_DEPENDENCIES_HEADERS_PRODUCT /*: string */ =
|
|
43
|
+
'ReactNativeDependenciesHeaders';
|
|
44
|
+
const REACT_NATIVE_XCFRAMEWORK_PRODUCTS /*: ReadonlyArray<string> */ =
|
|
45
|
+
Object.freeze([
|
|
46
|
+
REACT_NATIVE_HEADERS_PRODUCT,
|
|
47
|
+
REACT_NATIVE_DEPENDENCIES_HEADERS_PRODUCT,
|
|
48
|
+
]);
|
|
49
|
+
// Derived, so a new product cannot be added without choosing a kind above.
|
|
50
|
+
const REACT_NATIVE_PRODUCTS /*: ReadonlyArray<string> */ = Object.freeze([
|
|
51
|
+
REACT_NATIVE_UMBRELLA_PRODUCT,
|
|
52
|
+
...REACT_NATIVE_XCFRAMEWORK_PRODUCTS,
|
|
53
|
+
]);
|
|
54
|
+
// The codegen package product every autolinked target depends on for the app's
|
|
55
|
+
// generated headers.
|
|
56
|
+
const REACT_CODEGEN_PRODUCTS /*: ReadonlyArray<string> */ = Object.freeze([
|
|
57
|
+
'ReactAppHeaders',
|
|
58
|
+
]);
|
|
59
|
+
// The codegen package products the APP target links, declared by the static
|
|
60
|
+
// template rather than by any emitter here.
|
|
61
|
+
const REACT_CODEGEN_APP_PRODUCTS /*: ReadonlyArray<string> */ = Object.freeze([
|
|
62
|
+
'ReactCodegen',
|
|
63
|
+
'ReactAppDependencyProvider',
|
|
64
|
+
]);
|
|
65
|
+
const REACT_HEADERS_TARGET_DIR /*: string */ = 'ReactHeadersTarget';
|
|
66
|
+
// Target names only have to be unique within their own package, so
|
|
67
|
+
// REACT_HEADERS_TARGET_DIR is deliberately absent: a dependency named after it
|
|
68
|
+
// collides with nothing.
|
|
69
|
+
const RESERVED_SWIFT_NAMES /*: ReadonlyArray<string> */ = Object.freeze([
|
|
70
|
+
REACT_NATIVE_PACKAGE_NAME,
|
|
71
|
+
REACT_CODEGEN_PACKAGE_NAME,
|
|
72
|
+
AUTOLINKED_PACKAGE_NAME,
|
|
73
|
+
...REACT_NATIVE_PRODUCTS,
|
|
74
|
+
...REACT_CODEGEN_PRODUCTS,
|
|
75
|
+
...REACT_CODEGEN_APP_PRODUCTS,
|
|
76
|
+
]);
|
|
77
|
+
|
|
17
78
|
/**
|
|
18
79
|
* Creates a logger trio {log, warn, die} that prefixes messages with [name].
|
|
19
80
|
* log – green prefix, writes to stdout
|
|
@@ -582,10 +643,10 @@ function installSpmCodegenTemplate(
|
|
|
582
643
|
if (remote != null) {
|
|
583
644
|
content = content
|
|
584
645
|
.replace(
|
|
585
|
-
|
|
646
|
+
`.package(name: "${REACT_NATIVE_PACKAGE_NAME}", path: "../../xcframeworks"),`,
|
|
586
647
|
`.package(url: "${remote.url}", exact: "${remote.version}"),`,
|
|
587
648
|
)
|
|
588
|
-
.split(
|
|
649
|
+
.split(`package: "${REACT_NATIVE_PACKAGE_NAME}")`)
|
|
589
650
|
.join(`package: "${remote.identity}")`);
|
|
590
651
|
}
|
|
591
652
|
fs.writeFileSync(codegenPkgSwift, content, 'utf8');
|
|
@@ -624,7 +685,59 @@ function runCodegenAndInstallTemplate(
|
|
|
624
685
|
}
|
|
625
686
|
}
|
|
626
687
|
|
|
688
|
+
// ---------------------------------------------------------------------------
|
|
689
|
+
// Autolinking-plugin script phases — the shared validation rules. Two gates
|
|
690
|
+
// apply them with different POLICIES (invokePlugins throws, the injector's
|
|
691
|
+
// sidecar reader skips the entry), so only the rules live here. See
|
|
692
|
+
// __doc__/spm-autolinking-plugins.md for the reasoning.
|
|
693
|
+
// ---------------------------------------------------------------------------
|
|
694
|
+
|
|
695
|
+
// `@` and `/` are admitted so a package can use its own scoped npm name
|
|
696
|
+
// (`@expo/log-box`). `:` is not: the id is hashed into the UUID seed as
|
|
697
|
+
// `plugin:<id>`, and keeping the separator out of the id keeps that seed
|
|
698
|
+
// unambiguous.
|
|
699
|
+
const SCRIPT_PHASE_ID_PATTERN = /^[@A-Za-z0-9_./-]+$/;
|
|
700
|
+
|
|
701
|
+
// `ledger.__proto__ = uuid` sets the prototype instead of an own property, so a
|
|
702
|
+
// phase with one of these ids would look recorded, vanish through
|
|
703
|
+
// JSON.stringify, and never be removable by `deinit`.
|
|
704
|
+
const RESERVED_SCRIPT_PHASE_IDS = new Set([
|
|
705
|
+
'__proto__',
|
|
706
|
+
'constructor',
|
|
707
|
+
'prototype',
|
|
708
|
+
]);
|
|
709
|
+
|
|
710
|
+
function isValidScriptPhaseId(value /*: unknown */) /*: boolean */ {
|
|
711
|
+
return (
|
|
712
|
+
typeof value === 'string' &&
|
|
713
|
+
SCRIPT_PHASE_ID_PATTERN.test(value) &&
|
|
714
|
+
!RESERVED_SCRIPT_PHASE_IDS.has(value)
|
|
715
|
+
);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* The name reaches the project file twice: verbatim in the escaped `name` field
|
|
720
|
+
* Xcode displays, and normalized (spm-pbxproj's commentSafe) in the cosmetic
|
|
721
|
+
* `/* … */` comments. Both are safe for any single-line string, so the only
|
|
722
|
+
* thing left to refuse is a line break — which no Xcode phase display name can
|
|
723
|
+
* carry anyway.
|
|
724
|
+
*/
|
|
725
|
+
function isValidScriptPhaseName(value /*: unknown */) /*: boolean */ {
|
|
726
|
+
return typeof value === 'string' && value.length > 0 && !/[\r\n]/.test(value);
|
|
727
|
+
}
|
|
728
|
+
|
|
627
729
|
module.exports = {
|
|
730
|
+
REACT_NATIVE_PACKAGE_NAME,
|
|
731
|
+
REACT_CODEGEN_PACKAGE_NAME,
|
|
732
|
+
AUTOLINKED_PACKAGE_NAME,
|
|
733
|
+
REACT_NATIVE_UMBRELLA_PRODUCT,
|
|
734
|
+
REACT_NATIVE_HEADERS_PRODUCT,
|
|
735
|
+
REACT_NATIVE_XCFRAMEWORK_PRODUCTS,
|
|
736
|
+
REACT_NATIVE_PRODUCTS,
|
|
737
|
+
REACT_CODEGEN_PRODUCTS,
|
|
738
|
+
REACT_CODEGEN_APP_PRODUCTS,
|
|
739
|
+
REACT_HEADERS_TARGET_DIR,
|
|
740
|
+
RESERVED_SWIFT_NAMES,
|
|
628
741
|
makeLogger,
|
|
629
742
|
displayPath,
|
|
630
743
|
sharedCacheDir,
|
|
@@ -641,5 +754,7 @@ module.exports = {
|
|
|
641
754
|
RemoteVersionError,
|
|
642
755
|
installSpmCodegenTemplate,
|
|
643
756
|
runCodegenAndInstallTemplate,
|
|
757
|
+
isValidScriptPhaseId,
|
|
758
|
+
isValidScriptPhaseName,
|
|
644
759
|
SCAFFOLDER_MARKER,
|
|
645
760
|
};
|
package/sdks/.hermesv1version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-v250829098.0.
|
|
1
|
+
hermes-v250829098.0.17
|
|
@@ -1 +1 @@
|
|
|
1
|
-
HERMES_VERSION_NAME=250829098.0.
|
|
1
|
+
HERMES_VERSION_NAME=250829098.0.17
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<deb4750b606ad5eeb96001b63b6e5089>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Animated/AnimatedImplementation.js
|
|
@@ -77,7 +77,7 @@ type LoopAnimationConfig = {
|
|
|
77
77
|
declare const loopImpl: (animation: CompositeAnimation, $$PARAM_1$$?: LoopAnimationConfig) => CompositeAnimation;
|
|
78
78
|
declare function forkEventImpl(event: (null | undefined | AnimatedEvent) | (null | undefined | Function), listener: Function): AnimatedEvent | Function;
|
|
79
79
|
declare function unforkEventImpl(event: (null | undefined | AnimatedEvent) | (null | undefined | Function), listener: Function): void;
|
|
80
|
-
declare const eventImpl: <T>(argMapping: ReadonlyArray<null | undefined | Mapping>, config: EventConfig<T>) => any;
|
|
80
|
+
declare const eventImpl: <T>(argMapping: ReadonlyArray<null | undefined | Mapping>, config: EventConfig<T>) => (...args: Array<any>) => void;
|
|
81
81
|
type AnimatedNumeric = AnimatedAddition | AnimatedDiffClamp | AnimatedDivision | AnimatedInterpolation<number> | AnimatedModulo | AnimatedMultiplication | AnimatedSubtraction | AnimatedValue;
|
|
82
82
|
export type { AnimatedNumeric as Numeric };
|
|
83
83
|
/**
|
|
@@ -4,12 +4,15 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<7e916c0065bd8ff58eca307a8c6a38f3>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Animated/nodes/AnimatedNode.js
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
export type ValueListenerCallback = (state: {
|
|
14
|
+
value: number;
|
|
15
|
+
}) => unknown;
|
|
13
16
|
export type AnimatedNodeConfig = Readonly<{
|
|
14
17
|
debugID?: string | undefined;
|
|
15
18
|
unstable_disableBatchingForNativeCreate?: boolean | undefined;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<21e82307ce339b1faa67f3ea4d4b5c8a>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Animated/nodes/AnimatedValue.js
|
|
@@ -14,7 +14,7 @@ import type Animation from "../animations/Animation";
|
|
|
14
14
|
import type { EndCallback } from "../animations/Animation";
|
|
15
15
|
import type { InterpolationConfigSupportedOutputType, InterpolationConfigType } from "./AnimatedInterpolation";
|
|
16
16
|
import type AnimatedNode from "./AnimatedNode";
|
|
17
|
-
import type { AnimatedNodeConfig } from "./AnimatedNode";
|
|
17
|
+
import type { AnimatedNodeConfig, ValueListenerCallback } from "./AnimatedNode";
|
|
18
18
|
import type AnimatedTracking from "./AnimatedTracking";
|
|
19
19
|
import AnimatedInterpolation from "./AnimatedInterpolation";
|
|
20
20
|
import AnimatedWithChildren from "./AnimatedWithChildren";
|
|
@@ -56,7 +56,7 @@ export declare function flushValue(rootNode: AnimatedNode): void;
|
|
|
56
56
|
*/
|
|
57
57
|
declare class AnimatedValue extends AnimatedWithChildren {
|
|
58
58
|
constructor(value: number, config?: null | undefined | AnimatedValueConfig);
|
|
59
|
-
addListener(callback:
|
|
59
|
+
addListener(callback: ValueListenerCallback): string;
|
|
60
60
|
removeListener(id: string): void;
|
|
61
61
|
removeAllListeners(): void;
|
|
62
62
|
/**
|