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 marking externals in Pages Functions #5172

Merged
merged 1 commit into from Apr 11, 2024

Conversation

GregBrimble
Copy link
Member

@GregBrimble GregBrimble commented Mar 5, 2024

What this PR solves / how to test

This allows Pages Plugins authors to mark dependencies as external when bundling their plugin. This is useful if you want to declare a module as a peer dependency.

Author has addressed the following

@GregBrimble GregBrimble requested review from a team as code owners March 5, 2024 20:46
Copy link

changeset-bot bot commented Mar 5, 2024

🦋 Changeset detected

Latest commit: ffad408

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

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@cloudflare/vitest-pool-workers 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

Copy link
Contributor

github-actions bot commented Mar 5, 2024

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/8625712351/npm-package-wrangler-5172

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8625712351/npm-package-wrangler-5172 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8625712351/npm-package-create-cloudflare-5172 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8625712351/npm-package-cloudflare-kv-asset-handler-5172
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8625712351/npm-package-miniflare-5172
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8625712351/npm-package-cloudflare-pages-shared-5172
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8625712351/npm-package-cloudflare-vitest-pool-workers-5172

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


wrangler@3.48.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240404.0
workerd 1.20240404.0 1.20240404.0
workerd --version 1.20240404.0 2024-04-04

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

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 70.53%. Comparing base (6c3be5b) to head (47d15a2).
Report is 20 commits behind head on main.

❗ Current head 47d15a2 differs from pull request most recent head ffad408. Consider uploading reports for the commit ffad408 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5172      +/-   ##
==========================================
- Coverage   72.09%   70.53%   -1.56%     
==========================================
  Files         331      298      -33     
  Lines       17175    15540    -1635     
  Branches     4386     4000     -386     
==========================================
- Hits        12382    10961    -1421     
+ Misses       4793     4579     -214     
Files Coverage Δ
packages/wrangler/src/pages/build.ts 67.41% <ø> (-4.27%) ⬇️
packages/wrangler/src/pages/buildFunctions.ts 90.00% <ø> (ø)
...ckages/wrangler/src/pages/functions/buildPlugin.ts 22.58% <ø> (ø)
...ckages/wrangler/src/pages/functions/buildWorker.ts 74.50% <100.00%> (ø)
packages/wrangler/src/deployment-bundle/bundle.ts 87.70% <50.00%> (+0.20%) ⬆️

... and 115 files with indirect coverage changes

Copy link
Contributor

@jahands jahands left a comment

Choose a reason for hiding this comment

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

LGTM

@GregBrimble GregBrimble force-pushed the allow-marking-externals-in-pages-functions branch 5 times, most recently from 2f2ab1d to 47d15a2 Compare March 12, 2024 20:11
@petebacondarwin petebacondarwin added the pages Relating to Pages label Mar 20, 2024
@GregBrimble GregBrimble force-pushed the allow-marking-externals-in-pages-functions branch from 47d15a2 to 74b9bff Compare April 9, 2024 19:01
@GregBrimble GregBrimble force-pushed the allow-marking-externals-in-pages-functions branch from 74b9bff to ffad408 Compare April 10, 2024 03:53
@GregBrimble GregBrimble merged commit fbe1c9c into main Apr 11, 2024
15 checks passed
@GregBrimble GregBrimble deleted the allow-marking-externals-in-pages-functions branch April 11, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pages Relating to Pages
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants