@rnpack/utils 0.1.9 → 0.1.11

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 (86) hide show
  1. package/example/node_modules/react-native/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec +34 -0
  2. package/example/node_modules/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec +88 -0
  3. package/example/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec +59 -0
  4. package/example/node_modules/react-native/Libraries/FBLazyVector/FBLazyVector.podspec +31 -0
  5. package/example/node_modules/react-native/Libraries/Image/React-RCTImage.podspec +57 -0
  6. package/example/node_modules/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec +51 -0
  7. package/example/node_modules/react-native/Libraries/NativeAnimation/React-RCTAnimation.podspec +54 -0
  8. package/example/node_modules/react-native/Libraries/Network/React-RCTNetwork.podspec +56 -0
  9. package/example/node_modules/react-native/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +53 -0
  10. package/example/node_modules/react-native/Libraries/Required/RCTRequired.podspec +30 -0
  11. package/example/node_modules/react-native/Libraries/Settings/React-RCTSettings.podspec +53 -0
  12. package/example/node_modules/react-native/Libraries/Text/React-RCTText.podspec +37 -0
  13. package/example/node_modules/react-native/Libraries/TypeSafety/RCTTypeSafety.podspec +39 -0
  14. package/example/node_modules/react-native/Libraries/Vibration/React-RCTVibration.podspec +53 -0
  15. package/example/node_modules/react-native/React/CoreModules/React-CoreModules.podspec +67 -0
  16. package/example/node_modules/react-native/React/React-RCTFBReactNativeSpec.podspec +95 -0
  17. package/example/node_modules/react-native/React/React-RCTFabric.podspec +107 -0
  18. package/example/node_modules/react-native/React/Runtime/React-RCTRuntime.podspec +70 -0
  19. package/example/node_modules/react-native/React-Core-prebuilt.podspec +78 -0
  20. package/example/node_modules/react-native/React-Core.podspec +137 -0
  21. package/example/node_modules/react-native/React.podspec +56 -0
  22. package/example/node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +25 -0
  23. package/example/node_modules/react-native/ReactCommon/React-Fabric.podspec +207 -0
  24. package/example/node_modules/react-native/ReactCommon/React-FabricComponents.podspec +170 -0
  25. package/example/node_modules/react-native/ReactCommon/React-FabricImage.podspec +79 -0
  26. package/example/node_modules/react-native/ReactCommon/React-Mapbuffer.podspec +40 -0
  27. package/example/node_modules/react-native/ReactCommon/ReactCommon.podspec +72 -0
  28. package/example/node_modules/react-native/ReactCommon/callinvoker/React-callinvoker.podspec +30 -0
  29. package/example/node_modules/react-native/ReactCommon/cxxreact/React-cxxreact.podspec +56 -0
  30. package/example/node_modules/react-native/ReactCommon/hermes/React-hermes.podspec +52 -0
  31. package/example/node_modules/react-native/ReactCommon/hermes/executor/React-jsitracing.podspec +38 -0
  32. package/example/node_modules/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +52 -0
  33. package/example/node_modules/react-native/ReactCommon/jsi/React-jsi.podspec +50 -0
  34. package/example/node_modules/react-native/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +45 -0
  35. package/example/node_modules/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec +63 -0
  36. package/example/node_modules/react-native/ReactCommon/jsinspector-modern/cdp/React-jsinspectorcdp.podspec +48 -0
  37. package/example/node_modules/react-native/ReactCommon/jsinspector-modern/network/React-jsinspectornetwork.podspec +53 -0
  38. package/example/node_modules/react-native/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +51 -0
  39. package/example/node_modules/react-native/ReactCommon/jsitooling/React-jsitooling.podspec +47 -0
  40. package/example/node_modules/react-native/ReactCommon/logger/React-logger.podspec +34 -0
  41. package/example/node_modules/react-native/ReactCommon/oscompat/React-oscompat.podspec +31 -0
  42. package/example/node_modules/react-native/ReactCommon/react/debug/React-debug.podspec +34 -0
  43. package/example/node_modules/react-native/ReactCommon/react/featureflags/React-featureflags.podspec +44 -0
  44. package/example/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +54 -0
  45. package/example/node_modules/react-native/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +54 -0
  46. package/example/node_modules/react-native/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +60 -0
  47. package/example/node_modules/react-native/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +53 -0
  48. package/example/node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +55 -0
  49. package/example/node_modules/react-native/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +52 -0
  50. package/example/node_modules/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +63 -0
  51. package/example/node_modules/react-native/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +50 -0
  52. package/example/node_modules/react-native/ReactCommon/react/renderer/consistency/React-rendererconsistency.podspec +43 -0
  53. package/example/node_modules/react-native/ReactCommon/react/renderer/css/React-renderercss.podspec +47 -0
  54. package/example/node_modules/react-native/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +48 -0
  55. package/example/node_modules/react-native/ReactCommon/react/renderer/graphics/React-graphics.podspec +55 -0
  56. package/example/node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +56 -0
  57. package/example/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +59 -0
  58. package/example/node_modules/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec +56 -0
  59. package/example/node_modules/react-native/ReactCommon/react/runtime/React-RuntimeHermes.podspec +53 -0
  60. package/example/node_modules/react-native/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +72 -0
  61. package/example/node_modules/react-native/ReactCommon/react/timing/React-timing.podspec +43 -0
  62. package/example/node_modules/react-native/ReactCommon/react/utils/React-utils.podspec +55 -0
  63. package/example/node_modules/react-native/ReactCommon/reactperflogger/React-perflogger.podspec +42 -0
  64. package/example/node_modules/react-native/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +56 -0
  65. package/example/node_modules/react-native/ReactCommon/yoga/Yoga.podspec +66 -0
  66. package/example/node_modules/react-native/react-native.config.js +139 -0
  67. package/example/node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec +165 -0
  68. package/example/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec +34 -0
  69. package/example/node_modules/react-native/third-party-podspecs/RCT-Folly.podspec +132 -0
  70. package/example/node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec +99 -0
  71. package/example/node_modules/react-native/third-party-podspecs/boost.podspec +34 -0
  72. package/example/node_modules/react-native/third-party-podspecs/fast_float.podspec +29 -0
  73. package/example/node_modules/react-native/third-party-podspecs/fmt.podspec +29 -0
  74. package/example/node_modules/react-native/third-party-podspecs/glog.podspec +47 -0
  75. package/example/node_modules/react-native-nitro-modules/NitroModules.podspec +90 -0
  76. package/example/node_modules/react-native-nitro-modules/react-native.config.js +16 -0
  77. package/example/react-native.config.js +21 -0
  78. package/lib/typescript/__tests__/utils/string.test.d.ts +2 -0
  79. package/lib/typescript/__tests__/utils/string.test.d.ts.map +1 -0
  80. package/package.json +3 -2
  81. package/lib/module/__mock__/jestSetupFile.js +0 -2
  82. package/lib/module/__mock__/jestSetupFile.js.map +0 -1
  83. package/lib/module/__mock__/rnpack-utils-mock.js +0 -23
  84. package/lib/module/__mock__/rnpack-utils-mock.js.map +0 -1
  85. /package/{src/__mock__ → __mocks__}/jestSetupFile.js +0 -0
  86. /package/{src/__mock__ → __mocks__}/rnpack-utils-mock.js +0 -0
@@ -0,0 +1,47 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ glog_config = get_glog_config()
7
+ glog_git_url = glog_config[:git]
8
+
9
+ Pod::Spec.new do |spec|
10
+ spec.name = 'glog'
11
+ spec.version = '0.3.5'
12
+ spec.license = { :type => 'Google', :file => 'COPYING' }
13
+ spec.homepage = 'https://github.com/google/glog'
14
+ spec.summary = 'Google logging module'
15
+ spec.authors = 'Google'
16
+
17
+ spec.prepare_command = File.read("../scripts/ios-configure-glog.sh")
18
+ spec.source = { :git => glog_git_url,
19
+ :tag => "v#{spec.version}" }
20
+ spec.module_name = 'glog'
21
+ spec.header_dir = 'glog'
22
+ spec.source_files = 'src/glog/*.h',
23
+ 'src/demangle.cc',
24
+ 'src/logging.cc',
25
+ 'src/raw_logging.cc',
26
+ 'src/signalhandler.cc',
27
+ 'src/symbolize.cc',
28
+ 'src/utilities.cc',
29
+ 'src/vlog_is_on.cc'
30
+ # workaround for https://github.com/facebook/react-native/issues/14326
31
+ spec.preserve_paths = 'src/*.h',
32
+ 'src/base/*.h'
33
+ spec.exclude_files = "src/windows/**/*"
34
+ spec.compiler_flags = '-Wno-shorten-64-to-32'
35
+ spec.resource_bundles = {'glog_privacy' => 'glog/PrivacyInfo.xcprivacy'}
36
+
37
+ spec.pod_target_xcconfig = {
38
+ "USE_HEADERMAP" => "NO",
39
+ "HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)/src",
40
+ "DEFINES_MODULE" => "YES",
41
+ "GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" # Disable warnings because we don't control this library
42
+ }
43
+
44
+ # Pinning to the same version as React.podspec.
45
+ spec.platforms = min_supported_versions
46
+
47
+ end
@@ -0,0 +1,90 @@
1
+ require "json"
2
+ require "./nitro_pod_utils"
3
+
4
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
5
+
6
+ Pod::UI.puts "[NitroModules] 🔥 Your app is boosted by nitro modules!"
7
+
8
+ Pod::Spec.new do |s|
9
+ s.name = "NitroModules"
10
+ s.version = package["version"]
11
+ s.summary = package["description"]
12
+ s.homepage = package["homepage"]
13
+ s.license = package["license"]
14
+ s.authors = package["author"]
15
+ s.source = { :git => "https://github.com/mrousavy/nitro.git", :tag => "#{s.version}" }
16
+ s.platforms = {
17
+ :ios => min_ios_version_supported,
18
+ :visionos => 1.0,
19
+ :macos => 10.13,
20
+ :tvos => 13.4,
21
+ }
22
+
23
+ s.source_files = [
24
+ # Shared C++ codebase
25
+ "cpp/**/*.{h,hpp}",
26
+ "cpp/**/*.{c,cpp}",
27
+ # iOS codebase
28
+ "ios/**/*.{h,hpp}",
29
+ "ios/**/*.{c,cpp}",
30
+ "ios/**/*.{m,mm}",
31
+ "ios/**/*.swift",
32
+ ]
33
+ s.public_header_files = [
34
+ # Public C++ headers will be exposed in modulemap (for Swift)
35
+ "cpp/core/AnyMap.hpp",
36
+ "cpp/core/ArrayBuffer.hpp",
37
+ "cpp/core/HybridObject.hpp",
38
+ "cpp/core/Null.hpp",
39
+ "cpp/core/Promise.hpp",
40
+ "cpp/entrypoint/HybridNitroModulesProxy.hpp",
41
+ "cpp/entrypoint/InstallNitro.hpp",
42
+ "cpp/registry/HybridObjectRegistry.hpp",
43
+ "cpp/jsi/JSIConverter.hpp",
44
+ "cpp/jsi/JSIHelpers.hpp",
45
+ "cpp/platform/NitroLogger.hpp",
46
+ "cpp/threading/Dispatcher.hpp",
47
+ "cpp/utils/JSCallback.hpp",
48
+ "cpp/utils/FastVectorCopy.hpp",
49
+ "cpp/utils/NitroHash.hpp",
50
+ "cpp/utils/NitroDefines.hpp",
51
+ "cpp/views/CachedProp.hpp",
52
+ # Public iOS-specific headers that will be exposed in modulemap (for Swift)
53
+ "ios/core/ArrayBufferHolder.hpp",
54
+ "ios/core/PromiseHolder.hpp",
55
+ "ios/utils/AnyMapUtils.hpp",
56
+ "ios/utils/AnyMapHolder.hpp", # <-- deprecated, removed soon
57
+ "ios/utils/Result.hpp",
58
+ "ios/utils/DateToChronoDate.hpp",
59
+ "ios/utils/RuntimeError.hpp",
60
+ "ios/utils/SwiftClosure.hpp",
61
+ ]
62
+
63
+ xcconfig = {
64
+ # Use C++ 20
65
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
66
+ # Enables C++ <-> Swift interop (by default it's only C)
67
+ "SWIFT_OBJC_INTEROP_MODE" => "objcxx",
68
+ # Enables stricter modular headers
69
+ "DEFINES_MODULE" => "YES",
70
+ }
71
+
72
+ if has_react_native()
73
+ react_native_version = get_react_native_version()
74
+ if (react_native_version < 80)
75
+ # C++ compiler flags, for folly when building as static framework:
76
+ current_header_search_paths = Array(xcconfig["HEADER_SEARCH_PATHS"])
77
+ xcconfig["HEADER_SEARCH_PATHS"] = current_header_search_paths + ["${PODS_ROOT}/RCT-Folly"]
78
+ xcconfig["GCC_PREPROCESSOR_DEFINITIONS"] = "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES"
79
+ xcconfig["OTHER_CPLUSPLUSFLAGS"] = "$(inherited) -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1"
80
+ end
81
+ end
82
+
83
+ s.pod_target_xcconfig = xcconfig
84
+
85
+ # Nitro depends on JSI.
86
+ s.dependency 'React-jsi'
87
+ # For React Native, we implement nitro::Dispatcher using react::CallInvoker
88
+ s.dependency 'React-callinvoker'
89
+ install_modules_dependencies(s)
90
+ end
@@ -0,0 +1,16 @@
1
+ // https://github.com/react-native-community/cli/blob/main/docs/dependencies.md
2
+
3
+ module.exports = {
4
+ dependency: {
5
+ platforms: {
6
+ /**
7
+ * @type {import('@react-native-community/cli-types').IOSDependencyParams}
8
+ */
9
+ ios: {},
10
+ /**
11
+ * @type {import('@react-native-community/cli-types').AndroidDependencyParams}
12
+ */
13
+ android: {},
14
+ },
15
+ },
16
+ }
@@ -0,0 +1,21 @@
1
+ const path = require('path');
2
+ const pkg = require('../package.json');
3
+
4
+ module.exports = {
5
+ project: {
6
+ ios: {
7
+ automaticPodsInstallation: true,
8
+ },
9
+ },
10
+ dependencies: {
11
+ [pkg.name]: {
12
+ root: path.join(__dirname, '..'),
13
+ platforms: {
14
+ // Codegen script incorrectly fails without this
15
+ // So we explicitly specify the platforms with empty object
16
+ ios: {},
17
+ android: {},
18
+ },
19
+ },
20
+ },
21
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=string.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/utils/string.test.tsx"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnpack/utils",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Basic utilities will be available and ready to use",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -22,6 +22,7 @@
22
22
  "nitro.json",
23
23
  "*.podspec",
24
24
  "react-native.config.js",
25
+ "__mocks__",
25
26
  "!ios/build",
26
27
  "!android/build",
27
28
  "!android/gradle",
@@ -30,7 +31,7 @@
30
31
  "!android/local.properties",
31
32
  "!**/__tests__",
32
33
  "!**/__fixtures__",
33
- "!**/__mocks__",
34
+ "**/__mocks__",
34
35
  "!**/.*"
35
36
  ],
36
37
  "scripts": {
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=jestSetupFile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["__mock__/jestSetupFile.js"],"mappings":"","ignoreList":[]}
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- module.exports = {
4
- NitroModules: {
5
- createHybridObject: () => ({
6
- init: () => {},
7
- add: () => {},
8
- createHybridNavigationBar: () => {},
9
- createHybridStatusBar: () => ({})
10
- })
11
- },
12
- responsive: {
13
- size: () => Number,
14
- height: () => Number
15
- },
16
- mergeObjects: (obj1, obj2) => ({
17
- ...obj1,
18
- ...obj2
19
- }),
20
- isNotEmpty: () => Boolean,
21
- isEmpty: () => Boolean
22
- };
23
- //# sourceMappingURL=rnpack-utils-mock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["module","exports","NitroModules","createHybridObject","init","add","createHybridNavigationBar","createHybridStatusBar","responsive","size","Number","height","mergeObjects","obj1","obj2","isNotEmpty","Boolean","isEmpty"],"sourceRoot":"../../../src","sources":["__mock__/rnpack-utils-mock.js"],"mappings":";;AAAAA,MAAM,CAACC,OAAO,GAAG;EACfC,YAAY,EAAE;IACZC,kBAAkB,EAAEA,CAAA,MAAO;MACzBC,IAAI,EAAEA,CAAA,KAAM,CAAC,CAAC;MACdC,GAAG,EAAEA,CAAA,KAAM,CAAC,CAAC;MACbC,yBAAyB,EAAEA,CAAA,KAAM,CAAC,CAAC;MACnCC,qBAAqB,EAAEA,CAAA,MAAO,CAAC,CAAC;IAClC,CAAC;EACH,CAAC;EACDC,UAAU,EAAE;IACVC,IAAI,EAAEA,CAAA,KAAMC,MAAM;IAClBC,MAAM,EAAEA,CAAA,KAAMD;EAChB,CAAC;EACDE,YAAY,EAAEA,CAACC,IAAI,EAAEC,IAAI,MAAM;IAAE,GAAGD,IAAI;IAAE,GAAGC;EAAK,CAAC,CAAC;EACpDC,UAAU,EAAEA,CAAA,KAAMC,OAAO;EACzBC,OAAO,EAAEA,CAAA,KAAMD;AACjB,CAAC","ignoreList":[]}
File without changes