-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to capnp-es
#7788
base: main
Are you sure you want to change the base?
Switch to capnp-es
#7788
Conversation
🦋 Changeset detectedLatest commit: 95d7afb The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 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 |
82f3c67
to
47ba5eb
Compare
packages/miniflare/package.json
Outdated
@@ -30,8 +30,7 @@ | |||
"bootstrap.js" | |||
], | |||
"scripts": { | |||
"build": "node scripts/build.mjs && pnpm run types:build", | |||
"capnp:workerd": "capnpc -o ts src/runtime/config/workerd.capnp", | |||
"build": "capnp-es node_modules/workerd/workerd.capnp -ots && mv node_modules/workerd/workerd.ts src/runtime/config/generated.ts && node scripts/build.mjs && pnpm run types:build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is mv
going to work on Windows?
Generally it is better to put this stuff into a Node.js script I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming all the CI checks pass!
const hashBuffer = await crypto.subtle.digest("SHA-256", data.buffer); | ||
const hashBuffer = await crypto.subtle.digest( | ||
"SHA-256", | ||
data.buffer as ArrayBuffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this cast now necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of this involved upgrading TS to 5.7 from 5.6 for the Miniflare package—I can probably remove that, but it was causing some issues with capnp-es
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-wrangler-7788 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7788/npm-package-wrangler-7788 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-wrangler-7788 dev path/to/script.js Additional artifacts:cloudflare-workers-bindings-extension: wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-cloudflare-workers-bindings-extension-7788 -O ./cloudflare-workers-bindings-extension.0.0.0-vcdbc26e2d.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vcdbc26e2d.vsix create-cloudflare: npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-create-cloudflare-7788 --no-auto-update @cloudflare/kv-asset-handler: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-cloudflare-kv-asset-handler-7788 miniflare: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-miniflare-7788 @cloudflare/pages-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-cloudflare-pages-shared-7788 @cloudflare/unenv-preset: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-cloudflare-unenv-preset-7788 @cloudflare/vite-plugin: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-cloudflare-vite-plugin-7788 @cloudflare/vitest-pool-workers: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-cloudflare-vitest-pool-workers-7788 @cloudflare/workers-editor-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-cloudflare-workers-editor-shared-7788 @cloudflare/workers-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-cloudflare-workers-shared-7788 @cloudflare/workflows-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12893285713/npm-package-cloudflare-workflows-shared-7788 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
8e9d944
to
95d7afb
Compare
The
capnp-ts
dependency we use for Miniflare (and for type generation inworkerd
for constructing and reading the capnp format for the runtime) is blockingworkerd
upgrading TS versions to 5.7 (and will block Miniflare when we get around to upgrading—we're currently on 5.6).capnp-ts
effectively abandoned and hasn't been touched in 4 years, so this PR switches us to usecapnp-es
. It's a followup to unjs/capnp-es#10.