Repository navigation
release 1.3.5 + xslt3 1.0.1: Safari 15.4-16.3 (#35), fetchOptions (#34), updates - #36
Merged
Merged
Conversation
…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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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, andsrc/browserSupport.test.jsfails on lookbehind, thevflag or built-ins newer than Safari 15.4 insrc/(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. Themflag'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 coverspackages/xslt3/src(lines markedbrowser-probedare exempt). Documented in docs/XSLT3.md (limits) and docs/BROWSER-SUPPORT.md.#34 —
fetchOptions.new XSLTProcessor({ fetchOptions: { credentials: "include" } })and per call onimportStylesheetAsync/transformAsync: theRequestInitof the requests the default fetch loader makes (xsl:import, xsl:include, document()). The call'ssignalstill wins; a custom loader is unaffected; non-objects throwTypeError. 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;
overridesminimatch ^11.0.8 (GHSA-g3hv-75wg-m249 via ESLint;npm auditclean); 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.