-
Notifications
You must be signed in to change notification settings - Fork 773
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
feat(cloudflare-workers-bindings-extensions): list bindings on the sidebar #7582
Conversation
🦋 Changeset detectedLatest commit: 9e31010 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
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/12401351877/npm-package-wrangler-7582 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7582/npm-package-wrangler-7582 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-wrangler-7582 dev path/to/script.js Additional artifacts:wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-cloudflare-workers-bindings-extension-7582 -O ./cloudflare-workers-bindings-extension.0.0.0-vb5632048e.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vb5632048e.vsix npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-create-cloudflare-7582 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-cloudflare-kv-asset-handler-7582 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-miniflare-7582 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-cloudflare-pages-shared-7582 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-cloudflare-unenv-preset-7582 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-cloudflare-vitest-pool-workers-7582 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-cloudflare-workers-editor-shared-7582 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-cloudflare-workers-shared-7582 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12401351877/npm-package-cloudflare-workflows-shared-7582 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
d2e3f15
to
2f42303
Compare
06fe2d8
to
9e31010
Compare
@@ -19,6 +19,7 @@ | |||
"package": "pnpm run check:type && pnpm run check:lint && node esbuild.js --production", | |||
"compile-tests": "tsc -p . --outDir out", | |||
"watch-tests": "tsc -p . -w --outDir out", | |||
"test": "node ./out/test/runTest.js", |
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.
We use tsx
in various other places for stuff like this. Would that work? I'd alos love to see if it's possible to run this in CI—does it fail if you add a test:ci
script?
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.
Just tried that but it fails with this message:
Error: Cannot find module '/Users/edmund/Workspace/workers-sdk/packages/cloudflare-workers-bindings-extension/src/test/suite/index'
I have also pushed a commit with the test:ci
script. The tests seems to be running fine on windows and macos but fails on ubuntu (https://github.com/cloudflare/workers-sdk/actions/runs/12401086099/job/34619688337). I can look at this next as a follow-up.
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.
Looks like we need to have Xvfb enabled specifically for ubuntu:
https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
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.
Minor comment about tests, but otherwise looking good! We should also make sure to render all bindings, not just the ones we can edit
I can do a follow-up and extend it to all bindings tomorrow 👍🏼 (or on this branch if the main is still locked) |
c1f26ae
to
9e31010
Compare
Fixes DEVX-1472
This PR introduce the bindings view on the vscode extension that lists all the supported bindings in the sidebar. This implementation assumes the wrangler config is present on the root of the workspace folder and does not support monorepo at the moment.