Closed Bug 2065611 Opened 1 month ago Closed 1 month ago

Implement export star default proposal

Categories

(Core :: JavaScript: Standard Library, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: dminor, Assigned: cemase)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

We've had a request to prototype this, even though it's only at Stage 1.

Hi, I'm the champion of the proposal :) The spec text is at https://tc39.es/proposal-export-star-default/.

This was presented a few TC39 meetings ago, and there was strong enough support that I plan to propose it for Stage 2.7 soon. While the semantics of the change have a significant level of agreement, the main risk is around web compatibility.

I recently added an (approximate) UseCounter for this to V8, but I'm hoping to also have a flagged implementation in Firefox so that I can get a group of people to try it out and see if anybody finds a website that happens to break.

Severity: -- → N/A
Priority: -- → P3
Assignee: nobody → nicolo.ribaudo

Right now export * from "mod" skips mod's default export; the spec
blocks it. This patch lets it through when the pref is on, by skipping the
"default" checks in GetExportedNames and ResolveExport so default is
treated like any other exported name (ambiguity checks included).

With the Pref off: There's no change in behavior.

I've also added jit-tests covering the basic case, missing default, ambiguous
default, and explicit re-export resolving the ambiguity.

Hi, Cornelius
Thanks for taking this bug.
I notice Nicolo has assigned this bug, next time if you want to take a bug with someone assigned,
you can ask if you can take over the bug.
We don't want to spend time doing on the same things.

Hey Yoshi,

I'm working with Nic at Igalia. He's my mentor. He assigned himself so no one can take it before I get to it.

(In reply to Cornelius | CE student from comment #5)

I'm working with Nic at Igalia. He's my mentor. He assigned himself so no one can take it before I get to it.

Then you can just assign yourself to this bug.

I can't edit the bug and he's on leave.

Assignee: nicolo.ribaudo → cemase
Pushed by arai_a@mac.com: https://github.com/mozilla-firefox/firefox/commit/a58cff11691d https://hg.mozilla.org/integration/autoland/rev/c4923eae3af2 Part 1: Add pref and shell option for Export star default proposal. r=arai,allstarschh https://github.com/mozilla-firefox/firefox/commit/9cbb8d10c69a https://hg.mozilla.org/integration/autoland/rev/40da41d07eb4 Part 2: Implement Export star default proposal behind pref. r=arai,allstarschh
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
QA Whiteboard: [qa-triage-done-c158/b157]
Keywords: dev-doc-needed

FF157 MDN work for this can be tracked in https://github.com/mdn/content/issues/45699

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: