Skip to content

chore: repo & docs hygiene quick-fix wave (QF-1/5)#832

Merged
jeswr merged 9 commits into
mainfrom
cleanup/qf1-repo-hygiene
Jul 5, 2026
Merged

chore: repo & docs hygiene quick-fix wave (QF-1/5)#832
jeswr merged 9 commits into
mainfrom
cleanup/qf1-repo-hygiene

Conversation

@jeswr

@jeswr jeswr commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Consolidated quick-fix wave 1/5 (repo & docs hygiene) from the rdflib.js backlog triage (see #824); consolidated into one PR to keep PR volume low.

Covered issues

Issue Fix
#654 Add a prepare script so installs from a git URL build lib/ (npm's documented mechanism for git dependencies); previously the package's main entry did not exist.
#87 Remove src/jsonparser.js: unused by any code path (JSON-LD goes through src/jsonldparser.js), undocumented, untested; its only reference was the vestigial $rdf.jsonParser re-export in src/index.ts, which is removed with it.
#88 example/people/book.js called the non-existent kb.load(); switched to fetcher.load() and moved the friends processing inside the fetch callback so it runs against a populated store.
#319 README's RDFJS "task force spec" link had been a 404 for years; now points at the RDF/JS data model spec at rdf.js.org.
#328 Documented the literal() factory signature in the README — literal(value, languageOrDatatype) — including the pitfall that the 3-argument literal(value, undefined, datatype) form from older tutorials silently ignores the datatype (verified against current build).
#301 Added a "Querying the store with SPARQL" section to Documentation/webapp-intro.html: SPARQLToQuery + store.query()/querySync() usage and an explicit list of the supported SPARQL subset (SELECT-only, PREFIX, BGPs, OPTIONAL, minimal FILTER; no UNION/LIMIT/etc.).
#221 Documented in the README when <canonical> <http://www.w3.org/2007/ont/link#uri> <obsoleted> statements are added: only when smushing features are enabled (off by default since #458), as alias book-keeping when the store equates two nodes. Behavior verified empirically against the current build.

Closes #654
Closes #87
Closes #88
Closes #319
Closes #328
Closes #301
Closes #221

Re-applied stale contributor PRs (close manually)

Deviations / notes for review

Expected conflicts with sibling waves

Local gates (all green before push)

  • npm run lint: 0 errors (5 pre-existing no-console warnings in untouched files)
  • npm test: unit 308 passing / 0 failing; serialize suite all pass; test:types (tsc) clean

Generated by an agent (Claude Fable 5) on @jeswr's behalf — draft for his review.

Review timing: This draft was prepared with Claude; I (@jeswr) will personally review it before it progresses. I'm currently batching a lot of work in flight, so expect active review Wednesday–Friday (8–10 July).

jeswr and others added 9 commits July 5, 2026 01:37
Installing rdflib from a git URL yielded a package whose main entry
lib/index.js does not exist, because lib/ is gitignored and nothing
built it. 'prepare' is npm's documented hook for building git
dependencies; it runs on 'npm install' from git (and in local dev
installs), so consumers get a working lib/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
src/jsonparser.js is not used by any code path: parse() handles
application/ld+json via src/jsonldparser.js, and the only reference
to jsonParser anywhere in the repo was the re-export in src/index.ts.
It is undocumented, untested, and expects a bespoke non-JSON-LD input
shape, so remove it (this drops the vestigial $rdf.jsonParser export).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The store has never had a load() method in modern rdflib; loading is
done by the Fetcher. Use fetcher.load() for the friends' profile
documents and rdfs:seeAlso links, and move the friends processing
inside the initial fetch callback so it runs once the profile has
actually been loaded (previously it ran synchronously against a
store that had not been populated yet).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…319)

The old link to rdfjs/representation-task-force interface-spec.md has
been a 404 for years; the spec now lives at rdf.js.org. Re-applies the
intent of PR #281 by @darrengarvey, updated to link directly to the
data model spec document.

Co-authored-by: Darren Garvey <dagarvey@ebay.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The literal() factory takes (value, languageOrDatatype) per the RDF/JS
DataFactory interface; the three-argument literal(value, undefined,
datatype) form shown in older tutorials silently ignores the datatype
and yields a plain xsd:string literal. Document the correct usage and
the pitfall in the README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Explain when the store adds <canonical> link:uri <obsoleted>
statements (only when smushing features are enabled, off by default
since #458), what they are for (alias book-keeping behind
store.uris()/allAliases()), and why they can show up when querying
or serializing a smushing store.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-applies the still-relevant parts of stale PR #318 by @codam
(2019): typo fixes, corrected code samples (cardFor(), fetcher
spacing, the update() insert-parameter description) and the broken
block-diagram image path. Hunks already fixed on main in the
meantime were skipped.

Co-authored-by: Raphaël Harmel <raphael.harmel@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a 'Querying the store with SPARQL' section to the webapp intro:
how to run a query with SPARQLToQuery + store.query()/querySync(),
how bindings are delivered, the auto-dereferencing behavior, and an
honest list of what the parser does and does not support (SELECT
only, PREFIX, basic graph patterns, OPTIONAL, a minimal FILTER
language; no UNION/DESCRIBE/LIMIT/etc).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-applies stale PR #317 by @codam (2019), which fixes a batch of
spelling and grammar errors in Documentation/turtle-intro.html. The
patch still applied cleanly.

Co-authored-by: Raphael Harmel <raphael.harmel@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeswr
jeswr marked this pull request as ready for review July 5, 2026 11:22
Copilot AI review requested due to automatic review settings July 5, 2026 11:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jeswr

jeswr commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Documentation change only, typo fixing and examples. LGTM and I see nothing contriversial here.

@jeswr
jeswr merged commit 59537df into main Jul 5, 2026
6 checks passed
@jeswr
jeswr deleted the cleanup/qf1-repo-hygiene branch July 5, 2026 16:14
@bourgeoa

bourgeoa commented Jul 6, 2026

Copy link
Copy Markdown
Member

Nothing controversial. Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment