Skip to content

release 1.3.5 + xslt3 1.0.1: Safari 15.4-16.3 (#35), fetchOptions (#34), updates - #36

Merged
spagu merged 2 commits into
mainfrom
fix/issues-34-35
Nov 13, 2026
Merged

spagu merged 2 commits into
mainfrom
fix/issues-34-35

Conversation

@spagu

@spagu spagu commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Fixes #35, closes #34. Two commits, everything tested locally first.

#35 — bundle failed to load in Safari 15.4–16.3. The unpaired-surrogate check of EXSLT str:encode-uri()/decode-uri() used a regex lookbehind (Safari parses it from 16.4 only; a syntax error stops the whole script). Now a code-unit loop (hasLoneSurrogate, tests incl. the edge cases). The build targets the browsers of docs/BROWSER-SUPPORT.md (chrome93, edge93, firefox92, safari15.4) instead of plain es2022, and src/browserSupport.test.js fails on lookbehind, the v flag or built-ins newer than Safari 15.4 in src/ (it fails on the old code). The built bundles contain no lookbehind.

@tradik/xslt3 1.0.1 — same problem in the XSLT 3.0 package. Title-case number words (format-integer($n, 'Ww')) now capture the word start instead of looking behind. The m flag's ^ has no lookbehind-free translation, so the parser builds it only after probing the engine (supportsLookbehind()); Safari before 16.4 gets FORX0002 naming the cause for that one pattern instead of a package that does not load. The browser-support scan now covers packages/xslt3/src (lines marked browser-probed are exempt). Documented in docs/XSLT3.md (limits) and docs/BROWSER-SUPPORT.md.

#34 — fetchOptions. new XSLTProcessor({ fetchOptions: { credentials: "include" } }) and per call on importStylesheetAsync/transformAsync: the RequestInit of the requests the default fetch loader makes (xsl:import, xsl:include, document()). The call's signal still wins; a custom loader is unaffected; non-objects throw TypeError. Types, API.md, LOADERS.md (new section on credentialed CORS).

Updates: jsdom 31.0.1, @playwright/test 1.65.0 (its Chromium is 158: no native XSLT any more, so the informational native-vs-library spec skips in the chromium project), ESLint 10.14.0, Prettier 3.10.1, linkedom 0.18.15; overrides minimatch ^11.0.8 (GHSA-g3hv-75wg-m249 via ESLint; npm audit clean); actions/setup-node 7.1.0, upload-artifact 7.0.2, download-artifact 8.0.2 (SHA-pinned); ssg 1.9.7 (fixes spagu/ssg#316, verified sha256).

Versions: library 1.3.5, @tradik/xslt3 1.0.1. Coverage of every changed file: 100% lines/branches/functions.

Local results: library 1828 tests, xslt3 961, qt3 21,770 / xslt30 7,772 (unchanged), checker 221, DOM matrix jsdom + xmldom, bench, binaries, W3C runners, lint, Prettier, docs links, site build with ssg 1.9.7 + 173 site tests, Playwright chromium + firefox 63 (+11 skipped by design; WebKit only in CI, it lacks host libraries here), libxslt 298/298, package managers npm/Yarn 1/Yarn 4 PnP/pnpm ✓, npm audit 0.

…CORS (#34), updates

#35: the unpaired-surrogate check of EXSLT encode-uri/decode-uri used a regex
lookbehind, a SyntaxError for the whole bundle in Safari before 16.4; it is a
code-unit loop now. The build targets the browsers of BROWSER-SUPPORT.md and
src/browserSupport.test.js keeps lookbehind, the v flag and post-Safari-15.4
built-ins out of the sources.

#34: fetchOptions (constructor and per call) is the RequestInit of the
requests the default fetch loader makes, e.g. { credentials: "include" }.

Dev dependencies at their latest (jsdom 31, Playwright 1.65, ESLint 10.14,
Prettier 3.10.1, linkedom 0.18.15), minimatch override for GHSA-g3hv-75wg-m249,
actions setup-node 7.1.0, upload-artifact 7.0.2, download-artifact 8.0.2,
ssg 1.9.7 (fixes spagu/ssg#316).
Title-case number words capture the word start instead of looking
behind; the m flag's ^ builds its lookbehind only after probing the
engine and otherwise raises FORX0002 naming Safari before 16.4. The
browser-support scan covers packages/xslt3/src too.
@spagu spagu changed the title release 1.3.5: Safari 15.4–16.3 (#35), fetchOptions for credentialed CORS (#34), dependency updates release 1.3.5 + xslt3 1.0.1: Safari 15.4-16.3 (#35), fetchOptions (#34), updates Nov 13, 2026
@sonarqubecloud

Copy link
Copy Markdown

@spagu
spagu merged commit f73bb2b into main Nov 13, 2026
19 checks passed
@spagu
spagu deleted the fix/issues-34-35 branch November 13, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant