Skip to content

WEBDEV-8506: Add conventions for non-component modules#50

Open
jbuckner wants to merge 2 commits into
mainfrom
WEBDEV-8506-non-component-conventions
Open

WEBDEV-8506: Add conventions for non-component modules#50
jbuckner wants to merge 2 commits into
mainfrom
WEBDEV-8506-non-component-conventions

Conversation

@jbuckner
Copy link
Copy Markdown
Collaborator

@jbuckner jbuckner commented May 27, 2026

Summary

Establishes the directory layout, package.json exports patterns, and test conventions for non-component modules (services, parsers, models, type utilities) ahead of consolidating metadata-service and its dependency tree into elements.

No code is moved in this PR — it's documentation + the routing rules that future migration PRs will fill in.

Changes

  • README.md — new "Adding a Service or Library Module" section parallel to "Adding a Component", documenting the new top-level directories (src/services, src/parsers, src/models, src/types), their purposes, structure, exports, and test patterns.
  • package.json — adds subpath exports for the four new module directories. Patterns mirror the existing ./labs/* pattern.

Why a separate ticket?

The next four tickets (WEBDEV-8507, WEBDEV-8508, WEBDEV-8509, WEBDEV-8510) each move a single repo into elements/src/. Landing the conventions first means each migration PR is straightforward "move code into the agreed location" without re-litigating layout.

Test plan

  • npm run build passes
  • Reviewers: confirm the proposed directory split (services / parsers / models / types) reads naturally — easy to redo before any code migrates if the names should change.

QA waived — docs + config only, no runtime artifact. qa-waived label applied at Code Review transition.

🤖 Generated with Claude Code

Establishes directory layout, exports map, and test conventions for
services, parsers, models, and type utilities ahead of consolidating
metadata-service and its dependency tree into elements.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

PR Preview Action v1.8.1

🚀 View preview at
https://internetarchive.github.io/elements/pr/pr-50/

Built to branch ghpages at 2026-05-28 20:59 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.75%. Comparing base (9a3b0f3) to head (a60acb4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #50   +/-   ##
=======================================
  Coverage   78.75%   78.75%           
=======================================
  Files          16       16           
  Lines         645      645           
  Branches      168      168           
=======================================
  Hits          508      508           
  Misses         95       95           
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@rebecca-shoptaw rebecca-shoptaw left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!! In the interest of keeping things simple and avoiding a ballooning list of sections, I'd personally prefer a simple division like this: services / utils (standalone functions, incl parsers) / types (types, models, etc.)

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.

3 participants