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

Preserve entrypoint filename when building a Worker with --outdir #2836

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

GregBrimble
Copy link
Member

@GregBrimble GregBrimble commented Mar 2, 2023

What this PR solves / how to test:

npx wrangler publish --dry-run --outdir dist --assets public src/foo.ts should produce a dist/foo.js rather than dist/<internal-facade-name>.js

Associated docs issues/PR:

Author has included the following, where applicable:

  • Tests
  • Changeset

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
  • Manually pulled down the changes and spot-tested

Fixes # [insert issue number].

@GregBrimble GregBrimble requested a review from a team as a code owner March 2, 2023 13:36
@changeset-bot
Copy link

changeset-bot bot commented Mar 2, 2023

🦋 Changeset detected

Latest commit: 92a3118

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

This PR includes changesets to release 1 package
Name Type
wrangler 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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 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/4355114628/npm-package-wrangler-2836

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

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

Or you can use npx with this latest build directly:

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

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

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.

LGTM on the surface but CI does not agree...

@GregBrimble GregBrimble changed the base branch from main to pages-functions-wasm-cleanup March 5, 2023 17:32
@GregBrimble GregBrimble force-pushed the preserve-entrypoint-filename branch 3 times, most recently from a54d158 to 99324ea Compare March 5, 2023 19:56
@GregBrimble GregBrimble requested a review from a team as a code owner March 5, 2023 19:56
@codecov
Copy link

codecov bot commented Mar 5, 2023

Codecov Report

Merging #2836 (def59b0) into main (8d462c0) will increase coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head def59b0 differs from pull request most recent head 92a3118. Consider uploading reports for the commit 92a3118 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2836      +/-   ##
==========================================
+ Coverage   73.93%   73.96%   +0.03%     
==========================================
  Files         166      166              
  Lines       10250    10251       +1     
  Branches     2744     2745       +1     
==========================================
+ Hits         7578     7582       +4     
+ Misses       2672     2669       -3     
Impacted Files Coverage Δ
packages/wrangler/src/bundle.ts 92.99% <100.00%> (+0.03%) ⬆️
packages/wrangler/src/git-client.ts 43.75% <0.00%> (+4.16%) ⬆️
...ackages/wrangler/src/__tests__/helpers/mock-bin.ts 100.00% <0.00%> (+5.26%) ⬆️

@GregBrimble GregBrimble mentioned this pull request Mar 5, 2023
6 tasks
@GregBrimble GregBrimble force-pushed the preserve-entrypoint-filename branch 3 times, most recently from 6c4aa66 to e24ebcb Compare March 6, 2023 10:29
@GregBrimble GregBrimble force-pushed the preserve-entrypoint-filename branch 2 times, most recently from 0c91902 to 95b886d Compare March 6, 2023 10:33
@GregBrimble GregBrimble force-pushed the preserve-entrypoint-filename branch 2 times, most recently from 3bd0c95 to 1e4d8fe Compare March 6, 2023 16:32
Base automatically changed from pages-functions-wasm-cleanup to main March 7, 2023 14:05
@GregBrimble GregBrimble merged commit 42fb97e into main Mar 7, 2023
@GregBrimble GregBrimble deleted the preserve-entrypoint-filename branch March 7, 2023 16:08
@github-actions github-actions bot mentioned this pull request Mar 7, 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.

🐛 BUG: Entrypoint filename is not preserved when building with --outdir
3 participants