8000 feat(mapper): take .reylo.yaml as a content mapper extension by colinhacks · Pull Request #11 · colinhacks/reylo · GitHub
[go: up one dir, main page]

Skip to content

feat(mapper): take .reylo.yaml as a content mapper extension - #11

Merged
colinhacks merged 1 commit into
mainfrom
map-project-file
Oct 22, 2026
Merged

colinhacks merged 1 commit into
mainfrom
map-project-file

Conversation

@colinhacks
Copy link
Copy Markdown
Owner

The setup now lists .reylo.yaml beside .sql in the content mapper's extensions, in the README, the setup page (and its agent prompt) and all ten example projects.

  • The mapper answers a project file as a module that declares nothing (src/mapper.ts). Before, a mapped .reylo.yaml was analyzed as SQL and failed with a syntax error; so did a <name>.reylo.yaml that include takes in.
  • TypeScript hands the file to Reylo rather than to a .yaml loader, since the longest registered suffix wins. A root .reylo.yaml stays out of the program unless imported, because include wildcards skip dotfiles.
  • Added tests/project-file-module.test.ts, which runs tsc --runExternalCode over a SQLite project that imports .reylo.yaml and takes in a config/staging.reylo.yaml; it fails without the mapper change.

Verified locally on 7.1.0-dev.20260918.1 and 7.1.0-beta: typecheck, loader tests, package build, docs site, and every example project's gate.

The setup now lists .reylo.yaml beside .sql, so the project file is
Reylo's to type rather than a YAML loader's. Its module declares
nothing, and a <name>.reylo.yaml that include takes in is no longer
read as a query.
Copilot AI balanced review requested due to automatic review settings October 22, 2026 17:03
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.

8000
@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:03pm UTC

Request Review

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

Reviewed changes

This review covers the full PR: it maps .reylo.yaml through the content mapper beside .sql, and it updates the documented setup and every example project to match.

  • Project file short-circuit in src/mapper.ts: transform returns an empty module (export {};) for any file ending in PROJECT_FILE. It does this before the project lookup, so neither the root .reylo.yaml nor a <name>.reylo.yaml that include takes in is analyzed as SQL.
  • Setup docs: README.md and site/content/sections/01-setup.mdx (including its agent prompt) now list [".sql", ".reylo.yaml"].
  • Examples: all ten examples/*/tsconfig.json files and their READMEs' "How Reylo is wired in" sections name the new extension.
  • New test tests/project-file-module.test.ts: runs tsc --runExternalCode over a temporary SQLite project that imports .reylo.yaml and includes config/staging.reylo.yaml. It uses the same scaffolding as tests/definition.test.ts.

I ran the new test locally and it passes. With the endsWith(PROJECT_FILE) line removed, it fails with reylo6 syntax errors on both YAML files, so it covers the change. The only contentMappers configs still listing just .sql are under lab/ and in two existing tests, and none of those are user-facing.

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

@colinhacks
colinhacks merged commit 5cb21b5 into main Oct 22, 2026
4 checks passed
@colinhacks
colinhacks deleted the map-project-file branch October 22, 2026 17:06
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

0