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

refactor: make a plugin for shorthand terms #185

Open
wants to merge 4 commits into
base: plugins
Choose a base branch
from

Conversation

tpluscode
Copy link
Contributor

Since we now have the plugin functionality, I thought I would move the code which inserts the shorthand terms kl:DescribeLoader to a plugin. That made me realise too that the logic of loading plugins is unnecessarily tied to the Kopflos class. Instead, I moved that out and now we can initialise the instance with pre-loaded plugin. Good for testing :)

Copy link

changeset-bot bot commented Oct 18, 2024

⚠️ No Changeset found

Latest commit: 0614fb5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.90%. Comparing base (5437284) to head (0614fb5).

Additional details and impacted files
@@             Coverage Diff             @@
##           plugins     #185      +/-   ##
===========================================
+ Coverage    92.34%   92.90%   +0.56%     
===========================================
  Files           23       25       +2     
  Lines         1032     1043      +11     
  Branches       109      114       +5     
===========================================
+ Hits           953      969      +16     
+ Misses          78       73       -5     
  Partials         1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -0,0 +1,12 @@
import type { KopflosPlugin } from '../lib/Kopflos.js'

export default function (): KopflosPlugin {
Copy link
Contributor

Choose a reason for hiding this comment

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

Although not specifically related to this PR, now I'm noticing the lack of expressivity of the plugin interface: given a Koplos instance, it does something with it. We may examine actual and potential plugins and try to refine this interface

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.

2 participants