-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ | |
"lib", | ||
"!lib/test.*" | ||
], | ||
"main": "lib", | ||
"module": "lib/index.mjs", | ||
"main": "lib/index.js", | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mike-marcacci
Author
Owner
|
||
"module": "src/index.mjs", | ||
This comment has been minimized.
Sorry, something went wrong.
jaydenseric
Collaborator
|
||
"engines": { | ||
"node": ">=8.5" | ||
}, | ||
|
@@ -36,7 +36,7 @@ | |
"eslint-config-prettier": "^4.0.0", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-import-order-alphabetical": "^0.0.2", | ||
"eslint-plugin-node": "^8.0.1", | ||
"eslint-plugin-node": "^9.0.1", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"husky": "^2.2.0", | ||
"leaked-handles": "^5.2.0", | ||
|
@@ -45,17 +45,11 @@ | |
"tap": "^13.1.2" | ||
}, | ||
"scripts": { | ||
"prepare": "npm run prepare:clean && npm run prepare:mjs && npm run prepare:js && npm run prepare:prettier", | ||
"prepare:clean": "rm -rf lib", | ||
"prepare:mjs": "BABEL_ESM=1 babel src -d lib --keep-file-extension", | ||
"prepare:js": "babel src -d lib", | ||
"prepare:prettier": "prettier 'lib/**/*.{mjs,js}' --write", | ||
"test": "npm run test:eslint && npm run test:prettier && npm run test:mjs && npm run test:js", | ||
"prepare": "rm -rf lib && babel src/index.mjs -d lib && prettier 'lib/**/*.js' --write", | ||
"test": "npm run test:eslint && npm run test:prettier && npm run test:tap", | ||
"test:eslint": "eslint . --ext mjs,js", | ||
"test:prettier": "prettier '**/*.{json,yml,md}' -l", | ||
"test:mjs": "node --experimental-modules --no-warnings lib/test | tap-mocha-reporter spec", | ||
"test:js": "node lib/test | tap-mocha-reporter spec", | ||
"prepublishOnly": "npm run prepare && npm test", | ||
"watch": "watch 'npm run prepublishOnly --silent' src --interval 1" | ||
"test:tap": "node --experimental-modules --no-warnings src/test | tap-mocha-reporter spec", | ||
"prepublishOnly": "npm run prepare && npm test" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import "leaked-handles"; | |
import fs from "fs"; | ||
import stream from "stream"; | ||
import t from "tap"; | ||
import WriteStream, { ReadAfterDestroyedError } from "."; | ||
import WriteStream, { ReadAfterDestroyedError } from "./index.mjs"; | ||
This comment has been minimized.
Sorry, something went wrong.
jaydenseric
Collaborator
|
||
|
||
const streamToString = stream => | ||
new Promise((resolve, reject) => { | ||
|
Pretty sure this will break native ESM, as you are directing all versions and modes of Node.js to enter the CJS
.js
file. Note that Node.js does not use the packagemodule
field; only bundlers like Webpack and Rollup use that.