feat: add nodenext compatibility (#470)

This commit is contained in:
Frazer Smith
2023-02-20 08:39:53 +00:00
committed by GitHub
parent 7637c71c3e
commit 4590aa794e
5 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -3,5 +3,5 @@
# should improve installation performance slightly
*
!src/index.js
!src/index.d.ts
!src/lib/**
!src/lib/**
!types/index.d.ts
+1
View File
@@ -33,6 +33,7 @@
"unite"
],
"main": "src/index.js",
"types": "types/index.d.ts",
"repository": "git+https://github.com/Fdawgs/node-poppler.git",
"homepage": "https://github.com/Fdawgs/node-poppler",
"bugs": {
+4 -4
View File
@@ -23,7 +23,8 @@ const errorMessages = {
* @param {object} acceptedOptions - Object containing options that a binary accepts.
* @param {object} options - Object containing options to pass to binary.
* @param {string=} version - Version of binary.
* @returns {Array|Error} Array of CLI arguments or Error object if invalid arguments provided.
* @returns {Array<string>} Array of CLI arguments.
* @throws {Error} If invalid arguments provided.
*/
function parseOptions(acceptedOptions, options, version) {
const args = [];
@@ -1519,6 +1520,5 @@ class Poppler {
}
}
module.exports = {
Poppler,
};
module.exports.Poppler = Poppler;
module.exports.default = Poppler;
+2 -1
View File
@@ -1,9 +1,10 @@
{
"include": ["src/index.js"],
"compilerOptions": {
"allowJs": true,
"declaration": true,
"emitDeclarationOnly": true,
"allowJs": true,
"outDir": "types",
"strict": true
}
}
+1
View File
@@ -1,3 +1,4 @@
export default Poppler;
export class Poppler {
/**
* @param {string=} binPath - Path of poppler-utils binaries.