exceljs / exceljs/exceljs

[BUG] Allow UUID > V8, because UUID V8 has exports problem

Open
#2,923 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
15.5k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

## 🐛 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.":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 https://github.com/uuidjs/uuid/pull/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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.