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

fix(functions): unbundle to slug directory by default #2127

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Apr 5, 2024

What kind of change does this PR introduce?

Bug fix #1912

What is the current behavior?

If only --entrypoint flag is used, the eszip will be unbundled as a single index.ts file

edge-runtime bundle --entrypoint functions/hello/index.ts --output /tmp/output.eszip
edge-runtime unbundle --eszip /tmp/output.eszip --output .

But if an --import-map flag is also used, for eg.

edge-runtime bundle --entrypoint functions/hello/index.ts --import-map import_map.json --output /tmp/output.eszip
edge-runtime unbundle --eszip /tmp/output.eszip --output .

The entrypoint file will be extracted relative to the import map:

import_map.json
functions/hello/index.ts

What is the new behavior?

It's too complicated to maintain the original bundled file structure when extracting. So we will simply extract the eszip folder as it is.

Additional context

Add any other context or screenshots.

@sweatybridge sweatybridge requested a review from a team as a code owner April 5, 2024 18:51
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8574405906

Details

  • 0 of 23 (0.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.06%) to 57.801%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/functions/download/download.go 0 23 0.0%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 11.76%
Totals Coverage Status
Change from base Build 8571489894: -0.06%
Covered Lines: 6376
Relevant Lines: 11031

💛 - Coveralls

@sweatybridge sweatybridge merged commit d9ff87c into develop Apr 5, 2024
9 checks passed
@sweatybridge sweatybridge deleted the fix-download branch April 5, 2024 18:57
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.

Cannot use supabase functions download
2 participants