vxrn 2.11.1 → 2.11.2
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/dist/exports/prebuildWithoutExpo.mjs +1 -0
- package/dist/exports/prebuildWithoutExpo.mjs.map +1 -1
- package/dist/exports/prebuildWithoutExpo.native.js +1 -0
- package/dist/exports/prebuildWithoutExpo.native.js.map +1 -1
- package/expo-plugin.cjs +1 -0
- package/native-project-patches.cjs +41 -0
- package/package.json +12 -12
- package/src/exports/prebuildWithoutExpo.test.ts +2 -2
- package/src/exports/prebuildWithoutExpo.ts +2 -0
- package/types/exports/prebuildWithoutExpo.d.ts.map +1 -1
package/expo-plugin.cjs
CHANGED
|
@@ -924,6 +924,7 @@ extern void OneSwiftRegisterPackage(const char *name, int (*entry)(int, char **)
|
|
|
924
924
|
let podfile = fs.readFileSync(podfilePath, 'utf8')
|
|
925
925
|
podfile = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(podfile)
|
|
926
926
|
podfile = nativeProjectPatches.injectWebGPUHeaderPathsIntoPodfile(podfile)
|
|
927
|
+
podfile = nativeProjectPatches.injectSkiaDawnVendoringIntoPodfile(podfile)
|
|
927
928
|
podfile = nativeProjectPatches.injectHermesMinificationPatchIntoPodfile(podfile)
|
|
928
929
|
podfile = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(podfile)
|
|
929
930
|
if (nativeProjectPatches.hasNitroWebImage(projectRoot)) {
|
|
@@ -68,6 +68,46 @@ function injectNitroWebImageModularHeaderIntoPodfile(podfile) {
|
|
|
68
68
|
*/
|
|
69
69
|
const FMT_CXX17_MARKER = '# [vxrn/one] fmt c++17 fix'
|
|
70
70
|
|
|
71
|
+
const SKIA_DAWN_MARKER = '# [vxrn/one] react-native-skia dawn'
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* react-native-skia 3 takes dawn from react-native-webgpu whenever node
|
|
75
|
+
* resolution finds that package instead of vendoring its own. a hoisted
|
|
76
|
+
* workspace install finds it even for an app that never links webgpu, which
|
|
77
|
+
* then fails on a dawn version mismatch or links no dawn at all. autolinking
|
|
78
|
+
* evaluates the skia podspec inside use_native_modules!, so the Podfile reads
|
|
79
|
+
* the modules its config command links first, and has skia vendor dawn
|
|
80
|
+
* through the RNSKIA_VENDOR_DAWN switch its podspec reads when webgpu is not
|
|
81
|
+
* among them.
|
|
82
|
+
*/
|
|
83
|
+
function injectSkiaDawnVendoringIntoPodfile(podfile) {
|
|
84
|
+
if (podfile.includes(SKIA_DAWN_MARKER)) return podfile
|
|
85
|
+
// a bare call runs autolinking's own default command
|
|
86
|
+
const anchor = /^(\s*config = use_native_modules!)(?:\((.*)\))?$/m
|
|
87
|
+
if (!anchor.test(podfile))
|
|
88
|
+
throw new Error('[vxrn] Podfile lost its use_native_modules! anchor')
|
|
89
|
+
const helper = [
|
|
90
|
+
SKIA_DAWN_MARKER,
|
|
91
|
+
"require 'json'",
|
|
92
|
+
'def vxrn_skia_dawn_config(config_command)',
|
|
93
|
+
' json, _, status = Pod::Executable.capture_command(config_command[0], config_command[1..], capture: :both)',
|
|
94
|
+
' if status.success?',
|
|
95
|
+
" linked = JSON.parse(json)['dependencies'] || {}",
|
|
96
|
+
" ENV['RNSKIA_VENDOR_DAWN'] ||= '1' unless linked.key?('react-native-webgpu')",
|
|
97
|
+
' end',
|
|
98
|
+
' config_command',
|
|
99
|
+
'end',
|
|
100
|
+
'',
|
|
101
|
+
].join('\n')
|
|
102
|
+
return (
|
|
103
|
+
helper +
|
|
104
|
+
podfile.replace(
|
|
105
|
+
anchor,
|
|
106
|
+
(_, call, command = '$default_command') => `${call}(vxrn_skia_dawn_config(${command}))`
|
|
107
|
+
)
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
|
|
71
111
|
const WEBGPU_HEADERS_MARKER = '# [vxrn/one] webgpu isolated package headers'
|
|
72
112
|
|
|
73
113
|
function injectWebGPUHeaderPathsIntoPodfile(podfile) {
|
|
@@ -788,6 +828,7 @@ function holdLaunchScreenInMainActivity(mainActivity) {
|
|
|
788
828
|
}
|
|
789
829
|
|
|
790
830
|
module.exports = {
|
|
831
|
+
injectSkiaDawnVendoringIntoPodfile,
|
|
791
832
|
injectWebGPUHeaderPathsIntoPodfile,
|
|
792
833
|
holdLaunchScreenInMainActivity,
|
|
793
834
|
ONE_NOTIFICATIONS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxrn",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -80,14 +80,14 @@
|
|
|
80
80
|
"@react-native-community/cli": "^20.2.0",
|
|
81
81
|
"@react-native-community/cli-config": "^20.2.0",
|
|
82
82
|
"@react-native/dev-middleware": "^0.88.0",
|
|
83
|
-
"@vxrn/compiler": "2.11.
|
|
84
|
-
"@vxrn/debug": "2.11.
|
|
85
|
-
"@vxrn/query-string": "2.11.
|
|
86
|
-
"@vxrn/resolve": "2.11.
|
|
87
|
-
"@vxrn/url-parse": "2.11.
|
|
88
|
-
"@vxrn/utils": "2.11.
|
|
89
|
-
"@vxrn/vendor": "2.11.
|
|
90
|
-
"@vxrn/vite-flow": "2.11.
|
|
83
|
+
"@vxrn/compiler": "2.11.2",
|
|
84
|
+
"@vxrn/debug": "2.11.2",
|
|
85
|
+
"@vxrn/query-string": "2.11.2",
|
|
86
|
+
"@vxrn/resolve": "2.11.2",
|
|
87
|
+
"@vxrn/url-parse": "2.11.2",
|
|
88
|
+
"@vxrn/utils": "2.11.2",
|
|
89
|
+
"@vxrn/vendor": "2.11.2",
|
|
90
|
+
"@vxrn/vite-flow": "2.11.2",
|
|
91
91
|
"citty": "^0.1.6",
|
|
92
92
|
"dotenv": "^17.2.1",
|
|
93
93
|
"dotenv-expand": "^12.0.2",
|
|
@@ -127,20 +127,20 @@
|
|
|
127
127
|
"react-native": "0.88.0",
|
|
128
128
|
"typescript": "7.0.2",
|
|
129
129
|
"vitest": "^4.1.0",
|
|
130
|
-
"@vxrn/vite-plugin-metro": "2.11.
|
|
130
|
+
"@vxrn/vite-plugin-metro": "2.11.2"
|
|
131
131
|
},
|
|
132
132
|
"publishConfig": {
|
|
133
133
|
"access": "public"
|
|
134
134
|
},
|
|
135
135
|
"peerDependencies": {
|
|
136
|
-
"@vxrn/vite-plugin-metro": "2.11.
|
|
136
|
+
"@vxrn/vite-plugin-metro": "2.11.2"
|
|
137
137
|
},
|
|
138
138
|
"peerDependenciesMeta": {
|
|
139
139
|
"@vxrn/vite-plugin-metro": {
|
|
140
140
|
"optional": true
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
"releaseSourceCommit": "
|
|
143
|
+
"releaseSourceCommit": "6c1420ae008fbd7ddcf7c4d36df8eeb10b27f0cb",
|
|
144
144
|
"repository": {
|
|
145
145
|
"type": "git",
|
|
146
146
|
"url": "git+https://github.com/onejs/one.git",
|
|
@@ -235,7 +235,7 @@ ${APP_DELEGATE_PBXPROJ}`,
|
|
|
235
235
|
})
|
|
236
236
|
expect(podfile.content).toContain("platform :ios, '17.0'")
|
|
237
237
|
expect(podfile.content).toContain(
|
|
238
|
-
`config = use_native_modules!(['node', '-e', "process.argv=['', '', 'config'];require(require('module').createRequire(require.resolve('vxrn/package.json')).resolve('@react-native-community/cli')).run()"])`
|
|
238
|
+
`config = use_native_modules!(vxrn_skia_dawn_config(['node', '-e', "process.argv=['', '', 'config'];require(require('module').createRequire(require.resolve('vxrn/package.json')).resolve('@react-native-community/cli')).run()"]))`
|
|
239
239
|
)
|
|
240
240
|
expect(podfile.content).toContain(
|
|
241
241
|
" # [vxrn/one] nitro web image modular header\n pod 'SDWebImage', :modular_headers => true\n # [vxrn/one] swift packages\n Dir[File.join(__dir__, 'OneSwiftPackages'"
|
|
@@ -1086,7 +1086,7 @@ extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autoli
|
|
|
1086
1086
|
app,
|
|
1087
1087
|
})
|
|
1088
1088
|
const podScript = podfile.content?.match(
|
|
1089
|
-
/use_native_modules!\(\['node', '-e', "([^"\n]+)"\]\)/
|
|
1089
|
+
/use_native_modules!\(vxrn_skia_dawn_config\(\['node', '-e', "([^"\n]+)"\]\)\)/
|
|
1090
1090
|
)?.[1]
|
|
1091
1091
|
if (!podScript) throw new Error('expected iOS pod discovery command')
|
|
1092
1092
|
expect(
|
|
@@ -45,6 +45,7 @@ type NativeProjectPatches = {
|
|
|
45
45
|
): string
|
|
46
46
|
injectFmtCxx17FixIntoPodfile(input: string): string
|
|
47
47
|
injectWebGPUHeaderPathsIntoPodfile(input: string): string
|
|
48
|
+
injectSkiaDawnVendoringIntoPodfile(input: string): string
|
|
48
49
|
injectOneSwiftPackagesIntoPodfile(input: string): string
|
|
49
50
|
injectHermesMinificationPatchIntoPodfile(input: string): string
|
|
50
51
|
injectReactNativeScreensGammaIntoPodfile(input: string): string
|
|
@@ -2942,6 +2943,7 @@ end`
|
|
|
2942
2943
|
nativeModulesCall,
|
|
2943
2944
|
`config = use_native_modules!(['node', '-e', "process.argv=['', '', 'config'];require(require('module').createRequire(require.resolve('vxrn/package.json')).resolve('@react-native-community/cli')).run()"])`
|
|
2944
2945
|
)
|
|
2946
|
+
rendered = nativeProjectPatches.injectSkiaDawnVendoringIntoPodfile(rendered)
|
|
2945
2947
|
if (
|
|
2946
2948
|
!rendered.includes('[vxrn/one] fmt c++17 fix') ||
|
|
2947
2949
|
!rendered.includes('[vxrn/one] minify iOS Hermes Release bundle input')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuildWithoutExpo.d.ts","sourceRoot":"","sources":["../../src/exports/prebuildWithoutExpo.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,iBAAiB,EAEjB,KAAK,iBAAiB,EAEvB,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"prebuildWithoutExpo.d.ts","sourceRoot":"","s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