linguist-js 2.7.0 → 2.7.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
@@ -8,6 +8,7 @@ const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const commander_1 = require("commander");
10
10
  const index_1 = __importDefault(require("./index"));
11
+ const norm_path_1 = require("./helpers/norm-path");
11
12
  const colouredMsg = ([r, g, b], msg) => `\u001B[${38};2;${r};${g};${b}m${msg}${'\u001b[0m'}`;
12
13
  const hexToRgb = (hex) => [parseInt(hex.slice(1, 3), 16), parseInt(hex.slice(3, 5), 16), parseInt(hex.slice(5, 7), 16)];
13
14
  commander_1.program
@@ -92,7 +93,7 @@ if (args.analyze)
92
93
  if (args.listFiles) {
93
94
  console.log(); // padding
94
95
  for (const file of filesPerLanguage[lang]) {
95
- let relFile = path_1.default.relative(path_1.default.resolve('.'), file).replace(/\\/g, '/');
96
+ let relFile = (0, norm_path_1.normPath)(path_1.default.relative(path_1.default.resolve('.'), file));
96
97
  if (!relFile.startsWith('../'))
97
98
  relFile = './' + relFile;
98
99
  const bytes = (await fs_1.default.promises.stat(file)).size;
@@ -0,0 +1,2 @@
1
+ export declare const normPath: (...inputPaths: string[]) => string;
2
+ export declare const normAbsPath: (...inputPaths: string[]) => string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.normAbsPath = exports.normPath = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const normPath = function normalisedPath(...inputPaths) {
9
+ return path_1.default.join(...inputPaths).replace(/\\/g, '/');
10
+ };
11
+ exports.normPath = normPath;
12
+ const normAbsPath = function normalisedAbsolutePath(...inputPaths) {
13
+ return path_1.default.resolve(...inputPaths).replace(/\\/g, '/');
14
+ };
15
+ exports.normAbsPath = normAbsPath;
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = __importDefault(require("path"));
3
+ const norm_path_1 = require("./norm-path");
7
4
  /**
8
5
  * Parses a gitattributes file.
9
6
  */
@@ -16,7 +13,7 @@ function parseAttributes(content, folderRoot = '.') {
16
13
  continue;
17
14
  const parts = line.split(/\s+/g);
18
15
  const fileGlob = parts[0];
19
- const relFileGlob = path_1.default.join(folderRoot, fileGlob).replace(/\\/g, '/');
16
+ const relFileGlob = (0, norm_path_1.normPath)(folderRoot, fileGlob);
20
17
  const attrParts = parts.slice(1);
21
18
  const isTrue = (str) => !str.startsWith('-') && !str.endsWith('=false');
22
19
  const isFalse = (str) => str.startsWith('-') || str.endsWith('=false');
@@ -0,0 +1 @@
1
+ export default function parseGitignore(content: string): string[];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function parseGitignore(content) {
4
+ const readableData = content
5
+ // Remove comments unless escaped
6
+ .replace(/(?<!\\)#.+/g, '')
7
+ // Remove whitespace unless escaped
8
+ .replace(/(?:(?<!\\)\s)+$/g, '');
9
+ const arrayData = readableData.split(/\r?\n/).filter(data => data);
10
+ return arrayData;
11
+ }
12
+ exports.default = parseGitignore;
@@ -5,6 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const fs_1 = __importDefault(require("fs"));
7
7
  const path_1 = __importDefault(require("path"));
8
+ const parse_gitignore_1 = __importDefault(require("./parse-gitignore"));
9
+ const norm_path_1 = require("./norm-path");
8
10
  let allFiles;
9
11
  let allFolders;
10
12
  ;
@@ -24,26 +26,38 @@ function walk(data) {
24
26
  // Get list of files and folders inside this folder
25
27
  const files = fs_1.default.readdirSync(folder).map(file => {
26
28
  // Create path relative to root
27
- const base = path_1.default.resolve(folder, file).replace(/\\/g, '/').replace(commonRoot, '.');
29
+ const base = (0, norm_path_1.normAbsPath)(folder, file).replace(commonRoot, '.');
28
30
  // Add trailing slash to mark directories
29
31
  const isDir = fs_1.default.lstatSync(path_1.default.resolve(commonRoot, base)).isDirectory();
30
32
  return isDir ? `${base}/` : base;
31
33
  });
34
+ // Read and apply gitignores
35
+ const gitignoreFilename = (0, norm_path_1.normPath)(folder, '.gitignore');
36
+ if (fs_1.default.existsSync(gitignoreFilename)) {
37
+ const gitignoreContents = fs_1.default.readFileSync(gitignoreFilename, 'utf-8');
38
+ const ignoredPaths = (0, parse_gitignore_1.default)(gitignoreContents);
39
+ ignored.add(ignoredPaths);
40
+ }
41
+ // Add gitattributes if present
42
+ const gitattributesPath = (0, norm_path_1.normPath)(folder, '.gitattributes');
43
+ if (fs_1.default.existsSync(gitattributesPath)) {
44
+ allFiles.add(gitattributesPath);
45
+ }
32
46
  // Loop through files and folders
33
47
  for (const file of files) {
34
48
  // Create absolute path for disc operations
35
- const path = path_1.default.resolve(commonRoot, file).replace(/\\/g, '/');
49
+ const path = (0, norm_path_1.normAbsPath)(commonRoot, file);
36
50
  const localPath = localRoot ? file.replace(`./${localRoot}/`, '') : file.replace('./', '');
37
51
  // Skip if nonexistant
38
52
  const nonExistant = !fs_1.default.existsSync(path);
39
53
  if (nonExistant)
40
54
  continue;
41
- // Skip if marked as ignored
55
+ // Skip if marked in gitignore
42
56
  const isIgnored = ignored.test(localPath).ignored;
43
57
  if (isIgnored)
44
58
  continue;
45
59
  // Add absolute folder path to list
46
- allFolders.add(path_1.default.resolve(folder).replace(/\\/g, '/'));
60
+ allFolders.add((0, norm_path_1.normAbsPath)(folder));
47
61
  // Check if this is a folder or file
48
62
  if (file.endsWith('/')) {
49
63
  // Recurse into subfolders
package/dist/index.js CHANGED
@@ -37,6 +37,7 @@ const load_data_1 = __importStar(require("./helpers/load-data"));
37
37
  const read_file_1 = __importDefault(require("./helpers/read-file"));
38
38
  const parse_gitattributes_1 = __importDefault(require("./helpers/parse-gitattributes"));
39
39
  const convert_pcre_1 = __importDefault(require("./helpers/convert-pcre"));
40
+ const norm_path_1 = require("./helpers/norm-path");
40
41
  async function analyse(rawPaths, opts = {}) {
41
42
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
42
43
  var _r, _s;
@@ -69,12 +70,10 @@ async function analyse(rawPaths, opts = {}) {
69
70
  unknown: { count: 0, bytes: 0, extensions: {}, filenames: {} },
70
71
  };
71
72
  // Set a common root path so that vendor paths do not incorrectly match parent folders
72
- const normPath = (file) => file.replace(/\\/g, '/');
73
- const resolvedInput = input.map(path => normPath(path_1.default.resolve(path)));
73
+ const resolvedInput = input.map(path => (0, norm_path_1.normPath)(path_1.default.resolve(path)));
74
74
  const commonRoot = (input.length > 1 ? (0, common_path_prefix_1.default)(resolvedInput) : resolvedInput[0]).replace(/\/?$/, '');
75
- const localRoot = (folder) => folder.replace(commonRoot, '').replace(/^\//, '');
76
- const relPath = (file) => useRawContent ? file : normPath(path_1.default.relative(commonRoot, file));
77
- const unRelPath = (file) => useRawContent ? file : normPath(path_1.default.resolve(commonRoot, file));
75
+ const relPath = (file) => useRawContent ? file : (0, norm_path_1.normPath)(path_1.default.relative(commonRoot, file));
76
+ const unRelPath = (file) => useRawContent ? file : (0, norm_path_1.normPath)(path_1.default.resolve(commonRoot, file));
78
77
  // Other helper functions
79
78
  const fileMatchesGlobs = (file, ...globs) => (0, ignore_1.default)().add(globs).ignores(relPath(file));
80
79
  const filterOutIgnored = (files, ignored) => ignored.filter(files.map(relPath)).map(unRelPath);
@@ -83,46 +82,39 @@ async function analyse(rawPaths, opts = {}) {
83
82
  const ignored = (0, ignore_1.default)();
84
83
  ignored.add('.git/');
85
84
  ignored.add((_b = opts.ignoredFiles) !== null && _b !== void 0 ? _b : []);
86
- const regexIgnores = [];
87
- if (!opts.keepVendored)
88
- regexIgnores.push(...vendorPaths.map(path => RegExp(path, 'i')));
85
+ const regexIgnores = opts.keepVendored ? [] : vendorPaths.map(path => RegExp(path, 'i'));
89
86
  // Load file paths and folders
90
87
  let files;
91
- let folders;
92
88
  if (useRawContent) {
93
89
  // Uses raw file content
94
90
  files = input;
95
- folders = [''];
96
91
  }
97
92
  else {
98
93
  // Uses directory on disc
99
94
  const data = (0, walk_tree_1.default)({ init: true, commonRoot, folderRoots: resolvedInput, folders: resolvedInput, ignored });
100
95
  files = data.files;
101
- folders = data.folders;
102
- }
103
- // Load gitignore data and apply ignores rules
104
- if (!useRawContent && opts.checkIgnored) {
105
- const nestedIgnoreFiles = files.filter(file => file.endsWith('.gitignore'));
106
- for (const ignoresFile of nestedIgnoreFiles) {
107
- const relIgnoresFile = relPath(ignoresFile);
108
- const relIgnoresFolder = path_1.default.dirname(relIgnoresFile);
109
- // Parse gitignores
110
- const ignoresDataRaw = await (0, read_file_1.default)(ignoresFile);
111
- const ignoresData = ignoresDataRaw.replace(/#.+|\s+$/gm, '');
112
- const absoluteIgnoresData = ignoresData
113
- // '.file' -> 'root/*/.file'
114
- .replace(/^(?=[^\s\/\\])/gm, localRoot(relIgnoresFolder) + '/*/')
115
- // '/folder' -> 'root/folder'
116
- .replace(/^[\/\\]/gm, localRoot(relIgnoresFolder) + '/');
117
- ignored.add(absoluteIgnoresData);
118
- files = filterOutIgnored(files, ignored);
119
- }
120
96
  }
121
97
  // Fetch and normalise gitattributes data of all subfolders and save to metadata
122
98
  const manualAttributes = {}; // Maps file globs to gitattribute boolean flags
123
99
  const getFlaggedGlobs = (attr, val) => {
124
100
  return Object.entries(manualAttributes).filter(([, attrs]) => attrs[attr] === val).map(([glob,]) => glob);
125
101
  };
102
+ const findAttrsForPath = (filePath) => {
103
+ const resultAttrs = {};
104
+ for (const glob in manualAttributes) {
105
+ if ((0, ignore_1.default)().add(glob).ignores(relPath(filePath))) {
106
+ const matchingAttrs = manualAttributes[glob];
107
+ for (const [attr, val] of Object.entries(matchingAttrs)) {
108
+ if (val !== null)
109
+ resultAttrs[attr] = val;
110
+ }
111
+ }
112
+ }
113
+ if (!JSON.stringify(resultAttrs)) {
114
+ return null;
115
+ }
116
+ return resultAttrs;
117
+ };
126
118
  if (!useRawContent && opts.checkAttributes) {
127
119
  const nestedAttrFiles = files.filter(file => file.endsWith('.gitattributes'));
128
120
  for (const attrFile of nestedAttrFiles) {
@@ -135,6 +127,25 @@ async function analyse(rawPaths, opts = {}) {
135
127
  }
136
128
  }
137
129
  }
130
+ // Remove files that are linguist-ignored via regex by default unless explicitly unignored in gitattributes
131
+ const filesToIgnore = [];
132
+ for (const file of files) {
133
+ const relFile = relPath(file);
134
+ const isRegexIgnored = regexIgnores.some(pattern => pattern.test(relFile));
135
+ if (!isRegexIgnored) {
136
+ // Checking overrides is moot if file is not even marked as ignored by default
137
+ continue;
138
+ }
139
+ const fileAttrs = findAttrsForPath(file);
140
+ if ((fileAttrs === null || fileAttrs === void 0 ? void 0 : fileAttrs.generated) === false || (fileAttrs === null || fileAttrs === void 0 ? void 0 : fileAttrs.vendored) === false) {
141
+ // File is explicitly marked as *not* to be ignored
142
+ // do nothing
143
+ }
144
+ else {
145
+ filesToIgnore.push(file);
146
+ }
147
+ }
148
+ files = files.filter(file => !filesToIgnore.includes(file));
138
149
  // Apply vendor file path matches and filter out vendored files
139
150
  if (!opts.keepVendored) {
140
151
  // Get data of files that have been manually marked with metadata
@@ -389,7 +400,7 @@ async function analyse(rawPaths, opts = {}) {
389
400
  if (!useRawContent && opts.relativePaths) {
390
401
  const newMap = {};
391
402
  for (const [file, lang] of Object.entries(results.files.results)) {
392
- let relPath = path_1.default.relative(process.cwd(), file).replace(/\\/g, '/');
403
+ let relPath = (0, norm_path_1.normPath)(path_1.default.relative(process.cwd(), file));
393
404
  if (!relPath.startsWith('../')) {
394
405
  relPath = './' + relPath;
395
406
  }
package/ext/generated.rb CHANGED
@@ -11,6 +11,7 @@
11
11
  - (^|\/)(\w+\.)?esy.lock$
12
12
  - npm-shrinkwrap\.json
13
13
  - package-lock\.json
14
+ - pnpm-lock\.yaml
14
15
  - (^|\/)\.pnp\..*$
15
16
  - Godeps\/
16
17
  - composer\.lock
@@ -23,3 +24,4 @@
23
24
  - __generated__\/
24
25
  - _tlb\.pas$
25
26
  - (?:^|\/)htmlcov\/
27
+ - (?:^|.*\/)\.sqlx\/query-.+\.json$
@@ -74,7 +74,7 @@ disambiguations:
74
74
  - language: BlitzBasic
75
75
  pattern: '(<^\s*; |End Function)'
76
76
  - language: BitBake
77
- pattern: '^\s*(# |include|require)\b'
77
+ pattern: '^(# |include|require|inherit)\b'
78
78
  - language: Clojure
79
79
  pattern: '\((def|defn|defmacro|let)\s'
80
80
  - extensions: ['.bf']
@@ -284,6 +284,12 @@ disambiguations:
284
284
  rules:
285
285
  - language: GSC
286
286
  named_pattern: gsc
287
+ - extensions: ['.gts']
288
+ rules:
289
+ - language: Gerber Image
290
+ pattern: '^G0.'
291
+ - language: Glimmer TS
292
+ negative_pattern: '^G0.'
287
293
  - extensions: ['.h']
288
294
  rules:
289
295
  - language: Objective-C
@@ -335,6 +341,8 @@ disambiguations:
335
341
  pattern:
336
342
  - '(?i:^\s*\{\$(?:mode|ifdef|undef|define)[ ]+[a-z0-9_]+\})'
337
343
  - '^\s*end[.;]\s*$'
344
+ - language: BitBake
345
+ pattern: '^inherit(\s+[\w.-]+)+\s*$'
338
346
  - extensions: ['.json']
339
347
  rules:
340
348
  - language: OASv2-json
@@ -428,6 +436,12 @@ disambiguations:
428
436
  - language: Modula-2
429
437
  pattern: '^\s*(?i:MODULE|END) [\w\.]+;'
430
438
  - language: [Linux Kernel Module, AMPL]
439
+ - extensions: ['.mojo']
440
+ rules:
441
+ - language: Mojo
442
+ pattern: '^\s*(alias|def|from|fn|import|struct|trait)\s'
443
+ - language: XML
444
+ pattern: '^\s*<\?xml'
431
445
  - extensions: ['.ms']
432
446
  rules:
433
447
  - language: Roff
@@ -770,6 +784,7 @@ named_patterns:
770
784
  - '^[ \t]*catch\s*\('
771
785
  - '^[ \t]*(class|(using[ \t]+)?namespace)\s+\w+'
772
786
  - '^[ \t]*(private|public|protected):$'
787
+ - '__has_cpp_attribute|__cplusplus >'
773
788
  - 'std::\w+'
774
789
  euphoria:
775
790
  - '^\s*namespace\s'
@@ -811,7 +826,7 @@ named_patterns:
811
826
  - '^[ ]*(?:Public|Private)? Declare PtrSafe (?:Sub|Function)\b'
812
827
  - '^[ ]*#If Win64\b'
813
828
  - '^[ ]*(?:Dim|Const) [0-9a-zA-Z_]*[ ]*As Long(?:Ptr|Long)\b'
814
- - '^[ ]*Option (?:Private Module|Compare Database)\b'
829
+ - '^[ ]*Option (?:Private Module|Compare (?:Database|Text|Binary))\b'
815
830
  - '(?: |\()(?:Access|Excel|Outlook|PowerPoint|Visio|Word|VBIDE)\.\w'
816
831
  - '\b(?:(?:Active)?VBProjects?|VBComponents?|Application\.(?:VBE|ScreenUpdating))\b'
817
832
  - '\b(?:ThisDrawing|AcadObject|Active(?:Explorer|Inspector|Window\.Presentation|Presentation|Document)|Selection\.(?:Find|Paragraphs))\b'
package/ext/languages.yml CHANGED
@@ -538,6 +538,7 @@ Bicep:
538
538
  color: "#519aba"
539
539
  extensions:
540
540
  - ".bicep"
541
+ - ".bicepparam"
541
542
  tm_scope: source.bicep
542
543
  ace_mode: text
543
544
  language_id: 321200902
@@ -563,9 +564,12 @@ Bison:
563
564
  BitBake:
564
565
  type: programming
565
566
  color: "#00bce4"
566
- tm_scope: none
567
+ tm_scope: source.bb
567
568
  extensions:
568
569
  - ".bb"
570
+ - ".bbappend"
571
+ - ".bbclass"
572
+ - ".inc"
569
573
  ace_mode: text
570
574
  language_id: 32
571
575
  Blade:
@@ -623,7 +627,7 @@ Bluespec BH:
623
627
  aliases:
624
628
  - bh
625
629
  - bluespec classic
626
- tm_scope: source.haskell
630
+ tm_scope: source.bh
627
631
  ace_mode: haskell
628
632
  codemirror_mode: haskell
629
633
  codemirror_mime_type: text/x-haskell
@@ -711,6 +715,7 @@ C#:
711
715
  extensions:
712
716
  - ".cs"
713
717
  - ".cake"
718
+ - ".cs.pp"
714
719
  - ".csx"
715
720
  - ".linq"
716
721
  language_id: 42
@@ -1176,7 +1181,7 @@ ColdFusion CFC:
1176
1181
  language_id: 65
1177
1182
  Common Lisp:
1178
1183
  type: programming
1179
- tm_scope: source.lisp
1184
+ tm_scope: source.commonlisp
1180
1185
  color: "#3fb68b"
1181
1186
  aliases:
1182
1187
  - lisp
@@ -1559,6 +1564,7 @@ Dotenv:
1559
1564
  - ".env.local"
1560
1565
  - ".env.prod"
1561
1566
  - ".env.production"
1567
+ - ".env.sample"
1562
1568
  - ".env.staging"
1563
1569
  - ".env.test"
1564
1570
  - ".env.testing"
@@ -1708,6 +1714,14 @@ Ecmarkup:
1708
1714
  aliases:
1709
1715
  - ecmarkdown
1710
1716
  language_id: 844766630
1717
+ Edge:
1718
+ type: markup
1719
+ color: "#0dffe0"
1720
+ extensions:
1721
+ - ".edge"
1722
+ tm_scope: text.html.edge
1723
+ ace_mode: html
1724
+ language_id: 460509620
1711
1725
  EdgeQL:
1712
1726
  type: programming
1713
1727
  color: "#31A7FF"
@@ -2400,6 +2414,15 @@ Glimmer JS:
2400
2414
  tm_scope: source.gjs
2401
2415
  group: JavaScript
2402
2416
  language_id: 5523150
2417
+ Glimmer TS:
2418
+ type: programming
2419
+ extensions:
2420
+ - ".gts"
2421
+ ace_mode: typescript
2422
+ color: "#3178c6"
2423
+ tm_scope: source.gts
2424
+ group: TypeScript
2425
+ language_id: 95110458
2403
2426
  Glyph:
2404
2427
  type: programming
2405
2428
  color: "#c1ac7f"
@@ -3120,6 +3143,7 @@ JSON:
3120
3143
  aliases:
3121
3144
  - geojson
3122
3145
  - jsonl
3146
+ - sarif
3123
3147
  - topojson
3124
3148
  extensions:
3125
3149
  - ".json"
@@ -3133,6 +3157,7 @@ JSON:
3133
3157
  - ".JSON-tmLanguage"
3134
3158
  - ".jsonl"
3135
3159
  - ".mcmeta"
3160
+ - ".sarif"
3136
3161
  - ".tfstate"
3137
3162
  - ".tfstate.backup"
3138
3163
  - ".topojson"
@@ -4269,6 +4294,16 @@ Module Management System:
4269
4294
  tm_scope: none
4270
4295
  ace_mode: text
4271
4296
  language_id: 235
4297
+ Mojo:
4298
+ type: programming
4299
+ color: "#ff4c1f"
4300
+ extensions:
4301
+ - ".mojo"
4302
+ ace_mode: python
4303
+ codemirror_mode: python
4304
+ codemirror_mime_type: text/x-python
4305
+ tm_scope: source.mojo
4306
+ language_id: 1045019587
4272
4307
  Monkey:
4273
4308
  type: programming
4274
4309
  extensions:
@@ -4681,6 +4716,13 @@ OCaml:
4681
4716
  - ocamlscript
4682
4717
  tm_scope: source.ocaml
4683
4718
  language_id: 255
4719
+ Oberon:
4720
+ type: programming
4721
+ extensions:
4722
+ - ".ob2"
4723
+ tm_scope: source.modula2
4724
+ ace_mode: text
4725
+ language_id: 677210597
4684
4726
  ObjDump:
4685
4727
  type: data
4686
4728
  extensions:
@@ -5205,6 +5247,15 @@ Pike:
5205
5247
  tm_scope: source.pike
5206
5248
  ace_mode: text
5207
5249
  language_id: 287
5250
+ Pip Requirements:
5251
+ type: data
5252
+ color: "#FFD343"
5253
+ filenames:
5254
+ - requirements-dev.txt
5255
+ - requirements.txt
5256
+ ace_mode: text
5257
+ tm_scope: source.pip-requirements
5258
+ language_id: 684385621
5208
5259
  PlantUML:
5209
5260
  type: data
5210
5261
  color: "#fbbd16"
@@ -5597,7 +5648,6 @@ R:
5597
5648
  type: programming
5598
5649
  color: "#198CE7"
5599
5650
  aliases:
5600
- - R
5601
5651
  - Rscript
5602
5652
  - splus
5603
5653
  extensions:
@@ -5961,6 +6011,14 @@ RobotFramework:
5961
6011
  tm_scope: text.robot
5962
6012
  ace_mode: text
5963
6013
  language_id: 324
6014
+ Roc:
6015
+ type: programming
6016
+ color: "#7c38f5"
6017
+ extensions:
6018
+ - ".roc"
6019
+ tm_scope: source.roc
6020
+ ace_mode: text
6021
+ language_id: 440182480
5964
6022
  Roff:
5965
6023
  type: markup
5966
6024
  color: "#ecdebe"
@@ -6468,6 +6526,7 @@ Shell:
6468
6526
  - ".kshrc"
6469
6527
  - ".login"
6470
6528
  - ".profile"
6529
+ - ".tmux.conf"
6471
6530
  - ".zlogin"
6472
6531
  - ".zlogout"
6473
6532
  - ".zprofile"
@@ -6485,6 +6544,7 @@ Shell:
6485
6544
  - login
6486
6545
  - man
6487
6546
  - profile
6547
+ - tmux.conf
6488
6548
  - zlogin
6489
6549
  - zlogout
6490
6550
  - zprofile
@@ -6578,7 +6638,7 @@ Slash:
6578
6638
  Slice:
6579
6639
  type: programming
6580
6640
  color: "#003fa2"
6581
- tm_scope: source.slice
6641
+ tm_scope: source.ice
6582
6642
  ace_mode: text
6583
6643
  extensions:
6584
6644
  - ".ice"
@@ -6593,6 +6653,14 @@ Slim:
6593
6653
  codemirror_mode: slim
6594
6654
  codemirror_mime_type: text/x-slim
6595
6655
  language_id: 350
6656
+ Slint:
6657
+ type: markup
6658
+ color: "#2379F4"
6659
+ extensions:
6660
+ - ".slint"
6661
+ tm_scope: source.slint
6662
+ ace_mode: text
6663
+ language_id: 119900149
6596
6664
  SmPL:
6597
6665
  type: programming
6598
6666
  extensions:
@@ -6863,11 +6931,9 @@ TI Program:
6863
6931
  color: "#A0AA87"
6864
6932
  extensions:
6865
6933
  - ".8xp"
6866
- - ".8xk"
6867
- - ".8xk.txt"
6868
6934
  - ".8xp.txt"
6869
6935
  language_id: 422
6870
- tm_scope: none
6936
+ tm_scope: source.8xp
6871
6937
  TL-Verilog:
6872
6938
  type: programming
6873
6939
  extensions:
@@ -7090,6 +7156,14 @@ Text:
7090
7156
  tm_scope: none
7091
7157
  ace_mode: text
7092
7158
  language_id: 372
7159
+ TextGrid:
7160
+ type: data
7161
+ color: "#c8506d"
7162
+ tm_scope: source.textgrid
7163
+ ace_mode: text
7164
+ extensions:
7165
+ - ".TextGrid"
7166
+ language_id: 965696054
7093
7167
  TextMate Properties:
7094
7168
  type: data
7095
7169
  color: "#df66e4"
@@ -7770,6 +7844,7 @@ XML:
7770
7844
  - ".mjml"
7771
7845
  - ".mm"
7772
7846
  - ".mod"
7847
+ - ".mojo"
7773
7848
  - ".mxml"
7774
7849
  - ".natvis"
7775
7850
  - ".ncl"
@@ -8162,6 +8237,13 @@ jq:
8162
8237
  type: programming
8163
8238
  extensions:
8164
8239
  - ".jq"
8240
+ interpreters:
8241
+ - gojq
8242
+ - jaq
8243
+ - jq
8244
+ - jqjq
8245
+ - jqq
8246
+ - query-json
8165
8247
  tm_scope: source.jq
8166
8248
  language_id: 905371884
8167
8249
  kvlang:
package/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ISC License
2
2
 
3
- Copyright &copy; Nixinova 2021&ndash;2022
3
+ Copyright &copy; Nixinova 2021&ndash;2024
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.7.0",
3
+ "version": "2.7.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": {
@@ -11,10 +11,10 @@
11
11
  "node": ">=12"
12
12
  },
13
13
  "scripts": {
14
- "download-files": "npx tsx@3 build/download-files",
14
+ "download-files": "npx tsx@4 build/download-files",
15
15
  "pre-publish": "npm run download-files && npm test && npm run perf",
16
16
  "perf": "tsc && node test/perf",
17
- "test": "tsc && node test/folder && echo --- && node test/unit"
17
+ "test": "tsc && node test/folder && node test/unit"
18
18
  },
19
19
  "files": [
20
20
  "bin/",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://github.com/Nixinova/Linguist#readme",
40
40
  "dependencies": {
41
- "binary-extensions": "^2.2.0",
41
+ "binary-extensions": "^2.2.0 <3",
42
42
  "commander": "^9.5.0 <10",
43
43
  "common-path-prefix": "^3.0.0",
44
44
  "cross-fetch": "^3.1.8 <4",