-
Notifications
You must be signed in to change notification settings - Fork 90
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(core)!: delegate overrideInitialEvents
to makeCoreStore
#445
Merged
+444
−206
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
dd0d84a
feat: add `divideBy` util
orionmiz 7e807cc
refactor: delegate `overrideInitialEvents` to `makeCoreStore`
orionmiz 8edcef4
chore: export `divideBy`
orionmiz c80b9ae
fix: correct module path
orionmiz 0cb685d
chore: version pre-release
orionmiz 3ef5d63
chore: resolve lock
orionmiz a7dbbe5
chore: bump packages
orionmiz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
"@stackflow/plugin-map-initial-activity": patch | ||
"@stackflow/plugin-google-analytics-4": patch | ||
"@stackflow/plugin-stack-depth-change": patch | ||
"@stackflow/plugin-renderer-basic": patch | ||
"@stackflow/plugin-history-sync": patch | ||
"@stackflow/plugin-renderer-web": patch | ||
"@stackflow/compat-await-push": patch | ||
"@stackflow/plugin-basic-ui": patch | ||
"@stackflow/plugin-devtools": patch | ||
"@stackflow/plugin-preload": patch | ||
"@stackflow/react": patch | ||
"@stackflow/link": patch | ||
"@stackflow/core": patch | ||
"@stackflow/demo": patch | ||
"@stackflow/docs": patch | ||
--- | ||
|
||
fix(core)!: delegate overrideInitialEvents to makeCoreStore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"mode": "exit", | ||
"tag": "canary", | ||
"initialVersions": { | ||
"@stackflow/core": "1.0.9", | ||
"@stackflow/demo": "1.2.19", | ||
"@stackflow/docs": "1.2.20", | ||
"@stackflow/compat-await-push": "1.1.6", | ||
"@stackflow/link": "1.3.15", | ||
"@stackflow/plugin-basic-ui": "1.5.1", | ||
"@stackflow/plugin-devtools": "0.1.7", | ||
"@stackflow/plugin-google-analytics-4": "1.1.8", | ||
"@stackflow/plugin-history-sync": "1.3.17", | ||
"@stackflow/plugin-map-initial-activity": "1.0.4", | ||
"@stackflow/plugin-preload": "1.2.14", | ||
"@stackflow/plugin-renderer-basic": "1.1.6", | ||
"@stackflow/plugin-renderer-web": "1.1.6", | ||
"@stackflow/plugin-stack-depth-change": "1.1.1", | ||
"@stackflow/react": "1.1.6", | ||
"@stackflow/esbuild-config": "1.0.1", | ||
"@stackflow/eslint-config": "1.0.2" | ||
}, | ||
"changesets": [ | ||
"red-lies-poke" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@stackflow/react": patch | ||
"@stackflow/core": patch | ||
--- | ||
|
||
fix(core)!: delegate overrideInitialEvents to makeCoreStore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { makeEvent } from "../event-utils"; | ||
import { divideBy } from "./divideBy"; | ||
|
||
test("divideBy", () => { | ||
const firstEvent = makeEvent("Popped", {}); | ||
const secondEvent = makeEvent("StepPopped", {}); | ||
const thirdEvent = makeEvent("StepPopped", {}); | ||
|
||
expect( | ||
divideBy( | ||
[firstEvent, secondEvent, thirdEvent], | ||
(e) => e.name === "StepPopped", | ||
), | ||
).toEqual([[secondEvent, thirdEvent], [firstEvent]]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const divideBy = <T>( | ||
arr: T[], | ||
predicate: (t: T) => boolean, | ||
): [T[], T[]] => { | ||
const satisfied: T[] = []; | ||
const unsatisfied: T[] = []; | ||
|
||
arr.forEach((element) => { | ||
if (predicate(element)) { | ||
satisfied.push(element); | ||
} else { | ||
unsatisfied.push(element); | ||
} | ||
}); | ||
|
||
return [satisfied, unsatisfied]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orionmiz
initialPushedEvents.length > 0
정도면 충분하다고 생각했는데 아래 조건은 어떤 용도로 들어간 걸까요??