hunspell-reader
Advanced tools
Comparing version 6.19.2 to 6.20.0
@@ -8,3 +8,3 @@ "use strict"; | ||
const assert_1 = __importDefault(require("assert")); | ||
const fs_extra_1 = require("fs-extra"); | ||
const promises_1 = require("fs/promises"); | ||
const iconv_lite_1 = require("iconv-lite"); | ||
@@ -305,3 +305,3 @@ const aff_1 = require("./aff"); | ||
async function parseAffFile(filename, encoding = UTF8) { | ||
const buffer = await (0, fs_extra_1.readFile)(filename); | ||
const buffer = await (0, promises_1.readFile)(filename); | ||
const file = (0, iconv_lite_1.decode)(buffer, encoding); | ||
@@ -308,0 +308,0 @@ const affInfo = parseAff(file, encoding); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// cSpell:ignore findup | ||
const commander_1 = require("commander"); | ||
const fs = __importStar(require("fs-extra")); | ||
const fs_1 = require("fs"); | ||
const gensequence_1 = require("gensequence"); | ||
@@ -81,3 +58,3 @@ const aff_1 = require("./aff"); | ||
let resolved = false; | ||
const out = outFile ? fs.createWriteStream(outFile) : process.stdout; | ||
const out = outFile ? (0, fs_1.createWriteStream)(outFile) : process.stdout; | ||
const bufferedSeq = (0, gensequence_1.genSequence)((0, util_1.batch)(seq, 500)).map((batch) => batch.join('')); | ||
@@ -186,4 +163,4 @@ const dataStream = (0, iterableToStream_1.iterableToStream)(bufferedSeq); | ||
const data = words.toArray().sort().join(''); | ||
const fd = outputFile ? fs.openSync(outputFile, 'w') : 1; | ||
fs.writeSync(fd, data); | ||
const fd = outputFile ? (0, fs_1.openSync)(outputFile, 'w') : 1; | ||
(0, fs_1.writeSync)(fd, data); | ||
} | ||
@@ -190,0 +167,0 @@ else { |
@@ -27,3 +27,3 @@ "use strict"; | ||
exports.createMatchingWordsFilter = exports.IterableHunspellReader = void 0; | ||
const fs = __importStar(require("fs-extra")); | ||
const fs = __importStar(require("fs/promises")); | ||
const gensequence_1 = require("gensequence"); | ||
@@ -30,0 +30,0 @@ const iconv_lite_1 = require("iconv-lite"); |
{ | ||
"name": "hunspell-reader", | ||
"version": "6.19.2", | ||
"version": "6.20.0", | ||
"description": "A library for reading Hunspell Dictionary Files", | ||
@@ -40,12 +40,10 @@ "bin": "bin.js", | ||
"devDependencies": { | ||
"@types/fs-extra": "^9.0.13", | ||
"@types/jest": "^29.2.5", | ||
"@types/jest": "^29.4.0", | ||
"@types/node": "^18.11.18", | ||
"jest": "^29.3.1", | ||
"jest": "^29.4.1", | ||
"ts-jest": "^29.0.5", | ||
"typescript": "^4.9.4" | ||
"typescript": "^4.9.5" | ||
}, | ||
"dependencies": { | ||
"commander": "^10.0.0", | ||
"fs-extra": "^11.1.0", | ||
"gensequence": "^4.0.3", | ||
@@ -57,3 +55,3 @@ "iconv-lite": "^0.6.3" | ||
}, | ||
"gitHead": "0413716934fdfde59971d24773e7df83623bb529" | ||
"gitHead": "9de0bdd5b8da54daa72ccd6c328274bd796ada33" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
3
5
62824
1563
- Removedfs-extra@^11.1.0
- Removedfs-extra@11.2.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removeduniversalify@2.0.1(transitive)