Skip to content

馃摝馃敡锛歳ecognize comments in generator syntax - #108

Merged
openinf-commit-queue[bot] merged 1 commit into
mainfrom
fix/generator-source-comments
Oct 2, 2026
Merged

openinf-commit-queue[bot] merged 1 commit into
mainfrom
fix/generator-source-comments

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

Generator shape matching accepted whitespace and block comments between the
function keyword and *, but rejected valid functions whose retained source
contains a line comment there.

This treats line comments plus each ECMAScript line terminator as source gaps
and adds generator and async-generator regressions.

Fixes #107.

Treat line comments and their terminators as source gaps when checking
generator and async-generator function shapes. This matches valid source
preserved by Function.prototype.toString.

Add regressions for both generator kinds.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Codex:gpt-6-astra
Fixes: #107
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You鈥檝e used all 4 included reviews currently available. Your 36 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

鈿欙笍 Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: ed8710f6-c8ee-4e31-a2bb-0f2eaacbde5b

馃摜 Commits

Reviewing files that changed from the base of the PR and between 8177c45 and 0619fc6.

馃搾 Files selected for processing (4)
  • .changeset/generators-retain-line-comments.md
  • packages/util-core/src/_internal/_matches-brand-shape.ts
  • packages/util-types/test/guards/is-async-generator-function.ts
  • packages/util-types/test/guards/is-generator-function.ts
  • Autopilot 路 Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@DerekNonGeneric DerekNonGeneric added the 馃殌 Status: Commit Queue Land this pull request when its checks pass label Oct 2, 2026
@openinf-commit-queue
openinf-commit-queue Bot merged commit b554adf into main Oct 2, 2026
10 checks passed
@openinf-commit-queue openinf-commit-queue Bot removed the 馃殌 Status: Commit Queue Land this pull request when its checks pass label Oct 2, 2026
@openinf-commit-queue
openinf-commit-queue Bot deleted the fix/generator-source-comments branch October 2, 2026 03:55
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.

Generator guards reject functions with retained line comments

1 participant