Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mark allowTrailingCommas as optional #150

Merged
merged 3 commits into from
Nov 5, 2024
Merged

Conversation

GeekyEggo
Copy link
Contributor

When updating from 3.0.1 to 3.3.1, I noticed a breaking change was introduced in #136, specifically with the TypeScript type of ParseOptions.allowTrailingCommas.

C:/git/cli/src/json/schema.ts:105:27
 '{ mode: "json"; ranges: false; tokens: false; }' but required in type 'ParseOptions$1'.

105   const ast = parse(json, { mode: "json", ranges: false, tokens: false });
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@humanwhocodes/momoa/dist/momoa.d.ts:66:14
    66     readonly allowTrailingCommas: boolean;
                    ~~~~~~~~~~~~~~~~~~~
    'allowTrailingCommas' is declared here.

This PR updates ParseOptions.allowTrailingCommas to be optional, preventing the introduction of a breaking change.

@nzakas
Copy link
Collaborator

nzakas commented Nov 5, 2024

Ah good catch. It looks like there's a bunch of unrelated formatting changes in this PR. Can you fix that?

@GeekyEggo
Copy link
Contributor Author

GeekyEggo commented Nov 5, 2024

Oops, my apologies! Those should be resolved now. 🙏

Copy link
Collaborator

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@nzakas nzakas merged commit 5746823 into humanwhocodes:main Nov 5, 2024
14 checks passed
@github-actions github-actions bot mentioned this pull request Nov 5, 2024
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