Skip to content

Dep ownership: remove app code and app-specific deps#308

Closed
drewda wants to merge 42 commits intomainfrom
dep-ownership
Closed

Dep ownership: remove app code and app-specific deps#308
drewda wants to merge 42 commits intomainfrom
dep-ownership

Conversation

@drewda
Copy link
Copy Markdown
Member

@drewda drewda commented Mar 28, 2026

Summary

Removes the three embedded app directories (stations, transfers, admin) and all their associated dependencies from tlv2-ui. This makes tlv2-ui a lean shared library with no app-specific dependencies.

App code (stations, transfers, admin) has moved to interline-io/tlv2-apps.
This removes the now-redundant copies and all dependencies that were only
used by that app code.

- Delete src/runtime/apps/ entirely (stations, transfers, admin)
- Remove addComponentsDir for apps from module.ts
- Remove maplibre-gl CSS registration from module.ts (handled by station-editor
  and transfer-analyst packages which own maplibre-gl)
- Remove TransferAnalyst module options (move to transfer-analyst package)
- peerDependencies: nuxt/vue exact pins → ^4.0.0 / ^3.0.0
- Remove from dependencies: maplibre-gl, @mapbox/mapbox-gl-draw,
  @maplibre/maplibre-gl-geocoder, cytoscape, cytoscape-fcose,
  d3-scale-chromatic, vega-embed, vega, vega-lite, dayjs,
  @observablehq/plot, @turf/centroid, commander, tiny-emitter
- Remove from devDependencies: @types/cytoscape, @types/cytoscape-fcose,
  @types/d3-scale-chromatic, @types/mapbox__mapbox-gl-draw
- Remove ./apps/* subpath exports

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 28, 2026 00:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes embedded app code (stations, transfers, admin) and strips their related dependencies/exports so tlv2-ui becomes a lean shared library, with apps living in the tlv2-apps monorepo as separate packages.

Changes:

  • Deleted src/runtime/apps/{stations,transfers,admin} code (including related tests/components).
  • Removed app-related module options and Nuxt module setup (app components dir + MapLibre CSS injection).
  • Dropped app-specific dependencies and subpath exports; loosened Nuxt/Vue peer dependency ranges.

Reviewed changes

Copilot reviewed 96 out of 108 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/module.ts Removes app-specific module options and Nuxt wiring (components dir + MapLibre CSS).
package.json Removes ./apps/* exports and app dependencies; loosens nuxt/vue peer ranges.
src/runtime/apps/transfers/* Deletes transfers app code/tests now moved to @interline-io/transfer-analyst.
src/runtime/apps/stations/* Deletes stations app code/tests now moved to @interline-io/station-editor.
src/runtime/apps/admin/* Deletes admin app code now moved to @interline-io/tlv2-admin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
irees and others added 27 commits March 27, 2026 17:23
Nuxt 4 ships vue as a direct dependency (^3.5.22), not a peer dep, so
consumers don't install Vue independently. Declaring vue as a peer here
only created the risk of accepting an invalid range (^3.0.0 allows Vue
versions Nuxt 4 doesn't support). Nuxt's own dep tree enforces the
correct Vue version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Station, Stop, Pathway, Level are the core GTFS data models for the
pathways graph — they belong in lib/pathways/, not in the deleted apps
directory. Export from the pathways index so consumers can import from
tlv2-ui/lib/pathways.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… tlv2-apps

These utilities are now owned by the private tlv2-apps monorepo and published
as @interline-io/pathways. Consumer apps should update their imports from
@interline-io/tlv2-ui/lib/geom → @interline-io/pathways/geom and
@interline-io/tlv2-ui/lib/pathways → @interline-io/pathways/pathways.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
safelink.vue depends on useToastNotification; filters.ts routeTypeToWords
depends on lib/gtfs/routetypes. Both were incorrectly removed. Canonical
home for both is tlv2-ui; tlv2-app-utils now imports from @interline-io/tlv2-ui/lib/gtfs.
Re-adds ./lib/gtfs subpath export. playground/modal.vue uses auto-import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-import alone doesn't satisfy typecheck; must use #imports explicitly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Playground uses direct relative imports to src/runtime/ consistently,
not #imports virtual module.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
irees and others added 14 commits April 1, 2026 01:07
- Replace @auth0/auth0-spa-js with @auth0/auth0-nuxt ^1.0.1
- New auth plugin structure (auth.server, csrf.client, auth/plugin.client)
- Auth0 config now handled by auth0-nuxt module, not ModuleOptions
- installModule('nuxt-csurf') replaces moduleDependencies pattern
- Keep dep-ownership dep removals (no app deps, no maplibre/vega/cytoscape)
- Keep dep-ownership removal of transferAnalyst options from ModuleOptions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Change vue from "3.5.22" to "^3.5.0" and nuxt/@nuxt/kit/@nuxt/schema
from "4.2.0" to "^4.2.0". This allows pnpm to consolidate on a single
Vue version and enables Renovate to auto-update Nuxt devDeps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Loosen h3 from exact 1.15.1 to ^1.15.0 so pnpm consolidates on
the version Nuxt already pulls in (1.15.10), eliminating duplicate
copies. Add minimumReleaseAge of 7 days as a supply-chain safety
buffer for all caret-range dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These are all unjs packages provided transitively by Nuxt. Listing
them as direct deps caused version duplication in the dep tree (e.g.
h3 1.15.1 alongside Nuxt's 1.15.10). Since tlv2-ui already declares
nuxt as a peer dependency, these are guaranteed to be available.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The module builder (unbuild/rollup) determines externals from
package.json. After removing these from dependencies, defu was
being implicitly bundled into dist/module.mjs causing a build
failure. Declaring them as peers tells the builder they're external
while documenting that Nuxt provides them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@drewda
Copy link
Copy Markdown
Member Author

drewda commented Apr 1, 2026

No longer needed

@drewda drewda closed this Apr 1, 2026
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