@povio/lightning-panda 0.0.17 → 0.0.19

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/LLM.md CHANGED
@@ -26,8 +26,9 @@ source is `src/steps.ts` (builders) and `src/index.ts` (pages and runs).
26
26
 
27
27
  Install the browser and client with `bun add --dev @povio/lightning-panda`
28
28
  (or `@povio/lightning-panda@next` for an RC). `Lightningpanda.launch()` finds
29
- the bundled macOS browser automatically. Fork mode requires a separately built
30
- patched JavaScriptCore browser selected via `LIGHTNINGPANDA_BIN` or `bin`.
29
+ the bundled macOS browser automatically. On Apple silicon it is the
30
+ fork-capable build (patched JavaScriptCore bundled), so `--fork` works; the
31
+ Intel browser has no fork mode.
31
32
  On other operating systems, connect to a remote browser with
32
33
  `Lightningpanda.connect()`.
33
34
 
package/README.md CHANGED
@@ -97,12 +97,13 @@ On other operating systems, use `Lightningpanda.connect()` with a remote
97
97
  browser. Installing/importing the client does not launch a local browser.
98
98
 
99
99
  `Lightningpanda.launch()` selects `bin`, then `$LIGHTNINGPANDA_BIN`, then the
100
- bundled browser for the current architecture, then a sibling browser in a
101
- legacy release archive. The CLI also respects `$LIGHTNINGPANDA_BIN`.
100
+ browser beside the package in a release archive, then the bundled browser for
101
+ the current architecture. The CLI also respects `$LIGHTNINGPANDA_BIN`.
102
102
 
103
- The bundled browsers use macOS's system JavaScriptCore. **Fork mode requires
104
- a separately built patched JavaScriptCore browser**; select that browser with
105
- `bin` or `$LIGHTNINGPANDA_BIN` when using `args: ['--fork']`.
103
+ On Apple silicon the bundled browser is the **fork-capable build** with its
104
+ patched JavaScriptCore included, so `args: ['--fork']` works without a separate
105
+ browser. The Intel browser uses macOS's system JavaScriptCore and has no fork
106
+ mode.
106
107
 
107
108
  The package is licensed under AGPL-3.0-only; see the included `LICENSE` and
108
109
  `NOTICE`. Maintainers: see
package/dist/cli.js CHANGED
@@ -15,12 +15,12 @@ function resolveBinary({
15
15
  } = {}) {
16
16
  if (env.LIGHTNINGPANDA_BIN)
17
17
  return env.LIGHTNINGPANDA_BIN;
18
- const bundled = join(root, "native", `${platform}-${arch}`, "lightningpanda");
19
- if (statSync(bundled, { throwIfNoEntry: false })?.isFile())
20
- return bundled;
21
18
  const sibling = join(root, "..", "lightningpanda");
22
19
  if (statSync(sibling, { throwIfNoEntry: false })?.isFile())
23
20
  return sibling;
21
+ const bundled = join(root, "native", `${platform}-${arch}`, "lightningpanda");
22
+ if (statSync(bundled, { throwIfNoEntry: false })?.isFile())
23
+ return bundled;
24
24
  if (platform !== "darwin" || !["arm64", "x64"].includes(arch)) {
25
25
  throw new Error(`Lightningpanda has no bundled browser for ${platform}-${arch}. The browser supports macOS 14+ on arm64 and x64. Use Lightningpanda.connect() for a remote browser, or set LIGHTNINGPANDA_BIN.`);
26
26
  }
package/dist/index.js CHANGED
@@ -14,12 +14,12 @@ function resolveBinary({
14
14
  } = {}) {
15
15
  if (env.LIGHTNINGPANDA_BIN)
16
16
  return env.LIGHTNINGPANDA_BIN;
17
- const bundled = join(root, "native", `${platform}-${arch}`, "lightningpanda");
18
- if (statSync(bundled, { throwIfNoEntry: false })?.isFile())
19
- return bundled;
20
17
  const sibling = join(root, "..", "lightningpanda");
21
18
  if (statSync(sibling, { throwIfNoEntry: false })?.isFile())
22
19
  return sibling;
20
+ const bundled = join(root, "native", `${platform}-${arch}`, "lightningpanda");
21
+ if (statSync(bundled, { throwIfNoEntry: false })?.isFile())
22
+ return bundled;
23
23
  if (platform !== "darwin" || !["arm64", "x64"].includes(arch)) {
24
24
  throw new Error(`Lightningpanda has no bundled browser for ${platform}-${arch}. The browser supports macOS 14+ on arm64 and x64. Use Lightningpanda.connect() for a remote browser, or set LIGHTNINGPANDA_BIN.`);
25
25
  }
@@ -0,0 +1,4 @@
1
+ [diffend] Oversized file quarantined before diffing.
2
+ name: package/native/darwin-arm64/lib/libJavaScriptCore.dylib
3
+ size: 48047712 bytes
4
+ sha256: 5cd4b806d0f3923b472de8f63ce5d243e7fc5f90caf24bb6caab1879f829479d
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/native/darwin-arm64/lightningpanda
3
- size: 35434864 bytes
4
- sha256: 1239cb423a30531603b31a780234232c28f4d0ec71c1366de2ffa323dbb314e7
3
+ size: 42335888 bytes
4
+ sha256: a024332b923340b6ad4a2388339de0653116be1cc0c61b7d06115f1a160f2579
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/native/darwin-x64/lightningpanda
3
- size: 37847744 bytes
4
- sha256: 2f4e69371305c4fdebc8763f65574113691006d8551c3fde85c519bc33864640
3
+ size: 44633616 bytes
4
+ sha256: e8a0ae45b3075911eecf5906c6f2519227fa1beabb39bf58fd14a146d713db26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/lightning-panda",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "Lightningpanda headless browser and typed E2E testing API",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -8,9 +8,15 @@
8
8
  "url": "git+https://github.com/povio/lightningpanda.git",
9
9
  "directory": "packages/lightning-panda"
10
10
  },
11
- "engines": { "node": ">=22" },
12
- "publishConfig": { "access": "public" },
13
- "bin": { "lightningpanda": "./dist/cli.js" },
11
+ "engines": {
12
+ "node": ">=22"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "bin": {
18
+ "lightningpanda": "./dist/cli.js"
19
+ },
14
20
  "type": "module",
15
21
  "exports": {
16
22
  ".": {
package/src/binary.ts CHANGED
@@ -10,10 +10,12 @@ export function resolveBinary({
10
10
  env = process.env,
11
11
  }: { platform?: string; arch?: string; root?: string; env?: NodeJS.ProcessEnv } = {}): string {
12
12
  if (env.LIGHTNINGPANDA_BIN) return env.LIGHTNINGPANDA_BIN;
13
- const bundled = join(root, 'native', `${platform}-${arch}`, 'lightningpanda');
14
- if (statSync(bundled, { throwIfNoEntry: false })?.isFile()) return bundled;
13
+ // A release archive unpacks the client beside the browser it ships (the
14
+ // standard or the fork build); that one wins over the package's own.
15
15
  const sibling = join(root, '..', 'lightningpanda');
16
16
  if (statSync(sibling, { throwIfNoEntry: false })?.isFile()) return sibling;
17
+ const bundled = join(root, 'native', `${platform}-${arch}`, 'lightningpanda');
18
+ if (statSync(bundled, { throwIfNoEntry: false })?.isFile()) return bundled;
17
19
  if (platform !== 'darwin' || !['arm64', 'x64'].includes(arch)) {
18
20
  throw new Error(`Lightningpanda has no bundled browser for ${platform}-${arch}. The browser supports macOS 14+ on arm64 and x64. Use Lightningpanda.connect() for a remote browser, or set LIGHTNINGPANDA_BIN.`);
19
21
  }