Visitar URL original
Writing to frozen/reserved data fails silently (should error in strict mode/ESM) · Issue #4341 · 11ty/buildawesome · GitHub
Skip to content

Writing to frozen/reserved data fails silently (should error in strict mode/ESM) #4341

Open

Description

@zachleat

Tracking issue for upstream #3470

Activity

  1. added
    bug: liteDebatable whether or not this is a bug. I mean, it’s not great but it’s not really broken either.
    on Aug 10, 2026
  2. added theissue type on Aug 10, 2026
  3. Boulea7 commented on Aug 13, 2026

    @Boulea7

    On current main, the original _data/eleventy.js case now fails on the first build with the sourced reserved-data error added in #3536. I can still reproduce one strictness-dependent path in JavaScript data functions: assigning to the frozen data.eleventy argument is silently ignored in CJS, while the same assignment throws in ESM (both when adding a key and when overwriting generator).

    For #4341, which contract would you prefer for that function argument: (1) an explicit reserved-data error in both CJS and ESM, (2) a mutable clone whose changes are local to the function, or (3) native behavior, including the CJS no-op? I’d lean toward (1), but can work with whichever behavior is intended.

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

    bug: liteDebatable whether or not this is a bug. I mean, it’s not great but it’s not really broken either.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions