Skip to content

Remove sparql client dependency v2#82

Open
nvdk wants to merge 2 commits into
mu-semtech:masterfrom
nvdk:remove-sparql-client-dependency-v2
Open

Remove sparql client dependency v2#82
nvdk wants to merge 2 commits into
mu-semtech:masterfrom
nvdk:remove-sparql-client-dependency-v2

Conversation

@nvdk

@nvdk nvdk commented Jun 11, 2026

Copy link
Copy Markdown
Member

This is a rewrite of the work done in #69 to be compatible on the latest work on master.

Thanks to dropping the old and unmaintained sparql-client dependency we have a template with fewer dependencies and as such fewer possible conflicts for services. It also drops all related security warnings from npm audit.

a few notes for the reviewer:

  • newSparqlClient is removed from the public API. Even though it wasn't documented in the README, it was exported and as such this could be considered a breaking change. A brief search indicates it wasn't used anywhere so this shouldn't be a major issue though.
  • I've dropped the digest-fetch dependency used in the original PR and replaced it with regular fetch as this is not a good match with the template's goal. Supporting digest authentication to a sparql endpoint is better suited in a separate library.
  • this is an AI assisted PR and while care was taken to avoid unnecessary rewrites of heredocs and unchanged code, some might have slipped through. If you flag them I'll happily correct them

Update:
after discussion these were removed from the PR:

  • configurable retry logic from the original mu-auth-sudo code was kept, with the improvements added by @Rahien
  • the option to specify the endpoint (and overwrite the default) in query and update was kept

I'll create PRs for these when this is merged.

Niels V added 2 commits June 11, 2026 13:25
These two modules are extracted from node-sparql-client so that
sparql-client-2 can be removed as a dependency without losing the
tagged-template-literal SPARQL builder and the RDF term types it
depended on.
Node 18 ships fetch built-in, so sparql-client-2 is no longer needed.
The replacement uses the same public API (query, update, sparqlEscape*,
SPARQL tagged template) and forwards the same mu-auth headers as before.

sudo and scope can now be passed as options to query/update instead of
constructing a dedicated client with newSparqlClient.
@nvdk nvdk force-pushed the remove-sparql-client-dependency-v2 branch 2 times, most recently from 0867771 to c9ea983 Compare June 11, 2026 11:36
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.

1 participant