react-native-worklets 0.11.0 → 0.12.0-nightly-20260716-d88c1b086
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/android/build.gradle.kts +19 -5
- package/compatibility.json +4 -1
- package/lib/module/debug/jsVersion.js +1 -1
- package/lib/module/debug/jsVersion.js.map +1 -1
- package/lib/typescript/debug/jsVersion.d.ts +1 -1
- package/lib/typescript/debug/jsVersion.d.ts.map +1 -1
- package/package.json +5 -5
- package/plugin/index.js +26 -0
- package/src/debug/jsVersion.ts +1 -1
package/android/build.gradle.kts
CHANGED
|
@@ -8,7 +8,21 @@ plugins {
|
|
|
8
8
|
id("com.android.library")
|
|
9
9
|
id("maven-publish")
|
|
10
10
|
id("com.diffplug.spotless") version "8.1.0"
|
|
11
|
-
id("org.jetbrains.kotlin.android")
|
|
11
|
+
id("org.jetbrains.kotlin.android") apply false
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
fun shouldApplyKotlinAndroidPlugin(): Boolean {
|
|
15
|
+
val agpMajorVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.substringBefore('.').toInt()
|
|
16
|
+
if (agpMajorVersion <= 8) {
|
|
17
|
+
return true
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
val builtInKotlin = providers.gradleProperty("android.builtInKotlin").orNull?.toBoolean() ?: true
|
|
21
|
+
return !builtInKotlin
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (shouldApplyKotlinAndroidPlugin()) {
|
|
25
|
+
apply(plugin = "org.jetbrains.kotlin.android")
|
|
12
26
|
}
|
|
13
27
|
|
|
14
28
|
fun safeExtGet(prop: String, fallback: Any?): Any? =
|
|
@@ -274,11 +288,11 @@ android {
|
|
|
274
288
|
|
|
275
289
|
sourceSets {
|
|
276
290
|
getByName("main") {
|
|
277
|
-
|
|
291
|
+
kotlin {
|
|
278
292
|
if (FETCH_PREVIEW_ENABLED) {
|
|
279
|
-
|
|
293
|
+
directories.add("src/networking")
|
|
280
294
|
} else {
|
|
281
|
-
|
|
295
|
+
directories.add("src/no-networking")
|
|
282
296
|
}
|
|
283
297
|
}
|
|
284
298
|
}
|
|
@@ -290,7 +304,7 @@ android {
|
|
|
290
304
|
}
|
|
291
305
|
|
|
292
306
|
if (project != rootProject) {
|
|
293
|
-
kotlin {
|
|
307
|
+
extensions.configure<org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension> {
|
|
294
308
|
compilerOptions {
|
|
295
309
|
jvmTarget = JvmTarget.fromTarget("17")
|
|
296
310
|
}
|
package/compatibility.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"nightly": {
|
|
3
|
-
"react-native": ["0.83", "0.84", "0.85", "0.86"]
|
|
3
|
+
"react-native": ["0.83", "0.84", "0.85", "0.86", "0.87"]
|
|
4
|
+
},
|
|
5
|
+
"0.12.x": {
|
|
6
|
+
"react-native": ["0.83", "0.84", "0.85", "0.86", "0.87"]
|
|
4
7
|
},
|
|
5
8
|
"0.11.x": {
|
|
6
9
|
"react-native": ["0.83", "0.84", "0.85", "0.86"]
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* version used to build the native part of the library in runtime. Remember to
|
|
6
6
|
* keep this in sync with the version declared in `package.json`
|
|
7
7
|
*/
|
|
8
|
-
export const jsVersion = '0.
|
|
8
|
+
export const jsVersion = '0.12.0-nightly-20260716-d88c1b086';
|
|
9
9
|
//# sourceMappingURL=jsVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["jsVersion"],"sourceRoot":"../../../src","sources":["debug/jsVersion.ts"],"mappings":"AAAA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,GAAG,
|
|
1
|
+
{"version":3,"names":["jsVersion"],"sourceRoot":"../../../src","sources":["debug/jsVersion.ts"],"mappings":"AAAA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,GAAG,mCAAmC","ignoreList":[]}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* version used to build the native part of the library in runtime. Remember to
|
|
4
4
|
* keep this in sync with the version declared in `package.json`
|
|
5
5
|
*/
|
|
6
|
-
export declare const jsVersion = "0.
|
|
6
|
+
export declare const jsVersion = "0.12.0-nightly-20260716-d88c1b086";
|
|
7
7
|
//# sourceMappingURL=jsVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsVersion.d.ts","sourceRoot":"","sources":["../../../src/debug/jsVersion.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"jsVersion.d.ts","sourceRoot":"","sources":["../../../src/debug/jsVersion.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,SAAS,sCAAsC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-worklets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-nightly-20260716-d88c1b086",
|
|
4
4
|
"description": "The React Native multithreading library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@babel/core": "*",
|
|
61
61
|
"@react-native/metro-config": "*",
|
|
62
62
|
"react": "*",
|
|
63
|
-
"react-native": "0.83 - 0.
|
|
63
|
+
"react-native": "0.83 - 0.87"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@babel/generator": "^7.27.1",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@babel/cli": "7.28.3",
|
|
83
|
-
"@babel/core": "7.
|
|
83
|
+
"@babel/core": "7.29.6",
|
|
84
84
|
"@react-native-community/cli": "20.1.0",
|
|
85
85
|
"@react-native/eslint-config": "0.83.0",
|
|
86
|
-
"@react-native/jest-preset": "patch:@react-native/jest-preset@npm%3A0.
|
|
86
|
+
"@react-native/jest-preset": "patch:@react-native/jest-preset@npm%3A0.87.0-rc.0#~/.yarn/patches/@react-native-jest-preset-npm-0.87.0-rc.0-63494e1a37.patch",
|
|
87
87
|
"@types/jest": "30.0.0",
|
|
88
88
|
"@types/node": "24.7.0",
|
|
89
89
|
"@types/react": "19.2.2",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"knip": "5.61.3",
|
|
96
96
|
"madge": "8.0.0",
|
|
97
97
|
"react": "19.2.3",
|
|
98
|
-
"react-native": "0.
|
|
98
|
+
"react-native": "0.87.0-rc.0",
|
|
99
99
|
"typescript": "5.9.3"
|
|
100
100
|
},
|
|
101
101
|
"main": "./lib/module/index",
|
package/plugin/index.js
CHANGED
|
@@ -1818,6 +1818,24 @@ var require_class = __commonJS({
|
|
|
1818
1818
|
}
|
|
1819
1819
|
});
|
|
1820
1820
|
|
|
1821
|
+
// lib/classMethod.js
|
|
1822
|
+
var require_classMethod = __commonJS({
|
|
1823
|
+
"lib/classMethod.js"(exports2) {
|
|
1824
|
+
"use strict";
|
|
1825
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1826
|
+
exports2.processIfWorkletMethod = processIfWorkletMethod;
|
|
1827
|
+
var types_12 = require("@babel/types");
|
|
1828
|
+
var assert_1 = require("assert");
|
|
1829
|
+
function processIfWorkletMethod(path) {
|
|
1830
|
+
if (path.node.body.directives.some((d) => d.value.value === "worklet")) {
|
|
1831
|
+
(0, assert_1.strict)((0, types_12.isIdentifier)(path.node.key), "ClassMethod key must be an Identifier");
|
|
1832
|
+
const methodIdentifier = path.node.key;
|
|
1833
|
+
path.replaceWith((0, types_12.classProperty)((0, types_12.cloneNode)(methodIdentifier, true), (0, types_12.functionExpression)((0, types_12.cloneNode)(methodIdentifier, true), path.node.params.filter((p) => (0, types_12.isFunctionParameter)(p)).map((p) => (0, types_12.cloneNode)(p, true)), (0, types_12.cloneNode)(path.node.body, true), path.node.generator, path.node.async)));
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
});
|
|
1838
|
+
|
|
1821
1839
|
// lib/contextObject.js
|
|
1822
1840
|
var require_contextObject = __commonJS({
|
|
1823
1841
|
"lib/contextObject.js"(exports2) {
|
|
@@ -2090,6 +2108,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2090
2108
|
var autoworkletization_1 = require_autoworkletization();
|
|
2091
2109
|
var bundleMode_1 = require_bundleMode();
|
|
2092
2110
|
var class_1 = require_class();
|
|
2111
|
+
var classMethod_1 = require_classMethod();
|
|
2093
2112
|
var contextObject_1 = require_contextObject();
|
|
2094
2113
|
var file_1 = require_file();
|
|
2095
2114
|
var globals_1 = require_globals();
|
|
@@ -2151,6 +2170,13 @@ module.exports = function WorkletsBabelPlugin() {
|
|
|
2151
2170
|
});
|
|
2152
2171
|
}
|
|
2153
2172
|
},
|
|
2173
|
+
ClassMethod: {
|
|
2174
|
+
enter(path, state) {
|
|
2175
|
+
runWithTaggedExceptions(state, () => {
|
|
2176
|
+
(0, classMethod_1.processIfWorkletMethod)(path);
|
|
2177
|
+
});
|
|
2178
|
+
}
|
|
2179
|
+
},
|
|
2154
2180
|
Program: {
|
|
2155
2181
|
enter(path, state) {
|
|
2156
2182
|
runWithTaggedExceptions(state, () => {
|
package/src/debug/jsVersion.ts
CHANGED