react-native-audio-api 0.10.0-nightly-353aaa2-20251023 → 0.10.0-nightly-c815c40-20251025

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-audio-api",
3
- "version": "0.10.0-nightly-353aaa2-20251023",
3
+ "version": "0.10.0-nightly-c815c40-20251025",
4
4
  "description": "react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification",
5
5
  "bin": {
6
6
  "setup-rn-audio-api-web": "./scripts/setup-rn-audio-api-web.js"
@@ -35,6 +35,8 @@
35
35
  "!**/.*",
36
36
  "!**/node_modules",
37
37
  "scripts/setup-rn-audio-api-web.js",
38
+ "scripts/rnaa_utils.rb",
39
+ "scripts/validate-worklets-version.js",
38
40
  "scripts/download-prebuilt-binaries.sh",
39
41
  "app.plugin.js"
40
42
  ],
@@ -0,0 +1,8 @@
1
+ def check_if_worklets_enabled()
2
+ validate_worklets_script = File.expand_path(File.join(__dir__, 'validate-worklets-version.js'))
3
+ unless system("node \"#{validate_worklets_script}\"")
4
+ # If the validation script fails, we assume worklets are not present or have an incompatible version
5
+ return false
6
+ end
7
+ true
8
+ end
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+ const semverPrerelease = require('semver/functions/prerelease');
3
+ const validWorkletsVersions = [
4
+ '0.6.0',
5
+ '0.6.1',
6
+ ];
7
+
8
+ function validateVersion() {
9
+ let workletsVersion;
10
+ try {
11
+ const { version } = require('react-native-worklets/package.json');
12
+ workletsVersion = version;
13
+ } catch (e) {
14
+ return false;
15
+ }
16
+ if (semverPrerelease(workletsVersion)) {
17
+ return true;
18
+ }
19
+
20
+ return validWorkletsVersions.includes(workletsVersion);
21
+ }
22
+
23
+ if (!validateVersion()) {
24
+ console.error(
25
+ 'Incompatible version of react-native-audio-worklets detected. Please install a compatible version.',
26
+ );
27
+ process.exit(1);
28
+ }