Skip to content

Commit f7dc8ac

Browse files
committed
2.7.1
1 parent 95faf3f commit f7dc8ac

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

3-
## Next
3+
## 2.7.1
4+
*2024-05-08*
45
- Fixed gitignore file reading not pertaining exactly to spec.
56
- Improved performance by filtering out gitignored files during folder traversal.
67

license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ISC License
22

3-
Copyright © Nixinova 2021–2022
3+
Copyright © Nixinova 2021–2024
44

55
Permission to use, copy, modify, and/or distribute this software for any
66
purpose with or without fee is hereby granted, provided that the above

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "linguist-js",
3-
"version": "2.7.0",
3+
"version": "2.7.1",
44
"description": "Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.",
55
"main": "dist/index.js",
66
"bin": {
@@ -14,7 +14,7 @@
1414
"download-files": "npx tsx@3 build/download-files",
1515
"pre-publish": "npm run download-files && npm test && npm run perf",
1616
"perf": "tsc && node test/perf",
17-
"test": "tsc && node test/folder && echo --- && node test/unit"
17+
"test": "tsc && node test/folder && node test/unit"
1818
},
1919
"files": [
2020
"bin/",
@@ -38,7 +38,7 @@
3838
},
3939
"homepage": "https://github.com/Nixinova/Linguist#readme",
4040
"dependencies": {
41-
"binary-extensions": "^2.2.0",
41+
"binary-extensions": "^2.2.0 <3",
4242
"commander": "^9.5.0 <10",
4343
"common-path-prefix": "^3.0.0",
4444
"cross-fetch": "^3.1.8 <4",

test/folder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const linguist = require('..');
33
const { updatedDiff } = require('deep-object-diff');
44

55
async function testFolder() {
6-
console.info('Folder test\n' + '-'.repeat(11));
6+
console.info('-'.repeat(11) + '\nFolder test\n' + '-'.repeat(11));
77
const samplesFolder = __dirname.replace(/\\/g, '/') + '/samples';
88
const expectedJson = fs.readFileSync(__dirname + '/expected.json', { encoding: 'utf8' });
99
const expected = JSON.parse(expectedJson.replace(/~/g, samplesFolder));

test/perf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ async function perfTest() {
1212
const unit = 'ms';
1313
const total = time;
1414
const average = total / amount;
15-
const EXPECTED_MAX = 100; // 2.6
15+
const EXPECTED_MAX = 90 // as of v2.7
1616
console.log('\n<Performance test results>');
1717
console.log('Total:', total, unit, `(n=${amount})`);
1818
console.log('Average:', average, unit);

test/unit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async function test([filename, fileContent = ''], [type, testVal]) {
2727
}
2828

2929
async function unitTest() {
30-
console.info('Unit tests\n' + '-'.repeat(10));
30+
console.info('-'.repeat(10) + '\nUnit tests\n' + '-'.repeat(10));
3131
desc('metadata');
3232
await test(['file_size', '0123456789'], ['size', 10]);
3333
await test(['empty', ''], ['size', 0]);

0 commit comments

Comments
 (0)