linguist-js 2.9.0 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +7 -0
- package/dist/helpers/convert-pcre.js +1 -1
- package/dist/helpers/load-data.js +2 -3
- package/dist/helpers/parse-gitattributes.js +1 -1
- package/dist/helpers/parse-gitignore.js +1 -1
- package/dist/helpers/read-file.js +2 -2
- package/dist/helpers/walk-tree.js +1 -1
- package/dist/index.js +1 -1
- package/ext/generated.rb +1 -1
- package/ext/heuristics.yml +46 -15
- package/ext/languages.yml +97 -12
- package/license.md +1 -1
- package/package.json +3 -3
- package/dist/package.json +0 -56
- package/dist/src/cli.d.ts +0 -1
- package/dist/src/cli.js +0 -146
- package/dist/src/helpers/convert-pcre.d.ts +0 -2
- package/dist/src/helpers/convert-pcre.js +0 -38
- package/dist/src/helpers/load-data.d.ts +0 -4
- package/dist/src/helpers/load-data.js +0 -37
- package/dist/src/helpers/norm-path.d.ts +0 -2
- package/dist/src/helpers/norm-path.js +0 -15
- package/dist/src/helpers/parse-gitattributes.d.ts +0 -17
- package/dist/src/helpers/parse-gitattributes.js +0 -37
- package/dist/src/helpers/parse-gitignore.d.ts +0 -1
- package/dist/src/helpers/parse-gitignore.js +0 -12
- package/dist/src/helpers/read-file.d.ts +0 -5
- package/dist/src/helpers/read-file.js +0 -23
- package/dist/src/helpers/walk-tree.d.ts +0 -20
- package/dist/src/helpers/walk-tree.js +0 -85
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +0 -485
- package/dist/src/schema.d.ts +0 -37
- package/dist/src/schema.js +0 -2
- package/dist/src/types.d.ts +0 -74
- package/dist/src/types.js +0 -2
- package/dist/version.d.ts +0 -2
- package/dist/version.js +0 -4
package/dist/cli.js
CHANGED
|
@@ -57,6 +57,13 @@ for (const arg in args) {
|
|
|
57
57
|
// Run Linguist
|
|
58
58
|
if (args.analyze)
|
|
59
59
|
(async () => {
|
|
60
|
+
var _a;
|
|
61
|
+
// Check arguments
|
|
62
|
+
const validCategories = ['data', 'programming', 'prose', 'markup'];
|
|
63
|
+
if ((_a = args.categories) === null || _a === void 0 ? void 0 : _a.some((category) => !validCategories.includes(category))) {
|
|
64
|
+
console.log(`Error: '${args.categories.join(', ')}' contains an invalid category. Valid options: ${validCategories.join(', ')}.`);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
60
67
|
// Fetch language data
|
|
61
68
|
const root = args.analyze === true ? '.' : args.analyze;
|
|
62
69
|
const data = await (0, index_1.default)(root, args);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = pcre;
|
|
3
4
|
/** Convert a PCRE regex into JS. */
|
|
4
5
|
function pcre(regex) {
|
|
5
6
|
let finalRegex = regex;
|
|
@@ -35,4 +36,3 @@ function pcre(regex) {
|
|
|
35
36
|
// Return final regex
|
|
36
37
|
return RegExp(finalRegex, [...finalFlags].join(''));
|
|
37
38
|
}
|
|
38
|
-
exports.default = pcre;
|
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.parseGeneratedDataFile =
|
|
6
|
+
exports.parseGeneratedDataFile = parseGeneratedDataFile;
|
|
7
|
+
exports.default = loadFile;
|
|
7
8
|
const fs_1 = __importDefault(require("fs"));
|
|
8
9
|
const path_1 = __importDefault(require("path"));
|
|
9
10
|
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
@@ -30,9 +31,7 @@ function parseGeneratedDataFile(fileContent) {
|
|
|
30
31
|
var _a;
|
|
31
32
|
return [...(_a = fileContent.match(/(?<=name\.match\(\/).+?(?=(?<!\\)\/)/gm)) !== null && _a !== void 0 ? _a : []];
|
|
32
33
|
}
|
|
33
|
-
exports.parseGeneratedDataFile = parseGeneratedDataFile;
|
|
34
34
|
/** Load a data file from github-linguist. */
|
|
35
35
|
function loadFile(file, offline = false) {
|
|
36
36
|
return offline ? loadLocalFile(file) : loadWebFile(file);
|
|
37
37
|
}
|
|
38
|
-
exports.default = loadFile;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = parseAttributes;
|
|
3
4
|
const norm_path_1 = require("./norm-path");
|
|
4
5
|
/**
|
|
5
6
|
* Parses a gitattributes file.
|
|
@@ -34,4 +35,3 @@ function parseAttributes(content, folderRoot = '.') {
|
|
|
34
35
|
}
|
|
35
36
|
return output;
|
|
36
37
|
}
|
|
37
|
-
exports.default = parseAttributes;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = parseGitignore;
|
|
3
4
|
function parseGitignore(content) {
|
|
4
5
|
const readableData = content
|
|
5
6
|
// Remove comments unless escaped
|
|
@@ -9,4 +10,3 @@ function parseGitignore(content) {
|
|
|
9
10
|
const arrayData = readableData.split(/\r?\n/).filter(data => data);
|
|
10
11
|
return arrayData;
|
|
11
12
|
}
|
|
12
|
-
exports.default = parseGitignore;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = readFileChunk;
|
|
6
7
|
const fs_1 = __importDefault(require("fs"));
|
|
7
8
|
/**
|
|
8
9
|
* Read part of a file on disc.
|
|
@@ -14,10 +15,9 @@ async function readFileChunk(filename, onlyFirstLine = false) {
|
|
|
14
15
|
let content = '';
|
|
15
16
|
for await (const data of stream) { // may throw
|
|
16
17
|
content += data.toString();
|
|
17
|
-
if (onlyFirstLine
|
|
18
|
+
if (onlyFirstLine) {
|
|
18
19
|
return content.split(/\r?\n/)[0];
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
return content;
|
|
22
23
|
}
|
|
23
|
-
exports.default = readFileChunk;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = walk;
|
|
6
7
|
const fs_1 = __importDefault(require("fs"));
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const parse_gitignore_1 = __importDefault(require("./parse-gitignore"));
|
|
@@ -87,4 +88,3 @@ function walk(data) {
|
|
|
87
88
|
folders: [...allFolders],
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
|
-
exports.default = walk;
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,7 @@ async function analyse(rawPaths, opts = {}) {
|
|
|
46
46
|
const manualFileContent = [(_a = opts.fileContent) !== null && _a !== void 0 ? _a : []].flat();
|
|
47
47
|
// Normalise input option arguments
|
|
48
48
|
opts = {
|
|
49
|
-
calculateLines: (_b = opts.calculateLines) !== null && _b !== void 0 ? _b : true,
|
|
49
|
+
calculateLines: (_b = opts.calculateLines) !== null && _b !== void 0 ? _b : true, // default to true if unset
|
|
50
50
|
checkIgnored: !opts.quick,
|
|
51
51
|
checkDetected: !opts.quick,
|
|
52
52
|
checkAttributes: !opts.quick,
|
package/ext/generated.rb
CHANGED
package/ext/heuristics.yml
CHANGED
|
@@ -38,7 +38,7 @@ disambiguations:
|
|
|
38
38
|
- extensions: ['.as']
|
|
39
39
|
rules:
|
|
40
40
|
- language: ActionScript
|
|
41
|
-
pattern: '^\s*(?:package(?:\s+[\w.]+)?\s+(?:\{|$)|import\s+[\w.*]+\s*;|(
|
|
41
|
+
pattern: '^\s*(?:package(?:\s+[\w.]+)?\s+(?:\{|$)|import\s+[\w.*]+\s*;|(?:intrinsic\s+)class\s+[\w<>.]+|\s+class\s+extends\s+[\w<>.]+|(?:(?:public|protected|private|static)\s+)*(?:(?:var|const|local)\s+\w+\s*:\s*[\w<>.]+(?:\s*=.*)?\s*;|function\s+\w+\s*\((?:\s*\w+\s*:\s*[\w<>.]+\s*(,\s*\w+\s*:\s*[\w<>.]+\s*)*)?\)))'
|
|
42
42
|
- extensions: ['.asc']
|
|
43
43
|
rules:
|
|
44
44
|
- language: Public Key
|
|
@@ -49,6 +49,8 @@ disambiguations:
|
|
|
49
49
|
pattern: '^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])'
|
|
50
50
|
- extensions: ['.asm']
|
|
51
51
|
rules:
|
|
52
|
+
- language: Assembly
|
|
53
|
+
pattern: '(?i)mov\s+[^\s]{2,},'
|
|
52
54
|
- language: Motorola 68K Assembly
|
|
53
55
|
named_pattern: m68k
|
|
54
56
|
- extensions: ['.asy']
|
|
@@ -103,12 +105,12 @@ disambiguations:
|
|
|
103
105
|
- extensions: ['.bs']
|
|
104
106
|
rules:
|
|
105
107
|
- language: Bikeshed
|
|
106
|
-
pattern: '^(?i:<pre\s+class)\s*=\s*(''|\"|\b)metadata\b
|
|
108
|
+
pattern: '^(?i:<pre\s+class)\s*=\s*(''|\"|\b)metadata\b(''|\"|\b)[^>\r\n]*>'
|
|
107
109
|
- language: BrighterScript
|
|
108
110
|
pattern:
|
|
109
|
-
- (?i:^\s*(
|
|
111
|
+
- (?i:^\s*(?:sub\s*\w+\(.*?\))|(?::\s*sub\(.*?\))$)
|
|
110
112
|
- (?i:^\s*(end\ssub)$)
|
|
111
|
-
- (?i:^\s*(
|
|
113
|
+
- (?i:^\s*(?:function\s*\w+\(.*?\)\s*as\s*\w*)|(?::\s*function\(.*?\)\s*as\s*\w*)$)
|
|
112
114
|
- (?i:^\s*(end\sfunction)$)
|
|
113
115
|
- language: Bluespec BH
|
|
114
116
|
pattern: '^package\s+[A-Za-z_][A-Za-z0-9_'']*(?:\s*\(|\s+where)'
|
|
@@ -258,7 +260,7 @@ disambiguations:
|
|
|
258
260
|
- extensions: ['.ftl']
|
|
259
261
|
rules:
|
|
260
262
|
- language: FreeMarker
|
|
261
|
-
pattern: '^(?:<|[a-zA-Z-][a-zA-Z0-9_-]+[ \t]+\w)|\$\{\w+[^\r\n]*?\}|^[ \t]*(?:<#--.*?-->|<#([a-z]+)
|
|
263
|
+
pattern: '^(?:<|[a-zA-Z-][a-zA-Z0-9_-]+[ \t]+\w)|\$\{\w+[^\r\n]*?\}|^[ \t]*(?:<#--.*?-->|<#(?:[a-z]+)\s[^>]*>.*?</#(?:[a-z]+)>|\[#--.*?--\]|\[#(?:[a-z]+)\s[^\]]*\].*?\[#(?:[a-z]+)\])'
|
|
262
264
|
- language: Fluent
|
|
263
265
|
pattern: '^-?[a-zA-Z][a-zA-Z0-9_-]* *=|\{\$-?[a-zA-Z][-\w]*(?:\.[a-zA-Z][-\w]*)?\}'
|
|
264
266
|
- extensions: ['.g']
|
|
@@ -326,6 +328,10 @@ disambiguations:
|
|
|
326
328
|
named_pattern: m68k
|
|
327
329
|
- language: SWIG
|
|
328
330
|
pattern: '^[ \t]*%[a-z_]+\b|^%[{}]$'
|
|
331
|
+
- language: Assembly
|
|
332
|
+
pattern:
|
|
333
|
+
- '(?i)mov\s+[^\s]+,'
|
|
334
|
+
- '^\s+(i?)db\s+[a-z\d]'
|
|
329
335
|
- extensions: ['.ice']
|
|
330
336
|
rules:
|
|
331
337
|
- language: JSON
|
|
@@ -345,7 +351,7 @@ disambiguations:
|
|
|
345
351
|
- language: NASL
|
|
346
352
|
pattern:
|
|
347
353
|
- '^\s*include\s*\(\s*(?:"|'')[\\/\w\-\.:\s]+\.(?:nasl|inc)\s*(?:"|'')\s*\)\s*;'
|
|
348
|
-
- '^\s*(?:global|local)_var\s+(?:\w+(?:\s*=\s*[\w\-"'']+)?\s*)(?:,\s*\w+(?:\s*=\s*[\w\-"'']+)?\s*)
|
|
354
|
+
- '^\s*(?:global|local)_var\s+(?:\w+(?:\s*=\s*[\w\-"'']+)?\s*)(?:,\s*\w+(?:\s*=\s*[\w\-"'']+)?\s*)*\s*;'
|
|
349
355
|
- '^\s*namespace\s+\w+\s*\{'
|
|
350
356
|
- '^\s*object\s+\w+\s*(?:extends\s+\w+(?:::\w+)?)?\s*\{'
|
|
351
357
|
- '^\s*(?:public\s+|private\s+|\s*)function\s+\w+\s*\([\w\s,]*\)\s*\{'
|
|
@@ -357,6 +363,10 @@ disambiguations:
|
|
|
357
363
|
- '^\s*end[.;]\s*$'
|
|
358
364
|
- language: BitBake
|
|
359
365
|
pattern: '^inherit(\s+[\w.-]+)+\s*$'
|
|
366
|
+
- language: Assembly
|
|
367
|
+
pattern:
|
|
368
|
+
- '^(?i)[^"m]*mov\s+[^\s]+,'
|
|
369
|
+
- '^\s+(?i)db\s+[a-z\d]'
|
|
360
370
|
- extensions: ['.json']
|
|
361
371
|
rules:
|
|
362
372
|
- language: OASv2-json
|
|
@@ -428,7 +438,7 @@ disambiguations:
|
|
|
428
438
|
- extensions: ['.mc']
|
|
429
439
|
rules:
|
|
430
440
|
- language: Win32 Message File
|
|
431
|
-
pattern: '(?i)^[ \t]*(
|
|
441
|
+
pattern: '(?i)^[ \t]*(\/\*\s*)?MessageId=|^\.$'
|
|
432
442
|
- language: M4
|
|
433
443
|
pattern: '^dnl|^divert\((?:-?\d+)?\)|^\w+\(`[^\r\n]*?''[),]'
|
|
434
444
|
- language: Monkey C
|
|
@@ -644,7 +654,7 @@ disambiguations:
|
|
|
644
654
|
- extensions: ['.rno']
|
|
645
655
|
rules:
|
|
646
656
|
- language: RUNOFF
|
|
647
|
-
pattern: '(?i:^\.!|^\f|\f$|^\.end lit(?:eral)?\b|^\.[a-zA-Z].*?;\.[a-zA-Z](?:[; \t])|\^\*[^\s*][^*]*\\\*(
|
|
657
|
+
pattern: '(?i:^\.!|^\f|\f$|^\.end lit(?:eral)?\b|^\.[a-zA-Z].*?;\.[a-zA-Z](?:[; \t])|\^\*[^\s*][^*]*\\\*(?:$|\s)|^\.c;[ \t]*\w+)'
|
|
648
658
|
- language: Roff
|
|
649
659
|
pattern: '^\.\\" '
|
|
650
660
|
- extensions: ['.rpy']
|
|
@@ -662,6 +672,10 @@ disambiguations:
|
|
|
662
672
|
pattern: '^\s*<\?xml'
|
|
663
673
|
- extensions: ['.s']
|
|
664
674
|
rules:
|
|
675
|
+
- language: Unix Assembly
|
|
676
|
+
pattern: '(?i:mov[lq]?)\s+[%\$]'
|
|
677
|
+
- language: Assembly
|
|
678
|
+
pattern: '(?i:mov)\s+[^\s%]{2,},'
|
|
665
679
|
- language: Motorola 68K Assembly
|
|
666
680
|
named_pattern: m68k
|
|
667
681
|
- extensions: ['.sc']
|
|
@@ -676,10 +690,27 @@ disambiguations:
|
|
|
676
690
|
pattern: '(?i:\^(this|super)\.|^\s*(~\w+\s*=\.|SynthDef\b))'
|
|
677
691
|
- language: Markdown
|
|
678
692
|
pattern: '^#+\s+(NAME|SYNOPSIS|DESCRIPTION)'
|
|
693
|
+
- extensions: ['.scm']
|
|
694
|
+
rules:
|
|
695
|
+
- language: Scheme
|
|
696
|
+
pattern:
|
|
697
|
+
- '(?:''[\(\*#]|\w->\w|\.\.\.[\s\)]|\([+\-:<>\/=~\)]|~>|[#`]\(|#:\w)'
|
|
698
|
+
- '^\s*\((?:define\*?|import|library|lambda)'
|
|
699
|
+
negative_pattern:
|
|
700
|
+
- '\(#[\w-]+[!\?]'
|
|
701
|
+
- '[\)\]"_]\s*(?:[\*\+\?]|@\w)'
|
|
702
|
+
- language: Tree-sitter Query
|
|
703
|
+
pattern:
|
|
704
|
+
- '\(#[\w-]+[!\?]'
|
|
705
|
+
- '[\)\]"_]\s*(?:[\*\+\?]|@\w)'
|
|
706
|
+
- '(?:^\s*\w+:\s*[\(\[\"])'
|
|
707
|
+
- '\(#(?:set!|(?:not-)?(?:any-of|match)\?)'
|
|
708
|
+
negative_pattern:
|
|
709
|
+
- '\([+\-:<>\/=~\)]'
|
|
679
710
|
- extensions: ['.sol']
|
|
680
711
|
rules:
|
|
681
712
|
- language: Solidity
|
|
682
|
-
pattern: '\bpragma\s+solidity\b|\b(?:abstract\s+)?contract\s+
|
|
713
|
+
pattern: '\bpragma\s+solidity\b|\b(?:abstract\s+)?contract\s+[a-zA-Z$_][a-zA-Z0-9$_]*(?:\s+is\s+(?:[a-zA-Z0-9$_][^\{]*?)?)?\s*\{'
|
|
683
714
|
- language: Gerber Image
|
|
684
715
|
pattern: '^[DGMT][0-9]{2}\*(?:\r?\n|\r)'
|
|
685
716
|
- extensions: ['.sql']
|
|
@@ -700,7 +731,7 @@ disambiguations:
|
|
|
700
731
|
- extensions: ['.st']
|
|
701
732
|
rules:
|
|
702
733
|
- language: StringTemplate
|
|
703
|
-
pattern: '\$\w+[($]
|
|
734
|
+
pattern: '\$\w+[($]|.!\s*.+?\s*!.|<!\s*.+?\s*!>|\[!\s*.+?\s*!\]|\{!\s*.+?\s*!\}'
|
|
704
735
|
- language: Smalltalk
|
|
705
736
|
pattern: '\A\s*[\[{(^"''\w#]|[a-zA-Z_]\w*\s*:=\s*[a-zA-Z_]\w*|class\s*>>\s*[a-zA-Z_]\w*|^[a-zA-Z_]\w*\s+[a-zA-Z_]\w*:|^Class\s*\{|if(?:True|False):\s*\['
|
|
706
737
|
- extensions: ['.star']
|
|
@@ -778,7 +809,7 @@ disambiguations:
|
|
|
778
809
|
- language: Vim Help File
|
|
779
810
|
pattern: '(?:(?:^|[ \t])(?:vi|Vi(?=m))(?:m[<=>]?[0-9]+|m)?|[ \t]ex)(?=:(?=[ \t]*set?[ \t][^\r\n:]+:)|:(?![ \t]*set?[ \t]))(?:(?:[ \t]*:[ \t]*|[ \t])\w*(?:[ \t]*=(?:[^\\\s]|\\.)*)?)*[ \t:](?:filetype|ft|syntax)[ \t]*=(help)(?=$|\s|:)'
|
|
780
811
|
- language: Hosts File
|
|
781
|
-
pattern: '(?xi) ^(?<ipv4>(?!\.)(?:\.?(?: 25[0-5]| 2[0-4]\d| 1\d\d| [1-9]?\d)\b){4})(?<cidr>/(3[0-2]|[12]?\d)\b)?(?<domains>[ \t]+\w[-\w]* (?:\.\w[-\w]*)*(?<!-)\b)*+(
|
|
812
|
+
pattern: '(?xi) ^(?<ipv4>(?!\.)(?:\.?(?: 25[0-5]| 2[0-4]\d| 1\d\d| [1-9]?\d)\b){4})(?<cidr>/(3[0-2]|[12]?\d)\b)?(?<domains>[ \t]+\w[-\w]* (?:\.\w[-\w]*)*(?<!-)\b)*+(?:$|\s)'
|
|
782
813
|
- language: Adblock Filter List
|
|
783
814
|
pattern: '\A\[(?<version>(?:[Aa]d[Bb]lock(?:[ \t][Pp]lus)?|u[Bb]lock(?:[ \t][Oo]rigin)?|[Aa]d[Gg]uard)(?:[ \t] \d+(?:\.\d+)*+)?)(?:[ \t]?;[ \t]?\g<version>)*+\]'
|
|
784
815
|
- language: Text
|
|
@@ -790,10 +821,10 @@ disambiguations:
|
|
|
790
821
|
- extensions: ['.url']
|
|
791
822
|
rules:
|
|
792
823
|
- language: INI
|
|
793
|
-
pattern: '^\[InternetShortcut\](?:\r?\n|\r)(
|
|
824
|
+
pattern: '^\[InternetShortcut\](?:\r?\n|\r)([^\s\[][^\r\n]*(?:\r?\n|\r)){0,20}URL='
|
|
794
825
|
- extensions: ['.v']
|
|
795
826
|
rules:
|
|
796
|
-
- language:
|
|
827
|
+
- language: Rocq Prover
|
|
797
828
|
pattern: '(?:^|\s)(?:Proof|Qed)\.(?:$|\s)|(?:^|\s)Require[ \t]+(Import|Export)\s'
|
|
798
829
|
- language: Verilog
|
|
799
830
|
pattern: '^[ \t]*module\s+[^\s()]+\s+\#?\(|^[ \t]*`(?:define|ifdef|ifndef|include|timescale)|^[ \t]*always[ \t]+@|^[ \t]*initial[ \t]+(begin|@)'
|
|
@@ -861,8 +892,8 @@ named_patterns:
|
|
|
861
892
|
- '(?i)^[ \t]*dim( shared)? [a-z_][a-z0-9_]* as [a-z_][a-z0-9_]* ptr'
|
|
862
893
|
gsc:
|
|
863
894
|
- '^\s*#\s*(?:using|insert|include|define|namespace)[ \t]+\w'
|
|
864
|
-
- '^\s*(
|
|
865
|
-
- '\b(?:level|self)[ \t]+thread[ \t]+(?:\[\[[ \t]*(
|
|
895
|
+
- '^\s*((?:autoexec|private)\s+){0,2}function\s+((?:autoexec|private)\s+){0,2}\w+\s*\('
|
|
896
|
+
- '\b(?:level|self)[ \t]+thread[ \t]+(?:\[\[[ \t]*(\w+\.)+[ \t]*\]\]|\w+)[ \t]*\([^\r\n\)]*\)[ \t]*;'
|
|
866
897
|
- '^[ \t]*#[ \t]*(?:precache|using_animtree)[ \t]*\('
|
|
867
898
|
json: '\A\s*[{\[]'
|
|
868
899
|
key_equals_value: '^[^#!;][^=]*='
|
package/ext/languages.yml
CHANGED
|
@@ -392,6 +392,7 @@ Assembly:
|
|
|
392
392
|
- ".inc"
|
|
393
393
|
- ".nas"
|
|
394
394
|
- ".nasm"
|
|
395
|
+
- ".s"
|
|
395
396
|
tm_scope: source.assembly
|
|
396
397
|
ace_mode: assembly_x86
|
|
397
398
|
language_id: 24
|
|
@@ -563,6 +564,13 @@ BibTeX:
|
|
|
563
564
|
codemirror_mode: stex
|
|
564
565
|
codemirror_mime_type: text/x-stex
|
|
565
566
|
language_id: 982188347
|
|
567
|
+
BibTeX Style:
|
|
568
|
+
type: programming
|
|
569
|
+
extensions:
|
|
570
|
+
- ".bst"
|
|
571
|
+
tm_scope: source.bst
|
|
572
|
+
ace_mode: text
|
|
573
|
+
language_id: 909569041
|
|
566
574
|
Bicep:
|
|
567
575
|
type: programming
|
|
568
576
|
color: "#519aba"
|
|
@@ -1299,15 +1307,6 @@ Cool:
|
|
|
1299
1307
|
tm_scope: source.cool
|
|
1300
1308
|
ace_mode: text
|
|
1301
1309
|
language_id: 68
|
|
1302
|
-
Coq:
|
|
1303
|
-
type: programming
|
|
1304
|
-
color: "#d0b68c"
|
|
1305
|
-
extensions:
|
|
1306
|
-
- ".coq"
|
|
1307
|
-
- ".v"
|
|
1308
|
-
tm_scope: source.coq
|
|
1309
|
-
ace_mode: text
|
|
1310
|
-
language_id: 69
|
|
1311
1310
|
Cpp-ObjDump:
|
|
1312
1311
|
type: data
|
|
1313
1312
|
extensions:
|
|
@@ -2747,6 +2746,16 @@ HCL:
|
|
|
2747
2746
|
codemirror_mime_type: text/x-ruby
|
|
2748
2747
|
tm_scope: source.hcl
|
|
2749
2748
|
language_id: 144
|
|
2749
|
+
HIP:
|
|
2750
|
+
type: programming
|
|
2751
|
+
color: "#4F3A4F"
|
|
2752
|
+
extensions:
|
|
2753
|
+
- ".hip"
|
|
2754
|
+
tm_scope: source.c++
|
|
2755
|
+
ace_mode: c_cpp
|
|
2756
|
+
codemirror_mode: clike
|
|
2757
|
+
codemirror_mime_type: text/x-c++src
|
|
2758
|
+
language_id: 674379998
|
|
2750
2759
|
HLSL:
|
|
2751
2760
|
type: programming
|
|
2752
2761
|
color: "#aace60"
|
|
@@ -3072,6 +3081,16 @@ IRC log:
|
|
|
3072
3081
|
codemirror_mode: mirc
|
|
3073
3082
|
codemirror_mime_type: text/mirc
|
|
3074
3083
|
language_id: 164
|
|
3084
|
+
ISPC:
|
|
3085
|
+
type: programming
|
|
3086
|
+
color: "#2D68B1"
|
|
3087
|
+
extensions:
|
|
3088
|
+
- ".ispc"
|
|
3089
|
+
tm_scope: source.ispc
|
|
3090
|
+
ace_mode: c_cpp
|
|
3091
|
+
codemirror_mode: clike
|
|
3092
|
+
codemirror_mime_type: text/x-csrc
|
|
3093
|
+
language_id: 327071
|
|
3075
3094
|
Idris:
|
|
3076
3095
|
type: programming
|
|
3077
3096
|
color: "#b30000"
|
|
@@ -3282,7 +3301,9 @@ JSON:
|
|
|
3282
3301
|
- ".tern-project"
|
|
3283
3302
|
- ".watchmanconfig"
|
|
3284
3303
|
- MODULE.bazel.lock
|
|
3304
|
+
- Package.resolved
|
|
3285
3305
|
- Pipfile.lock
|
|
3306
|
+
- bun.lock
|
|
3286
3307
|
- composer.lock
|
|
3287
3308
|
- deno.lock
|
|
3288
3309
|
- flake.lock
|
|
@@ -3292,7 +3313,7 @@ JSON with Comments:
|
|
|
3292
3313
|
type: data
|
|
3293
3314
|
color: "#292929"
|
|
3294
3315
|
group: JSON
|
|
3295
|
-
tm_scope: source.
|
|
3316
|
+
tm_scope: source.json.comments
|
|
3296
3317
|
ace_mode: javascript
|
|
3297
3318
|
codemirror_mode: javascript
|
|
3298
3319
|
codemirror_mime_type: text/javascript
|
|
@@ -3708,6 +3729,7 @@ KiCad Schematic:
|
|
|
3708
3729
|
- eeschema schematic
|
|
3709
3730
|
extensions:
|
|
3710
3731
|
- ".kicad_sch"
|
|
3732
|
+
- ".kicad_sym"
|
|
3711
3733
|
- ".sch"
|
|
3712
3734
|
tm_scope: source.pcb.schematic
|
|
3713
3735
|
ace_mode: text
|
|
@@ -3728,6 +3750,16 @@ Kit:
|
|
|
3728
3750
|
- ".kit"
|
|
3729
3751
|
tm_scope: text.html.basic
|
|
3730
3752
|
language_id: 188
|
|
3753
|
+
Koka:
|
|
3754
|
+
type: programming
|
|
3755
|
+
ace_mode: text
|
|
3756
|
+
extensions:
|
|
3757
|
+
- ".kk"
|
|
3758
|
+
interpreters:
|
|
3759
|
+
- koka
|
|
3760
|
+
color: "#215166"
|
|
3761
|
+
tm_scope: source.koka
|
|
3762
|
+
language_id: 597930447
|
|
3731
3763
|
Kotlin:
|
|
3732
3764
|
type: programming
|
|
3733
3765
|
color: "#A97BFF"
|
|
@@ -3917,14 +3949,14 @@ Linear Programming:
|
|
|
3917
3949
|
ace_mode: text
|
|
3918
3950
|
language_id: 377204539
|
|
3919
3951
|
Linker Script:
|
|
3920
|
-
type:
|
|
3952
|
+
type: programming
|
|
3921
3953
|
extensions:
|
|
3922
3954
|
- ".ld"
|
|
3923
3955
|
- ".lds"
|
|
3924
3956
|
- ".x"
|
|
3925
3957
|
filenames:
|
|
3926
3958
|
- ld.script
|
|
3927
|
-
tm_scope:
|
|
3959
|
+
tm_scope: source.c.linker
|
|
3928
3960
|
ace_mode: text
|
|
3929
3961
|
language_id: 202
|
|
3930
3962
|
Linux Kernel Module:
|
|
@@ -4083,6 +4115,18 @@ M:
|
|
|
4083
4115
|
codemirror_mime_type: text/x-mumps
|
|
4084
4116
|
language_id: 214
|
|
4085
4117
|
tm_scope: none
|
|
4118
|
+
M3U:
|
|
4119
|
+
type: data
|
|
4120
|
+
aliases:
|
|
4121
|
+
- hls playlist
|
|
4122
|
+
- m3u playlist
|
|
4123
|
+
extensions:
|
|
4124
|
+
- ".m3u"
|
|
4125
|
+
- ".m3u8"
|
|
4126
|
+
color: "#179C7D"
|
|
4127
|
+
tm_scope: source.m3u
|
|
4128
|
+
ace_mode: text
|
|
4129
|
+
language_id: 89638692
|
|
4086
4130
|
M4:
|
|
4087
4131
|
type: programming
|
|
4088
4132
|
extensions:
|
|
@@ -5829,6 +5873,7 @@ Python:
|
|
|
5829
5873
|
- py
|
|
5830
5874
|
- pypy
|
|
5831
5875
|
- pypy3
|
|
5876
|
+
- uv
|
|
5832
5877
|
aliases:
|
|
5833
5878
|
- python3
|
|
5834
5879
|
- rusthon
|
|
@@ -6302,6 +6347,18 @@ Roc:
|
|
|
6302
6347
|
tm_scope: source.roc
|
|
6303
6348
|
ace_mode: text
|
|
6304
6349
|
language_id: 440182480
|
|
6350
|
+
Rocq Prover:
|
|
6351
|
+
type: programming
|
|
6352
|
+
color: "#d0b68c"
|
|
6353
|
+
extensions:
|
|
6354
|
+
- ".v"
|
|
6355
|
+
- ".coq"
|
|
6356
|
+
aliases:
|
|
6357
|
+
- coq
|
|
6358
|
+
- rocq
|
|
6359
|
+
tm_scope: source.coq
|
|
6360
|
+
ace_mode: text
|
|
6361
|
+
language_id: 69
|
|
6305
6362
|
Roff:
|
|
6306
6363
|
type: markup
|
|
6307
6364
|
color: "#ecdebe"
|
|
@@ -6529,6 +6586,7 @@ SMT:
|
|
|
6529
6586
|
extensions:
|
|
6530
6587
|
- ".smt2"
|
|
6531
6588
|
- ".smt"
|
|
6589
|
+
- ".z3"
|
|
6532
6590
|
interpreters:
|
|
6533
6591
|
- boolector
|
|
6534
6592
|
- cvc4
|
|
@@ -6675,6 +6733,14 @@ Sage:
|
|
|
6675
6733
|
codemirror_mode: python
|
|
6676
6734
|
codemirror_mime_type: text/x-python
|
|
6677
6735
|
language_id: 338
|
|
6736
|
+
Sail:
|
|
6737
|
+
type: programming
|
|
6738
|
+
color: "#259dd5"
|
|
6739
|
+
ace_mode: text
|
|
6740
|
+
extensions:
|
|
6741
|
+
- ".sail"
|
|
6742
|
+
tm_scope: source.sail
|
|
6743
|
+
language_id: 1029438153
|
|
6678
6744
|
SaltStack:
|
|
6679
6745
|
type: programming
|
|
6680
6746
|
color: "#646464"
|
|
@@ -6917,6 +6983,14 @@ Singularity:
|
|
|
6917
6983
|
- Singularity
|
|
6918
6984
|
ace_mode: text
|
|
6919
6985
|
language_id: 987024632
|
|
6986
|
+
Slang:
|
|
6987
|
+
type: programming
|
|
6988
|
+
color: "#1fbec9"
|
|
6989
|
+
extensions:
|
|
6990
|
+
- ".slang"
|
|
6991
|
+
tm_scope: source.slang
|
|
6992
|
+
ace_mode: text
|
|
6993
|
+
language_id: 239357863
|
|
6920
6994
|
Slash:
|
|
6921
6995
|
type: programming
|
|
6922
6996
|
color: "#007eff"
|
|
@@ -7525,6 +7599,16 @@ Toit:
|
|
|
7525
7599
|
tm_scope: source.toit
|
|
7526
7600
|
ace_mode: text
|
|
7527
7601
|
language_id: 356554395
|
|
7602
|
+
Tree-sitter Query:
|
|
7603
|
+
type: programming
|
|
7604
|
+
color: "#8ea64c"
|
|
7605
|
+
aliases:
|
|
7606
|
+
- tsq
|
|
7607
|
+
extensions:
|
|
7608
|
+
- ".scm"
|
|
7609
|
+
tm_scope: source.scm
|
|
7610
|
+
ace_mode: text
|
|
7611
|
+
language_id: 436081647
|
|
7528
7612
|
Turing:
|
|
7529
7613
|
type: programming
|
|
7530
7614
|
color: "#cf142b"
|
|
@@ -7568,6 +7652,7 @@ TypeScript:
|
|
|
7568
7652
|
aliases:
|
|
7569
7653
|
- ts
|
|
7570
7654
|
interpreters:
|
|
7655
|
+
- bun
|
|
7571
7656
|
- deno
|
|
7572
7657
|
- ts-node
|
|
7573
7658
|
- tsx
|
package/license.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linguist-js",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=12",
|
|
12
|
-
"npm": "
|
|
12
|
+
"npm": ">=8"
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"download-files": "npx tsx@3 build/download-files",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"commander": "^9.5.0 <10",
|
|
44
44
|
"common-path-prefix": "^3.0.0",
|
|
45
45
|
"cross-fetch": "^3.2.0 <4",
|
|
46
|
-
"ignore": "^7.0.
|
|
46
|
+
"ignore": "^7.0.4",
|
|
47
47
|
"isbinaryfile": "^4.0.10 <5",
|
|
48
48
|
"js-yaml": "^4.1.0",
|
|
49
49
|
"node-cache": "^5.1.2"
|
package/dist/package.json
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "linguist-js",
|
|
3
|
-
"version": "2.8.0",
|
|
4
|
-
"description": "Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"linguist-js": "bin/index.js",
|
|
8
|
-
"linguist": "bin/index.js"
|
|
9
|
-
},
|
|
10
|
-
"engines": {
|
|
11
|
-
"node": ">=12"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"download-files": "npx tsx@3 build/download-files",
|
|
15
|
-
"pre-publish": "npm run download-files && npm test && npm run perf",
|
|
16
|
-
"perf": "tsc && node test/perf",
|
|
17
|
-
"test": "tsc && node test/folder && node test/unit"
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"bin/",
|
|
21
|
-
"dist/",
|
|
22
|
-
"ext/"
|
|
23
|
-
],
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/Nixinova/Linguist.git"
|
|
27
|
-
},
|
|
28
|
-
"keywords": [
|
|
29
|
-
"linguist",
|
|
30
|
-
"languages",
|
|
31
|
-
"language-analysis",
|
|
32
|
-
"language-analyzer"
|
|
33
|
-
],
|
|
34
|
-
"author": "Nixinova (https://nixinova.com)",
|
|
35
|
-
"license": "ISC",
|
|
36
|
-
"bugs": {
|
|
37
|
-
"url": "https://github.com/Nixinova/Linguist/issues"
|
|
38
|
-
},
|
|
39
|
-
"homepage": "https://github.com/Nixinova/Linguist#readme",
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"binary-extensions": "^2.3.0 <3",
|
|
42
|
-
"commander": "^9.5.0 <10",
|
|
43
|
-
"common-path-prefix": "^3.0.0",
|
|
44
|
-
"cross-fetch": "^3.1.8 <4",
|
|
45
|
-
"ignore": "^5.3.2",
|
|
46
|
-
"isbinaryfile": "^4.0.10 <5",
|
|
47
|
-
"js-yaml": "^4.1.0",
|
|
48
|
-
"node-cache": "^5.1.2"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@types/js-yaml": "^4.0.9",
|
|
52
|
-
"@types/node": "ts5.0",
|
|
53
|
-
"deep-object-diff": "^1.1.9",
|
|
54
|
-
"typescript": "~5.0.4 <5.1"
|
|
55
|
-
}
|
|
56
|
-
}
|
package/dist/src/cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|