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

feat: support default file as .cjs #269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jpandersen87
Copy link

This PR updates happo.io to be able to load the default config filename with either a cjs or js extension.

  • replace DEFAULTS configFile with configFilename
  • remove default config argument from cli commands
  • simplify load function to not catch errors
  • update loadUserConfig function to load a provided config path with no catch
  • update loadUserConfig function to attempt to load the default config file for both js and cjs extensions (ignoring Cannot find error type if thrown), falling back to default config if none found
  • yarn version explicitly set (allows project to work as intended in yarn v2+ environments)

- replace DEFAULTS `configFile` with `configFilename`
- remove default config argument from cli commands
- simplify `load` function to not catch errors
- update `loadUserConfig` function to load a provided config path with no catch
- update `loadUserConfig` function to attempt to load the default config path for both `js` and `cjs` extensions (ignoring `Cannot find` error type if thrown), falling back to default config if none found
- yarn version explicitly set (allows project to work as intended in yarn v2+ environments)
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.

1 participant