← All tasks
javascriptjshttp/mime-types #135Not a task: already works

engines field is not correct for 3.x

envgap__jshttp__mime-types-135

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
64e03d9d532c8967ebf611efc8ddd55f445ac9e5
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

jshttp/mime-types #135 · read the original issue
`engines` is https://github.com/jshttp/mime-types/blob/master/package.json#L37

But in code we have:

```js
 if (
    exports.types[extension] !== 'application/octet-stream' &&
    (score0 > score1 ||
      (score0 === score1 &&
        exports.types[extension]?.slice(0, 12) === 'application/'))
  ) {
    return type0
  }
```

https://github.com/jshttp/mime-types/blob/master/index.js#L201C2-L208C4

Optional chaining is not available in Node.js@0.6

Ref: https://github.com/webpack/webpack/pull/19366
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]