Skip to content

Support comments & trailing commas in require/import package.json - #10531

Merged
Jarred-Sumner merged 1 commit into
mainfrom
jarred/require-and-import
Apr 26, 2024
Merged

Jarred-Sumner merged 1 commit into
mainfrom
jarred/require-and-import

Conversation

@Jarred-Sumner

Copy link
Copy Markdown
Collaborator

What does this PR do?

Supports require("./package.json") and await import("./package.json") when the json file has comments or trailing commas

How did you verify your code works?

There is a test

@Jarred-Sumner
Jarred-Sumner merged commit 189aa22 into main Apr 26, 2024
@Jarred-Sumner
Jarred-Sumner deleted the jarred/require-and-import branch April 26, 2024 03:48
@github-actions

Copy link
Copy Markdown
Contributor

❌ @Jarred-Sumner, your commit has failing tests :(

💪 4 failing tests Darwin AARCH64

💻 1 failing tests Darwin x64 baseline

💻 2 failing tests Darwin x64

🐧💪 3 failing tests Linux AARCH64

🐧🖥 3 failing tests Linux x64 baseline

🐧🖥 2 failing tests Linux x64

🪟💻 11 failing tests Windows x64 baseline

🪟💻 11 failing tests Windows x64

View logs

@Jarred-Sumner
Jarred-Sumner restored the jarred/require-and-import branch April 26, 2024 06:13
@silverwind

Copy link
Copy Markdown
Contributor

Which JSONC parser is in use here and is it available as an npm module?

If the ecosystem is to standardize on JSONC for package.json, it ought to use the same parser.

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.

3 participants