Skip to content

Add tests to cover all state transitions in dev mode and fix some issues #6648

@sapphi-red

Description

@sapphi-red

FYI this is the state diagram for the previous implementation.

flowchart TD
    start((start)) --> initial
    initial --> bundling
    bundling -- error --> bundle_error
    bundle_error -- file change --> bundling
    bundling -- file change --> bundling
    bundling -- success --> bundled
    bundled -- file change --> generating_hmr_patch
    generating_hmr_patch -- error --> bundled
    generating_hmr_patch -- success (hmr) --> bundled
    generating_hmr_patch -- success (no hmr) --> bundling
    generating_hmr_patch -- file change --> generating_hmr_patch

    A@{ shape: text, label: "when environment is closed, it will go to 'initial'" }
Loading

The cases that are currently not working are:

  • initial -> bundling -> bundle_error -> bundling (i.e. error in the initial bundle)
  • bundling -> bundling (i.e. file change while the bundle is generated)
    • the build hangs
  • bundled -> generating_hmr_patch -> generating_hmr_patch (i.e. file change while generating the patch file)
    • the new content is not output

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions