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: use options as second parameter #5

Merged
merged 6 commits into from
Jan 9, 2024
Merged

Conversation

lwhiteley
Copy link
Collaborator

@lwhiteley lwhiteley commented Jan 8, 2024

  • add support options object to configure proxyWithHistory
  • extract shouldSaveHistory utility

@lwhiteley lwhiteley requested a review from dai-shi January 8, 2024 13:49
@lwhiteley lwhiteley force-pushed the use-options-parameter branch 4 times, most recently from b096543 to f4b7d5a Compare January 8, 2024 13:57
BREAKING CHANGE: This replaces skipSubscribe with options to configure proxyWithHistory
@dai-shi
Copy link
Member

dai-shi commented Jan 9, 2024

You can keep supporting boolean value and show deprecation warning.

@lwhiteley
Copy link
Collaborator Author

updated

@lwhiteley lwhiteley changed the title refactor!: use options as second parameter refactor: use options as second parameter Jan 9, 2024
@lwhiteley lwhiteley force-pushed the use-options-parameter branch 4 times, most recently from 0bd30b9 to 7853d84 Compare January 9, 2024 04:39
@lwhiteley
Copy link
Collaborator Author

lwhiteley commented Jan 9, 2024

in the end, i re-added everything except the unsubscribe handler.

Should have enough convenience features now.

if one needs more control then they have to create their own subscribe process and skip the internal one

@@ -0,0 +1,7 @@
const isProduction = import.meta?.env?.MODE === 'production';
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't work well for minification. We should simply have inline if (...).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

just reviewed packages/history-utility/src/history-utility.ts.

@lwhiteley lwhiteley merged commit 43e2fcd into main Jan 9, 2024
1 check passed
@lwhiteley lwhiteley deleted the use-options-parameter branch January 9, 2024 13:01
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