Skip to content

Add is-waypoint-record util (moved from ember-core) - #71

Open
roncodes wants to merge 1 commit into
mainfrom
feature/add-is-waypoint-record
Open

Add is-waypoint-record util (moved from ember-core)#71
roncodes wants to merge 1 commit into
mainfrom
feature/add-is-waypoint-record

Conversation

@roncodes

@roncodes roncodes commented Aug 7, 2026

Copy link
Copy Markdown
Member

Why

isWaypointRecord lived in @fleetbase/ember-core, where it imported ../models/waypoint — a path that does not exist in that package. Any consumer importing it got Could not find module.

This is its natural home: the Waypoint model is here, so the import is a plain relative one.

It could not stay in ember-core. That package cannot depend on @fleetbase/fleetops-data, because fleetops-data already depends on @fleetbase/ember-core — a direct dependency would be circular. The alternatives were an undeclared cross-package import or an optional peer dependency, both worse than putting the util beside the model it checks.

Consumer impact

None. No package references it in source — checked across every package in the monorepo. The matches that appear elsewhere are inside built dist/ bundles, which is ember-core's own code inlined into consumers' vendor files, not real usage.

Tests

Covers a real waypoint record, the place model that waypoint extends (the check has to reject the parent while accepting the child), an unrelated record, an ObjectProxy wrapping a waypoint (instanceof sees the proxy, not its content), and plain and nullish values.

Related

Removed from ember-core in fleetbase/ember-core#90.

🤖 Generated with Claude Code

Moved here from @fleetbase/ember-core, where it had been importing
../models/waypoint — a path that does not exist in that package, so the module
threw for anyone who imported it.

This is its natural home: the Waypoint model lives here, so the import is a
plain relative one. It could not stay in ember-core, because ember-core cannot
depend on fleetops-data (fleetops-data already depends on ember-core), leaving
only an undeclared cross-package import or an optional peer dependency, both
worse than putting the util beside the model it checks.

No package used it in source, so nothing needs updating alongside this. The
matches that show up elsewhere are in built dist bundles, which is ember-core's
own code inlined into consumers' vendor files rather than real usage.

Tested against a real waypoint, the place model waypoint extends, an unrelated
record, a proxy, and plain and nullish values.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant