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

refactor: simplify config loading by skipping fs.existsSync check #5305

Merged
merged 1 commit into from Mar 24, 2020

Conversation

sodatea
Copy link
Member

@sodatea sodatea commented Mar 23, 2020

Use error code thrown by require directly.
This also simplifies module mocking in unit tests.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

Use error code thrown by `require` directly.
This also simplifies module mocking in unit test.
@sodatea sodatea merged commit f1bdf73 into vuejs:dev Mar 24, 2020
@sodatea sodatea deleted the fix-config-loading branch March 24, 2020 07:24
sodatea added a commit to sodatea/vue-cli that referenced this pull request May 19, 2020
reverts vuejs#5305
this makes the tests a little more tedious, need to find a better way
to test these functionalities

fixes vuejs#5442
sodatea added a commit that referenced this pull request May 19, 2020
…5500)

reverts #5305
this makes the tests a little more tedious, need to find a better way
to test these functionalities

fixes #5442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant