Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

linguist-js

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linguist-js - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

28

dist/cli.js

@@ -15,10 +15,11 @@ "use strict";

.option('-i|--ignore <files...>', `A list of file path globs to ignore`)
.option('-f|--files|--full', 'List every file parsed', false)
.option('-s|--summary', 'Show output in a human-readable format', false)
.option('-q|--quick', 'Skip checking of gitattributes/gitignore files (alias for -AIHS=false)', false)
.option('-V|--keepVendored', 'Prevent skipping over vendored/generated files', false)
.option('-A|--checkAttributes', 'Force the checking of gitattributes files (default: true unless --quick is set)')
.option('-I|--checkIgnored', 'Force the checking of gitignore files (default: true unless --quick is set)')
.option('-H|--checkHeuristics', 'Apply heuristics to ambiguous languages (default: true unless --quick is set)')
.option('-S|--checkShebang|--checkHashbang', 'Check shebang lines for explicit classification (default: true unless --quick is set)')
.option('-f|--files|--full [bool]', 'List every file parsed', false)
.option('-s|--summary [bool]', 'Show output in a human-readable format', false)
.option('-q|--quick [bool]', 'Skip checking of gitattributes/gitignore files (alias for -AIHS=false)', false)
.option('-V|--keepVendored [bool]', 'Prevent skipping over vendored/generated files', false)
.option('-B|--keepBinary [bool]', 'Prevent skipping over binary files', false)
.option('-A|--checkAttributes [bool]', 'Force the checking of gitattributes files (default: true unless --quick is set)', true)
.option('-I|--checkIgnored [bool]', 'Force the checking of gitignore files (default: true unless --quick is set)', true)
.option('-H|--checkHeuristics [bool]', 'Apply heuristics to ambiguous languages (default: true unless --quick is set)', true)
.option('-S|--checkShebang|--checkHashbang [bool]', 'Check shebang lines for explicit classification (default: true unless --quick is set)', true)
.helpOption(`-h|--help`, 'Display this help message')

@@ -28,7 +29,14 @@ .version(VERSION, '-v|--version', 'Display the installed version of linguist-js');

const args = commander_1.program.opts();
for (const arg in args) {
if (typeof args[arg] !== 'string')
continue;
args[arg] = args[arg].replace(/^=/, '');
if (args[arg].match(/true$|false$/))
args[arg] = args[arg] === 'true';
}
if (args.analyze) {
(async () => {
const root = args.analyze === true ? '.' : args.analyze;
if (typeof args.ignore === 'string')
args.ignore = args.ignore.split(/(?<!\\)[:;|]/);
if (args.ignore[0].match(/(?<!\\)[:;|]/))
args.ignore = args.ignore[0].split(/(?<!\\)[:;|]/);
const { count, languages, results } = await index_1.default(root, args);

@@ -35,0 +43,0 @@ if (args.summary) {

{
"name": "linguist-js",
"version": "1.5.3",
"version": "1.5.4",
"description": "Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc