Repository navigation
feat: accept .reylo.yml as the project file's name - #13
Conversation
A project file may be named .reylo.yml as well as .reylo.yaml; with both beside one package.json the project is an error that names them. The setup lists .reylo.yml among the content mapper's extensions, and the mapper answers it as a module that declares nothing.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
ℹ️ No critical issues. One message that this change makes inaccurate is described below.
Reviewed changes
I reviewed the whole PR: the project file can now be named .reylo.yml as well as .reylo.yaml, and having both names beside one package.json is an error.
- Lookup:
findProjectFilechecksPROJECT_FILESin order, so.reylo.yamlwins.resolveProjectreports an error when both files exist andREYLO_CONFIGis unset. - Watching:
watchednow covers both names, andconfigIdentityalready hashesresolved.error. So creating the second file retypes the project and shows the error. - Mapper: a file ending in either name becomes
export {};. - Docs and examples: every
contentMappersentry, plus the README, setup and configuration pages, now lists.reylo.yml. - Tests: new coverage for the
.ymlname, watching both names, the both-files error and theREYLO_CONFIGbypass. The module test now imports aconfig/local.reylo.yml.
ℹ️ The strict_params diagnostic still names .reylo.yaml in a .reylo.yml project
The untyped-parameter error in src/module-types.ts:60 always says set strict_params: false in .reylo.yaml. In a project that uses .reylo.yml, it points to a file that doesn't exist. If the user follows it and creates .reylo.yaml, the project hits the new error .reylo.yaml and .reylo.yml are both project files; keep one. This PR already fixes the same problem for missingUrl, which uses file ? shown(file) : PROJECT_FILE, but this message can't do that because moduleTypes never gets the file name.
Technical details
# strict_params diagnostic names a hardcoded `.reylo.yaml`
## Affected sites
- src/module-types.ts:60: message hardcodes `.reylo.yaml`
- src/mapper.ts:112: the only caller, `moduleTypes(sql, analysis, project.dialect, lexed, project.strictParams)`; it has the `Session`, whose `project.file` is the resolved path
## Required outcome
- When the project's file is `.reylo.yml` (or a `REYLO_CONFIG` path), the message names that file; with no project file, it keeps naming `.reylo.yaml` (`PROJECT_FILE`)
- Existing assertions in tests/strict-params.test.ts:77 keep passing for the `.reylo.yaml` case
## Suggested approach (optional)
- Pass the project file's display name (e.g. `basename(project.file ?? PROJECT_FILE)`) into `moduleTypes` next to `strictParams`, and use it in the messageclaude-opus-5-5 | 𝕏
|
Fixed in 35ddb45. |
There was a problem hiding this comment.
ℹ️ The previous review's
strict_paramsconcern is fixed. One minor gap remains in the newreylo generatehint (see inline comment).
Reviewed changes
Since the last review at 6827cd2, one commit makes the project's messages name the file the project actually uses.
- Mapper option diagnostic: the code-104 message now names the resolved project file, given relative to the tsconfig's directory, instead of a fixed
.reylo.yaml. strict_paramsdiagnostic:moduleTypesnow takesprojectFile(it defaults to.reylo.yaml), andmapper.tspasses the project's file. This resolves the concern from the previous review.- CLI hint: the "No query under …" message names the project's own file when the run opened exactly one project.
- Tests:
tests/strict-params.test.tsnow checks the code-12 message in a.reylo.ymlproject.
claude-opus-5-5 | 𝕏
There was a problem hiding this comment.
✅ No new issues found. The
reylo generatehint concern from the previous review is fixed.
Reviewed changes
Since the last review at 35ddb45, one commit makes the "No query under …" hint name a .reylo.yml project's file even when no .sql file was found.
- CLI hint fallback: when no session opened and at most one path was given,
ownis nowfindProjectFile(resolve(paths[0] ?? ".")). That function honoursREYLO_CONFIGand checks both names beside the package'spackage.json. In every other case the hint still falls back to.reylo.yaml. - Test:
tests/cli.test.tsrunsreylo generatein an empty.reylo.ymlproject and checks that the hint readsset cli.include in .reylo.yml.
claude-opus-5-5 | 𝕏

A project file may now be named
.reylo.ymlas well as.reylo.yaml.src/project.ts):findProjectFiletakes.reylo.yaml, else.reylo.yml, beside the package'spackage.json. With both there, the project is an error that names them (".reylo.yaml and .reylo.yml are both project files; keep one."), since edits to whichever was not read would do nothing.REYLO_CONFIGstill names one file and skips the check. The type check watches both names, so creating either one retypes the project.src/mapper.ts): a file ending in either name is answered as a module that declares nothing, as.reylo.yamlhas been since feat(mapper): take .reylo.yaml as a content mapper extension #11.[".sql", ".reylo.yaml", ".reylo.yml"].tests/project.test.tscovers the.ymlname, the watch on both names, the error for both andREYLO_CONFIG;tests/project-file-module.test.tsnow imports a.reylo.ymland fails without the mapper change.Verified locally: typecheck, loader tests, package build, docs site, and every example project's gate.