Skip to content

Conversation

@mikenomitch
Copy link
Contributor

@mikenomitch mikenomitch commented Mar 4, 2025

Summary

Adds documentation for importable env

Documentation checklist

TODO

  • Get correct changelog date

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2025

Howdy and thanks for contributing to our repo. We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.

Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

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

Hyperlint Review is complete!

Hyperlint Vale Style Guide Review

Reviewed 2 files and found 1 issues.

See the inline comments and suggestions below.

Hyperlint Link Check Review

Reviewed 2 files and found 0 issues.


We are upgrading our reviewer model! Going forward, our model will learn your particular style - which comments you all accept and reject, so that it can further personalize its suggestions.

What is Hyperlint?

Hyperlint is an AI agent that helps you write, edit, and maintain your documentation. It can review, edit, and suggest fixes for your documentation.

Learn more about the Hyperlint AI reviewer and the checks that we can run on your documentation.

Copy link
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

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

Few notes but 👍 excited about this

@mikenomitch mikenomitch force-pushed the mikenomitch/add-importable-env branch from c6c5df1 to 979a8f2 Compare March 6, 2025 20:55
@mikenomitch mikenomitch changed the title WIP - Adds documentation for importable env Adds documentation for importable env Mar 6, 2025
@irvinebroque
Copy link
Contributor

Ship it!

@mikenomitch
Copy link
Contributor Author

Ship it!

Still getting Uncaught SyntaxError: The requested module 'cloudflare:workers' does not provide an export named 'env' on latest wrangler with compat date set to today.

@mikenomitch
Copy link
Contributor Author

FYI: This is usable if you deploy your worker but not if you wrangler dev. We need a workerd release to go out, and then make its way into latest wrangler for full support.

Blocking the changelog until we get that sorted.

@mikenomitch mikenomitch force-pushed the mikenomitch/add-importable-env branch from 979a8f2 to ab221e9 Compare March 13, 2025 22:56
@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Mar 13, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Added documentation for the importable env feature, enhancing the ability to access bindings in Worker code.

  • Introduced documentation for importing env from cloudflare:workers for easier access to bindings.
  • Updated existing bindings documentation to reflect the new importable env functionality.
  • Clarified usage examples for accessing environment variables and secrets in Worker code.

Modified Files

  • src/content/docs/workers/runtime-apis/bindings/index.mdx

Added Files

  • src/content/changelog/workers/2025-03-14-importable-env.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

What is Hyperlint?

Hyperlint is an AI agent that helps you write, edit, and maintain your documentation.

Learn more about the Hyperlint AI reviewer and the checks that we can run on your documentation.

@penalosa
Copy link
Contributor

penalosa commented Mar 13, 2025

@mikenomitch can we block this on cloudflare/workers-sdk#8478, which adds support for this to wrangler types? The relevant workerd release is out, but we haven't updated in Wrangler yet because of a cautious approach to landing v4 this week and minimising conflicting changes. It should be in tomorrow's Wrangler release.

Copy link
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

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

Awesome. Nice examples

@mikenomitch mikenomitch enabled auto-merge (squash) March 17, 2025 15:19
@mikenomitch mikenomitch merged commit a94f883 into production Mar 17, 2025
11 checks passed
@mikenomitch mikenomitch deleted the mikenomitch/add-importable-env branch March 17, 2025 15:38
RebeccaTamachiro pushed a commit that referenced this pull request Apr 21, 2025
Adds documentation for importable env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants