@siteed/expo-audio-studio 2.8.1 → 2.8.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/CHANGELOG.md CHANGED
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  ## [Unreleased]
9
9
 
10
10
 
11
+ ## [2.8.2] - 2025-05-06
12
+ ### Changed
13
+ - chore(expo-audio-studio): update TypeScript configurations for dual module support and enhance CommonJS compatibility ([7377a5f](https://github.com/deeeed/expo-audio-stream/commit/7377a5fd3925a21d8628eb31b64c8c65102a1713))
14
+ - chore(expo-audio-studio): release @siteed/expo-audio-studio@2.8.1 ([78721e4](https://github.com/deeeed/expo-audio-stream/commit/78721e41bbc9e4e999118474c887cca7b5420915))
11
15
  ## [2.8.1] - 2025-05-06
12
16
  ### Changed
13
17
  - feat(expo-audio-studio): implement dual module format (ESM/CommonJS) to resolve module resolution issues (#235) ([58c5a94](https://github.com/deeeed/expo-audio-stream/commit/58c5a94ecf2fdcefa554b2f8664743730001e6d8))
@@ -226,7 +230,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
226
230
  - Feature: Audio features extraction during recording.
227
231
  - Feature: Consistent WAV PCM recording format across all platforms.
228
232
 
229
- [unreleased]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.8.1...HEAD
233
+ [unreleased]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.8.2...HEAD
234
+ [2.8.2]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.8.1...@siteed/expo-audio-studio@2.8.2
230
235
  [2.8.1]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.8.0...@siteed/expo-audio-studio@2.8.1
231
236
  [2.8.0]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.7.0...@siteed/expo-audio-studio@2.8.0
232
237
  [2.7.0]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.6.3...@siteed/expo-audio-studio@2.7.0
package/app.plugin.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // This is a CommonJS file (.cjs) which loads the plugin configuration
2
2
  try {
3
3
  // Export the plugin from its CommonJS build
4
- module.exports = require('./plugin/build/index.cjs')
4
+ module.exports = require('./plugin/build/cjs/index.js')
5
5
  } catch (error) {
6
6
  console.error(
7
7
  '[@siteed/expo-audio-studio] Plugin loading error:',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siteed/expo-audio-studio",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Comprehensive audio processing library for React Native and Expo with recording, analysis, visualization, and streaming capabilities across iOS, Android, and web",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -83,8 +83,9 @@
83
83
  "build:cjs": "tsc -p tsconfig.cjs.json",
84
84
  "build:esm": "tsc -p tsconfig.esm.json",
85
85
  "build:types": "tsc -p tsconfig.types.json",
86
- "build:plugin": "tsc --build plugin/tsconfig.json && npm run build:plugin:cjs",
87
- "build:plugin:cjs": "node -e \"const fs=require('fs');const path=require('path');const content=fs.readFileSync('./plugin/build/index.js','utf8').replace(/export default/,'module.exports =');fs.writeFileSync('./plugin/build/index.cjs',content);\"",
86
+ "build:plugin": "rimraf plugin/build && npm run build:plugin:esm && npm run build:plugin:cjs && node ./post-build.js",
87
+ "build:plugin:esm": "tsc -p plugin/tsconfig.esm.json",
88
+ "build:plugin:cjs": "tsc -p plugin/tsconfig.cjs.json",
88
89
  "build:plugin:dev": "expo-module build plugin",
89
90
  "build:dev": "expo-module build",
90
91
  "clean": "expo-module clean && rimraf build plugin/build",
@@ -189,4 +189,5 @@ const withRecordingPermission = (config, props) => {
189
189
  debugLog('✨ Recording Permissions Plugin configuration completed');
190
190
  return config;
191
191
  };
192
- exports.default = withRecordingPermission;
192
+ // Export as default
193
+ module.exports = withRecordingPermission;
@@ -1,6 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const config_plugins_1 = require("@expo/config-plugins");
1
+ import { withAndroidManifest, withInfoPlist, AndroidConfig, } from '@expo/config-plugins';
4
2
  const MICROPHONE_USAGE = 'Allow $(PRODUCT_NAME) to access your microphone';
5
3
  const NOTIFICATION_USAGE = 'Show recording notifications and controls';
6
4
  const LOG_PREFIX = '[@siteed/expo-audio-studio]';
@@ -30,7 +28,7 @@ const withRecordingPermission = (config, props) => {
30
28
  const { enablePhoneStateHandling, enableNotifications, enableBackgroundAudio, } = options;
31
29
  debugLog('📱 Configuring Recording Permissions Plugin...', options);
32
30
  // iOS Configuration
33
- config = (0, config_plugins_1.withInfoPlist)(config, (config) => {
31
+ config = withInfoPlist(config, (config) => {
34
32
  // Always set the microphone usage description from options first
35
33
  config.modResults['NSMicrophoneUsageDescription'] =
36
34
  options.iosConfig?.microphoneUsageDescription ||
@@ -107,7 +105,7 @@ const withRecordingPermission = (config, props) => {
107
105
  return config;
108
106
  });
109
107
  // Android Configuration
110
- config = (0, config_plugins_1.withAndroidManifest)(config, (config) => {
108
+ config = withAndroidManifest(config, (config) => {
111
109
  const basePermissions = [
112
110
  'android.permission.RECORD_AUDIO',
113
111
  'android.permission.WAKE_LOCK',
@@ -121,7 +119,7 @@ const withRecordingPermission = (config, props) => {
121
119
  const permissionsToAdd = [...basePermissions, ...optionalPermissions];
122
120
  debugLog('📋 Existing Android permissions:', config.modResults.manifest['uses-permission']?.map((p) => p.$?.['android:name']) || []);
123
121
  debugLog('➕ Adding Android permissions:', permissionsToAdd);
124
- const { addPermission } = config_plugins_1.AndroidConfig.Permissions;
122
+ const { addPermission } = AndroidConfig.Permissions;
125
123
  // Add each permission only if it doesn't exist
126
124
  permissionsToAdd.forEach((permission) => {
127
125
  const existingPermission = config.modResults.manifest['uses-permission']?.find((p) => p.$?.['android:name'] === permission);
@@ -189,4 +187,5 @@ const withRecordingPermission = (config, props) => {
189
187
  debugLog('✨ Recording Permissions Plugin configuration completed');
190
188
  return config;
191
189
  };
192
- exports.default = withRecordingPermission;
190
+ // Export as default
191
+ export default withRecordingPermission;
@@ -278,4 +278,5 @@ const withRecordingPermission: ConfigPlugin<AudioStreamPluginOptions> = (
278
278
  return config as any
279
279
  }
280
280
 
281
+ // Export as default
281
282
  export default withRecordingPermission
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "CommonJS",
5
+ "moduleResolution": "node",
6
+ "target": "ES2020",
7
+ "esModuleInterop": true,
8
+ "outDir": "build/cjs",
9
+ "declaration": false
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "ESNext",
5
+ "moduleResolution": "node",
6
+ "target": "ES2020",
7
+ "outDir": "build/esm",
8
+ "declaration": true,
9
+ "declarationDir": "build/types"
10
+ }
11
+ }
File without changes