There are a lot of moving parts to devtools so here's a quick runthrough to make your life easier!
Under the hood, this exchange has a small set of responsibilities:
- Listen for events in
urql
and message them to devtools - Listen for events from devtools and trigger side effects / response messages
Here are a few useful approaches to get started developing.
If you just need a working project which uses the devtools exchange (useful when working on devtools), there's a live project here.
Note: The live project uses the devtools exchange from master
The easiest way to get started on a change in devtools is in a testing shallow environment.
yarn test --watch
With a shallow environment, you can:
- quickly simulate events from
urql
- quickly simulate messages from devtools
- increase test coverage!
To test the full suite (from the exchange all the way to the devtools extension), an example project can be used.
Run the following command to start a watched build.
yarn start
Note: You'll want to run this command in a dedicated shell
This command pulls an example repo from urql
and adds your watched build as a dependency.
yarn example:init
Starting the example will run the example server with the built exchange.
yarn example:start
Note: Changes to the exchange will automatically cause the example to be rebuilt
Navigate to the example you just started (usually http://localhost:5000) and interact with the site. If you have a running version of devtools, you should see updates.
TBD
Anyone with write access to the repository can publish a release. The steps are as follows.
Set the version attribute in the package.json
Note: This step requires docker
yarn changelog --future-release [release version] --token [your github oauth token]
git add package.json CHANGELOG.md
git commit -m "Version v0.0.0"
git push origin master
Warning: This will publish a new release to the chrome app store.
(replace v0.0.0 with your new version)
git fetch origin master
git tag v0.0.0 origin/master
git push origin v0.0.0
Finally, navigate to releases and choose draft a new release.
- You can copy and paste the release notes from the changelog you just generated
- Attatching the published assets is also a good idea -
wget $(npm view @urql/devtools dist.tarball)