Commit graph

42 commits

Author SHA1 Message Date
William Perron
b00ef4fd16
fix(miniflare): batch local observability persistence (#15970) 2026-10-01 06:55:59 +01:00
Jesse Li
7bb6eaea0d
Include preview token in Access probes and login (#15159)
Co-authored-by: Eric Falcao <efalcao@cloudflare.com>
Co-authored-by: Christopher Little-Savage <clittle-savage@cloudflare.com>
2026-09-29 10:05:48 +01:00
for-the-kidz
433fa9846c
[wrangler] Add pull request title to preview deployment annotations (#15307)
Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
2026-08-25 14:53:53 +00:00
Yomna Shousha
a4c3458cec
[wrangler] Add PR metadata to preview deployments (#14966)
Co-authored-by: Matt Price <mattprice@cloudflare.com>
2026-08-21 09:59:58 -04:00
nickpatt
3203b5d344
[miniflare] Local dev observability: traces, spans & logs via a SQL query API (#14633)
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-23 16:54:28 +01:00
emily-shen
8e29318b56
move preview code into deploy-helpers (#14681) 2026-07-14 16:58:17 +01:00
Gabi
4ef872fe53
containers: Do not force pull a specific proxy-everything image (#14358) 2026-06-23 09:22:24 -05:00
MatinGathani
da664d5913
[wrangler] fix: auto-delete logs older than 7 days and add WRANGLER_LOG_DISK opt-out (#13750) 2026-05-12 13:17:41 +00:00
Somhairle MacLeòid
f3871f8c25
[wrangler] Shard E2E tests across 4 parallel CI jobs (#12941) 2026-03-20 10:01:03 +00:00
Pete Bacon Darwin
451dae3717
[wrangler] Attempts to reduce remote e2e test flakiness (#12896) 2026-03-20 07:23:41 +00:00
Somhairle MacLeòid
aa26784ce1
Convert from ESLint to oxlint, Prettier to oxfmt (#12930) 2026-03-18 16:03:35 +00:00
Thomas Gauvin
3b81fc6a75
feat(wrangler): add wrangler tunnel (#12492)
Co-authored-by: Nikita Cano <ncano@cloudflare.com>
Co-authored-by: Nikita Cano <48366124+nikitacano@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Edmund Hung <me@edmund.dev>
2026-03-17 11:20:18 +00:00
Pete Bacon Darwin
a31ee0b0c7
[workers-playground] Migrate from Cloudflare Pages to Cloudflare Workers (#12655)
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-03-11 13:11:10 +00:00
Gabi
35b2c56cde
containers: Add container and test Containers interceptOutboundHttp (#12649) 2026-03-03 10:32:06 +00:00
Pete Bacon Darwin
caf9b11439
[wrangler] Smart cache directory detection for Yarn PnP compatibility (#12466) 2026-02-16 17:39:16 +00:00
Victor Berchet
698f510661
Speed up pnpm fix and pnpm check (#12348) 2026-02-01 17:05:54 +01:00
Pete Bacon Darwin
41103f560c
Miscellaneous improvements and refactorings (#11414)
* pin the Typescript version

* add error message info to debug where we are getting the api token from

* allow C3 to import from workers-utils

* clean up vitest config

* Add PWD to turbo's global pass-through env

* post review fixups

* add changeset
2025-12-08 13:13:30 +00:00
Dario Piotrowicz
83bb334a66
skip container tests locally if docker is not running (#10853)
* vite-plugin: skip containers tests locally if docker is not running

* fixtures/interactive-dev-tests: skip containers tests locally if docker is not running

* wrangler: skip containers e2e tests locally if docker is not running

* add message for tests skipping in wrangler e2es and interactive-dev-tests fixture

* run prettier

* move containers skipping logic to vite-plugin vitest global setup and add console warn
2025-10-15 11:09:03 +01:00
emily-shen
79a6b7dd81
containers: default max_instances to 20 and fix logging in @cloudflare/cli (#10764)
* default max_instances to 20

* add log level to @cloudflare/cli

* fixup link to docs in error

* Update packages/containers-shared/src/images.ts

Co-authored-by: Edmund Hung <edmund@cloudflare.com>

---------

Co-authored-by: Edmund Hung <edmund@cloudflare.com>
2025-10-01 10:34:39 +01:00
Nikita Sharma
a7f6966825
staging wrangler should push images to staging.registry.cloudflare.com (#10808) 2025-09-29 11:47:00 -05:00
emily-shen
f8a80a8075
Automatically get docker socket path (and fix socket path config in vite plugin) (#10061)
* try to get docker socket from docker context ls

* changeset

* fix socket config in vite plugin

* only test in ci on linux

* PR feedback
2025-07-25 14:39:07 +01:00
emily-shen
1e92dd815c
refactor containers config handling (#9961)
* refactor containers config handling

Unfortunately I had to squash this to fix merge conflicts, so this commit contains:

* add config normalisation function

* refactor dev to use normalised config

* refactor containers deploy to use normalised config

* consolidate tests into containers/deploy.test.ts

* fix up loop in build command and config handling in ensureDiskSize

* stray fixups for cloudchamber apply

* validate and normalise app name, constraints and observability too in config normalisation function

* bring back dev specific options type

* resolve image path in readConfig (main validation func)

* fix custom instance limit units and add test

* PR feedback

* rebase fixups
2025-07-23 17:16:02 +01:00
Sid
a1181bf804
Add an event-subscriptions subcommand (#9064)
* feat: add an `event-subscriptions` subcommand

* fix: Queues `wrangler --help` emoji

* fixup! feat: add an `event-subscriptions` subcommand

* improve reliability of workers-with-assets fixture tests

* clean up worker after deployments e2e tests

* ci: add diagnostics to test-and-check action

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
2025-07-07 09:33:05 +00:00
Somhairle MacLeòid
56dc5c4946
Initial support for VSCode Javascript Debug Terminals (#9535)
* Initial support for VSCode Javascript Debug Terminals

* turbo env

* type tests

* Create perfect-plants-compete.md

* reset fixtures

* Add comments

* fix format

* fixups

* bump timeout

* loosen stack trace matching

* Support Vite

* fix sentry test
2025-07-02 22:12:09 +00:00
Pete Bacon Darwin
1f76f30bb3
Ensure consistent fixture package naming (#9378)
* tighten up turbo dependencies to avoid having to manually build

* test: ensure that fixture packages always start with `fixture-`

* refactor: consolidate fixture package names with consistent `fixture-` prefix

Updates all 63 fixture package names to use a consistent naming scheme with logical categorization:
- Core workers: fixture-worker-basic, fixture-worker-ai, fixture-worker-typescript, etc.
- Pages functions: fixture-pages-functions, fixture-pages-workerjs, etc.
- Database/storage: fixture-d1-basic, fixture-secrets-store, etc.
- Module handling: fixture-import-wasm, fixture-no-bundle-import, etc.
- Development tools: fixture-interactive-dev, fixture-local-mode, etc.

Also updates test files that reference specific fixture package names to maintain compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* add CI_OS env var to the check run to ensure correct turbo remote caching

* fixup! refactor: consolidate fixture package names with consistent `fixture-` prefix

* fixup! test: ensure that fixture packages always start with `fixture-`

* revert unnecessary change

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-28 12:08:48 +00:00
Somhairle MacLeòid
05b1e8391f
Refactor Turbo + CI jobs (#8845) 2025-04-10 10:42:22 +01:00
Pete Bacon Darwin
0dae4acb33
improve turbo settings and vite e2e test config (#8754)
* improve turbo settings and vite e2e test config

* skip the vite warnings playground when in build mode

* Run Wrangler test:e2e in non-interactive mode

* fixup! improve turbo settings and vite e2e test config
2025-04-02 11:24:39 +01:00
Somhairle MacLeòid
5d34c8f5db
Add MINIFLARE_WORKERD_PATH to more places (#8506) 2025-03-17 09:31:37 +00:00
Pete Bacon Darwin
d86e84561a
Pbd/release-fixups (#8259)
* tweak changeset

* Revert "Use print in Python console.log test (#8252)"

This reverts commit 71eea4f1e8.

* Revert "Adds Python `wrangler dev` test to verify `print` works. (#8195)"

This reverts commit 1ad53c578f.

* chore: add env vars needed for e2e testing to turbo.json

In strict mode turbo will block these env vars.
2025-02-25 18:03:13 +00:00
Pete Bacon Darwin
ca3cbc42ad
fix node.js compat module resolution (#8118)
* fix node.js compat module resolution

Resolves https://github.com/cloudflare/workers-sdk/issues/8108

* add e2e tests for node-compat

* fix linting issues

* post-review fixups

* update changeset
2025-02-13 21:48:21 +00:00
Pete Bacon Darwin
4a206213f3
Implement verdaccio local npm registry for vitest-pool-workers tests (#7902)
* chore: configure eslint to ignore CommonJS config files (.cjs) as well as normal files (.js)

* chore: suppress logs of cached builds and tests

* chore: ensure wrangler can be published from Windows

* chore: reduce noise on Windows tests using `run-in-tmp`

* chore: ensure that NODE_EXTRA_CA_CERTS gets passed through turbo to jobs

This was causing the C3 e2e tests to fail locally for people running behind WARP, since framework generators like Remix and Solid were trying to make Internet requests to get template files and crashing with self-signed certificates errors.

* test: add new mock-npm-registry helper package

* test: use new mock-npm-registry helper in vitest-pool-workers tests

* test: use new mock-npm-registry helper in create-cloudflare e2e tests
2025-02-04 14:07:28 +00:00
Somhairle MacLeòid
fa8cc0def2
Upgrade to turbo v2 (#7076)
* Upgrade to turbo v2

* fix tests

* rebase
2024-10-25 14:07:35 +01:00
Somhairle MacLeòid
c6c083f346
Granular e2e caching (#6201) 2024-07-05 15:06:05 +01:00
Somhairle MacLeòid
db4930586e
Jest -> Vitest (#5896)
* So long, and thanks for all the fish
2024-05-22 20:14:06 +01:00
Somhairle MacLeòid
649e763823
cache + speedup windows e2e (#5654)
* cache + speedup windows e2e

* fix README

* Merge prerelease jobs

* Run tests on PRs

* Fix turborepo

* Cache changesets

* Use turbo for create-cloudflare publishing
2024-04-25 15:21:35 +01:00
Somhairle MacLeòid
2ec4b930ba
Enable test caching (#5521)
* Enable test caching

* more cach plz

* fix lockfile

* Run all tests in CI

* fix test

* lockfile
2024-04-18 19:19:05 +01:00
MrBBot
027f971975
Implement Vitest testing environment for Miniflare 3 (#4795)
* [miniflare] Add support for module fallback service

Adds a `unsafeUseModuleFallbackService` worker option and a
`unsafeModuleFallbackService` shared option for using `workerd`'s
module fallback service. Note `workerd` only accepts an address for
fallback service configuration. This means if we wanted per-worker
fallback service configuration, we'd need to start a new HTTP server
for each worker that enabled it. To avoid starting additional servers,
we reuse Miniflare's existing loopback server, and allow each worker
to enable/disable the fallback service instead.

* [miniflare] Return `Response` from `fetch()` if socket upgrade failed

Previously, Miniflare would throw an error if the `Upgrade: websocket`
header was set, but a non-WebSocket response was returned. This change
ensures the response is returned, just without `webSocket` set. This
allows the caller to handle the error case/response themselves.

* MVP for `@cloudflare/vitest-pool-workers`

Implements a basic Vitest pool that runs tests inside `workerd`,
using the module fallback service and a test runner Durable Object.
Provides access to bindings via `env` from the `cloudflare:test`
module.

Closes DEVX-1052 and DEVX-1053

* Implement workspace/test file worker isolation

Adds a `singleWorker` option for running all a project's test files
serially in the same worker. This can speed up execution if the
project contains lots of small test files, as Vitest only needs to
be initialised once.

* Add Durable Object test helpers and support for self-service bindings

Adds a `runInDurableObject()` test helper for running arbitrary code
inside a Durable Object's I/O context, and a `runDurableObjectAlarm()`
helper for running a Durable Object's scheduled alarms.

These require the new `main` option to be set to the worker's
entrypoint, so the Vitest pool can create instances of the user's
Durable Objects.

The `main` option also allows service bindings to be declared to the
worker running the tests. Events dispatched to these service bindings
will use the handler exported by the `main` worker.

Closes DEVX-1056, DEVX-1057 and DEVX-1058

* Add support for fetch mocking with `undici` `MockAgent`

Adds `fetchMock` to the `cloudflare:test` module. This is an instance
of `undici`'s `MockAgent`, and can be used to mock global `fetch()`
requests in the test worker. This works by bundling just the `undici`
`MockAgent` code, with a customisable `Dispatcher` that is set to the
original workers `fetch()` function in the pool.

Closes DEVX-1059

* Use custom test runner and reset fetch mock at the start of each file

A custom test runner allows us to hook into test execution.
Specifically, this allows us to run code before and after
files/suites/tests are executed. We'll need this for isolated storage.

* Add (inline) snapshot support and fix source maps

By default, Vitest uses the `node:fs` module for reading/writing
snapshots. This isn't available in workers, so this change implements
a custom snapshot client using service bindings.

Closes DEVX-1054

* Fix logs not showing on re-runs

* [miniflare] Export `formatZodError`

We'd like to use Zod for validating the pool's options. Miniflare has
a `formatZodError` function that makes pretty error messages from Zod
validation errors.

* Validate pool options with Zod and pretty error formatting

* Bump to stable `vitest@1.0.1`

* Add support for serialising any structured serialisable

* Add support for fake timers

* Verify module mocking and spies work

* [miniflare] Add support for "sticky blobs" that aren't deleted

For isolated per-test storage, we'll be pushing/popping databases
to a "stack". After pushing a database stack frame, we may delete a
record in a test. We'd like to avoid deleting the associated blob here
so when we pop the frame, the record still links up with it.

This change adds an `unsafeStickyBlobs` option that disables garbage
blob cleanup if enabled.

* [miniflare] Add support for getting persistence paths

Isolated storage will need access to SQLite database files. This
change adds a `unsafeGetPersistPaths()` function for getting the
persistence paths used by a `Miniflare` instance. This is unsafe as
the layout of persistence directories is not a public interface.

* [miniflare] Add support for colo-local ephemeral "Durable" Objects

For isolated storage, we'd like the runner object not to persist any
state to disk, so we don't have to worry about excluding it when
managing the storage stack. We currently have an
`unsafeEphemeralDurableObjects` option that makes _all_ Durable
Objects in a worker use in-memory state. This isn't suitable for our
Vitest pool, as user objects will run in the same worker as the runner
object.

This change adds support for `workerd` "colo-local" actors. These are
like Durable Objects, but don't provide any durable storage (i.e. no
`state.storage` API), and have a slightly different namespace binding
API.

* [miniflare] Bind `this` to `Miniflare` instance in custom services

We'd like to extend our Vitest pool's custom loopback service with
endpoints for managing isolated storage stacks. To do this, we need to
know the persistence paths of the `Miniflare` instance we're currently
running in. A previous commit added an `unsafeGetPersistPaths()`
function. If we wanted to access these paths in the pool's loopback
service, we'd need to capture the paths/`Miniflare` instance in a
closure used as the service binding function. Unfortunately, we use
`util.deepStrictEqual()` on Miniflare options to determine if we
should restart the `Miniflare` instance. This would always return
`true` if we created a new bound/arrow function on each test run.

This change binds `this` to the current `Miniflare` instance when
calling custom service functions, meaning we can reuse the same
function when building options.

* Add support for isolated storage

This change adds an `isolatedStorage` pool option. If enabled, each
test gets its own isolated storage environment. Storage writes in a
test are automatically undone at the end of the test. The storage
environment is copied from the parent suite, ensuring writes from
`beforeAll()`s show up in tests.

This is implemented with an on-disk stack of `.sqlite` files. Before
a suite/test attempt begins, the current storage state is "pushed".
When the suite/test attempt completes/fails, the state is "popped",
undoing all changes. Sticky blobs are used to ensure deleting records
in a test keeps the corresponding blobs around, so they can be used
when the state is "popped".

Closes DEVX-1055

* [miniflare] Use `z.input()` for user facing options types

Previously, we were using `z.infer()` on our option schemas to derive
`WorkerOptions` and `SharedOptions` types. This gave the _output_
types for schemas, rather than the user _input_ types. Usually, these
were the same. However, if a schema was `.transform()`ed, they could
be different. Notably, `hyperdrives` values output objects, but accept
strings, leading to type errors if these were used.

* Add `defineWorkersPoolOptions()` for typed pool options in config

* [miniflare] Easy service bindings to self

* Use Miniflare's mechanism for self-service bindings

* Tidy up Node and package polyfills

Tries to remove unnecessary polyfills/functions, so users are less
likely to import APIs that would be unsupported in production in their
tests.

* Throw actual unhandled errors in pool on failed test runs

Tunnels through the error thrown when running tests fails. This is
useful for debugging, as it means the startup error thrown by Vitest
includes a useful message and stack.

* Add argument validation to `cloudflare:test` Durable Object helpers

While we expect most users to write their tests in TypeScript,
JavaScript tests are also supported. Since we can't guarantee correct
types at runtime, this change adds type validation to test helpers,
throwing errors in the same JSG-style as other `workerd` APIs.

* [miniflare] Add support for `rootPath`s

Previously, Miniflare would always resolve path-valued options
relative to the current working directory. For the Vitest pool, we'd
like to be able to resolve these relative to the project config file.

This change adds back Miniflare 2's `rootPath` option for controlling
the resolution directory. `rootPath` can be set as a shared or
per-worker option. Path-valued options resolve relative to the closest
`rootPath`.

* [miniflare] Fix linting scripts

* Resolve pool Miniflare options relative to `vitest.config.ts`

...rather than the current working directory. This ensures paths are
always resolved to the same location when `vitest` is run in different
directories.

* Support injecting provided values in pool options

Vitest global setup hooks provide a good place to start auxiliary
servers required by tests (e.g. upstream). This change allows provided
values to be injected into the Miniflare config (e.g. using port from
global setup in hyperdrive local connection string).

* Support seeding data in config and reset storage between runs

This change adds a `setupEnvironment(env)` function called with a
bindings proxy per-`Miniflare`-instance per-test-run. This should be
used for seeding data from disk (e.g. applying D1 migrations).

* [miniflare] Fix `DurableObjectStub` detection

Enabling Durable Object JS RPC changes the class name of
`DurableObjectStub` from `DurableObject` to `WorkerRpc`. This was
breaking `Fetcher#fetch()` detection and WebSocket-upgrading
`DurableObjectStub#fetch()`es when using the magic proxy.

* Bump to `vitest@1.1.3`

* Support calling `fetch`/`scheduled`/`queue` handlers directly

This change adds some new test helpers useful when importing Worker
source code and calling handlers directly. Namely...

- `createExecutionContext()` for creating an `ExecutionContext`
- `getWaitUntil()` for waiting for all `ctx.waitUntil()` callbacks
- `createScheduledController()` for creating a `scheduled` handler's
  `ScheduledController`
- `getScheduledResult()` for getting the "no-retry" state of a
  `ScheduledController`
- `createMessageBatch()` for creating a `queue` handler's
  `MessageBatch`
- `getQueueResult()` for getting ack/retry state of a `MessageBatch`

Note `createScheduledController()`/`getScheduledResult()` and
`createMessageBatch()`/`getQueueResult()` take/return the same types
as `Fetcher#scheduled()` and `Fetcher#queue()` respectively.

Closes DEVX-1060

* Block custom environments

Our Vitest pool runs tests inside `workerd` itself. This means we
don't need to use Vitest's custom environment feature to setup the
correct global scope. Modifying the global scope would result in some
franken-`workerd`-environment that didn't match production.

With Miniflare 2's `vitest-environment-miniflare`, we _did_ require
users to enable a custom environment. Considering this is a
significant difference, this change adds a very helpful error message
if we detect a custom `environment` is configured.

* Assert compatible Vitest version on startup

Our Vitest pool currently depends on internal Vitest APIs that are not
protected by semantic-versioning guarantees. Therefore, this change
adds a runtime sanity check for a peer-dependency version constraint
on `vitest`.

* Fix fallback service on Windows

* [miniflare] Update API docs for unsupported products

* Integrate `vitest-pool-workers` with monorepo tooling

* Only include `dist` directory when publishing

* [pre] Move `CloudflareTestEnv` to `cloudflare:test` `ProvidedEnv`

* [pre] Use correct project path for non-workspace projects

`WorkspaceProject#path` was actually giving the path to the directory
containing the Vitest config, not the config file itself, for
non-workspace projects.

* [pre] Manually construct `__dirname`s

`vite-node` was transforming the pool files during development, but
externalising them when the pool was depended on externally. When
Vite transforms files, it automatically injects `__dirname`, even
though these are ES modules, which shouldn't have this by default.

* [pre] Construct serialised `poolOptions` to prevent serialising symbol

* [pre] Include `cloudflare:test` types in package

These can be referenced by adding `@cloudflare/vitest-pool-workers` to
the `types` array in `tsconfig.json`.

* Fixup comments: move method comments to JSDocs & add additional docs

* fixup! [miniflare] Add support for `rootPath`s

* Allow pool restarts on config change

Vitest will dispose of the pool and recreate it when the Vitest config
changes. This was causing `Miniflare` instances to be disposed, then
reused when the pool was recreated. This change moves the project
cache from the module-level to a "pool-level" local variable.

* Get builtin module list and `ExportedHandler` keys from RTTI

* fixup! Add support for fetch mocking with `undici` `MockAgent`

Our mock agent implementation depends on `undici` internals. This
change ensures we pin our version, so we don't accidentally upgrade
to an incompatible version.

* fixup! [miniflare] Bind `this` to `Miniflare` instance in custom services

Switch to passing `Miniflare` instance as parameter instead of `this`

* Use the same `esbuild` version as `wrangler`

* Use `node:path/posix` for posix path helpers in module fallback

* fixup! Fix fallback service on Windows

* Check all parents in `"type": "module"` cache before reading files

* fixup! Support seeding data in config and reset storage between runs

Rename abort-all helper worker

* Remove unnecessary `if` statement in fallback service

* fixup! Tidy up Node and package polyfills

Update not-implemented messages

* Remove unnecessarily complex `groupBy()`

* Add back support for listing Durable Objects in a namespace

Adds a `listDurableObjectIds()` test helper that behaves similarly to
`getMiniflareDurableObjectIds()` from Miniflare 2's test environments.

* [miniflare] Allow `URL`s to be passed in `hyperdrives` option

Importantly, this change makes the Zod output type of `hyperdrives`
assignable to the input type. This means we can pass the output of
parsing options schemas back to the `new Miniflare()` constructor.
Also adds a few more `hyperdrives` tests to verify this doesn't change
behaviour.

* Remove `setupEnvironment()` in favor of services to access file-system

* Add `SELF` export to `cloudflare:test` module

Exposing `kCurrentWorker` to users for integration testing wasn't very
nice. This is a common use case so this change ensures it's always
bound and adds it directly to the `cloudflare:test` module.

* Replace `getWaitUntil` with `waitOnExecutionContext` and `void` return

This function aims to allow users to wait on side-effecting
`waitUntil`s, then assert on their effects. `workerd` ignores the
resolved value of `Promise`s, so exposing these may make it trickier
to change the implementation of this function in the future.

* Remove redundant `isolateDurableObjectBindings` serialised option

`durableObjectBindingDesignators` includes the same and more
information, so there's no need to pass this.

* Fail if required compatibility flags aren't set

This makes it explicit which flags we're enabling, and helps avoid
behaviour differences when running `wrangler dev` or deployed code.

* Rename `WorkersProjectOptions` to `WorkersPoolOptions`

* fixup! Add support for isolated storage

Clarify `StackedStorageState` is per `Miniflare`-instance

* fixup! Add `SELF` export to `cloudflare:test` module

Update docs in `config.ts`

* Format with monorepo's `prettier` version
2024-02-16 18:04:49 +00:00
Somhairle MacLeòid
9bc52cfb38
Improve Testing (#4325) 2023-11-09 16:16:57 +00:00
bcoll
3ac91e839d [migration] Fix Miniflare build and test scripts 2023-11-01 15:27:07 +01:00
Somhairle MacLeòid
1231a2b68d
Disable turbo cache for tests (#4261) 2023-10-24 11:56:47 +01:00
Jacob M-G Evans
e4bb5f36a9
[📦 Monorepo] Turbo R2 Archive (#3885)
* Turbo R2 Archive
This is a Worker that will act as an event server for caching TurboRepo artifacts. Compliant with the TurboRepo API, for remote caching, it will store the cache artifacts in a Cloudflare R2 bucket and purge the cache on a schedule. This allows for all the benefits of remote caching TurboRepo artifacts on Cloudflare's edge network.
2023-09-01 15:20:45 -05:00
Jacob M-G Evans
05099f4c9f
Turborepo Implementation & Monorepo standardization (#3261)
* Turborepo 
- Turbo Workspaces: isolated tasks and localized pipelines more complex packages to exist in the monorepo.
- Persistent mode for dev keyword let's Turborepo know it's something that will be watched or run long term.
- Update all packages with namespaced ones for configs
- Namespacing TSConfig & ESlint with `@Cloudflare/` per security suggestion by Greg Brimble

* ESLint and TSConfig Monorepo Configuration
   - ESLint & TSConfig are local packages, the monorepo now isolates its configs to packages utilizing them, 
      configurations are now monorepo packages
   -  Type Checking TypeScript can now directly
       use the TSConfig which infers from valid TS config formats, since we are using Monorepo conventions each 
       package only needs to care about its own config specifics and the extended global config as a package.
   - Wrangler Emit TSConfig: Figure out if this can be part of the TurboRepo pipeline then move this into the workers- 
      tsconfig package as "wrangler-emit"
   - TurboRepo setup to work with TypeScript subdirectories as TS projects & added configs to more fixtures
   - Instructions for VSCode TypeScript Project Version
   - ESLint & Turbo require the `.` declared where to run monorepo tasks from each package

* Dependencies 
  - Adding Wrangler as direct Dependency for Fixtures that need it
  - Standardize Monorepo packaging in Fixtures 
  - All Wrangler dependencies are now devDependency

* Vitest
   - Update Vitest & remove global Vitest config
   - Added Vitest script for explicit test:watch
   - Refactor pages-simple-assets test
   - Fix tests in fixtures (thanks @petebacondarwin)
2023-06-12 12:57:01 -05:00