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

Ensure empty extended config throws a diagnostic #9701

Merged
merged 2 commits into from May 7, 2024

Conversation

marcins
Copy link
Contributor

@marcins marcins commented May 7, 2024

↪️ Pull Request

Small fix for a bug where an empty extended config file would result in an error message that didn't point to the root cause, this was because the error was an AssertionError and the error handling tried to process it as a Diagnostic.

💻 Examples

Before:

❯ parcel build
TypeError: Cannot read properties of undefined (reading 'message')
    at new ThrowableDiagnostic (/Users/mszczepanski/Work/atlassian/data-playground/node_modules/@parcel/diagnostic/lib/diagnostic.js:124:26)
[...]

After:

❯ parcel build
@parcel/core: packages/parcel-config-broken/index.json can't be empty

🚨 Test instructions

Extend an "empty" config file (i.e. index.json contains {})

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@marcins marcins requested a review from a team May 7, 2024 06:01
@marcins marcins enabled auto-merge May 7, 2024 06:49
@marcins marcins added this pull request to the merge queue May 7, 2024
Merged via the queue into v2 with commit 6dfeb9c May 7, 2024
16 of 17 checks passed
@mischnic mischnic deleted the mszczepanski/fix-missing-config-diagnostic branch May 7, 2024 10:37
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.

None yet

2 participants