Skip to content

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

Merged
sweatybridge merged 2 commits into
developfrom
fix-download
Apr 5, 2024
Merged

fix(functions): unbundle to slug directory by default#2127
sweatybridge merged 2 commits into
developfrom
fix-download

Conversation

@sweatybridge
Copy link
Copy Markdown
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
Copy Markdown

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
@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