browser-evm-signer 0.1.5 → 0.1.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,OAAO,EAAE,MAAqB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,OAAO,EAAE,MAAqB,CAAC"}
package/esm/version.js CHANGED
@@ -2,13 +2,16 @@ import { readFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  function getVersion() {
5
+ // When loaded from JSR, import.meta.url is https:// — filesystem detection won't work
6
+ if (!globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url.startsWith("file://"))
7
+ return "dev";
5
8
  const root = join(dirname(fileURLToPath(globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url)), "..");
6
9
  // npm bundle: package.json exists at package root
7
10
  try {
8
11
  return JSON.parse(readFileSync(join(root, "package.json"), "utf-8")).version;
9
12
  }
10
13
  catch { /* not in npm bundle */ }
11
- // JSR / Deno dev: read from deno.jsonc
14
+ // Local dev: read from deno.jsonc
12
15
  try {
13
16
  const raw = readFileSync(join(root, "deno.jsonc"), "utf-8");
14
17
  return JSON.parse(raw.replace(/^\s*\/\/.*$/gm, "")).version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-evm-signer",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Route EVM transactions to browser wallets for signing — standalone library, no MCP dependency",
5
5
  "keywords": [
6
6
  "wallet",