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

Fix generating logger import code and improve documentation #7118

Merged
merged 6 commits into from
Jun 20, 2024

Conversation

kamilkowalski
Copy link
Contributor

@kamilkowalski kamilkowalski commented Jun 14, 2024

Description

The logger option was always meant as a path to a file exporting a logger instance not as the logger instance itself - it has to be this way so that code generation works and can correctly load the logger.

I've changed the documentation and typing of the logger option, as well as fixing the import path similarly to how other imports work (like additionalEnvelopPlugins).

Fixes #7107

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

How Has This Been Tested?

I've built the library and used the built artifacts in my project with success - I'd appreciate hints on how to test this better.

Test Environment:

  • OS: macOS 14.5
  • @graphql-mesh/cli: v0.90.4
  • NodeJS: v18.12.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
  • 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, and I have added a
    changeset using yarn changeset that bumps the version
  • New and existing unit tests and linter rules pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@kamilkowalski
Copy link
Contributor Author

@ardatan I'd appreciate some help on testing - I didn't see any existing unit tests for this option, is it enough if I just built the libraries and used the artifacts in my project?

Also locally running npm run test fails with some errors in:

  • packages/fusion/composition/tests/composition.spec.ts
  • packages/legacy/cli/test/cli.spec.ts
  • packages/plugins/rate-limit/tests/rate-limit.spec.ts

.changeset/orange-seas-knock.md Outdated Show resolved Hide resolved
@kamilkowalski kamilkowalski requested a review from enisdenjo June 20, 2024 14:51
@kamilkowalski kamilkowalski marked this pull request as ready for review June 20, 2024 14:52
@enisdenjo enisdenjo merged commit 4c75671 into ardatan:master Jun 20, 2024
22 checks passed
@kamilkowalski kamilkowalski deleted the fix-logger-import branch June 20, 2024 15:04
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.

Mesh doesn't use custom logger
2 participants