Skip to content

Commit 5dab8cc

Browse files
committed
Add 'promise.js' to exports
Prior to 2.2.0, an ES6 import of the promise wrapper had to specify a file extension ("import mysql from 'mysql2/promise.js';"), which made PR#1100 a breaking change as only the extensionless version was included in the exports; this restores promise.js as a valid import.
1 parent 8121ea1 commit 5dab8cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
],
4545
"exports": {
4646
".": "./index.js",
47-
"./promise": "./promise.js"
47+
"./promise": "./promise.js",
48+
"./promise.js": "./promise.js"
4849
},
4950
"engines": {
5051
"node": ">= 8.0"

0 commit comments

Comments
 (0)