@pwa-platform/entry-resilience 0.4.2 → 0.4.3

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/README.md CHANGED
@@ -36,6 +36,10 @@ script (normally through `/assets`). The build rejects a recovery page that is n
36
36
  accepts 1–90 and defaults to 30. `locale` accepts `"zh-CN"` or `"en"`; `messages` overrides individual strings;
37
37
  `css` is appended after the default page style and must not contain a closing `</style` sequence.
38
38
 
39
+ ## Browser support
40
+
41
+ Code from this package that runs in a browser is checked against the platform's supported floor: Safari 13.1, iOS Safari 13.4, Chrome 80, Edge 80 and Firefox 74 ([ADR-0053](https://github.com/haigeerlab/pwa-platform/blob/main/docs/adr/0053-browser-compat-baseline.md)). On those versions and later it does not throw or fail to parse because of newer syntax or a missing built-in; a capability the browser lacks is treated as unavailable. This is not a promise that every PWA feature works there — see the [compatibility reference](https://github.com/haigeerlab/pwa-platform/blob/main/website/reference/compatibility.md).
42
+
39
43
  ## Browser integration
40
44
 
41
45
  The application owns fetching, authentication, authorization, decryption and polling. Hand the already-decoded
@@ -22,7 +22,11 @@ export function isNormalizedOrigin(value) {
22
22
  */
23
23
  function canParseUrl(value, base) {
24
24
  try {
25
- new URL(value, base);
25
+ // Not `new URL(value, base)` with `base` undefined: Safari 13 throws for an explicit undefined base.
26
+ if (base === undefined)
27
+ new URL(value);
28
+ else
29
+ new URL(value, base);
26
30
  return true;
27
31
  }
28
32
  catch {
@@ -1 +1 @@
1
- {"version":3,"file":"origin.js","sourceRoot":"","sources":["../../src/internal/origin.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,4GAA4G;AAC5G,2GAA2G;AAC3G,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AAEzF;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;QAAE,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W,CAAC,KAAa,EAAE,IAAa;IAC/C,IAAI,CAAC;QACH,qGAAqG;QACrG,IAAI,IAAI,KAAK,SAAS;YAAE,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;;YAClC,IAAI,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pwa-platform/entry-resilience",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Validated fallback entries for installed PWA applications.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,7 +24,7 @@
24
24
  "dist"
25
25
  ],
26
26
  "dependencies": {
27
- "@pwa-platform/vite": "0.4.2"
27
+ "@pwa-platform/vite": "0.4.3"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "vite": "^5.0.0 || ^8.0.0"
@@ -33,7 +33,7 @@
33
33
  "@playwright/test": "1.63.0",
34
34
  "@types/node": "24.13.4",
35
35
  "vite": "8.3.0",
36
- "@pwa-platform/contracts": "0.4.2",
36
+ "@pwa-platform/contracts": "0.4.3",
37
37
  "@pwa-platform/browser-test-harness": "0.0.0"
38
38
  },
39
39
  "engines": {
@@ -51,6 +51,6 @@
51
51
  "test:browser:real": "playwright test --config playwright.real.config.ts",
52
52
  "test:browser:android": "playwright test --config playwright.android.config.ts",
53
53
  "test:browser:ios": "playwright test --config playwright.ios.config.ts",
54
- "typecheck": "tsc --noEmit --project tsconfig.json && tsc --noEmit --project tsconfig.browser.json && tsc --noEmit --project tsconfig.app.json"
54
+ "typecheck": "tsc --noEmit --project tsconfig.json && tsc --noEmit --project tsconfig.browser.json && tsc --noEmit --project tsconfig.app.json && tsc --noEmit --project tsconfig.floor.json"
55
55
  }
56
56
  }