Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 10 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
{
"name": "react-native-vosk",
"version": "2.1.1",
"version": "2.1.2",
"description": "Speech recognition module for react native using Vosk library",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
"exports": {
".": {
"source": "./src/index.tsx",
"types": "./lib/typescript/src/index.d.ts",
"default": "./lib/module/index.js"
},
"./plugin": {
"default": "./plugin/withVosk.js"
},
"./package.json": "./package.json"
},
"types": "lib/typescript/src/index.d.ts",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
"react-native": "src/index.ts",

Copilot AI Sep 11, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The react-native field points to 'src/index.ts' but the main source file is 'src/index.tsx' (as seen in the build configuration). This mismatch could cause module resolution issues in React Native projects.

Suggested change
"react-native": "src/index.ts",
"react-native": "src/index.tsx",

Copilot uses AI. Check for mistakes.
"files": [
"src",
"lib",
"android",
"ios",
"plugin",
"plugin/build",

Copilot AI Sep 11, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The files array references 'plugin/build' but there's no indication this directory exists or will be created during the build process. This could cause the plugin to be missing from published packages. Verify that the plugin build process creates this directory or change back to 'plugin' to include the source files.

Suggested change
"plugin/build",
"plugin",

Copilot uses AI. Check for mistakes.
"cpp",
"app.plugin.js",
"*.podspec",
Expand Down Expand Up @@ -85,7 +76,7 @@
"del-cli": "^6.0.0",
"eslint": "^9.35.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jest": "latest",
"eslint-plugin-jest": "^29.0.1",
"eslint-plugin-prettier": "^5.5.4",
"expo-module-scripts": "^5.0.7",
"jest": "^29.7.0",
Expand Down Expand Up @@ -150,18 +141,9 @@
"source": "src",
"output": "lib",
"targets": [
[
"module",
{
"esm": true
}
],
[
"typescript",
{
"project": "tsconfig.build.json"
}
]
"module",
"commonjs",
"typescript"
]
},
"codegenConfig": {
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/withVosk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type VoskPluginProps = {
};

const withVosk: ConfigPlugin<VoskPluginProps | void> = (config, props) => {
const { models = [], iOSMicrophonePermission } = props as VoskPluginProps;
const { models = [], iOSMicrophonePermission } = props ?? {};

// iOS: add microphone permission string
if (iOSMicrophonePermission) {
Expand Down
File renamed without changes.
Loading