8000 [BUG] Allow UUID > V8, because UUID V8 has exports problem · Issue #2923 · exceljs/exceljs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[BUG] Allow UUID > V8, because UUID V8 has exports problem #2923
Open
@wkeese

Description

@wkeese

🐛 Bug Report

Lib version: 4.4.0

Steps To Reproduce

When trying to run Jest tests on my project, I get an error that:

    Jest encountered an unexpected token

    Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

    ...

    Details:

    /.../node_modules/exceljs/node_modules/uuid/dist/esm-browser/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export { default as v1 } from './v1.js';
                                                                                      ^^^^^^

    SyntaxError: Unexpected token 'export'

The problem is that UUID V8's package.json is ambiguous about CJS vs. ESM for its exports, in particular package.json's exports.default field.

This was fixed in UUID V9, in uuidjs/uuid#642, when they added:

"exports": {
      ...
      "browser": {
        "import": "./dist/esm-browser/index.js",
        "require": "./dist/commonjs-browser/index.js"
      },
}

Possible solution

If exceljs just switches to UUID V11 (or V10 or V9), or even just allows a range of UUID versions, then we can avoid this.

Exceljs only uses UUID's v4() method, without any options. I don't think that has changed since UUID V8.

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

      0