
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
pear-mobile
Advanced tools
Embeddable Pear runtime for mobile applications. Provides storage path and bare workers via worklets.
npm install pear-mobile
This module integrates Pear into React-Native-based Mobile applications.
See pear-runtime for Pear's embeddable runtime module for Desktop Devices.
This boilerplate is MVP and Experimental.
const PearRuntime = require('pear-mobile')
const { version, upgrade, productName, name } = require('./package.json')
const runtime = new PearRuntime({ version, upgrade, name: productName })
runtime.updater.on('updated', async () => {
await runtime.updater.applyUpdate()
conosle.log('restart for update')
})
git clone https://github.com/holepunchto/hello-pear-react-native
For end-to-end instructions from building to deploying with Pear see hello-pear-react-native README.md.
const pear = new PearRuntime(opts)Create a runtime. opts may include:
dir Directory to store data (e.g. app data dir). Defaults to /Documents.upgrade – (required) Pear link for OTA updates (e.g. from package.json upgrade field).name - (required) The package.json prductName of the app.store - (optional) pass a Corestore to be used for updates. If passed swarm must also be passed. The store should be replicated over the swarm.swarm - (optional) pass a Hyperswarm to be used for swarming updates. If passed store must also be passed. The store should be replicated over the swarm.app – (optional) The path to the local OTA react-native bundle as booted from native code. (defaults to pear-runtime-react-native default)version – (optional) Current app version (i.e. from package.json); used for update checks.updates – (optional) Set to false to disable P2P OTA updates.storage – (optional) Saves the app storage path.pear.storageSuggested storage folder for app storage.
pear.updaterInstance of pear-runtime-updater
await pear.ready()Awaits the open of the updater (p2p connections, drive open ...)
await pear.close()Shut it down. You should do this when closing your app for best performance.
VERY EXPERIMENTAL, MOST DEFINITELY WILL CHANGE.
Update listening and apply logic lives in pear-runtime-updater.
First allocate a pear link if you haven't using pear:
pear touch
Store this link in the package.json upgrade field of a project.
bundle your JS frontend. Take the distributable (e.g react-native bundle and assets) produced and make a deployment folder with the following structure:
/package.json
/by-arch
/[...platform-arch]
/app
Now go to this folder and stage this onto the link with pear stage
pear stage {link-from-touch}
Now seed it. Any build out there on a lower version will trigger the update flow.
Apache-2.0
FAQs
Embeddable Pear runtime for mobile applications
The npm package pear-mobile receives a total of 89 weekly downloads. As such, pear-mobile popularity was classified as not popular.
We found that pear-mobile demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.