Skip to content

Implementing configurable fetch#173

Merged
leonelsanchesdasilva merged 3 commits intomainfrom
fetch-function
Feb 11, 2026
Merged

Implementing configurable fetch#173
leonelsanchesdasilva merged 3 commits intomainfrom
fetch-function

Conversation

@leonelsanchesdasilva
Copy link
Collaborator

Resolves #172

@github-actions
Copy link

github-actions bot commented Feb 11, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
77.93% (+0.08% 🔼)
3269/4195
🟡 Branches
67.93% (+0.06% 🔼)
1925/2834
🟡 Functions
71.11% (+0.05% 🔼)
384/540
🟡 Lines
78.04% (+0.08% 🔼)
3131/4012

Test suite run success

620 tests passing in 61 suites.

Report generated by 🧪jest coverage report action from 9d147f8

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a configurable loader for external stylesheets so <xsl:import> / <xsl:include> no longer depend strictly on globalThis.fetch, addressing issue #172’s request to allow custom loading/denial of external resources.

Changes:

  • Introduces fetchFunction on XsltOptions and the Xslt class to customize external resource loading.
  • Routes <xsl:import> / <xsl:include> loading through this.fetchFunction(...) instead of directly using globalThis.fetch.
  • Documents the new option in the README with usage examples.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/xslt/xslt.ts Adds fetchFunction initialization and uses it for import/include loading.
src/xslt/types.ts Extends XsltOptions with optional fetchFunction.
README.md Documents fetchFunction and provides examples for deny/local/remap strategies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

leonelsanchesdasilva and others added 2 commits February 11, 2026 09:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@leonelsanchesdasilva leonelsanchesdasilva merged commit 07bdad1 into main Feb 11, 2026
3 checks passed
@leonelsanchesdasilva leonelsanchesdasilva deleted the fetch-function branch February 11, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow configurable fetch

1 participant