Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Refactor configuration #26

Merged
merged 6 commits into from
Nov 10, 2022
Merged

Conversation

magnetised
Copy link
Contributor

Replace ElectrifyOptions with a {ElectricConfig, ElectrifyOptions} params.

@@ -48,7 +48,7 @@ export const initElectricSqlJs = async (worker: Worker, locateOpts: LocateFileOp
await workerClient.request(init, locator.serialise())

// we remove opts type info here to implement target interface
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove this comment.
I tried separating the config from the opts but it would not implement the target interface.

I see there is not the same problem now, but I also see that this ElectrifyOptions still has the config. That is not the idea right? -- you might enter the same problems that I did, if you try to refactor this type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops. yeah. forgot to remove the config from the ElectrifyOptions interface

Copy link
Contributor

@balegas balegas left a comment

Choose a reason for hiding this comment

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

I think it looks great, definitely better to have config and opts separate.
It's approved on my side.

@magnetised magnetised force-pushed the magnetised/configuration-refactor branch from f3144db to d6f68ff Compare November 9, 2022 11:37
@magnetised magnetised merged commit 815d535 into main Nov 10, 2022
@magnetised magnetised deleted the magnetised/configuration-refactor branch November 10, 2022 14:33
balegas added a commit that referenced this pull request Nov 25, 2022
* main:
  Release version 0.3.0 (#31)
  Refactor configuration (#26)
  [VAX-388] Use FIRST_LSN option for cases where we do not know starting LSN position (#30)
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.

2 participants