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 2.0.0 to 2.0.1

11

dist/cli.js

@@ -7,3 +7,2 @@ "use strict";

const VERSION = require('../package.json').version;
const path_1 = __importDefault(require("path"));
const commander_1 = require("commander");

@@ -52,8 +51,2 @@ const index_1 = __importDefault(require("./index"));

const { files, languages, unknown } = await (0, index_1.default)(root, args);
// Make file paths relative
for (const [file, lang] of Object.entries(files.results)) {
const relFile = file.replace(path_1.default.resolve().replace(/\\/g, '/'), '.');
delete files.results[file];
files.results[relFile] = lang;
}
// Print output

@@ -63,3 +56,3 @@ if (!args.json) {

const totalBytes = languages.bytes;
console.log(`Analysed ${files.bytes} B from ${files.count} files with linguist-js`);
console.log(`Analysed ${files.bytes.toLocaleString()} B from ${files.count} files with linguist-js`);
console.log(`\n Language analysis results:`);

@@ -71,3 +64,3 @@ let i = 0;

lang: lang.padEnd(24, ' '),
percent: (bytes / totalBytes * 100).toFixed(2).padStart(5, ' '),
percent: (bytes / (totalBytes || 1) * 100).toFixed(2).padStart(5, ' '),
bytes: bytes.toLocaleString().padStart(10, ' '),

@@ -74,0 +67,0 @@ };

5

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

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

},
"engines": {
"node": ">=12"
},
"scripts": {

@@ -11,0 +14,0 @@ "prepublish": "tsc",

@@ -34,3 +34,3 @@ [![Latest version](https://img.shields.io/github/v/release/Nixinova/Linguist?label=latest%20version&style=flat-square)](https://github.com/Nixinova/Linguist/releases)

```
.
/
| src

@@ -51,6 +51,6 @@ | | cli.js 1kB

"results": {
"src/index.ts": "TypeScript",
"src/cli.js": "JavaScript",
"readme.md": "Markdown",
"no-lang": null,
"/src/index.ts": "TypeScript",
"/src/cli.js": "JavaScript",
"/readme.md": "Markdown",
"/no-lang": null,
}

@@ -78,2 +78,4 @@ },

Note that file paths in the output use only forward slashes as delimiters, even on Windows.
## API

@@ -80,0 +82,0 @@

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