From f7dc8acb9a5928a8b141d1134289922c5e4e1ba3 Mon Sep 17 00:00:00 2001 From: Nixinova Date: Wed, 8 May 2024 22:47:07 +1200 Subject: [PATCH] 2.7.1 --- changelog.md | 3 ++- license.md | 2 +- package-lock.json | 6 +++--- package.json | 6 +++--- test/folder.js | 2 +- test/perf.js | 2 +- test/unit.js | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/changelog.md b/changelog.md index 4475b57..e1a6f77 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # Changelog -## Next +## 2.7.1 +*2024-05-08* - Fixed gitignore file reading not pertaining exactly to spec. - Improved performance by filtering out gitignored files during folder traversal. diff --git a/license.md b/license.md index 96e5077..09bed95 100644 --- a/license.md +++ b/license.md @@ -1,6 +1,6 @@ # ISC License -Copyright © Nixinova 2021–2022 +Copyright © Nixinova 2021–2024 Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/package-lock.json b/package-lock.json index 7e6a48f..9ef0862 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "linguist-js", - "version": "2.7.0", + "version": "2.7.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "linguist-js", - "version": "2.7.0", + "version": "2.7.1", "license": "ISC", "dependencies": { - "binary-extensions": "^2.2.0", + "binary-extensions": "^2.2.0 <3", "commander": "^9.5.0 <10", "common-path-prefix": "^3.0.0", "cross-fetch": "^3.1.8 <4", diff --git a/package.json b/package.json index d87b5ba..dc6e6ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linguist-js", - "version": "2.7.0", + "version": "2.7.1", "description": "Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.", "main": "dist/index.js", "bin": { @@ -14,7 +14,7 @@ "download-files": "npx tsx@3 build/download-files", "pre-publish": "npm run download-files && npm test && npm run perf", "perf": "tsc && node test/perf", - "test": "tsc && node test/folder && echo --- && node test/unit" + "test": "tsc && node test/folder && node test/unit" }, "files": [ "bin/", @@ -38,7 +38,7 @@ }, "homepage": "https://github.com/Nixinova/Linguist#readme", "dependencies": { - "binary-extensions": "^2.2.0", + "binary-extensions": "^2.2.0 <3", "commander": "^9.5.0 <10", "common-path-prefix": "^3.0.0", "cross-fetch": "^3.1.8 <4", diff --git a/test/folder.js b/test/folder.js index ac9b0ab..349c9f2 100644 --- a/test/folder.js +++ b/test/folder.js @@ -3,7 +3,7 @@ const linguist = require('..'); const { updatedDiff } = require('deep-object-diff'); async function testFolder() { - console.info('Folder test\n' + '-'.repeat(11)); + console.info('-'.repeat(11) + '\nFolder test\n' + '-'.repeat(11)); const samplesFolder = __dirname.replace(/\\/g, '/') + '/samples'; const expectedJson = fs.readFileSync(__dirname + '/expected.json', { encoding: 'utf8' }); const expected = JSON.parse(expectedJson.replace(/~/g, samplesFolder)); diff --git a/test/perf.js b/test/perf.js index 8efc58f..5d8d134 100644 --- a/test/perf.js +++ b/test/perf.js @@ -12,7 +12,7 @@ async function perfTest() { const unit = 'ms'; const total = time; const average = total / amount; - const EXPECTED_MAX = 100; // 2.6 + const EXPECTED_MAX = 90 // as of v2.7 console.log('\n'); console.log('Total:', total, unit, `(n=${amount})`); console.log('Average:', average, unit); diff --git a/test/unit.js b/test/unit.js index a800eed..00fdb61 100644 --- a/test/unit.js +++ b/test/unit.js @@ -27,7 +27,7 @@ async function test([filename, fileContent = ''], [type, testVal]) { } async function unitTest() { - console.info('Unit tests\n' + '-'.repeat(10)); + console.info('-'.repeat(10) + '\nUnit tests\n' + '-'.repeat(10)); desc('metadata'); await test(['file_size', '0123456789'], ['size', 10]); await test(['empty', ''], ['size', 0]);