@swmansion/popcorn 0.3.2 → 0.4.0-next.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.
Files changed (47) hide show
  1. package/LICENSE +1 -1
  2. package/NOTICE +12 -0
  3. package/README.md +78 -2
  4. package/dist/beam.d.ts +10 -0
  5. package/dist/errors.d.ts +96 -39
  6. package/dist/etf.d.ts +38 -0
  7. package/dist/events.d.ts +82 -0
  8. package/dist/index.d.ts +7 -3
  9. package/dist/index.mjs +1287 -2
  10. package/dist/plugins/beam_tools/lib/popcorn/beam_tools/beam_patcher.ex +184 -0
  11. package/dist/plugins/beam_tools/lib/popcorn/beam_tools/cli.ex +74 -0
  12. package/dist/plugins/beam_tools/lib/popcorn/beam_tools/packager.ex +540 -0
  13. package/dist/plugins/beam_tools/mix.exs +16 -0
  14. package/dist/plugins/beam_tools/patches/kernel/prim_tty.erl +13 -0
  15. package/dist/plugins/beam_tools/patches/stdlib/beam_lib.erl +27 -0
  16. package/dist/plugins/esbuild.d.ts +10 -2
  17. package/dist/plugins/esbuild.mjs +39 -34
  18. package/dist/plugins/rollup.d.ts +10 -2
  19. package/dist/plugins/rollup.mjs +46 -25
  20. package/dist/plugins/shared.d.ts +54 -4
  21. package/dist/plugins/shared.mjs +207 -0
  22. package/dist/plugins/vite.d.ts +17 -2
  23. package/dist/plugins/vite.mjs +201 -75
  24. package/dist/popcorn.d.ts +237 -110
  25. package/dist/runtimes/core/beam.emu.mjs +141 -0
  26. package/dist/runtimes/core/beam.mjs +141 -0
  27. package/dist/runtimes/core/beam.wasm +0 -0
  28. package/dist/runtimes/core/manifest.json +1 -0
  29. package/dist/runtimes/crypto/beam.emu.mjs +520 -0
  30. package/dist/runtimes/crypto/beam.mjs +520 -0
  31. package/dist/runtimes/crypto/beam.wasm +0 -0
  32. package/dist/runtimes/crypto/manifest.json +1 -0
  33. package/dist/tar.d.ts +4 -0
  34. package/dist/types.d.ts +108 -63
  35. package/dist/utils.d.ts +7 -0
  36. package/dist/worker.d.ts +1 -0
  37. package/dist/worker.mjs +765 -0
  38. package/package.json +20 -28
  39. package/dist/AtomVM.mjs +0 -7992
  40. package/dist/AtomVM.wasm +0 -0
  41. package/dist/bridge.d.ts +0 -22
  42. package/dist/bridge.mjs +0 -66
  43. package/dist/errors.mjs +0 -55
  44. package/dist/iframe.d.ts +0 -1
  45. package/dist/iframe.mjs +0 -215
  46. package/dist/popcorn.mjs +0 -381
  47. package/dist/types.mjs +0 -25
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@swmansion/popcorn",
3
- "version": "0.3.2",
4
- "description": "JS bindings for Popcorn",
3
+ "version": "0.4.0-next.0",
4
+ "description": "JS bindings for BEAM/OTP in WebAssembly",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "homepage": "https://popcorn.swmansion.com",
8
- "bugs": {
9
- "url": "https://github.com/software-mansion/popcorn/issues"
10
- },
11
8
  "repository": {
12
9
  "type": "git",
13
- "url": "git+https://github.com/software-mansion/popcorn.git"
10
+ "url": "git+https://github.com/software-mansion/popcorn.git",
11
+ "directory": "popcorn/js"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/software-mansion/popcorn/issues"
14
15
  },
15
- "author": "Software Mansion",
16
16
  "files": [
17
- "dist"
17
+ "dist",
18
+ "NOTICE"
18
19
  ],
19
20
  "main": "./dist/index.mjs",
20
21
  "module": "./dist/index.mjs",
@@ -24,6 +25,10 @@
24
25
  "types": "./dist/index.d.ts",
25
26
  "import": "./dist/index.mjs"
26
27
  },
28
+ "./esbuild": {
29
+ "types": "./dist/plugins/esbuild.d.ts",
30
+ "import": "./dist/plugins/esbuild.mjs"
31
+ },
27
32
  "./vite": {
28
33
  "types": "./dist/plugins/vite.d.ts",
29
34
  "import": "./dist/plugins/vite.mjs"
@@ -32,10 +37,6 @@
32
37
  "types": "./dist/plugins/rollup.d.ts",
33
38
  "import": "./dist/plugins/rollup.mjs"
34
39
  },
35
- "./esbuild": {
36
- "types": "./dist/plugins/esbuild.d.ts",
37
- "import": "./dist/plugins/esbuild.mjs"
38
- },
39
40
  "./package.json": "./package.json"
40
41
  },
41
42
  "peerDependencies": {
@@ -55,28 +56,19 @@
55
56
  }
56
57
  },
57
58
  "devDependencies": {
58
- "@eslint/js": "^9.39.0",
59
- "@playwright/test": "^1.60.0",
59
+ "@playwright/test": "^1.61.1",
60
60
  "@rollup/plugin-typescript": "^12.1.2",
61
61
  "@types/node": "^25.0.8",
62
62
  "esbuild": "^0.25.0",
63
- "eslint": "^9.39.4",
64
- "globals": "^16.2.0",
65
- "prettier": "^3.7.4",
66
63
  "rollup": "^4.55.1",
67
64
  "tslib": "^2.8.1",
68
- "typescript": "^5.8.3",
69
- "typescript-eslint": "^8.53.0",
70
- "vite": "^7.3.1",
71
- "vitest": "^4.0.17"
65
+ "typescript": "^5.9.3",
66
+ "vite": "^7.3.1"
72
67
  },
73
68
  "scripts": {
74
- "setup": "../../scripts/build-atomvm.sh --outdir assets/ debug-wasm",
75
- "build": "pnpm run setup && rollup -c",
76
- "build:prod": "pnpm run lint && rm -rf assets dist && ATOMVM_SOURCE='https://github.com/software-mansion-labs/FissionVM.git#swm' pnpm run setup && rollup -c",
77
- "dev": "pnpm run setup && rollup -c --watch",
78
- "lint": "tsc --noEmit && eslint && prettier . --check --log-level=warn",
79
- "test": "vitest",
80
- "test:e2e": "playwright test --config e2e/playwright.config.ts"
69
+ "build": "rollup -c",
70
+ "lint": "tsc --noEmit && tsc -p plugins/tsconfig.json --noEmit",
71
+ "lint:e2e": "tsc -p e2e/tsconfig.json",
72
+ "e2e": "env -u FORCE_COLOR -u NO_COLOR playwright test --config e2e/playwright.config.ts"
81
73
  }
82
74
  }