Skip to content

feat: accept .reylo.yml as the project file's name - #13

Merged
colinhacks merged 3 commits into
mainfrom
reylo-yml
Oct 22, 2026
Merged

colinhacks merged 3 commits into
mainfrom
reylo-yml

Conversation

@colinhacks

Copy link
Copy Markdown
Owner

A project file may now be named .reylo.yml as well as .reylo.yaml.

  • Lookup (src/project.ts): findProjectFile takes .reylo.yaml, else .reylo.yml, beside the package's package.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_CONFIG still names one file and skips the check. The type check watches both names, so creating either one retypes the project.
  • Mapper (src/mapper.ts): a file ending in either name is answered as a module that declares nothing, as .reylo.yaml has been since feat(mapper): take .reylo.yaml as a content mapper extension #11.
  • Setup: the README, the setup page and its agent prompt, the configuration section, and all ten example projects list [".sql", ".reylo.yaml", ".reylo.yml"].
  • Tests: tests/project.test.ts covers the .yml name, the watch on both names, the error for both and REYLO_CONFIG; tests/project-file-module.test.ts now imports a .reylo.yml and fails without the mapper change.

Verified locally: typecheck, loader tests, package build, docs site, and every example project's gate.

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.
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reylo Ready Ready Preview Oct 22, 2026 5:26pm UTC

Request Review

Copilot AI balanced review requested due to automatic review settings October 22, 2026 17:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ 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: findProjectFile checks PROJECT_FILES in order, so .reylo.yaml wins. resolveProject reports an error when both files exist and REYLO_CONFIG is unset.
  • Watching: watched now covers both names, and configIdentity already hashes resolved.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 contentMappers entry, plus the README, setup and configuration pages, now lists .reylo.yml.
  • Tests: new coverage for the .yml name, watching both names, the both-files error and the REYLO_CONFIG bypass. The module test now imports a config/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 message

Pullfrog  | Fix it ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

@colinhacks

Copy link
Copy Markdown
Owner Author

Fixed in 35ddb45. moduleTypes takes the project file it names as an optional last argument, .reylo.yaml by default, and the mapper passes the resolved file (relative to the project, .reylo.yaml where there is none). The untyped-parameter error now names .reylo.yml in a .reylo.yml project. Two other messages had the same flaw and now name the real file too: the mapper's option diagnostic ("reylo reads its settings from …") and reylo generate's "set cli.include in …" hint, which names the project's file when the run covered one project that has one. tests/strict-params.test.ts checks the .reylo.yml message.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ The previous review's strict_params concern is fixed. One minor gap remains in the new reylo generate hint (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_params diagnostic: moduleTypes now takes projectFile (it defaults to .reylo.yaml), and mapper.ts passes 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.ts now checks the code-12 message in a .reylo.yml project.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread src/cli.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found. The reylo generate hint 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, own is now findProjectFile(resolve(paths[0] ?? ".")). That function honours REYLO_CONFIG and checks both names beside the package's package.json. In every other case the hint still falls back to .reylo.yaml.
  • Test: tests/cli.test.ts runs reylo generate in an empty .reylo.yml project and checks that the hint reads set cli.include in .reylo.yml.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@colinhacks
colinhacks merged commit 9cc640b into main Oct 22, 2026
4 checks passed
@colinhacks
colinhacks deleted the reylo-yml branch October 22, 2026 17:28
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