You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TSDecorator.qualified_name is documented as "checker-resolved FQN when available". It is not
resolved by anything. It is ts-morph's Decorator.getFullName() — the written expression text —
and the builder never consults the checker (src/syntactic_analysis/builders.ts, decoratorsOf).
Measured with a decorator imported as import { Get as HttpGet } from "./decorators", where
resolution is trivial: the field emits HttpGet, the alias as typed. So the field is a second copy
of name with dots, and every consumer that trusted the comment — including #143 — was misled.
Consequence in #143 as shipped: :TSDecorator merges on qualified_name || name, so a project's
local @Get and NestJS's @Get collapse into one node. The "two spellings, one decorator"
behaviour that PR describes works in the opposite direction from python's.
The two decorator identity fields only. No entrypoint detection, no rules file, no changes to
argument capture.
Goals
qualified_name is the import-table resolution of the written spelling, or absent when
the decorator's head is not an imported binding — python's rule ("Jedi, else the import table,
else None") minus the Jedi step TypeScript does not have
name is the decorator as written (http.route, not route), so an unresolved dotted
decorator keeps its spelling in the output — python's name is the written spelling for the
same reason
The resolver is reusable: the entrypoint pass (units 2-3) needs the same import table for base
classes and the unresolved counter
Schema comments say what the fields actually hold
Caveats and known risks
This changes emitted values, so it is a fix with a visible effect rather than an invisible one:
decorator
name before → after
qualified_name before → after
@Get from @nestjs/common
Get → Get
Get → @nestjs/common.Get
@HttpGet via import { Get as HttpGet }
HttpGet → HttpGet
HttpGet → <module>.Get
@http.route via import * as http
route → http.route
http.route → <module>.route
@Local declared in the same file
Local → Local
Local → absent
Neo4j :TSDecorator merge key (qualified_name || name) therefore becomes package-qualified for
imported decorators and stays the written spelling for local ones — which is what #143 meant.
Not a breaking change: the field was documented as resolved and never was. But anything that
matched on the old bare qualified_name sees different values.
Definition of done
The four rows above are asserted end-to-end, including the alias and namespace cases
Problem
TSDecorator.qualified_nameis documented as "checker-resolved FQN when available". It is notresolved by anything. It is ts-morph's
Decorator.getFullName()— the written expression text —and the builder never consults the checker (
src/syntactic_analysis/builders.ts,decoratorsOf).Measured with a decorator imported as
import { Get as HttpGet } from "./decorators", whereresolution is trivial: the field emits
HttpGet, the alias as typed. So the field is a second copyof
namewith dots, and every consumer that trusted the comment — including #143 — was misled.Consequence in #143 as shipped:
:TSDecoratormerges onqualified_name || name, so a project'slocal
@Getand NestJS's@Getcollapse into one node. The "two spellings, one decorator"behaviour that PR describes works in the opposite direction from python's.
Found while propagating python 1.4.1's entrypoint changes; this is unit 0 of
docs/design/specs/entrypoint-detection.md(#150), and blocks the decorator matcher there.
Scope boundary
The two decorator identity fields only. No entrypoint detection, no rules file, no changes to
argument capture.
Goals
qualified_nameis the import-table resolution of the written spelling, or absent whenthe decorator's head is not an imported binding — python's rule ("Jedi, else the import table,
else
None") minus the Jedi step TypeScript does not havenameis the decorator as written (http.route, notroute), so an unresolved dotteddecorator keeps its spelling in the output — python's
nameis the written spelling for thesame reason
classes and the unresolved counter
Caveats and known risks
This changes emitted values, so it is a
fixwith a visible effect rather than an invisible one:namebefore → afterqualified_namebefore → after@Getfrom@nestjs/commonGet→GetGet→@nestjs/common.Get@HttpGetviaimport { Get as HttpGet }HttpGet→HttpGetHttpGet→<module>.Get@http.routeviaimport * as httproute→http.routehttp.route→<module>.route@Localdeclared in the same fileLocal→LocalLocal→ absentNeo4j
:TSDecoratormerge key (qualified_name || name) therefore becomes package-qualified forimported decorators and stays the written spelling for local ones — which is what #143 meant.
Not a breaking change: the field was documented as resolved and never was. But anything that
matched on the old bare
qualified_namesees different values.Definition of done
qualified_namebun testgreen; the feat(neo4j): project decorators, matching python #143 test still passes (its decorators are same-file, so the merge key isunchanged there)