Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

feat: support default file as .cjs#269

Open
jpandersen87 wants to merge 1 commit into
happo:mainfrom
jpandersen87:default-config-cjs
Open

feat: support default file as .cjs#269
jpandersen87 wants to merge 1 commit into
happo:mainfrom
jpandersen87:default-config-cjs

Conversation

@jpandersen87

Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant