Extract autoconfig in its own standalone package#14295
Extract autoconfig in its own standalone package#14295dario-piotrowicz wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: ce61f9d The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
UnknownError: ProviderInitError |
|
@dario-piotrowicz Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
|
✅ All changesets look good |
981aea6 to
517e184
Compare
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
517e184 to
ebd6427
Compare
ebd6427 to
585fb0f
Compare
7548da1 to
66056e2
Compare
c8373b2 to
2108672
Compare
2108672 to
ce61f9d
Compare
| import * as fs from "node:fs"; | ||
| import * as path from "node:path"; | ||
| import { parseStaticRouting } from "@cloudflare/workers-shared/utils/configuration/parseStaticRouting"; | ||
| import { getWorkerNameFromProject } from "@cloudflare/workers-utils"; |
There was a problem hiding this comment.
This has the nice effect to reducing the vite-plugin's dependency to wrangler 🙂
| { | ||
| "name": "@cloudflare/autoconfig", | ||
| "version": "0.1.0", | ||
| "private": true, |
There was a problem hiding this comment.
We could just make this public... but I figured we might start with it being private and only start publishing it to npm once it's actually needed
I don't have a super strong preference
In any case I wanted to point out that I am removing the Wrangler autoconfig programmatic API in this PR, so having this package private basically means that that API will effectively no longer be accessible by users... I feel like this is not a big deal as I don't imagine anyone relying on that API right now, but if that's a concern we might just want to make the package public
This PR extracts the Wrangler autoconfig logic in its own package, Wrangler being a consumer of such package.
The package is for the time being private, when/if needed we can make it public and release it to npm so that it can be used externally as well.
From the Wrangler CLI perspective this PR does not introduce any user-facing change in autoconfig behavior.
In regards to the autoconfig programmatic API, that is no longer exported by Wrangler but it is importable from this new package instead.
A picture of a cute animal (not mandatory, but encouraged)