Skip to content

Expose the project configuration file loader - #396

Open
soleil-colza wants to merge 3 commits into
mainfrom
feat/config-file-loader-20261029
Open

soleil-colza wants to merge 3 commits into
mainfrom
feat/config-file-loader-20261029

Conversation

@soleil-colza

@soleil-colza soleil-colza commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Expose findProjectConfigFile and readProjectConfigFile through @stayingupwind/adapter/project-config so build tools can read the selected configuration without applying adapter-specific validation. The existing reader delegates to the same implementation, preserving file precedence, JSONC handling and executable TypeScript exports.

Validation: all 37 project-configuration tests pass; the adapter package builds with the new published subpath.


Summary by cubic

Exposes findProjectConfigFile and readProjectConfigFile through the new @stayingupwind/adapter/project-config subpath so build tools can read the selected config without adapter-specific validation. The adapter's existing reader now delegates to them, preserving file precedence, JSONC handling, and executable TypeScript exports. The build now emits the subpath as its own entry, and the packager's explicit BOM handling is kept portable. All 37 project-configuration tests pass, and the adapter package builds with the published subpath.

Written for commit ce6a575. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • New Features
    • Added APIs for locating and reading project configuration files, including caller-specified filenames. Configuration values are returned for caller validation; when no file is found, the result contains an empty value.
    • TypeScript configuration files are not executed during discovery, but are evaluated when read.
  • Documentation
    • Added guidance on configuration file selection, returned values, and safely evaluating TypeScript configuration.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T15:07:05.832643Z ce6a575 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@arkor-deploy

arkor-deploy Bot commented Oct 29, 2026

Copy link
Copy Markdown

Arkor — Preview deployments for arkorlab-upwind

Use the checkbox below to choose whether this pull request gets preview deployments.

  • Build and deploy previews for this pull request

Checking this builds the latest commit and future pushes. Unchecking stops queued and future builds; a running build can finish and an existing preview stays available.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 92d6e97a-3c21-4c3c-bc77-35934c7c19c4
Commits

Reviewing files that changed from the base of the PR and between 32f3465 and ce6a575.

Files selected for processing: 6
  • packages/adapter/README.md
  • packages/adapter/package.json
  • packages/adapter/scripts/build.ts
  • packages/adapter/src/node-original-load-mode.ts
  • packages/adapter/src/project-config.ts
  • packages/adapter/test/project-config.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The adapter adds exported functions to discover and read project configuration files. Existing configuration loading now uses the shared reader. The package build and exports include a project-config entry point, and the UTF-8 decoder option is explicit.

Changes: Adapter project config API

Layer / File(s) Summary
Project config discovery and reading
packages/adapter/src/project-config.ts, packages/adapter/test/project-config.test.ts, packages/adapter/README.md
The adapter exports functions to find and read project configuration files. The reader returns the filename and unvalidated value, or an undefined filename and empty value when no file exists. Existing configuration loading uses the shared reader. Tests and documentation cover the API.
Build and package exports
packages/adapter/scripts/build.ts, packages/adapter/package.json
The build creates separate index and project-config entries and logs each entry’s size. The package exports the project-config entry for source and published output.

CommonJS metadata decoding

Layer / File(s) Summary
Explicit UTF-8 decoding option
packages/adapter/src/node-original-load-mode.ts
The fatal UTF-8 decoder now sets ignoreBOM: false, matching its prior default.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: k-taro56

Merge Risk: Minimal · up to ce6a5

The documented build-tools API is ready to merge. Published TypeScript declarations remain a known limitation.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the primary change: exposing the project configuration file loader through the adapter package.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 4 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge based on the changes since the previous review.

Summary

Exposes findProjectConfigFile and readProjectConfigFile through @stayingupwind/adapter/project-config.

  • Build tools can read the selected project config without adapter-specific checks.
  • Metadata decoding keeps its existing BOM behavior.

Reviews (2) · Last reviewed commit: "Separate configuration test assertions f..." · Reviewed by Greptile

This branch has not been deployed

No deployments
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.

1 participant