Repository navigation
Open
Labels
choreRepo upkeep: config, templates, toolingRepo upkeep: config, templates, toolingrefactorCode change without behavior changeCode change without behavior change
Description
Is your feature request related to a problem? Please describe.
TS_PREFIX is dead on main. It is declared and re-exported, and nothing reads it:
src/build/neo4j/schema.ts:46 export const TS_PREFIX = "TS";
src/build/neo4j/index.ts:6 export { SCHEMA_VERSION, TS_PREFIX, ... } from "./schema";
git grep TS_PREFIX main -- src test scripts returns exactly those two lines — the declaration and its re-export. No third hit.
It is a leftover, not an oversight. On the 0.x line the same constant is live:
v0.5.0:src/build/neo4j/schema.ts:48 export const twinOf = (label) => `${TS_PREFIX}${label}`;
v0.5.0:src/build/neo4j/schema.ts:58 if (l === "Symbol" || l.startsWith(TS_PREFIX)) continue;
The v2 rewrite dropped twinOf/withTwins and declares labels as literals instead (label: "TSApplication", "TSModule", … at schema.ts:56-128), which orphaned the constant.
Describe the solution you'd like
- Delete
TS_PREFIXfromsrc/build/neo4j/schema.tsand from theindex.tsre-export list - Confirm
schema.neo4j.jsonis unchanged afterbun run gen:schema— proof that nothing observable moved
Describe alternatives you've considered
Not stated in the original issue.
Additional context
Scope boundary
Deletes a dead constant on main only. Does not:
- touch the 0.x line, where
TS_PREFIXis load-bearing (twinOfgenerates the:TSModule-style twin labels); - change any emitted label, relationship type, or schema version — nothing reads this, so nothing observable moves;
- address relationship-type namespacing, which is neo4j: relationship types are not namespaced, unlike every other analyzer's #88 and is a contract decision, not a cleanup.
Caveats and known risks
- It is a public export. Anything importing
TS_PREFIXfrom the package breaks.src/index.tsis a CLImain()with no library exports, so there is no published surface today — but check before deleting rather than assuming. - Do not "fix" it by using it. The obvious alternative — wire it back in so labels are built from the prefix rather than written literally — silently pre-decides the prefix scheme that neo4j: relationship types are not namespaced, unlike every other analyzer's #88 exists to settle. Delete, or leave it; do not re-activate it here.
- Removing it slightly increases the chance someone re-invents the constant when neo4j: relationship types are not namespaced, unlike every other analyzer's #88 lands. That is acceptable: a constant is cheap, a dead export that looks like an existing convention is misleading.
Definition of done
git grep TS_PREFIXonmainreturns nothing undersrc/.bun testandbun run typecheckpass.bun run gen:schemaproduces aschema.neo4j.jsonbyte-identical to the committed one.
Metadata
Metadata
Assignees
Labels
choreRepo upkeep: config, templates, toolingRepo upkeep: config, templates, toolingrefactorCode change without behavior changeCode change without behavior change
Activity
[-]chore(neo4j): delete the dead TS_PREFIX constant on main[/-][+]Delete the dead `TS_PREFIX` constant on main[/+]