pear-mobile 4.1.0 → 4.2.0

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,20 +1,21 @@
1
1
  {
2
2
  "name": "pear-mobile",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "Embeddable Pear runtime for mobile applications",
5
- "main": "index.js",
5
+ "main": "bare.js",
6
6
  "exports": {
7
7
  "./package": "./package.json",
8
8
  ".": {
9
- "types": "./index.d.ts",
10
- "default": "./index.js"
9
+ "react-native": "./react-native.js",
10
+ "types": "./react-native.d.ts",
11
+ "default": "./bare.js"
11
12
  }
12
13
  },
13
14
  "files": [
14
15
  "package.json",
15
- "index.js",
16
- "index.d.ts",
17
- "index.rn.js"
16
+ "bare.js",
17
+ "react-native.js",
18
+ "react-native.d.ts"
18
19
  ],
19
20
  "scripts": {
20
21
  "format": "prettier . --write",
@@ -40,10 +41,13 @@
40
41
  "dependencies": {
41
42
  "bare-fs": "^4.5.5",
42
43
  "bare-path": "^3.0.0",
43
- "bare-storage": "^1.0.1",
44
+ "bare-storage": "^1.1.0",
44
45
  "corestore": "^7.9.1",
45
46
  "hyperswarm": "^4.17.0",
46
47
  "pear-runtime-updater": "^3.0.0",
47
48
  "ready-resource": "^1.2.0"
49
+ },
50
+ "peerDependencies": {
51
+ "react-native-bare-kit": "*"
48
52
  }
49
53
  }
@@ -0,0 +1,5 @@
1
+ declare module 'pear-mobile' {
2
+ export default class PearRuntime {
3
+ static run(filename: string, bundle: unknown, argv: unknown[]): unknown
4
+ }
5
+ }
@@ -0,0 +1,9 @@
1
+ const { Worklet } = require('react-native-bare-kit')
2
+
3
+ module.exports = class PearRuntime {
4
+ static run(filename, bundle, argv) {
5
+ const worklet = new Worklet()
6
+ worklet.start(filename, bundle, argv)
7
+ return worklet.IPC
8
+ }
9
+ }
package/index.d.ts DELETED
@@ -1,9 +0,0 @@
1
- declare module 'pear-mobile' {
2
- export default class PearRuntime {
3
- constructor(config?: object)
4
- on(event: 'updating' | 'updated', callback: (req: unknown) => void): this
5
- emit(event: string, ...args: unknown[]): this
6
- run(filename: string, bundle: unknown, argv: unknown[]): unknown
7
- applyUpdate(): Promise<void>
8
- }
9
- }
File without changes