-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: new fetch state machine #202
Merged
Merged
Conversation
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
Member
alimd
commented
Sep 15, 2024
- feat: Add @alwatr/fetch-state-machine package
- refactor: Remove unused dependencies from @alwatr/fsm package
- refactor: Update all package URLs to point to the flux repository
- refactor: Update package dependencies and references
- refactor: Rename fetch-state-machine.ts to base.ts and update imports
- refactor: Rename fetch-state-machine.ts base class name
- refactor: Make dispatch__ method private in AlwatrObservable class
- refactor: Update @alwatr/polyfill-has-own dependency to version ^1.0.9 in fsm package.json
- deps: update
- refactor(fetch-state-machine): base class and imports
- feat(fetch-state-machine): Add AlwatrJsonFetchStateMachineBase class
- feat(fetch-state-machine): Add AlwatrJsonFetchStateMachine class
- refactor(fetch-state-machine): Add JFSM classes
- chore: Update .vscode/settings.json
Add new package @alwatr/fetch-state-machine with its main files, demo files, and package.json configuration.
Update the package dependencies and references in the @alwatr/context, @alwatr/fetch-state-machine, @alwatr/fsm, and @alwatr/signal packages. Add the @alwatr/observable package as a dependency and reference in the appropriate packages.
- Renamed fetch-state-machine.ts to base.ts in the fetch-state-machine package - Updated imports in base.ts to use AlwatrFluxStateMachineBase instead of FiniteStateMachineBase - Removed unused dependencies from @alwatr/fsm package
…9 in fsm package.json
- Rename fetch-state-machine.ts to base.ts - Update imports in fetch-state-machine.ts - Make dispatch__ method private in AlwatrObservable class - Update @alwatr/polyfill-has-own dependency to version ^1.0.9 in fsm package.json - Rename fetchOptions__ to fetchOptions_ in AlwatrFetchStateMachineBase class - Rename response_ to rawResponse_ in AlwatrFetchStateMachineBase class - Update fetch_ method in AlwatrFetchStateMachineBase class - Update requestAction__ method in AlwatrFetchStateMachineBase class - Update resetToInitialState_ method in AlwatrFetchStateMachineBase class
This commit adds the AlwatrJsonFetchStateMachineBase class to the fetch-state-machine package. This class extends the AlwatrFetchStateMachineBase class and provides additional functionality for handling JSON responses in fetch requests. It includes methods for parsing the response text into a JSON object and handling errors related to invalid response text or JSON parsing. The AlwatrJsonFetchStateMachineBase class also includes a jsonResponse_ property to store the parsed JSON response. This commit also includes the necessary imports and type definitions for the new class. Refactor the fetch-state-machine package to include the AlwatrJsonFetchStateMachineBase class and its dependencies.
alimd
added
new-feature
New features or options.
refactor
Updating the code with simpler, easier to understand or more efficient syntax or methods.
breaking-change
A change that changes the API or breaks backward compatibility for users.
labels
Sep 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking-change
A change that changes the API or breaks backward compatibility for users.
new-feature
New features or options.
refactor
Updating the code with simpler, easier to understand or more efficient syntax or methods.
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.