This PR splits code into separate packages for v8env and core (cli, server, bridge, data adapters, etc) and adds tooling to work with a multi-package repo.
multi-package repo architecture with lerna, yarn workspaces, and typescript project refs
new jest-based test framework with a nice api for testing real edge apps in a dev server sandbox
new jest-based unit tests that run in the node environment NOT v8env so testing isolated logic is fast and easy without webpack
Why?
There's a bunch of reasons for this, but here's some of the bigger ones:
All @fly/* modules are missing until mapped to v8env/lib/fly/* with webpack which breaks typescript typings and editor tools. Using normal module resolution with npm packages or yarn workspaces simplifies build & typings (remove loads of ambient declarations) and allows us to remove webpack for everything but final bundling for v8env. More control over build & bundling will help with #123 and #84
Easier to extract code into standalone packages #141
We maintain 3 different but mostly similar runtimes: dev, test, and prod (external nodeproxy repo). This refactor is a step towards unifying the build pipeline and runtime for all environments.
Replacing the runtime environment with an out-of-process instance of the new new rust proxy should be straight forward.
Support for testing sandboxed edge apps without mocking or binding the v8env and test environment together, helps with #96
Apps can import @fly/fly as a dev dependency for access to the cli and dev environment and import @fly/v8env as a dependency for access to the runtime environment api and ambient types. This will greatly improve the developer experience for typescript apps and also keep the bundled dependencies down.
This PR splits code into separate packages for v8env and core (cli, server, bridge, data adapters, etc) and adds tooling to work with a multi-package repo.
Why?
There's a bunch of reasons for this, but here's some of the bigger ones:
@fly/*
modules are missing until mapped tov8env/lib/fly/*
with webpack which breaks typescript typings and editor tools. Using normal module resolution with npm packages or yarn workspaces simplifies build & typings (remove loads of ambient declarations) and allows us to remove webpack for everything but final bundling for v8env. More control over build & bundling will help with #123 and #84What's left?
See https://github.com/superfly/fly/milestone/1