Skip to content

Commit

Permalink
refactor(pkg): Update writable stream path
Browse files Browse the repository at this point in the history
And make it work for old Node versions
  • Loading branch information
fb55 committed Jul 16, 2024
1 parent 1f83db3 commit d5882db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions WritableStream.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Make exports work in Node < 12
// eslint-disable-next-line no-undef, unicorn/prefer-module
module.exports = require("./dist/commonjs/WritableStream.js");
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"default": "./dist/commonjs/index.js"
}
},
"./dist/WritableStream": {
"./WritableStream": {
"import": {
"source": "./src/WritableStream.ts",
"types": "./dist/esm/WritableStream.d.ts",
Expand Down Expand Up @@ -105,7 +105,7 @@
],
"exports": {
".": "./src/index.ts",
"./dist/WritableStream": "./src/WritableStream.ts"
"./WritableStream": "./src/WritableStream.ts"
}
}
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"exactOptionalPropertyTypes": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"isolatedDeclarations": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
Expand Down

2 comments on commit d5882db

@velocityzen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot to update docs!

@fb55
Copy link
Owner Author

@fb55 fb55 commented on d5882db Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder, fixed in 3ab8e71!

Please sign in to comment.