Skip to content

CDN generates empty module mappings that turn out to be incorrect #104

Description

@merryman

I can reproduce this with the latest version of mocha 11.7.4 but any version since 10.3 appears to have this issue.
JSPM generates an import map for mocha that has several empty mappings:

...
"#lib/nodejs/esm-utils.js": "https://ga.jspm.io/npm:@jspm/core@2.1.0/nodelibs/@empty.js",
"#lib/nodejs/file-unloader.js": "https://ga.jspm.io/npm:@jspm/core@2.1.0/nodelibs/@empty.js",
"#lib/nodejs/parallel-buffered-runner.js": "https://ga.jspm.io/npm:@jspm/core@2.1.0/nodelibs/@empty.js",
...

However in the actual modules that import these mappings, certain function exports are being assumed that are not present.
One example: https://ga.jspm.io/npm:mocha@11.7.4/_/C9_7g5Z2.js, where #lib/nodejs/esm-utils.js is assumed to export a dew member that is not present in the module.

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