theatre/compatibility-tests
Elliot bebf281517
Fix process.env.version in browser-bundles (#206)
* Fix `process.env.version` in browser-bundles

- also fix tsdoc warns in mjs files

Co-authored-by: Fülöp Kovács <kovacs.fulop@gmail.com>
Co-authored-by: Cole Lawrence <cole@colelawrence.com>

* Change to `process.env.THEATRE_VERSION`

Co-authored-by: Fülöp Kovács <kovacs.fulop@gmail.com>
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
2022-06-09 19:05:25 +02:00
..
scripts Fix process.env.version in browser-bundles (#206) 2022-06-09 19:05:25 +02:00
test-cra-react18 Make @theatre/r3f play well with different vs of react,three,r3f #177 2022-05-27 21:59:51 +02:00
test-next Re-do bundling, compat tests, and extension API (#174) 2022-05-25 00:37:18 +02:00
test-parcel1-react17 Make @theatre/r3f play well with different vs of react,three,r3f #177 2022-05-27 21:59:51 +02:00
test-parcel1-react18 Re-do bundling, compat tests, and extension API (#174) 2022-05-25 00:37:18 +02:00
test-parcel2-react18 Re-do bundling, compat tests, and extension API (#174) 2022-05-25 00:37:18 +02:00
test-vite-react18 Make @theatre/r3f play well with different vs of react,three,r3f #177 2022-05-27 21:59:51 +02:00
.gitignore Re-do bundling, compat tests, and extension API (#174) 2022-05-25 00:37:18 +02:00
package.json Re-do bundling, compat tests, and extension API (#174) 2022-05-25 00:37:18 +02:00
README.md Set up manual compatibility tests (#171) 2022-05-20 18:52:57 +02:00
verdaccio.yml Set up manual compatibility tests (#171) 2022-05-20 18:52:57 +02:00

Compatibility tests

This setup helps us test whether Theatre.js is compatible with popular tools in the JS ecosystem, such as Vite, webpack, react, vue, etc.

This setup is 3/10 complete.

The currentr workflow is:

  1. Run a local npm registry, and build and publish the @theatre/* packages to it. All packages will have the 0.0.1-COMPAT.1 version
yarn workspace @theatre/compatibility-tests run registry:start

This script will keep running until it is terminated. While running, npm will be configured to point to the local registry that contains the @theatre/*@0.0.1-COMPAT.1 packages.

  1. cd into any test project (either use those in ./test-* or make a new npm package elsewhere via npm init.)
  2. Install @theatre/* from the local registry:
npm install @theatre/core@0.0.1-COMPAT.1 @theatre/studio@0.0.1-COMPAT.1 @theatre/r3f@0.0.1-COMPAT.1
  1. Test your local build of Thatre.js against your setup by manually building, running a dev server, and using Theatre.js on a browser pointing to the dev server.

Inspired by the #help channel on our Discord we collect examples for including Theatre.js in project that use different tools (parcel, Next.js, vanilla Rollup, etc...) to build them in the CI (these are the compatibility tests).

Gotchas Some bundlers like webpack are not configured to work well with yarn workspaces by default. For example, the webpack config of create-react-app, tries to look up the node_modules chain to find missing dependencies, which is not a behavior that we want in build-tests setups. So if a setup doesn't work, try running it outside the monorepo to see if being in the monorepo is what's causing it to fail.