{"_id":"@ammarahmed/react-native-workers","_rev":"5-9973ee35acfef1a5f2273895ad041a12","name":"@ammarahmed/react-native-workers","dist-tags":{"alpha":"1.0.0-alpha.1","latest":"1.0.0-alpha.4"},"versions":{"1.0.0-alpha.0":{"name":"@ammarahmed/react-native-workers","version":"1.0.0-alpha.0","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/ammarahm-ed","name":"Ammar Ahmed","email":"ammarahmed6506@gmail.com"},"license":"MIT","_id":"@ammarahmed/react-native-workers@1.0.0-alpha.0","maintainers":[{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"}],"homepage":"https://github.com/ammarahm-ed/ammarahmed-react-native-workers#readme","bugs":{"url":"https://github.com/ammarahm-ed/ammarahmed-react-native-workers/issues"},"bin":{"rn-workers-bundle":"cli/index.js"},"dist":{"shasum":"aa02c6953909932773dd2b886c0bfffc40dd0652","tarball":"https://registry.npmjs.org/@ammarahmed/react-native-workers/-/react-native-workers-1.0.0-alpha.0.tgz","fileCount":165,"integrity":"sha512-QVKTafMuGnPRDNELD87sjpvcoANxWOoMhNPhl55Ds37/kofdBcea2XvqmuJUDW0vjDmBDDiBw6DyjHRzTlZaEA==","signatures":[{"sig":"MEUCIQCP9JdSoB2RiLIlOrwf5wUGXyvYRY9reSVLkz4CXEV0LwIgA/qU256i/f5iwxSl5wbagtIcoORUxy3HoSGt1ko/ZEk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":665691},"jest":{"preset":"@react-native/jest-preset","testEnvironmentOptions":{"customExportConditions":["require","react-native","<%- project.sourceCondition -%>"]},"modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"types":"./lib/typescript/src/index.d.ts","default":"./lib/module/index.js","ammarahmed-react-native-workers-source":"./src/index.tsx"},"./cli":"./cli/index.js","./metro":"./metro/index.js","./plugin":"./plugin/index.js","./scripts/*":"./scripts/*","./package.json":"./package.json","./app.plugin.js":"./app.plugin.js","./android/worker-bundles.gradle":"./android/worker-bundles.gradle"},"gitHead":"4556a7479ba08b145c5f5db3f1d08051cba60b24","scripts":{"web":"vite","lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","matrix":"node scripts/matrix.mjs","example":"yarn workspace @ammarahmed/react-native-workers-example","prepare":"bob build","release":"release-it --only-version","build:web":"vite build","typecheck":"tsc"},"_npmUser":{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/ammarahm-ed/ammarahmed-react-native-workers.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.9.3","description":"React Native Workers Runtime","directories":{},"_nodeVersion":"22.20.0","codegenConfig":{"name":"ReactNativeWorkersSpec","type":"modules","android":{"javaPackageName":"com.ammarahmed.reactnativeworkers"},"jsSrcsDir":"src","outputDir":{"ios":"ios/generated","android":"android/generated"}},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@4.11.0","devDependencies":{"jest":"^29.7.0","react":"19.2.3","turbo":"^2.9.16","eslint":"^9.39.4","del-cli":"^7.0.0","lefthook":"^2.1.9","prettier":"^3.8.3","@eslint/js":"^10.0.1","commitlint":"^21.0.2","release-it":"^20.2.0","typescript":"^6.0.3","@types/react":"^19.2.0","react-native":"0.86.0","@jest/globals":"^29.7.0","@eslint/compat":"^2.1.0","@eslint/eslintrc":"^3.3.5","react-native-web":"~0.21.2","@expo/config-plugins":"~54.0.5","eslint-plugin-ft-flow":"^3.0.11","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","react-native-builder-bob":"^0.43.0","@react-native/jest-preset":"0.86.0","@react-native/babel-preset":"0.86.0","@react-native-community/cli":"20.1.0","@react-native/eslint-config":"0.86.0","@commitlint/config-conventional":"^21.0.2","@release-it/conventional-changelog":"^11.0.1"},"peerDependencies":{"react":">=19.1.0","react-native":">=0.81.4"},"_npmOperationalInternal":{"tmp":"tmp/react-native-workers_1.0.0-alpha.0_1785086535005_0.7738706905897321","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}],"codegen"]},"create-react-native-library":{"type":"turbo-module","tools":["eslint","jest","lefthook","release-it","vite"],"version":"0.63.0","languages":"cpp"}},"1.0.0-alpha.1":{"name":"@ammarahmed/react-native-workers","version":"1.0.0-alpha.1","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/ammarahm-ed","name":"Ammar Ahmed","email":"ammarahmed6506@gmail.com"},"license":"MIT","_id":"@ammarahmed/react-native-workers@1.0.0-alpha.1","maintainers":[{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"}],"homepage":"https://github.com/ammarahm-ed/react-native-workers#readme","bugs":{"url":"https://github.com/ammarahm-ed/react-native-workers/issues"},"bin":{"rn-workers-bundle":"cli/index.js"},"dist":{"shasum":"aa632957fb6a3458e45bf546620ed28091356824","tarball":"https://registry.npmjs.org/@ammarahmed/react-native-workers/-/react-native-workers-1.0.0-alpha.1.tgz","fileCount":165,"integrity":"sha512-gHVk5pWy6dTojCNDiwzy+N5mHboI112eW4K6z2X+29D4rTX0HN/lK5RIGthX8BbgC5B5zk8lc5LGwyqDOrhYlQ==","signatures":[{"sig":"MEQCIGE+RfyqELiNxDa45hJORB1a8XemwQdjzMAWeuhMnakzAiBzgopJGMEWSjACe/4TyRKqQs0+JmuudiCjVIhCQ0T/dg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":665727},"jest":{"preset":"@react-native/jest-preset","testEnvironmentOptions":{"customExportConditions":["require","react-native","<%- project.sourceCondition -%>"]},"modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"types":"./lib/typescript/src/index.d.ts","default":"./lib/module/index.js","ammarahmed-react-native-workers-source":"./src/index.tsx"},"./cli":"./cli/index.js","./metro":"./metro/index.js","./plugin":"./plugin/index.js","./scripts/*":"./scripts/*","./package.json":"./package.json","./app.plugin.js":"./app.plugin.js","./android/worker-bundles.gradle":"./android/worker-bundles.gradle"},"gitHead":"4556a7479ba08b145c5f5db3f1d08051cba60b24","scripts":{"web":"vite","lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","matrix":"node scripts/matrix.mjs","example":"yarn workspace @ammarahmed/react-native-workers-example","prepare":"bob build","release":"release-it --only-version","build:web":"vite build","typecheck":"tsc"},"_npmUser":{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/ammarahm-ed/react-native-workers.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.9.3","description":"React Native Workers Runtime","directories":{},"_nodeVersion":"22.20.0","codegenConfig":{"name":"ReactNativeWorkersSpec","type":"modules","android":{"javaPackageName":"com.ammarahmed.reactnativeworkers"},"jsSrcsDir":"src","outputDir":{"ios":"ios/generated","android":"android/generated"}},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@4.11.0","readmeFilename":"README.md","devDependencies":{"jest":"^29.7.0","react":"19.2.3","turbo":"^2.9.16","eslint":"^9.39.4","del-cli":"^7.0.0","lefthook":"^2.1.9","prettier":"^3.8.3","@eslint/js":"^10.0.1","commitlint":"^21.0.2","release-it":"^20.2.0","typescript":"^6.0.3","@types/react":"^19.2.0","react-native":"0.86.0","@jest/globals":"^29.7.0","@eslint/compat":"^2.1.0","@eslint/eslintrc":"^3.3.5","react-native-web":"~0.21.2","@expo/config-plugins":"~54.0.5","eslint-plugin-ft-flow":"^3.0.11","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","react-native-builder-bob":"^0.43.0","@react-native/jest-preset":"0.86.0","@react-native/babel-preset":"0.86.0","@react-native-community/cli":"20.1.0","@react-native/eslint-config":"0.86.0","@commitlint/config-conventional":"^21.0.2","@release-it/conventional-changelog":"^11.0.1"},"peerDependencies":{"react":">=19.1.0","react-native":">=0.81.4"},"_npmOperationalInternal":{"tmp":"tmp/react-native-workers_1.0.0-alpha.1_1785086876191_0.09409745221053711","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}],"codegen"]},"create-react-native-library":{"type":"turbo-module","tools":["eslint","jest","lefthook","release-it","vite"],"version":"0.63.0","languages":"cpp"}},"1.0.0-alpha.2":{"name":"@ammarahmed/react-native-workers","version":"1.0.0-alpha.2","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/ammarahm-ed","name":"Ammar Ahmed","email":"ammarahmed6506@gmail.com"},"license":"MIT","_id":"@ammarahmed/react-native-workers@1.0.0-alpha.2","maintainers":[{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"}],"homepage":"https://github.com/ammarahm-ed/react-native-workers#readme","bugs":{"url":"https://github.com/ammarahm-ed/react-native-workers/issues"},"bin":{"rn-workers-bundle":"cli/index.js"},"dist":{"shasum":"e52dd826915c2f923038d074f496c3a249fd3bca","tarball":"https://registry.npmjs.org/@ammarahmed/react-native-workers/-/react-native-workers-1.0.0-alpha.2.tgz","fileCount":165,"integrity":"sha512-CsImlLMOx++t8uy1rvfCTfmD1c8b7X5KnKhziBxxlPochHtfJ2ihNfgP2uwuSI9FRC8m/jdW0joXAw5y2lYjYA==","signatures":[{"sig":"MEUCIQDfdGugeT9FMYEC1Fw+Chl1pb7NyAvDu1P/VZjwiATuwQIgMd+dz787zii0PBoGfXAwsKtfR0bRZqcIJFZoAckyAmM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":665727},"jest":{"preset":"@react-native/jest-preset","testEnvironmentOptions":{"customExportConditions":["require","react-native","<%- project.sourceCondition -%>"]},"modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"types":"./lib/typescript/src/index.d.ts","default":"./lib/module/index.js","ammarahmed-react-native-workers-source":"./src/index.tsx"},"./cli":"./cli/index.js","./metro":"./metro/index.js","./plugin":"./plugin/index.js","./scripts/*":"./scripts/*","./package.json":"./package.json","./app.plugin.js":"./app.plugin.js","./android/worker-bundles.gradle":"./android/worker-bundles.gradle"},"gitHead":"361fee20ad7fe52601a89731b997a65266d9d1ab","scripts":{"web":"vite","lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","matrix":"node scripts/matrix.mjs","example":"yarn workspace @ammarahmed/react-native-workers-example","prepare":"bob build","release":"release-it --only-version","build:web":"vite build","typecheck":"tsc"},"_npmUser":{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/ammarahm-ed/react-native-workers.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.9.3","description":"React Native Workers Runtime","directories":{},"_nodeVersion":"22.20.0","codegenConfig":{"name":"ReactNativeWorkersSpec","type":"modules","android":{"javaPackageName":"com.ammarahmed.reactnativeworkers"},"jsSrcsDir":"src","outputDir":{"ios":"ios/generated","android":"android/generated"}},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@4.11.0","devDependencies":{"jest":"^29.7.0","react":"19.2.3","turbo":"^2.9.16","eslint":"^9.39.4","del-cli":"^7.0.0","lefthook":"^2.1.9","prettier":"^3.8.3","@eslint/js":"^10.0.1","commitlint":"^21.0.2","release-it":"^20.2.0","typescript":"^6.0.3","@types/react":"^19.2.0","react-native":"0.86.0","@jest/globals":"^29.7.0","@eslint/compat":"^2.1.0","@eslint/eslintrc":"^3.3.5","react-native-web":"~0.21.2","@expo/config-plugins":"~54.0.5","eslint-plugin-ft-flow":"^3.0.11","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","react-native-builder-bob":"^0.43.0","@react-native/jest-preset":"0.86.0","@react-native/babel-preset":"0.86.0","@react-native-community/cli":"20.1.0","@react-native/eslint-config":"0.86.0","@commitlint/config-conventional":"^21.0.2","@release-it/conventional-changelog":"^11.0.1"},"peerDependencies":{"react":">=19.1.0","react-native":">=0.81.4"},"_npmOperationalInternal":{"tmp":"tmp/react-native-workers_1.0.0-alpha.2_1785087011919_0.32807715938743054","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}],"codegen"]},"create-react-native-library":{"type":"turbo-module","tools":["eslint","jest","lefthook","release-it","vite"],"version":"0.63.0","languages":"cpp"}},"1.0.0-alpha.3":{"name":"@ammarahmed/react-native-workers","version":"1.0.0-alpha.3","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/ammarahm-ed","name":"Ammar Ahmed","email":"ammarahmed6506@gmail.com"},"license":"MIT","_id":"@ammarahmed/react-native-workers@1.0.0-alpha.3","maintainers":[{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"}],"homepage":"https://github.com/ammarahm-ed/react-native-workers#readme","bugs":{"url":"https://github.com/ammarahm-ed/react-native-workers/issues"},"bin":{"rn-workers-bundle":"cli/index.js"},"dist":{"shasum":"350a6754f21b723c87e5e8895a585e191365c159","tarball":"https://registry.npmjs.org/@ammarahmed/react-native-workers/-/react-native-workers-1.0.0-alpha.3.tgz","fileCount":173,"integrity":"sha512-zEdOhne8opD0Lt9xQUwf4VxdwhY23n5qTXAgZap8gayNLfVlt9UopGgopE3euJiAfYYE8QkKmY7YIni5Q1ds6g==","signatures":[{"sig":"MEUCIQDudFhRgO2gkKJtz9NjJMTKwxmmlGFA4LeH08V/Wwy70gIgTsgajpswueJv1oY/ZUHSAqNNK0QZsI3v40xBs8ZBqTo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":838705},"jest":{"preset":"@react-native/jest-preset","testEnvironmentOptions":{"customExportConditions":["require","react-native","<%- project.sourceCondition -%>"]},"modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"types":"./lib/typescript/src/index.d.ts","default":"./lib/module/index.js","ammarahmed-react-native-workers-source":"./src/index.tsx"},"./cli":"./cli/index.js","./metro":"./metro/index.js","./plugin":"./plugin/index.js","./scripts/*":"./scripts/*","./package.json":"./package.json","./app.plugin.js":"./app.plugin.js","./android/worker-bundles.gradle":"./android/worker-bundles.gradle"},"gitHead":"02153ebf9a9549d69d75865b5beccaa089bf1d33","scripts":{"web":"vite","lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","matrix":"node scripts/matrix.mjs","example":"yarn workspace @ammarahmed/react-native-workers-example","prepare":"bob build","release":"release-it --only-version","build:web":"vite build","typecheck":"tsc"},"_npmUser":{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/ammarahm-ed/react-native-workers.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.9.3","description":"React Native Workers Runtime","directories":{},"_nodeVersion":"22.20.0","codegenConfig":{"name":"ReactNativeWorkersSpec","type":"modules","android":{"javaPackageName":"com.ammarahmed.reactnativeworkers"},"jsSrcsDir":"src","outputDir":{"ios":"ios/generated","android":"android/generated"}},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@4.11.0","devDependencies":{"jest":"^29.7.0","react":"19.2.3","turbo":"^2.9.16","eslint":"^9.39.4","del-cli":"^7.0.0","lefthook":"^2.1.9","prettier":"^3.8.3","@eslint/js":"^10.0.1","commitlint":"^21.0.2","release-it":"^20.2.0","typescript":"^6.0.3","@types/react":"^19.2.0","react-native":"0.86.0","@jest/globals":"^29.7.0","@eslint/compat":"^2.1.0","@eslint/eslintrc":"^3.3.5","react-native-web":"~0.21.2","@expo/config-plugins":"~54.0.5","eslint-plugin-ft-flow":"^3.0.11","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","react-native-builder-bob":"^0.43.0","@react-native/jest-preset":"0.86.0","@react-native/babel-preset":"0.86.0","@react-native-community/cli":"20.1.0","@react-native/eslint-config":"0.86.0","@commitlint/config-conventional":"^21.0.2","@release-it/conventional-changelog":"^11.0.1"},"peerDependencies":{"react":">=19.1.0","react-native":">=0.81.4"},"_npmOperationalInternal":{"tmp":"tmp/react-native-workers_1.0.0-alpha.3_1785261924935_0.3966841834796395","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}],"codegen"]},"create-react-native-library":{"type":"turbo-module","tools":["eslint","jest","lefthook","release-it","vite"],"version":"0.63.0","languages":"cpp"}},"1.0.0-alpha.4":{"_id":"@ammarahmed/react-native-workers@1.0.0-alpha.4","bin":{"rn-workers-bundle":"cli/index.js"},"bugs":{"url":"https://github.com/ammarahm-ed/react-native-workers/issues"},"dist":{"shasum":"95f6f6505752f056127d59fa6b0809c194958d29","tarball":"https://registry.npmjs.org/@ammarahmed/react-native-workers/-/react-native-workers-1.0.0-alpha.4.tgz","fileCount":174,"integrity":"sha512-8ksQp6+oZtzXf4En6l7cTTAJJiJlktiyzw3Us1oXmZe9PPmHVEpu9U/cTp9kvnNeuRU17ksVnMu0KOEN1Lecfw==","signatures":[{"sig":"MEQCIAri6Nzr5XeSZlZ5lqPL6Md9bbYMpmt1i/papKnhFvvMAiBvySGpj0TsI2zznFsNawIaHRwha4//8lsi5+Nne8WlTQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC2wAjwfA1Pqiphv3AtnIKt/H5tWrlcVXiZoGvMqMPx4AIgSpaT4lVjCpREbzC70EysgeIv5df+3clllfhXGxTf3DI="}],"unpackedSize":843263},"jest":{"preset":"@react-native/jest-preset","testEnvironmentOptions":{"customExportConditions":["require","react-native","<%- project.sourceCondition -%>"]},"modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","name":"@ammarahmed/react-native-workers","types":"./lib/typescript/src/index.d.ts","author":{"url":"https://github.com/ammarahm-ed","name":"Ammar Ahmed","email":"ammarahmed6506@gmail.com"},"exports":{".":{"types":"./lib/typescript/src/index.d.ts","default":"./lib/module/index.js","ammarahmed-react-native-workers-source":"./src/index.tsx"},"./cli":"./cli/index.js","./metro":"./metro/index.js","./plugin":"./plugin/index.js","./scripts/*":"./scripts/*","./package.json":"./package.json","./app.plugin.js":"./app.plugin.js","./android/worker-bundles.gradle":"./android/worker-bundles.gradle"},"gitHead":"b1080702e3170fbb61626ebb391c10eb8cb37411","license":"MIT","scripts":{"web":"vite","lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","matrix":"node scripts/matrix.mjs","example":"yarn workspace @ammarahmed/react-native-workers-example","prepare":"bob build","release":"release-it --only-version","build:web":"vite build","typecheck":"tsc"},"version":"1.0.0-alpha.4","_npmUser":{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"},"homepage":"https://github.com/ammarahm-ed/react-native-workers#readme","keywords":["react-native","ios","android"],"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/ammarahm-ed/react-native-workers.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.9.3","description":"React Native Workers Runtime","directories":{},"maintainers":[{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"}],"_nodeVersion":"22.20.0","codegenConfig":{"name":"ReactNativeWorkersSpec","type":"modules","android":{"javaPackageName":"com.ammarahmed.reactnativeworkers"},"jsSrcsDir":"src","outputDir":{"ios":"ios/generated","android":"android/generated"}},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@4.11.0","devDependencies":{"jest":"^29.7.0","react":"19.2.3","turbo":"^2.9.16","eslint":"^9.39.4","del-cli":"^7.0.0","lefthook":"^2.1.9","prettier":"^3.8.3","@eslint/js":"^10.0.1","commitlint":"^21.0.2","release-it":"^20.2.0","typescript":"^6.0.3","@types/react":"^19.2.0","react-native":"0.86.0","@jest/globals":"^29.7.0","@eslint/compat":"^2.1.0","@eslint/eslintrc":"^3.3.5","react-native-web":"~0.21.2","@expo/config-plugins":"~54.0.5","eslint-plugin-ft-flow":"^3.0.11","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","react-native-builder-bob":"^0.43.0","@react-native/jest-preset":"0.86.0","@react-native/babel-preset":"0.86.0","@react-native-community/cli":"20.1.0","@react-native/eslint-config":"0.86.0","@commitlint/config-conventional":"^21.0.2","@release-it/conventional-changelog":"^11.0.1"},"peerDependencies":{"react":">=19.1.0","react-native":">=0.81.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-workers_1.0.0-alpha.4_1789636749609_0.470833306373998"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}],"codegen"]},"create-react-native-library":{"type":"turbo-module","tools":["eslint","jest","lefthook","release-it","vite"],"version":"0.63.0","languages":"cpp"}}},"time":{"created":"2026-07-26T17:22:14.838Z","modified":"2026-09-17T09:19:09.952Z","1.0.0-alpha.0":"2026-07-26T17:22:15.214Z","1.0.0-alpha.1":"2026-07-26T17:27:56.361Z","1.0.0-alpha.2":"2026-07-26T17:30:12.087Z","1.0.0-alpha.3":"2026-07-28T18:05:25.088Z","1.0.0-alpha.4":"2026-09-17T09:19:09.721Z"},"bugs":{"url":"https://github.com/ammarahm-ed/react-native-workers/issues"},"author":{"url":"https://github.com/ammarahm-ed","name":"Ammar Ahmed","email":"ammarahmed6506@gmail.com"},"license":"MIT","homepage":"https://github.com/ammarahm-ed/react-native-workers#readme","keywords":["react-native","ios","android"],"repository":{"url":"git+https://github.com/ammarahm-ed/react-native-workers.git","type":"git"},"description":"React Native Workers Runtime","maintainers":[{"name":"ammarahm-ed","email":"ammarahmed6506@gmail.com"}],"readme":"<div align=\"center\">\n\n<img src=\"https://raw.githubusercontent.com/ammarahm-ed/react-native-workers/HEAD/docs/static/img/logo.svg\" alt=\"\" width=\"120\" height=\"120\" />\n\n# React Native Workers\n\n**Real threads for React Native.** Web Worker–style API, backed by a separate\nHermes runtime on its own thread — with structured-clone messaging, timers,\nshared memory, and full native-module access.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)\n[![Platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20Android-lightgrey.svg)](#)\n[![React Native](https://img.shields.io/badge/React%20Native-0.81.4%2B-61dafb.svg)](https://reactnative.dev)\n[![New Architecture](https://img.shields.io/badge/New%20Architecture-Hermes-brightgreen.svg)](https://reactnative.dev/architecture/landing-page)\n\n[Documentation](https://ammarahm-ed.github.io/react-native-workers/) ·\n[Quick start](https://ammarahm-ed.github.io/react-native-workers/docs/quick-start) ·\n[API reference](https://ammarahm-ed.github.io/react-native-workers/docs/api-reference) ·\n[Examples](https://ammarahm-ed.github.io/react-native-workers/docs/examples)\n\n</div>\n\n---\n\nReact Native runs all your JavaScript on a single JS thread, and drives UI\nupdates from it. A long parse, a big image filter, or a tight simulation loop\nblocks that thread — so it can't dispatch updates and your UI stalls.\n\nThis library gives you a real one:\n\n```js\nimport { Worker } from '@ammarahmed/react-native-workers';\n\nconst worker = new Worker({\n  inline: `self.onmessage = (e) => self.postMessage({ doubled: e.data * 2 });`,\n});\n\nworker.onmessage = (e) => console.log(e.data); // { doubled: 42 }\nworker.postMessage(21);\n```\n\nIt's a headless React Native: no UI, but the same JavaScript engine, the same\ntimers and Promises, and the same native modules you already use.\n\n## Why it's different\n\n|  | |\n| --- | --- |\n| **A real thread** | Its own Hermes runtime with its own heap and event loop, not a time-slice of yours. |\n| **Native modules work** | TurboModules, legacy modules and Nitro modules all resolve inside a worker — `react-native-mmkv`, `react-native-blob-util` and friends work unmodified. |\n| **Shared memory, not just messages** | A ladder from `postMessage` to lock-free shared cells and raw shared `ArrayBuffer`s — pick the cost you want to pay. |\n| **Typed two-way RPC** | Call across the boundary like a local `async` function, in both directions, with one shared type. |\n| **Small bundles** | Worker bundles ship ~150 KB instead of ~1.4 MB, because the UI half of React Native never enters the graph. |\n| **Debuggable** | Every worker is its own DevTools target — breakpoints, stepping, and `console.log` forwarded to the host with a `[Worker:name]` tag. |\n\n## Workers vs. Worklets\n\nThese get compared a lot, so briefly — they solve different problems and are not\ncompetitors:\n\n- **The unit differs.** A worklet is a *function* plus its captured closure, moved\n  into another runtime. A worker is a *file* with its own Metro bundle graph, so you\n  `import` npm packages normally and there are no closure-capture rules to learn.\n- **Both give you real JS runtimes.** Worklet runtimes have event loops and timers\n  too, and Bundle Mode lets you import libraries into them. That part isn't a\n  difference.\n- **The API differs.** Workers speak the Web spec — `new Worker()`, `postMessage`,\n  `onmessage`. Worklets are a lower-level imperative primitive for scheduling work\n  onto a runtime, which is more flexible and less familiar.\n- **For animations and gestures, use Reanimated / Worklets.** Their synchronous UI\n  runtime is purpose-built and battle-tested for driving UI at 60–120fps. A\n  message-passing worker shouldn't be your animation layer.\n- **For \"get this work off my JS thread\", workers fit.** Parsing, crypto, image\n  work, database access, network I/O — with per-worker native module instances and\n  events that stay on the worker.\n\nThe long version, including where Worklets is ahead and corrections from their team,\nis in the\n[comparison](https://ammarahm-ed.github.io/react-native-workers/docs/prior-art).\n\n## Install\n\n```sh\nnpm install @ammarahmed/react-native-workers\n```\n\nRequires the **New Architecture** with **Hermes** (RN 0.81.4+, developed against\n0.86). Native code is autolinked; run `pod install` on iOS.\n\nThen wrap your Metro config — this is what keeps worker bundles small:\n\n```js title=\"metro.config.js\"\nconst { getDefaultConfig } = require('@react-native/metro-config');\nconst { withWorkers } = require('@ammarahmed/react-native-workers/metro');\n\nmodule.exports = withWorkers(getDefaultConfig(__dirname));\n```\n\nFull setup — including the Babel plugin for file-based workers and the one-time\nAndroid native-module registration — is in the\n[installation guide](https://ammarahm-ed.github.io/react-native-workers/docs/installation).\n\n## A tour\n\n<details>\n<summary><b>Workers from files</b> — auto-bundled, one Metro graph each</summary>\n\nAdd the Babel plugin to `babel.config.js`, then reference a file relatively:\n\n```js\nconst worker = new Worker('./workers/heavy-task');\n```\n\nEach entry is compiled into its own bundle — fetched from Metro in development,\nloaded as a Hermes bytecode asset in release. See the\n[bundling guide](https://ammarahm-ed.github.io/react-native-workers/docs/guides/bundling)\nand [`design-docs/release-bundling.md`](design-docs/release-bundling.md).\n\n</details>\n\n<details>\n<summary><b>Native modules inside a worker</b></summary>\n\nC++ (Cxx) modules and nested workers work by default. Platform (Java/ObjC)\nmodules are opt-in per worker, because building the per-worker TurboModule\nmanager costs memory:\n\n```js\nconst worker = new Worker('./workers/task', { nativeModules: true });\n```\n\n- **iOS** — a per-worker `RCTTurboModuleManager` resolves any registered ObjC\n  module through the global registry. No app changes.\n- **Android** — register your packages once, since there is no global registry:\n\n  ```kotlin\n  reactHost.addReactInstanceEventListener(object : ReactInstanceEventListener {\n    override fun onReactContextInitialized(context: ReactContext) {\n      if (context is ReactApplicationContext) {\n        WorkerTurboModules.initialize(context, PackageList(this@MainApplication).packages)\n      }\n    }\n  })\n  ```\n\nRN's core modules (`SourceCode`, `PlatformConstants`, `DeviceInfo`, …) are added\nautomatically. UI-affine modules (UIManager and friends) are denylisted.\n[Details](https://ammarahm-ed.github.io/react-native-workers/docs/guides/native-modules).\n\n</details>\n\n<details>\n<summary><b>Native events</b> — <code>NativeEventEmitter</code> in a worker</summary>\n\n```js\n// inside a worker\nconst emitter = new NativeEventEmitter(someNativeModule);\nconst sub = emitter.addListener('SomeEvent', (payload) => {\n  // fires on the worker thread\n});\n```\n\nEvents from the **worker's own** modules — C++, Java or ObjC — are delivered\nstraight to that worker and never touch the app's runtime. Events raised by the\n**host** (the app's own `DeviceEventEmitter`, or a module the host owns) are\nforwarded to workers that registered a listener.\n[Details](https://ammarahm-ed.github.io/react-native-workers/docs/guides/native-events).\n\n</details>\n\n<details>\n<summary><b>Shared state</b> — <code>SharedStore</code>, <code>SharedValue</code>, <code>SharedBuffer</code></summary>\n\n`SharedStore` is a C++-backed store shared by the host and every worker, with\nsynchronized reads/writes and change watchers:\n\n```js\nconst store = new SharedStore('session');\nstore.set('user', { id: 1, name: 'Ada' });\nconst off = store.subscribe('user', (key, value) => { /* any runtime wrote */ });\n```\n\nUnlike `postMessage`, a stored value is an addressable tree — read and update\n*parts* of it, and watch just a subtree:\n\n```js\nstore.setIn('doc', ['user', 'age'], 31);           // encodes only the new leaf\nstore.subscribeIn('doc', ['user'], (path, value) => { /* ['age'], 31 */ });\n```\n\nFor hot paths there are two leaner primitives:\n\n```ts\n// A single synchronous cell — lock-free for numbers (~17M writes/sec).\nconst progress = new SharedValue('anim:progress', 0);\nprogress.value = 0.42;\n\n// Raw shared memory — same bytes in every runtime, zero host calls per element.\nconst buf = new SharedBuffer('sim', 50_000 * Float64Array.BYTES_PER_ELEMENT);\nconst view = new Float64Array(buf.arrayBuffer);\n```\n\n`SharedValue` is ~2× faster than `SharedStore` for a single value; `SharedBuffer`\nis ~4× faster for bulk numeric work. The full ladder, with benchmarks, is in\n[`design-docs/shared-data-primitives.md`](design-docs/shared-data-primitives.md).\n\n</details>\n\n<details>\n<summary><b>Typed RPC</b> — the <code>JSModule</code> bridge and <code>defineModule</code></summary>\n\nCall across the worker boundary as if it were a local `async` function — a\ntwo-way JS→JS RPC:\n\n```js\n// worker (JSModule is a global in every worker)\nnew JSModule('calc', {\n  add(a, b) { return a + b; },\n  async fetchUser(id) { return await load(id); },\n});\n```\n\n```ts\n// host — fully typed\nconst calc = worker.module<Calc>('calc');\nawait worker.ready('calc');\nconst sum = await calc.add(2, 3); // 5\n```\n\nThe worker can call back into the host, modules emit events, and large params\nare best passed by `SharedStore` reference rather than cloned per call.\n\n`defineModule` folds the bridge and reactive state into one contract both sides\nimplement halves of:\n\n```ts\nexport const calc = defineModule<{\n  worker: { add(a: number, b: number): number };\n  host:   { getConfig(): Config };\n  events: { progress: { percent: number } };\n  state:  { status: 'idle' | 'busy' };\n}>('calc');\n```\n\nDesign and wire protocol: [`design-docs/jsmodule-bridge.md`](design-docs/jsmodule-bridge.md),\n[`design-docs/jsmodule-defineModule.md`](design-docs/jsmodule-defineModule.md).\n\n</details>\n\n<details>\n<summary><b><code>UIWorker</code></b> — a worker on the UI thread</summary>\n\nA non-spec worker whose runtime lives on the platform main thread, so it can call\nUI-affine native methods with no thread hop. Same API as `Worker`; supported on\nboth platforms. Use sparingly — work here competes with rendering.\n\n```js\nconst w = new UIWorker({ inline: `self.onmessage = (e) => { /* UI-thread JS */ };` });\n```\n\n</details>\n\n<details>\n<summary><b>From native code</b></summary>\n\nWorkers can be created and driven from C++ on any thread via\n[`cpp/api/NativeWorkers.h`](cpp/api/NativeWorkers.h) (a JSON message bridge) —\nuseful for background JS triggered by native events.\n\n</details>\n\n## Bundle size\n\nEach worker is its own Metro graph, so `import … from 'react-native'` pulls the\nwhole framework — renderer, components, Animated, virtualized-lists — into every\nworker that reaches it. Third-party native modules import that barrel themselves,\nso careful worker code alone cannot avoid it.\n\n`withWorkers()` resolves `react-native` to a worker-sized shim **inside worker\ngraphs only**. Measured on the example app (Hermes bytecode, minified):\n\n| worker | without | with |\n| --- | --- | --- |\n| `react-native-gzip` (legacy module) | 1.39 MB | **149 KB** |\n| `react-native-mmkv` (Nitro) | 1.42 MB | **302 KB** |\n| `react-native-blob-util` (TurboModule) | 1.50 MB | **264 KB** |\n| a worker importing nothing | 17.8 KB | 17.8 KB |\n\nExports a worker cannot use (`View`, `StyleSheet`, `Animated`, hooks…) throw on\naccess with a message naming the export, instead of being silently `undefined`.\n\n## What's supported\n\nStructured clone (objects, arrays, cycles, typed arrays, `ArrayBuffer`, `Date`,\n`Map`, `Set`, `RegExp`, `Error`, `BigInt`), `self` / `postMessage` / `onmessage` /\n`close` / `addEventListener`, timers, Promises, `structuredClone`, error\npropagation to `onerror`, `terminate`, worker isolation, and `NativeEventEmitter`.\n\nBinary data transfers instead of copying: `postMessage(v, [buf])` moves the\nbacking store, and `createTransferableBuffer(n)` gives you a buffer that's\nzero-copy on every hop.\n\nNative modules inside a worker are **isolated** — their events are delivered to\nthat worker rather than being raised on the app's runtime and copied back, their\nmethod bodies run off the worker's JS thread (Android), and peer lookups resolve\nto the worker's own instances. A worker's network I/O doesn't depend on the RN JS\nthread being free.\n\nAlso inside a worker: **Expo Modules** via `requireNativeModule(...)` on both\nplatforms, and the experimental\n[`Thread`](https://ammarahm-ed.github.io/react-native-workers/docs/guides/threads)\nAPI for running a worker's own runtime on another thread.\n\n**Limits worth knowing.** Hermes has no `ArrayBuffer` detach, so a transferred\nbuffer isn't neutered by the engine — this library refuses to reuse it and\n`.detached` reports `true`, but raw reads still succeed unless you call\n`enableTransferGuard()`. `SharedArrayBuffer` doesn't exist in Hermes;\n[`SharedBuffer`](#a-tour) is the shared-memory path. Native-module isolation leans\non private React Native internals, all of which are listed — with what would let me\ndelete them — in\n[Hacks & compatibility seams](https://ammarahm-ed.github.io/react-native-workers/docs/compat-seams).\n\n## Example app\n\nThe [`example/`](example) app is a gallery of working screens — search service,\nimage filters, downloads, sensors, parallel parsing, notes — plus a conformance\nsuite covering the API surface. Step-by-step build-ups for each screen are in the\n[tutorials](https://ammarahm-ed.github.io/react-native-workers/docs/category/tutorials).\n\n## Contributing\n\n- [Development workflow](CONTRIBUTING.md#development-workflow)\n- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)\n\n## License\n\nMIT © Ammar Ahmed\n\n---\n\n<div align=\"center\">\nMade with <a href=\"https://github.com/callstack/react-native-builder-bob\">create-react-native-library</a>\n</div>\n","readmeFilename":"README.md"}