Skip to content

Commit 7e04493

Browse files
petebacondarwinjamesopstaddario-piotrowicz
authored
Migrate vite-plugin-cloudflare to workers-sdk (#7763)
* copied over vite-plugin-cloudflare * packages/vite-plugin-cloudflare -> packages/vite-plugin-cloudflare * playground -> packages/vite-plugin-cloudflare/playground * vitest.config.e2e.ts -> packages/vite-plugin-cloudflare/playground/vitest.config.ts Co-authored-by: Peter Bacon Darwin <[email protected]> Co-authored-by: Dario Piotrowicz <[email protected]> * update vite-plugin-cloudflare files to work with workers-sdk * add playground to CI tests * add frameworks team to unenv-preset and vite-plugin-cloudflare CODEOWNERS * Rename @flarelabs-net/vite-plugin-cloudflare to @cloudflare/vite-plugin * Remove the use of playground-temp This is probably not needed because any generated files are already gitignored * Remove unnecessary workers-types catalog entry * Add changeset * add Vite plugin beta releases off main * Fix up package.json repo URL * Add test script * Remove changes to vitest-pool-workers test config, which is not relevant to this PR * update CODEOWNERS so frameworks team can also see changes to workers-tsconfig * Fix package-lock file * Fix up minimum Vite version for the Cloudflare Vite Plugin * Add README * Update packages/vite-plugin-cloudflare/package.json Co-authored-by: James Opstad <[email protected]> * Update packages/vite-plugin-cloudflare/package.json Co-authored-by: James Opstad <[email protected]> * use Cloudflare environments terminology consistently in README * Fix whitespace --------- Co-authored-by: James Opstad <[email protected]> Co-authored-by: Dario Piotrowicz <[email protected]>
1 parent cca7885 commit 7e04493

File tree

283 files changed

+8713
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+8713
-100
lines changed

.changeset/chilled-maps-learn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudflare/vite-plugin": patch
3+
---
4+
5+
Initial beta release of the Cloudflare Vite plugin

.github/workflows/prereleases.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
node .github/version-script.js create-cloudflare
3636
node .github/version-script.js workers-shared
3737
node .github/version-script.js unenv-preset
38+
node .github/version-script.js vite-plugin-cloudflare
3839
3940
- name: Build
4041
run: pnpm run build
@@ -79,6 +80,11 @@ jobs:
7980
env:
8081
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
8182

83+
- name: Publish vite-plugin-cloudflare@beta to NPM
84+
run: pnpm --filter vite-plugin-cloudflare publish --tag beta
85+
env:
86+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
87+
8288
- name: Get Package Version
8389
run: echo "WRANGLER_VERSION=$(npm view wrangler@beta version)" >> $GITHUB_ENV
8490
working-directory: packages/wrangler

.github/workflows/test-and-check.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ jobs:
101101
fail-fast: false
102102
matrix:
103103
os: [ubuntu-latest, windows-latest, macos-13]
104-
filter: ["./packages/*", "./fixtures/*"]
104+
filter:
105+
[
106+
"./packages/*",
107+
"./fixtures/*",
108+
"./packages/vite-plugin-cloudflare/playground",
109+
]
105110
# Things in the tools folder are for running in CI, and so only need to run on linux
106111
include:
107112
- os: ubuntu-latest

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,6 @@ fixtures/interactive-dev-tests/src/startup-error.ts
4343

4444
# These are generated by the build step
4545
fixtures/pages-redirected-config/build/*
46-
fixtures/redirected-config-worker/build/*
46+
fixtures/redirected-config-worker/build/*
47+
48+
packages/vite-plugin-cloudflare/playground/**/*.d.ts

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,16 @@
2424
"jsx",
2525
"decorators",
2626
"explicitResourceManagement"
27+
],
28+
"overrides": [
29+
{
30+
"files": "packages/vite-plugin-cloudflare/README.md",
31+
"options": {
32+
"useTabs": false,
33+
"semi": false,
34+
"singleQuote": true,
35+
"plugins": []
36+
}
37+
}
2738
]
2839
}

CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
# Workflows ownership
3333
/packages/workflows-shared/ @cloudflare/workflows @cloudflare/wrangler
3434

35+
# unenv-preset ownership
36+
/packages/unenv-preset/ @cloudflare/workers-frameworks @cloudflare/wrangler
37+
38+
# vite-plugin-cloudflare ownership
39+
/packages/vite-plugin-cloudflare/ @cloudflare/workers-frameworks @cloudflare/wrangler
40+
/packages/workers-tsconfig/ @cloudflare/workers-frameworks @cloudflare/wrangler
41+
3542
# Owners intentionally left blank on these shared directories / files
3643
# to avoid noisy review requests
3744
/.changeset/

packages/create-cloudflare/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@
7979
"open": "^8.4.0",
8080
"recast": "^0.22.0",
8181
"semver": "^7.5.1",
82+
"typescript": "catalog:default",
8283
"undici": "catalog:default",
84+
"vite": "catalog:default",
8385
"vite-tsconfig-paths": "^4.0.8",
86+
"vitest": "catalog:default",
8487
"which-pm-runs": "^1.1.0",
8588
"wrangler": "workspace:*",
8689
"wrap-ansi": "^9.0.0",

packages/unenv-preset/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
},
4848
"devDependencies": {
4949
"@types/node-unenv": "npm:@types/node@^22.10.5",
50-
"typescript": "^5.7.3",
50+
"typescript": "catalog:default",
5151
"unbuild": "^3.2.0",
5252
"undici": "catalog:default",
5353
"vitest": "catalog:default",

0 commit comments

Comments
 (0)