Skip to content

Commit

Permalink
2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixinova committed Sep 10, 2021
1 parent 4de0a2b commit 3b66882
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Next
## 2.1.0
*2021-09-11*
- Added nullable `parent` property to each entry in `languages.results` to display the parent language.
- Added option `childLanguages` to control whether child languages are displayed instead of their parent (defaults to `false`).

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linguist-js",
"version": "2.0.3",
"version": "2.1.0",
"description": "Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.",
"main": "dist/index.js",
"bin": {
Expand All @@ -11,6 +11,7 @@
},
"scripts": {
"prepublish": "tsc",
"prepare": "npm test && npm run perf",
"perf": "tsc && node test/perf",
"test": "tsc && node test/test"
},
Expand Down
7 changes: 6 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ Running Linguist on this folder will return the following JSON:
}
```

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

- File paths in the output use only forward slashes as delimiters, even on Windows.
- Do not rely on any language classification output from Linguist being immutable between runs.
Language data is fetched each run from the latest classifications of `github-linguist`.
This data is subject to change at any time and may change the results of a run even when using the same version of Linguist.

## API

Expand Down
8 changes: 4 additions & 4 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import { Category, Language } from './types'
export interface LanguagesScema {
[name: string]: {
language_id: number
fs_name?: string
fs_name?: Language
type: Category
group?: Language
color?: `#${string}`
aliases?: string[]
extensions?: string[]
extensions?: `.${string}`[]
filenames?: string[]
interpreters?: string[]
tm_scope?: string
tm_scope?: `${'source' | 'text'}.${string}`
ace_mode?: string
codemirror_mode?: string
codemirror_mime_type?: string
codemirror_mime_type?: `${string}/${string}`
wrap?: boolean
}
}
Expand Down

0 comments on commit 3b66882

Please sign in to comment.