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

Add support for loading the config from "package.json" #693

Merged
merged 2 commits into from
May 19, 2021
Merged

Add support for loading the config from "package.json" #693

merged 2 commits into from
May 19, 2021

Conversation

ionut-botizan
Copy link
Contributor

@ionut-botizan ionut-botizan commented May 14, 2021

Description

This PR enables loading the configuration from the package.json file. This is one of the default locations cosmiconfig normally looks into when searching for configurations and it is also already listed as supported in the graphql-config documentation.

Fixes #692

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tests have been added to the test suite.

Test Environment:

  • OS: Windows 10 Enterprise | OS Version: 20H2 | OS Build: 19042.985
  • GraphQL Config Version: 3.2.0
  • NodeJS: v14.16.1

Checklist:

  • I have followed the CONTRIBUTING doc and the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • [N/A] I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests and linter rules pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Further comments

Some of the new tests fail because of another newly discovered issue in an upstream package: EndemolShineGroup/cosmiconfig-typescript-loader#134

@kamilkisiela kamilkisiela merged commit 40e892e into kamilkisiela:master May 19, 2021
@kamilkisiela
Copy link
Owner

Thank you <3

This was referenced Mar 28, 2022
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.

Config is not loaded from package.json
2 participants