Skip to content

Make worker autoupdate an explicit choice #1297

Description

@kettanaito

Scope

Improves an existing behavior

Compatibility

  • This is a breaking change

Feature description

Current behavior

This package has a postinstall script that auto-copies the worker script to the consumer's specified directory. Executing arbitrary scripts in NPM packages is not a good idea.

Expected behavior

The consumer should instead include the auto-update functionality in their package.json as an explicit command they wish to have any time they reinstall dependencies:

{
  "scripts": {
    "postinstall": "npx msw update-worker"
  }
}

Possible CLI command names:

  • update-worker
  • autoupdate

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXchoreTasks aimed at internal improvementfeature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions