Skip to content

feat: add documentation links to vscode extension#7689

Merged
emily-shen merged 10 commits intomainfrom
emily/extension-fixups
Jan 23, 2025
Merged

feat: add documentation links to vscode extension#7689
emily-shen merged 10 commits intomainfrom
emily/extension-fixups

Conversation

@emily-shen
Copy link
Copy Markdown
Contributor

@emily-shen emily-shen commented Jan 7, 2025

Fixes/adds:

  • DEVX-1555 use correct config name

  • DEVX-1550 Add documentation notifications
    Screenshot 2025-01-23 at 18 49 55

  • DEVX-1554 Use info styling for clipboard notifications
    Screenshot 2025-01-23 at 18 46 51

  • DEVX-1548 Add documentation links to binding types in sidebar

Screenshot 2025-01-14 at 10 26 44
  • DEVX-1558 Prompt user to update if wrangler is old
    (instead of bindings tree view welcome)
Screenshot 2025-01-16 at 15 55 19
  • DEVX-1471 - ensure each binding has an icon
    (whew we have a lot of bindings)
Screenshot 2025-01-22 at 00 40 05
  • Tests
    • TODO (before merge)
    • Tests included (sort of - they're not great)
    • Tests not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: no e2e tests either
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: unreleased

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 7, 2025

🦋 Changeset detected

Latest commit: f133236

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
cloudflare-workers-bindings-extension Patch

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

@emily-shen emily-shen changed the title error -> info message fix: extension feedback items Jan 7, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 7, 2025

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/12935939251/npm-package-wrangler-7689

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7689/npm-package-wrangler-7689

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-wrangler-7689 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-cloudflare-workers-bindings-extension-7689 -O ./cloudflare-workers-bindings-extension.0.0.0-v1690d09c9.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v1690d09c9.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-create-cloudflare-7689 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-cloudflare-kv-asset-handler-7689

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-miniflare-7689

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-cloudflare-pages-shared-7689

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-cloudflare-unenv-preset-7689

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-cloudflare-vite-plugin-7689

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-cloudflare-vitest-pool-workers-7689

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-cloudflare-workers-editor-shared-7689

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-cloudflare-workers-shared-7689

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12935939251/npm-package-cloudflare-workflows-shared-7689

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.105.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241230.2
workerd 1.20241230.0 1.20241230.0
workerd --version 1.20241230.0 2024-12-30

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@emily-shen emily-shen force-pushed the emily/extension-fixups branch from 096d275 to 90960c9 Compare January 13, 2025 13:27
@emily-shen emily-shen force-pushed the emily/extension-fixups branch from 90960c9 to 484b53f Compare January 13, 2025 13:36
@emily-shen emily-shen marked this pull request as ready for review January 13, 2025 20:55
@emily-shen emily-shen requested a review from a team as a code owner January 13, 2025 20:55
@emily-shen emily-shen changed the title fix: extension feedback items feat: add documentation links to vscode extension Jan 14, 2025
const configUri = await getConfigUri();
if (!config || !configUri) {
const docs = await window.showErrorMessage(
"Unable to locate Wrangler configuration file — have you opened a project with a wrangler.json(c) or wrangler.toml file?",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

up to prod, but IMHO smth more action oriented like Unable to locate Wrangler configuration file. Please make sure your project contains a wrangler.json(c) or wrangler.toml file. would be more helpful than asking a question. But again, up to prod

Comment thread packages/cloudflare-workers-bindings-extension/src/add-binding.ts Outdated
@emily-shen emily-shen marked this pull request as draft January 16, 2025 11:21
@emily-shen emily-shen marked this pull request as ready for review January 16, 2025 16:55
Comment on lines +79 to +81
// if we didn't successfully read the config, it's probably because of an old wrangler version
// import wrangler will already have warned the user (prbs at the view binding stage) - do we want to error again?
// should we just hide the add buttons if wrangler is old?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to show the error again here—users can trigger this through the command pallete

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the add binding command is now entirely disabled if you don't have a supported version of wrangler. but i'll leave in the warning in case they somehow get there

Comment thread packages/cloudflare-workers-bindings-extension/src/add-binding.ts Outdated
Comment thread packages/cloudflare-workers-bindings-extension/src/wrangler.ts Outdated
@emily-shen emily-shen merged commit 3886065 into main Jan 23, 2025
@emily-shen emily-shen deleted the emily/extension-fixups branch January 23, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants