linguist-js 2.8.1 → 2.9.1

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 CHANGED
@@ -22,6 +22,7 @@ commander_1.program
22
22
  .option('-j|--json [bool]', 'Display the output as JSON', false)
23
23
  .option('-t|--tree <traversal>', 'Which part of the output JSON to display (dot-delimited)')
24
24
  .option('-F|--listFiles [bool]', 'Whether to list every matching file under the language results', false)
25
+ .option('-m|--minSize <size>', 'Minimum size of file to show language results for (must have a unit: b, kb, mb, %, or loc)')
25
26
  .option('-q|--quick [bool]', 'Skip complex language analysis (alias for -{A|I|H|S}=false)', false)
26
27
  .option('-o|--offline [bool]', 'Use packaged data files instead of fetching latest from GitHub', false)
27
28
  .option('-L|--calculateLines [bool]', 'Calculate lines of code totals', true)
@@ -56,13 +57,52 @@ for (const arg in args) {
56
57
  // Run Linguist
57
58
  if (args.analyze)
58
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
+ }
59
67
  // Fetch language data
60
68
  const root = args.analyze === true ? '.' : args.analyze;
61
69
  const data = await (0, index_1.default)(root, args);
62
70
  const { files, languages, unknown } = data;
63
71
  // Print output
64
72
  if (!args.json) {
65
- const sortedEntries = Object.entries(languages.results).sort((a, b) => a[1].bytes < b[1].bytes ? +1 : -1);
73
+ // Ignore languages with a bytes/% size less than the declared min size
74
+ if (args.minSize) {
75
+ const totalSize = languages.bytes;
76
+ const minSizeAmt = parseFloat(args.minSize.replace(/[a-z]+$/i, '')); // '2KB' -> 2
77
+ const minSizeUnit = args.minSize.replace(/^\d+/, '').toLowerCase(); // '2KB' -> 'kb'
78
+ const checkBytes = minSizeUnit !== 'loc'; // whether to check bytes or loc
79
+ const conversionFactors = {
80
+ 'b': n => n,
81
+ 'kb': n => n * 1e3,
82
+ 'mb': n => n * 1e6,
83
+ '%': n => n * totalSize / 100,
84
+ 'loc': n => n,
85
+ };
86
+ const minBytesSize = conversionFactors[minSizeUnit](+minSizeAmt);
87
+ const other = { bytes: 0, lines: { total: 0, content: 0, code: 0 } };
88
+ // Apply specified minimums: delete language results that do not reach the threshold
89
+ for (const [lang, data] of Object.entries(languages.results)) {
90
+ const checkUnit = checkBytes ? data.bytes : data.lines.code;
91
+ if (checkUnit < minBytesSize) {
92
+ // Add to 'other' count
93
+ other.bytes += data.bytes;
94
+ other.lines.total += data.lines.total;
95
+ other.lines.content += data.lines.content;
96
+ other.lines.code += data.lines.code;
97
+ // Remove language result
98
+ delete languages.results[lang];
99
+ }
100
+ }
101
+ if (other.bytes) {
102
+ languages.results["Other"] = { ...other, type: null };
103
+ }
104
+ }
105
+ const sortedEntries = Object.entries(languages.results).sort((a, b) => (a[1].bytes < b[1].bytes ? +1 : -1));
66
106
  const totalBytes = languages.bytes;
67
107
  console.log(`\n Analysed ${files.bytes.toLocaleString()} B from ${files.count} files with linguist-js`);
68
108
  console.log(`\n Language analysis results: \n`);
package/ext/generated.rb CHANGED
@@ -29,4 +29,4 @@
29
29
  - __generated__\/
30
30
  - _tlb\.pas$
31
31
  - (?:^|\/)htmlcov\/
32
- - (?:^|.*\/)\.sqlx\/query-.+\.json$
32
+ - (?:^|\/)\.sqlx\/query-[a-f\d]{64}\.json$
@@ -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*;|(?=.*?(?:intrinsic|extends))(intrinsic\s+)?class\s+[\w<>.]+(?:\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*)*)?\)))'
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\1[^>\r\n]*>'
108
+ pattern: '^(?i:<pre\s+class)\s*=\s*(''|\"|\b)metadata\b(''|\"|\b)[^>\r\n]*>'
107
109
  - language: BrighterScript
108
110
  pattern:
109
- - (?i:^\s*(?=^sub\s)(?:sub\s*\w+\(.*?\))|(?::\s*sub\(.*?\))$)
111
+ - (?i:^\s*(?:sub\s*\w+\(.*?\))|(?::\s*sub\(.*?\))$)
110
112
  - (?i:^\s*(end\ssub)$)
111
- - (?i:^\s*(?=^function\s)(?:function\s*\w+\(.*?\)\s*as\s*\w*)|(?::\s*function\(.*?\)\s*as\s*\w*)$)
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]+)(?=\s|>)[^>]*>.*?</#\1>|\[#--.*?--\]|\[#([a-z]+)(?=\s|\])[^\]]*\].*?\[#\2\])'
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*)*+\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
@@ -380,6 +390,11 @@ disambiguations:
380
390
  pattern: '^import [a-z]'
381
391
  - language: Lean 4
382
392
  pattern: '^import [A-Z]'
393
+ - extensions: ['.lp']
394
+ rules:
395
+ - language: Linear Programming
396
+ pattern: '^(?i:minimize|minimum|min|maximize|maximum|max)(?i:\s+multi-objectives)?$'
397
+ - language: Answer Set Programming
383
398
  - extensions: ['.ls']
384
399
  rules:
385
400
  - language: LoomScript
@@ -423,7 +438,7 @@ disambiguations:
423
438
  - extensions: ['.mc']
424
439
  rules:
425
440
  - language: Win32 Message File
426
- pattern: '(?i)^[ \t]*(?>\/\*\s*)?MessageId=|^\.$'
441
+ pattern: '(?i)^[ \t]*(\/\*\s*)?MessageId=|^\.$'
427
442
  - language: M4
428
443
  pattern: '^dnl|^divert\((?:-?\d+)?\)|^\w+\(`[^\r\n]*?''[),]'
429
444
  - language: Monkey C
@@ -469,8 +484,8 @@ disambiguations:
469
484
  - language: MAXScript
470
485
  - extensions: ['.msg']
471
486
  rules:
472
- - language: omnetpp-msg
473
- pattern: '^cplusplus \{\{|^namespace[\s]*([^.\s]*\.)*[^.\s]*;|^struct \{|^message [\S]* (extends)? [\S]*[\s]*\{|^packet \{|^class (extends) [\S]*[\s]*\{|^enum \{|^import ([^.\s]*\.)*[^.\s]*;'
487
+ - language: OMNeT++ MSG
488
+ pattern: '^cplusplus\(?[\S]*\)?[\s]*\{?\{?|^namespace[\s]+([^.\s]*\.)*[^.\s]*;|^struct[\s]+[\S]+|^message[\s]+[\S]+(extends )?[\S]*[\s]*|^packet[\s]+[\S]+|^class[\s]+[\S]+(extends )?[\S]*[\s]*|^enum[\s]+[\S]+|^import ([^.\s]*\.)*[^.\s]*;'
474
489
  - extensions: ['.n']
475
490
  rules:
476
491
  - language: Roff
@@ -639,7 +654,7 @@ disambiguations:
639
654
  - extensions: ['.rno']
640
655
  rules:
641
656
  - language: RUNOFF
642
- pattern: '(?i:^\.!|^\f|\f$|^\.end lit(?:eral)?\b|^\.[a-zA-Z].*?;\.[a-zA-Z](?:[; \t])|\^\*[^\s*][^*]*\\\*(?=$|\s)|^\.c;[ \t]*\w+)'
657
+ pattern: '(?i:^\.!|^\f|\f$|^\.end lit(?:eral)?\b|^\.[a-zA-Z].*?;\.[a-zA-Z](?:[; \t])|\^\*[^\s*][^*]*\\\*(?:$|\s)|^\.c;[ \t]*\w+)'
643
658
  - language: Roff
644
659
  pattern: '^\.\\" '
645
660
  - extensions: ['.rpy']
@@ -657,6 +672,10 @@ disambiguations:
657
672
  pattern: '^\s*<\?xml'
658
673
  - extensions: ['.s']
659
674
  rules:
675
+ - language: Unix Assembly
676
+ pattern: '(?i:mov[lq]?)\s+[%\$]'
677
+ - language: Assembly
678
+ pattern: '(?i:mov)\s+[^\s%]{2,},'
660
679
  - language: Motorola 68K Assembly
661
680
  named_pattern: m68k
662
681
  - extensions: ['.sc']
@@ -671,10 +690,27 @@ disambiguations:
671
690
  pattern: '(?i:\^(this|super)\.|^\s*(~\w+\s*=\.|SynthDef\b))'
672
691
  - language: Markdown
673
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
+ - '\([+\-:<>\/=~\)]'
674
710
  - extensions: ['.sol']
675
711
  rules:
676
712
  - language: Solidity
677
- pattern: '\bpragma\s+solidity\b|\b(?:abstract\s+)?contract\s+(?!\d)[a-zA-Z0-9$_]+(?:\s+is\s+(?:[a-zA-Z0-9$_][^\{]*?)?)?\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*\{'
678
714
  - language: Gerber Image
679
715
  pattern: '^[DGMT][0-9]{2}\*(?:\r?\n|\r)'
680
716
  - extensions: ['.sql']
@@ -695,7 +731,7 @@ disambiguations:
695
731
  - extensions: ['.st']
696
732
  rules:
697
733
  - language: StringTemplate
698
- pattern: '\$\w+[($]|(.)!\s*.+?\s*!\1|<!\s*.+?\s*!>|\[!\s*.+?\s*!\]|\{!\s*.+?\s*!\}'
734
+ pattern: '\$\w+[($]|.!\s*.+?\s*!.|<!\s*.+?\s*!>|\[!\s*.+?\s*!\]|\{!\s*.+?\s*!\}'
699
735
  - language: Smalltalk
700
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*\['
701
737
  - extensions: ['.star']
@@ -707,6 +743,11 @@ disambiguations:
707
743
  rules:
708
744
  - language: STL
709
745
  pattern: '\A\s*solid(?:$|\s)[\s\S]*^endsolid(?:$|\s)'
746
+ - extensions: ['.svx']
747
+ rules:
748
+ - language: Survex data
749
+ pattern: '\A(;|\*[^*]+$)'
750
+ - language: mdsvex
710
751
  - extensions: ['.sw']
711
752
  rules:
712
753
  - language: Sway
@@ -768,7 +809,7 @@ disambiguations:
768
809
  - language: Vim Help File
769
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|:)'
770
811
  - language: Hosts File
771
- 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)'
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)'
772
813
  - language: Adblock Filter List
773
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>)*+\]'
774
815
  - language: Text
@@ -780,7 +821,7 @@ disambiguations:
780
821
  - extensions: ['.url']
781
822
  rules:
782
823
  - language: INI
783
- pattern: '^\[InternetShortcut\](?:\r?\n|\r)(?>[^\s\[][^\r\n]*(?:\r?\n|\r))*URL='
824
+ pattern: '^\[InternetShortcut\](?:\r?\n|\r)([^\s\[][^\r\n]*(?:\r?\n|\r)){0,20}URL='
784
825
  - extensions: ['.v']
785
826
  rules:
786
827
  - language: Coq
@@ -849,11 +890,10 @@ named_patterns:
849
890
  freebasic:
850
891
  - '(?i)^[ \t]*#(?:define|endif|endmacro|ifn?def|include|lang|macro|pragma)(?:$|\s)'
851
892
  - '(?i)^[ \t]*dim( shared)? [a-z_][a-z0-9_]* as [a-z_][a-z0-9_]* ptr'
852
- - '(?i)^[ \t]*dim( shared)? as [a-z_][a-z0-9_]* [a-z_][a-z0-9_]*'
853
893
  gsc:
854
894
  - '^\s*#\s*(?:using|insert|include|define|namespace)[ \t]+\w'
855
- - '^\s*(?>(?:autoexec|private)\s+){0,2}function\s+(?>(?:autoexec|private)\s+){0,2}\w+\s*\('
856
- - '\b(?:level|self)[ \t]+thread[ \t]+(?:\[\[[ \t]*(?>\w+\.)*\w+[ \t]*\]\]|\w+)[ \t]*\([^\r\n\)]*\)[ \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]*;'
857
897
  - '^[ \t]*#[ \t]*(?:precache|using_animtree)[ \t]*\('
858
898
  json: '\A\s*[{\[]'
859
899
  key_equals_value: '^[^#!;][^=]*='
package/ext/languages.yml CHANGED
@@ -271,6 +271,16 @@ AngelScript:
271
271
  codemirror_mode: clike
272
272
  codemirror_mime_type: text/x-c++src
273
273
  language_id: 389477596
274
+ Answer Set Programming:
275
+ type: programming
276
+ color: "#A9CC29"
277
+ extensions:
278
+ - ".lp"
279
+ interpreters:
280
+ - clingo
281
+ tm_scope: source.answersetprogramming
282
+ ace_mode: prolog
283
+ language_id: 433009171
274
284
  Ant Build System:
275
285
  type: data
276
286
  color: "#A9157E"
@@ -305,7 +315,7 @@ ApacheConf:
305
315
  - ".htaccess"
306
316
  - apache2.conf
307
317
  - httpd.conf
308
- tm_scope: source.apache-config
318
+ tm_scope: source.apacheconf
309
319
  ace_mode: apache_conf
310
320
  language_id: 16
311
321
  Apex:
@@ -313,6 +323,7 @@ Apex:
313
323
  color: "#1797c0"
314
324
  extensions:
315
325
  - ".cls"
326
+ - ".apex"
316
327
  - ".trigger"
317
328
  tm_scope: source.apex
318
329
  ace_mode: java
@@ -381,6 +392,7 @@ Assembly:
381
392
  - ".inc"
382
393
  - ".nas"
383
394
  - ".nasm"
395
+ - ".s"
384
396
  tm_scope: source.assembly
385
397
  ace_mode: assembly_x86
386
398
  language_id: 24
@@ -552,6 +564,13 @@ BibTeX:
552
564
  codemirror_mode: stex
553
565
  codemirror_mime_type: text/x-stex
554
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
555
574
  Bicep:
556
575
  type: programming
557
576
  color: "#519aba"
@@ -712,6 +731,7 @@ C:
712
731
  - ".c"
713
732
  - ".cats"
714
733
  - ".h"
734
+ - ".h.in"
715
735
  - ".idc"
716
736
  interpreters:
717
737
  - tcc
@@ -2799,9 +2819,9 @@ HTML+EEX:
2799
2819
  - heex
2800
2820
  - leex
2801
2821
  extensions:
2802
- - ".eex"
2803
- - ".html.heex"
2804
- - ".html.leex"
2822
+ - ".html.eex"
2823
+ - ".heex"
2824
+ - ".leex"
2805
2825
  ace_mode: text
2806
2826
  codemirror_mode: htmlmixed
2807
2827
  codemirror_mime_type: text/html
@@ -3060,6 +3080,16 @@ IRC log:
3060
3080
  codemirror_mode: mirc
3061
3081
  codemirror_mime_type: text/mirc
3062
3082
  language_id: 164
3083
+ ISPC:
3084
+ type: programming
3085
+ color: "#2D68B1"
3086
+ extensions:
3087
+ - ".ispc"
3088
+ tm_scope: source.ispc
3089
+ ace_mode: c_cpp
3090
+ codemirror_mode: clike
3091
+ codemirror_mime_type: text/x-csrc
3092
+ language_id: 327071
3063
3093
  Idris:
3064
3094
  type: programming
3065
3095
  color: "#b30000"
@@ -3270,7 +3300,9 @@ JSON:
3270
3300
  - ".tern-project"
3271
3301
  - ".watchmanconfig"
3272
3302
  - MODULE.bazel.lock
3303
+ - Package.resolved
3273
3304
  - Pipfile.lock
3305
+ - bun.lock
3274
3306
  - composer.lock
3275
3307
  - deno.lock
3276
3308
  - flake.lock
@@ -3280,7 +3312,7 @@ JSON with Comments:
3280
3312
  type: data
3281
3313
  color: "#292929"
3282
3314
  group: JSON
3283
- tm_scope: source.js
3315
+ tm_scope: source.json.comments
3284
3316
  ace_mode: javascript
3285
3317
  codemirror_mode: javascript
3286
3318
  codemirror_mime_type: text/javascript
@@ -3349,6 +3381,14 @@ JSONiq:
3349
3381
  - ".jq"
3350
3382
  tm_scope: source.jsoniq
3351
3383
  language_id: 177
3384
+ Jai:
3385
+ type: programming
3386
+ color: "#ab8b4b"
3387
+ ace_mode: text
3388
+ tm_scope: source.jai
3389
+ extensions:
3390
+ - ".jai"
3391
+ language_id: 70127133
3352
3392
  Janet:
3353
3393
  type: programming
3354
3394
  color: "#0886a5"
@@ -3606,6 +3646,16 @@ Just:
3606
3646
  - ".just"
3607
3647
  ace_mode: text
3608
3648
  language_id: 128447695
3649
+ KDL:
3650
+ type: data
3651
+ color: "#ffb3b3"
3652
+ extensions:
3653
+ - ".kdl"
3654
+ tm_scope: source.kdl
3655
+ ace_mode: tcl
3656
+ codemirror_mode: yacas
3657
+ codemirror_mime_type: text/x-yacas
3658
+ language_id: 931123626
3609
3659
  KRL:
3610
3660
  type: programming
3611
3661
  color: "#28430A"
@@ -3879,15 +3929,22 @@ Limbo:
3879
3929
  tm_scope: none
3880
3930
  ace_mode: text
3881
3931
  language_id: 201
3932
+ Linear Programming:
3933
+ type: programming
3934
+ extensions:
3935
+ - ".lp"
3936
+ tm_scope: none
3937
+ ace_mode: text
3938
+ language_id: 377204539
3882
3939
  Linker Script:
3883
- type: data
3940
+ type: programming
3884
3941
  extensions:
3885
3942
  - ".ld"
3886
3943
  - ".lds"
3887
3944
  - ".x"
3888
3945
  filenames:
3889
3946
  - ld.script
3890
- tm_scope: none
3947
+ tm_scope: source.c.linker
3891
3948
  ace_mode: text
3892
3949
  language_id: 202
3893
3950
  Linux Kernel Module:
@@ -4372,6 +4429,21 @@ MiniYAML:
4372
4429
  codemirror_mode: yaml
4373
4430
  codemirror_mime_type: text/x-yaml
4374
4431
  language_id: 4896465
4432
+ MiniZinc:
4433
+ type: programming
4434
+ color: "#06a9e6"
4435
+ extensions:
4436
+ - ".mzn"
4437
+ tm_scope: source.mzn
4438
+ ace_mode: text
4439
+ language_id: 238874535
4440
+ MiniZinc Data:
4441
+ type: data
4442
+ extensions:
4443
+ - ".dzn"
4444
+ tm_scope: source.mzn
4445
+ ace_mode: text
4446
+ language_id: 938193433
4375
4447
  Mint:
4376
4448
  type: programming
4377
4449
  extensions:
@@ -4882,6 +4954,26 @@ OCaml:
4882
4954
  - ocamlscript
4883
4955
  tm_scope: source.ocaml
4884
4956
  language_id: 255
4957
+ OMNeT++ MSG:
4958
+ type: programming
4959
+ extensions:
4960
+ - ".msg"
4961
+ color: "#a0e0a0"
4962
+ tm_scope: source.msg
4963
+ ace_mode: text
4964
+ aliases:
4965
+ - omnetpp-msg
4966
+ language_id: 664100008
4967
+ OMNeT++ NED:
4968
+ type: programming
4969
+ extensions:
4970
+ - ".ned"
4971
+ color: "#08607c"
4972
+ tm_scope: source.ned
4973
+ ace_mode: text
4974
+ aliases:
4975
+ - omnetpp-ned
4976
+ language_id: 924868392
4885
4977
  Oberon:
4886
4978
  type: programming
4887
4979
  extensions:
@@ -5108,6 +5200,15 @@ Org:
5108
5200
  tm_scope: none
5109
5201
  ace_mode: text
5110
5202
  language_id: 267
5203
+ OverpassQL:
5204
+ type: programming
5205
+ color: "#cce2aa"
5206
+ wrap: true
5207
+ extensions:
5208
+ - ".overpassql"
5209
+ tm_scope: source.overpassql
5210
+ ace_mode: text
5211
+ language_id: 689079655
5111
5212
  Ox:
5112
5213
  type: programming
5113
5214
  extensions:
@@ -6836,6 +6937,14 @@ Singularity:
6836
6937
  - Singularity
6837
6938
  ace_mode: text
6838
6939
  language_id: 987024632
6940
+ Slang:
6941
+ type: programming
6942
+ color: "#1fbec9"
6943
+ extensions:
6944
+ - ".slang"
6945
+ tm_scope: source.slang
6946
+ ace_mode: text
6947
+ language_id: 239357863
6839
6948
  Slash:
6840
6949
  type: programming
6841
6950
  color: "#007eff"
@@ -7085,6 +7194,14 @@ SuperCollider:
7085
7194
  tm_scope: source.supercollider
7086
7195
  ace_mode: text
7087
7196
  language_id: 361
7197
+ Survex data:
7198
+ type: data
7199
+ color: "#ffcc99"
7200
+ tm_scope: none
7201
+ ace_mode: text
7202
+ extensions:
7203
+ - ".svx"
7204
+ language_id: 24470517
7088
7205
  Svelte:
7089
7206
  type: markup
7090
7207
  color: "#ff3e00"
@@ -7436,6 +7553,16 @@ Toit:
7436
7553
  tm_scope: source.toit
7437
7554
  ace_mode: text
7438
7555
  language_id: 356554395
7556
+ Tree-sitter Query:
7557
+ type: programming
7558
+ color: "#8ea64c"
7559
+ aliases:
7560
+ - tsq
7561
+ extensions:
7562
+ - ".scm"
7563
+ tm_scope: source.scm
7564
+ ace_mode: text
7565
+ language_id: 436081647
7439
7566
  Turing:
7440
7567
  type: programming
7441
7568
  color: "#cf142b"
@@ -7479,6 +7606,7 @@ TypeScript:
7479
7606
  aliases:
7480
7607
  - ts
7481
7608
  interpreters:
7609
+ - bun
7482
7610
  - deno
7483
7611
  - ts-node
7484
7612
  - tsx
@@ -8076,6 +8204,7 @@ XML:
8076
8204
  - ".glade"
8077
8205
  - ".gml"
8078
8206
  - ".gmx"
8207
+ - ".gpx"
8079
8208
  - ".grxml"
8080
8209
  - ".gst"
8081
8210
  - ".hzp"
@@ -8239,6 +8368,14 @@ XSLT:
8239
8368
  codemirror_mime_type: text/xml
8240
8369
  color: "#EB8CEB"
8241
8370
  language_id: 404
8371
+ Xmake:
8372
+ type: programming
8373
+ color: "#22a079"
8374
+ filenames:
8375
+ - xmake.lua
8376
+ tm_scope: source.xmake
8377
+ ace_mode: text
8378
+ language_id: 225223071
8242
8379
  Xojo:
8243
8380
  type: programming
8244
8381
  color: "#81bd41"
@@ -8542,6 +8679,17 @@ mcfunction:
8542
8679
  tm_scope: source.mcfunction
8543
8680
  ace_mode: text
8544
8681
  language_id: 462488745
8682
+ mdsvex:
8683
+ type: markup
8684
+ color: "#5f9ea0"
8685
+ tm_scope: none
8686
+ ace_mode: markdown
8687
+ codemirror_mode: gfm
8688
+ codemirror_mime_type: text/x-gfm
8689
+ wrap: true
8690
+ extensions:
8691
+ - ".svx"
8692
+ language_id: 566198445
8545
8693
  mupad:
8546
8694
  type: programming
8547
8695
  color: "#244963"
@@ -8570,22 +8718,6 @@ nesC:
8570
8718
  ace_mode: text
8571
8719
  tm_scope: source.nesc
8572
8720
  language_id: 417
8573
- omnetpp-msg:
8574
- type: programming
8575
- extensions:
8576
- - ".msg"
8577
- color: "#a0e0a0"
8578
- tm_scope: source.msg
8579
- ace_mode: text
8580
- language_id: 664100008
8581
- omnetpp-ned:
8582
- type: programming
8583
- extensions:
8584
- - ".ned"
8585
- color: "#08607c"
8586
- tm_scope: source.ned
8587
- ace_mode: text
8588
- language_id: 924868392
8589
8721
  ooc:
8590
8722
  type: programming
8591
8723
  color: "#b0b77e"
package/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ISC License
2
2
 
3
- Copyright &copy; Nixinova 2021&ndash;2024
3
+ Copyright &copy; Nixinova 2021&ndash;2025
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linguist-js",
3
- "version": "2.8.1",
3
+ "version": "2.9.1",
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": "<9"
12
+ "npm": ">=8"
13
13
  },
14
14
  "scripts": {
15
15
  "download-files": "npx tsx@3 build/download-files",
@@ -42,8 +42,8 @@
42
42
  "binary-extensions": "^2.3.0 <3",
43
43
  "commander": "^9.5.0 <10",
44
44
  "common-path-prefix": "^3.0.0",
45
- "cross-fetch": "^3.1.8 <4",
46
- "ignore": "^5.3.2",
45
+ "cross-fetch": "^3.2.0 <4",
46
+ "ignore": "^7.0.3",
47
47
  "isbinaryfile": "^4.0.10 <5",
48
48
  "js-yaml": "^4.1.0",
49
49
  "node-cache": "^5.1.2"