Skip to content

Check whether this polyfill runs afoul of Dual Package hazards #164

Open
@12wrigja

Description

@12wrigja

Context: https://nodejs.org/api/packages.html#dual-package-hazard

I was pondering this in the context of #155, specifically whether if two versions of the polyfill sources (one with jsbi, and one with bigint) were to be loaded into the page whether they would correctly interoperate with each other, at the cost of extreme code-size regression (two copies of Temporal srcs, potentially two copies of JSBI!).

My guess is that no, currently they would not, primarily because an object from one instance would not satisfy the slot-based checks when passed to the other:

const slots = new WeakMap();

Setting aside the code-size problems, if it were possible to at least have the results be correct when interoperating I would consider publishing a second package that contains a pre-"transpiled" bundle that does not contain JSBI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions