Skip to content

ci: run the devtools package tests pnpm test runs the Angular host app suite, which tsconfig.spec.json limits to src/**/*.spec.ts, so the vitest suite in packages/ng-devtools never ran on a pull request. Add a step for pnpm test:devtools and name the existing step after the project it covers. - #1

Closed
erkamyaman wants to merge 11 commits into
mainfrom
chore/prettier

Conversation

@erkamyaman

Copy link
Copy Markdown
Owner

Two small things. The repo's .prettierrc was never run (43 files drifted), so I reformatted and added a format:check CI step. The reformat is its own commit, whitespace only. Also CI wasn't running the package tests at all, since pnpm test only covers src/**/*.spec.ts, so I added a test:devtools step. Full CI run green locally on Node 24.

erkamyaman and others added 11 commits September 20, 2026 18:29
- use .ts import specifiers in devframe.ts; the package has no build
  step and Node's type stripping does not remap .js to .ts
- enable allowImportingTsExtensions and rewriteRelativeImportExtensions
  in tsconfig.app.json so ng build still compiles src/server.ts
- declare cac, an optional peer of devframe that nothing installs but
  both bin.mjs call through createCac
- provide Router in app.spec.ts and drop the assertion on an h1 that
  app.html no longer renders
highlight, inspect-signals and inspect-providers each advertised
`inputSchema: { type: 'object', properties: {} }` while their handlers
read `args.selector`, so an MCP client had no way to discover the
argument and a wrong guess failed silently.
fix: repair devtools build, CLI entry, and test suite
…put-schemas

feat: declare input schemas for the selector-taking agent tools
Runs on push and pull requests to main: frozen-lockfile install, then
the test suite, the devtools UI build, the SSR app build, the Chrome
extension build, and a CLI smoke test.
…antoshyadavdev#4)

* fix: report the right component for lazy and component-less routes

Lazy routes were reported as `import`, and a route without a component
took the next route's, because each search ran to the end of the file.
Scope each route to the text before the next `path:` and match eager and
lazy components explicitly.

Adds the first scanner tests, run with `pnpm test:devtools`.

* fix: read each route from its own object literal

Splitting at each `path:` broke when `component` came before `path`,
let a parent route pick up its child's component, and let the lazy
match run into later properties such as a resolver's `.then(...)`.

Walk the file's object literals, skipping strings and comments, and read
`path`, `component` and `loadComponent` from each object's top-level
properties only.

* fix: ignore comments when reading route properties

A comment above `path` hid the whole route, and one before
`loadComponent` hid its component, because property text still carried
the comment. Strip comments from the file once, respecting strings, so
neither the object scan nor the property split sees them.

* fix: only read routes from array elements

A nested object such as `data: { path: 'label' }` was reported as its
own route. Only take object literals whose direct parent is an array,
which covers the routes array, `children` and `provideRouter([...])`.

* fix: only read routes from route configuration arrays

Objects were taken from any array, so a nested metadata array such as
`data: { breadcrumbs: [{ path: 'label' }] }` produced a phantom route.

Track which arrays hold routes while scanning: the route configuration
itself (a top-level array, or one passed to provideRouter, forRoot or
forChild) and `children` arrays. Objects in any other array, including
`providers` and metadata under `data`, are no longer reported as routes,
while routes nested below a `children` array still are.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HiFGG73GY1m7uGtSQjhVNo

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The repo carries a .prettierrc that nothing ran, so 43 files had drifted
from it. Run `prettier --write .` over the tree and add a .prettierignore
for the directories that hold generated output (dist, .angular,
extension/ui, the assets package's dist) and the lockfile.

No behaviour changes: whitespace, quoting and wrapping only.
Add `pnpm format` and `pnpm format:check`, and run the check in CI so the
tree cannot drift from .prettierrc again.
`pnpm test` runs the Angular host app suite, which tsconfig.spec.json
limits to src/**/*.spec.ts, so the vitest suite in packages/ng-devtools
never ran on a pull request.

Add a step for `pnpm test:devtools` and name the existing step after the
project it covers.
@erkamyaman erkamyaman closed this Sep 22, 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.

2 participants