Skip to content

Prevent publishing packages that use import assertions #418

Closed
@nicolo-ribaudo

Description

@nicolo-ribaudo

This is related to denoland/deno#17944.

The old import assertions proposal (import ... assert { ... }) has been replaced by import attributes (import ... with { ... }). There are three platforms that currently support the old syntax: Deno, Node.js and Chrome. They all also support the new syntax (which is also supported by Bun and Safari).

As far as I know, Deno is the only platform that doesn't have a concrete plan yet to remove assert:

  • Node.js will drop it in v22 (next week)
  • Chrome will drop it in v126 (in June)

A good step to prevent more users from depending on the old syntax would be to ban it on JSR, so that new packages are forced to use the new syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    publishingProblems with publishing

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions