chore: repo & docs hygiene quick-fix wave (QF-1/5)#832
Merged
Conversation
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>
Contributor
Author
|
Documentation change only, typo fixing and examples. LGTM and I see nothing contriversial here. |
Member
|
Nothing controversial. Agreed. |
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.
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
preparescript so installs from a git URL buildlib/(npm's documented mechanism for git dependencies); previously the package'smainentry did not exist.src/jsonparser.js: unused by any code path (JSON-LD goes throughsrc/jsonldparser.js), undocumented, untested; its only reference was the vestigial$rdf.jsonParserre-export insrc/index.ts, which is removed with it.example/people/book.jscalled the non-existentkb.load(); switched tofetcher.load()and moved the friends processing inside the fetch callback so it runs against a populated store.literal()factory signature in the README —literal(value, languageOrDatatype)— including the pitfall that the 3-argumentliteral(value, undefined, datatype)form from older tutorials silently ignores the datatype (verified against current build).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.).<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)
Co-authored-bytrailer) — updated to link directly to https://rdf.js.org/data-model-spec/ per the Readme: Broken Link - RDFJS Representation Task Force spec #319 thread, rather than the rdf.js.org homepage.Deviations / notes for review
$rdf.jsonParserwas an exported (though undocumented and unused) symbol. If you'd rather deprecate first, drop commitchore: remove unused jsonparser (#87)from this PR.package.json#654:preparerunsnpm run buildonly (transpiled JS). It does not runbuild:types, so a git-URL install still lackslib/index.d.ts; extending it tonpm run build && npm run build:typeswould fix that at the cost of slower installs (preparealso runs on localnpm ci, including CI). Kept minimal per the issue; happy to extend.link#uristatement (inIndexedFormula.replaceWith), not the fetcher; and its object is nowadays the obsoleted NamedNode, not a literal as in the 2017 report. Documented current behavior.Expected conflicts with sibling waves
package.json(one added line) will trivially conflict with wave QF-5's package.json edits.Local gates (all green before push)
npm run lint: 0 errors (5 pre-existingno-consolewarnings in untouched files)npm test: unit 308 passing / 0 failing; serialize suite all pass;test:types(tsc) cleanGenerated by an agent (Claude Fable 5) on @jeswr's behalf — draft for his review.