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

Replace built-in sinks with modules #576

Merged
merged 6 commits into from
Jul 31, 2024
Merged

Conversation

wkillerud
Copy link
Contributor

Fixes #575

In favor of sink and the separate sink modules, to
keep the API consistent between "built-ins" and
third-party sinks.
This uses the separate sink modules internally
@wkillerud
Copy link
Contributor Author

Once this is merged we need to update the docs to:

  • replace references to the built in sinks with the separate modules
  • replace customSink with sink in code examples
  • document sink as a constructor option
  • document that customSink is deprecated

@wkillerud
Copy link
Contributor Author

@leftieFriele brings up a good point. In practice, this would be deprecating the support for running @eik/service as a binary with npx. If we're OK with that, we could also remove the use of convict and go all in on configuration via the constructor (#484).

@@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, macOS-latest]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable for Windows awaiting eik-lib/common#303

Copy link
Contributor

@leftieFriele leftieFriele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some suggestions on the docs.

I was also thinking out loud about what to do in the actual deprecation, but that is perhaps better to deal with when we do that.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
/**
* @param {EikServiceOptions} [options={}]
*/
constructor(options = {}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to keep the "bin-option", then I assume this would cause issues for what is happening here: https://github.com/eik-lib/service/blob/deprecate-built-in-sinks/bin/eik-server.js#L6

But I guess that is perhaps for the actual deprecation pr 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's optional now, so you can new up an instance without passing any opts 👍

@wkillerud wkillerud changed the title Deprecate built in sinks Replace built-in sinks with modules Jul 30, 2024
Undo marking them as deprecated since the binary depends on them.
@wkillerud
Copy link
Contributor Author

I removed the depracation notice so we can keep the binary option. This PR now replaces the modules from core with the separate modules, adds sink and deprecates customSink. This to encourage end users to use the { sink } constructor option if they use the Fastify plugin.

@leftieFriele
Copy link
Contributor

I removed the depracation notice so we can keep the binary option. This PR now replaces the modules from core with the separate modules, adds sink and deprecates customSink. This to encourage end users to use the { sink } constructor option if they use the Fastify plugin.

I say merge it

@wkillerud wkillerud merged commit 16eff87 into main Jul 31, 2024
4 checks passed
@wkillerud wkillerud deleted the deprecate-built-in-sinks branch July 31, 2024 08:03
Copy link

🎉 This issue has been resolved in version 2.0.164 🎉

The release is available on:

Your semantic-release bot 📦🚀

@wkillerud wkillerud self-assigned this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace built-in sinks in favor of sink modules
2 participants