Title: feat: LWS Protocol Mode (DRAFT) by melvincarvalho · Pull Request #88 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: feat: LWS Protocol Mode (DRAFT) by melvincarvalho · Pull Request #88 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: feat: LWS Protocol Mode (DRAFT) by melvincarvalho · Pull Request #88 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary Adds preliminary implementation of W3C Linked Web Storage (LWS) protocol mode as an optional configuration flag. Status: 🚧 DRAFT - This PR captures the initial infrastructure for LWS support. Not intended for immediate merge - waiting for ecosystem signals (see #87). Changes Config Infrastructure ✅ Added --lws-mode CLI flag ✅ Added JSS_LWS_MODE environment variable support ✅ Added lwsMode config file option ✅ Server displays "LWS Mode: enabled (DRAFT)" in config output Core Implementation ✅ PUT restriction: In LWS mode, PUT returns 404 for non-existent resources with helpful error message suggesting POST ✅ Preserves LDP mode: Default behavior unchanged (PUT creates or updates) ✅ Request decoration: request.lwsMode available to all handlers Testing ✅ Basic LWS test suite (test/lws.test.js) Tests PUT rejection for non-existent resources Tests PUT success for updates Tests POST for creation (already works) Documents key LWS differences Documentation ✅ README section explaining LWS mode with examples ✅ Comparison table (Solid/LDP vs LWS) ✅ Warning about draft status ✅ Links to issue #87 for full context Key Difference Solid/LDP Mode (default): PUT /alice/new.json → 201 Created (creates resource) LWS Mode: PUT /alice/new.json → 404 Not Found (suggests POST instead) POST /alice/ + Slug → 201 Created (required for creation) PUT /alice/existing.json → 204 No Content (updates work) What's NOT Implemented Yet From the full plan in #87, this PR only implements the foundation: ❌ Link header-based container detection (still uses trailing slash) ❌ Linkset metadata endpoints (/resource;linkset) ❌ JSON Merge Patch for metadata ❌ Full test matrix (only basic tests included) These are intentionally deferred until we see ecosystem adoption. Why This PR Exists This PR: Captures the analysis from evaluating LWS PR #37 Proves feasibility - demonstrates LWS mode can coexist with LDP Enables experimentation - developers can test LWS semantics Preserves work - when/if LWS gains traction, we have a foundation Decision Criteria for Merge Recommend merging when: ✅ At least 3 other servers implement LWS protocol ✅ At least 5 client apps use LWS endpoints ✅ W3C Solid CG shows interest in LWS alignment ✅ LWS spec reaches Candidate Recommendation Current status (Jan 2026): Servers: Unknown Clients: Likely zero Spec: Early draft (PR #37 just merged) Testing # Run LWS-specific tests npm test -- test/lws.test.js # Run full suite (LWS tests are isolated) npm test Related Issue: #87 LWS Spec PR: w3c/lws-protocol#37 LWS Repo: https://github.com/w3c/lws-protocol Checklist Config flag infrastructure Basic PUT restriction logic Tests demonstrating behavior README documentation Full container detection (deferred) Linkset endpoints (deferred) Complete test matrix (deferred) Note: Keeping as draft until ecosystem signals warrant merge. Can be rebased/updated as LWS spec evolves.
Open Graph Description: Summary Adds preliminary implementation of W3C Linked Web Storage (LWS) protocol mode as an optional configuration flag. Status: 🚧 DRAFT - This PR captures the initial infrastructure for LWS suppor...
X Description: Summary Adds preliminary implementation of W3C Linked Web Storage (LWS) protocol mode as an optional configuration flag. Status: 🚧 DRAFT - This PR captures the initial infrastructure for LWS suppor...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/88
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:10b22c85-bb0b-3b57-a9d5-4f651ffc5c04 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D5B0:272E5B:42932C:5B014A:69774DF0 |
| html-safe-nonce | 439abbc31320ec788c5bd5fbb15869c48d7fd06c586bce9655a3d0c0d3c5f69e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUIwOjI3MkU1Qjo0MjkzMkM6NUIwMTRBOjY5Nzc0REYwIiwidmlzaXRvcl9pZCI6IjU0MjQ4NzEzNTEwODI1MDM2NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4eaedef4bd95c7d8e50e8c47eb5950da9888b441a78c8de8d956d1afe59cbdd1 |
| hovercard-subject-tag | pull_request:3173800163 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/88/files |
| twitter:image | https://avatars.githubusercontent.com/u/65864?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/65864?s=400&v=4 |
| og:image:alt | Summary Adds preliminary implementation of W3C Linked Web Storage (LWS) protocol mode as an optional configuration flag. Status: 🚧 DRAFT - This PR captures the initial infrastructure for LWS suppor... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3310064f35a62c06a4024ba37f41c06836f39376a095c2dfd2c4b693c34965be |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 67d5f8d1d53c3cc4f49fc3bb8029933c3dc219e6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width