embroider-build / ember-auto-import

Zero config import from npm packages
Other
360 stars 109 forks source link

[2.7.3] Different export used for Sinon dependency #632

Open SanderKnauff opened 3 months ago

SanderKnauff commented 3 months ago

Summary from the discussion in #628:

A change in ember-auto-import 2.7.3 caused the export of a package to be different from the one that ember-auto-import 2.7.2.

In the observed case, using a named import import { stub } from 'sinon'; seems to be resulting in different behavior than import sinon from 'sinon'; sinon.stub();

Sinon defines its exports as follows:

  "exports": {
    ".": {
      "browser": "./pkg/sinon-esm.js",
      "require": "./lib/sinon.js",
      "import": "./pkg/sinon-esm.js"
    },
    "./*": "./*"
  },

The ESM module does have the export defined on line 20295.