Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: linkeddata/rdflib.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: JavaScriptSolidServer/rdflib.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 172 files changed
  • 1 contributor

Commits on Jan 18, 2026

  1. feat: add modular exports for reduced bundle size

    Add lightweight entry points that reduce bundle size by 95%:
    - rdflib/core (8KB gzipped) - RDF data structures only
    - rdflib/parse-lite - N3/Turtle parser with plugin support
    
    Changes:
    - Create formula-lite.ts and store-lite.ts without heavy deps
    - Use `import type` for Fetcher/UpdateManager to prevent bundling
    - Add package.json exports for subpath imports
    - Fix circular dependency on ./index in store.ts
    
    Full library remains backward compatible at 171KB gzipped.
    melvincarvalho committed Jan 18, 2026
    Configuration menu
    Copy the full SHA
    fe5d095 View commit details
    Browse the repository at this point in the history
  2. perf: reduce bundle size by removing/lazy-loading heavy deps

    - Remove n3 dependency: create lightweight nquads-parser.ts
    - Use native DOMParser in browser, lazy-load xmldom for Node.js
    - Use native fetch (Node 18+), remove cross-fetch dependency
    - Lazy-load @frogcat/ttl2jsonld only when JSON-LD serialization needed
    
    Bundle size: 587KB -> 407KB minified (30% reduction)
    Gzipped: 171KB -> 119KB (30% reduction)
    
    All tests pass.
    melvincarvalho committed Jan 18, 2026
    Configuration menu
    Copy the full SHA
    fbb2c39 View commit details
    Browse the repository at this point in the history
  3. perf: move optional deps to peerDependencies

    Move heavy optional dependencies to peerDependencies:
    - jsonld (277KB) - only needed for JSON-LD parsing
    - @xmldom/xmldom (136KB) - only needed for RDF/XML in Node.js
    - @frogcat/ttl2jsonld (135KB) - only needed for JSON-LD serialization
    
    Removed from dependencies (no longer used):
    - n3 (replaced with internal nquads-parser)
    - cross-fetch (using native fetch)
    
    Bundle size with externals:
    - Before: 587 KB minified, 171 KB gzipped
    - After:  190 KB minified,  56 KB gzipped (67% reduction)
    
    Users who need these features should install them:
      npm install jsonld                # for JSON-LD parsing
      npm install @xmldom/xmldom        # for RDF/XML in Node.js
      npm install @frogcat/ttl2jsonld   # for JSON-LD serialization
    melvincarvalho committed Jan 18, 2026
    Configuration menu
    Copy the full SHA
    27b63dc View commit details
    Browse the repository at this point in the history
  4. chore: include built files for GitHub installs

    Include lib/, esm/, and dist/ directories in the repository so that
    the package can be installed directly from GitHub without requiring
    a build step. This enables use as a GitHub dependency.
    
    Also cleaned up unused imports in the lite modules to fix TypeScript
    compilation warnings.
    melvincarvalho committed Jan 18, 2026
    Configuration menu
    Copy the full SHA
    e7d16da View commit details
    Browse the repository at this point in the history
Loading