Skip to content

CommonJS model: comma expressions are not a familiar shape, so minified files always fall back #38

Closed as not planned

Description

@inth3shadows

Found in the round-1 review of branch fix/commonjs-model-gaps (stacked on PR #29, which fixes #34).

familiar() has no rule for a comma expression. Minified output joins top-level writes with commas, so it always fails the gate. That limits the !0 marker fix (#34) to its 'ES module interop default' path.

Repro: "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.load=void 0;function load(){return 1}exports.load=load; gives unfamiliar top-level ExpressionStatement.

Fix direction: treat a comma expression as familiar when every operand is a familiar expression statement.

Activity

  1. inth3shadows commented on Nov 17, 2026

    @inth3shadows
    OwnerAuthor

    Closing as moot: this tracked a gap in the CommonJS export model from #29, which is closed (see the closing note there). The CommonJS work continues in #28.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions