Skip to content
 
 

Repository files navigation

npm deps test coverage chat

Webpack Canary

Run dependency examples against webpack versions to detect incompatibilities.

Usage

Squawk

Expected usage of the canary is to check multiple versions of webpack against a set of dependencies and squawk if there are any failures. The squawk task is a runner to just that. Webpack and dependency versions are stored in webpack-to-dependency-versions.json.

Use npm run squawk to run all dependencies against all versions of webpack, and generate a report with successes and failures. This command supports only one flag: --verbose.

CLI Interface

To run a specific dependency version against a specific version of webpack, use the canary CLI interface

node index.js --webpack=<webpack_reference> --dependency=<dependency_reference>
  • --webpack can be a version or path to remote repository
  • --dependency can be a dependency name (with or without version) or path to remote repository
  • --package-manager (optional) can be set to yarn to use yarn for installation of modules. If not set (or set to anything else) it will default to npm
  • --example-dir can be one or more relative paths to examples folders (e.g. --example-dir ./demo or --exmaple-dir demo)

Example

# Published versions in registry
node index.js --webpack=2.2 --dependency=raw-loader

# Development versions in remote repositories
node index.js --webpack=webpack/webpack#master --dependency=https://github.com/alistairjcbrown/raw-loader/

Compatibility

A dependency must include an example or examples directory which contains an example setup with corresponding webpack config (ie. must have a webpack.config.js file). This config is run with the installed webpack version to confirm compatibility. If a custom command needs to be run, there should be an accompanying README.md file which contains the command in a codeblock.

Readme file

The readme can also contain any other content tha twould usualy be in the file. If there are multiple code blocks, only the first one will be used.

# A title

Some content

```npm run example```

Some other content

```command that will be ignored```

The command can also contain some placeholders. Right now, only <insert local ip> is supported (will be replaced with 127.0.0.1).

Maintainers


Alistair Brown

Darko Kukovec

Andrei Zvonimir Crnkovic

Sean Larkin

Joshua Wiens

About

Canary tooling for checking webpack dependencies against specific webpack versions

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages