Skip to content
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

allow cloudflare-specific js module #2905

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

edevil
Copy link
Contributor

@edevil edevil commented Mar 15, 2023

Mark cloudflare-specific js module as external so that scripts can be published that reference it.

What this PR solves / how to test:

import { EmailMessage } from "cloudflare:email";

Author has included the following, where applicable:

Reviewer has performed the following, where applicable:

  • Checked for inclusion of relevant tests
  • Checked for inclusion of a relevant changeset
  • [ ] Checked for creation of associated docs updates : no documentation needed for this just yet. I assume when the first official cloudflare:.. prefixed modules are announced there will be docs associated with it.
  • Manually pulled down the changes and spot-tested

@edevil edevil requested a review from a team as a code owner March 15, 2023 16:34
@changeset-bot
Copy link

changeset-bot bot commented Mar 15, 2023

🦋 Changeset detected

Latest commit: ec3c8ef

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

This PR includes changesets to release 1 package
Name Type
wrangler Minor

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 15, 2023

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/4436097268/npm-package-wrangler-2905

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/4436097268/npm-package-wrangler-2905 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/4436097268/npm-package-cloudflare-pages-shared-2905

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

@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Merging #2905 (ec3c8ef) into main (9996ac4) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2905      +/-   ##
==========================================
+ Coverage   73.94%   73.98%   +0.03%     
==========================================
  Files         167      167              
  Lines       10295    10299       +4     
  Branches     2748     2748              
==========================================
+ Hits         7613     7620       +7     
+ Misses       2682     2679       -3     
Impacted Files Coverage Δ
packages/wrangler/src/bundle.ts 93.11% <100.00%> (+0.12%) ⬆️

... and 2 files with indirect coverage changes

@petebacondarwin
Copy link
Contributor

Thanks for getting the ball rolling on this. We will also need to add a changeset and a test or two.

@edevil
Copy link
Contributor Author

edevil commented Mar 15, 2023

The test here would be if I could publish (or build) a script that tried to import this module. Is there an existing test suite that this could fit into?

@edevil
Copy link
Contributor Author

edevil commented Mar 15, 2023

Added test and changeset.

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Great! Thanks for the quick turnaround @edevil - just a suggestion for the changeset description. Otherwise LGTM.

.changeset/afraid-readers-warn.md Outdated Show resolved Hide resolved
Mark cloudflare-specific js module as external so that scripts can be
published that reference it.
@petebacondarwin petebacondarwin merged commit 6fd0624 into cloudflare:main Mar 16, 2023
@github-actions github-actions bot mentioned this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants