Skip to content

Commit

Permalink
2.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixinova committed May 8, 2024
1 parent 95faf3f commit f7dc8ac
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion license.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -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/",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/folder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion test/perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<Performance test results>');
console.log('Total:', total, unit, `(n=${amount})`);
console.log('Average:', average, unit);
Expand Down
2 changes: 1 addition & 1 deletion test/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit f7dc8ac

Please sign in to comment.