linguist-js 2.4.2 → 2.5.2
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 +1 -0
- package/dist/helpers/load-data.js +11 -2
- package/dist/index.js +83 -46
- package/dist/types.d.ts +1 -0
- package/ext/documentation.yml +17 -0
- package/ext/generated.rb +351 -0
- package/ext/heuristics.yml +690 -0
- package/ext/languages.yml +7633 -0
- package/ext/vendor.yml +166 -0
- package/package.json +10 -8
- package/readme.md +6 -3
package/ext/vendor.yml
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
|
|
2
|
+
- (^|/)cache/
|
|
3
|
+
- ^[Dd]ependencies/
|
|
4
|
+
- (^|/)dist/
|
|
5
|
+
- ^deps/
|
|
6
|
+
- (^|/)configure$
|
|
7
|
+
- (^|/)config\.guess$
|
|
8
|
+
- (^|/)config\.sub$
|
|
9
|
+
- (^|/)aclocal\.m4
|
|
10
|
+
- (^|/)libtool\.m4
|
|
11
|
+
- (^|/)ltoptions\.m4
|
|
12
|
+
- (^|/)ltsugar\.m4
|
|
13
|
+
- (^|/)ltversion\.m4
|
|
14
|
+
- (^|/)lt~obsolete\.m4
|
|
15
|
+
- (^|/)dotnet-install\.(ps1|sh)$
|
|
16
|
+
- (^|/)cpplint\.py
|
|
17
|
+
- (^|/)node_modules/
|
|
18
|
+
- (^|/)\.yarn/releases/
|
|
19
|
+
- (^|/)\.yarn/plugins/
|
|
20
|
+
- (^|/)\.yarn/sdks/
|
|
21
|
+
- (^|/)\.yarn/versions/
|
|
22
|
+
- (^|/)\.yarn/unplugged/
|
|
23
|
+
- (^|/)_esy$
|
|
24
|
+
- (^|/)bower_components/
|
|
25
|
+
- ^rebar$
|
|
26
|
+
- (^|/)erlang\.mk
|
|
27
|
+
- (^|/)Godeps/_workspace/
|
|
28
|
+
- (^|/)testdata/
|
|
29
|
+
- (^|/)\.indent\.pro
|
|
30
|
+
- (\.|-)min\.(js|css)$
|
|
31
|
+
- ([^\s]*)import\.(css|less|scss|styl)$
|
|
32
|
+
- (^|/)bootstrap([^/.]*)\.(js|css|less|scss|styl)$
|
|
33
|
+
- (^|/)custom\.bootstrap([^\s]*)(js|css|less|scss|styl)$
|
|
34
|
+
- (^|/)font-?awesome\.(css|less|scss|styl)$
|
|
35
|
+
- (^|/)font-?awesome/.*\.(css|less|scss|styl)$
|
|
36
|
+
- (^|/)foundation\.(css|less|scss|styl)$
|
|
37
|
+
- (^|/)normalize\.(css|less|scss|styl)$
|
|
38
|
+
- (^|/)skeleton\.(css|less|scss|styl)$
|
|
39
|
+
- (^|/)[Bb]ourbon/.*\.(css|less|scss|styl)$
|
|
40
|
+
- (^|/)animate\.(css|less|scss|styl)$
|
|
41
|
+
- (^|/)materialize\.(css|less|scss|styl|js)$
|
|
42
|
+
- (^|/)select2/.*\.(css|scss|js)$
|
|
43
|
+
- (^|/)bulma\.(css|sass|scss)$
|
|
44
|
+
- (3rd|[Tt]hird)[-_]?[Pp]arty/
|
|
45
|
+
- (^|/)vendors?/
|
|
46
|
+
- (^|/)[Ee]xtern(als?)?/
|
|
47
|
+
- (^|/)[Vv]+endor/
|
|
48
|
+
- ^debian/
|
|
49
|
+
- (^|/)run\.n$
|
|
50
|
+
- (^|/)bootstrap-datepicker/
|
|
51
|
+
- (^|/)jquery([^.]*)\.js$
|
|
52
|
+
- (^|/)jquery\-\d\.\d+(\.\d+)?\.js$
|
|
53
|
+
- (^|/)jquery\-ui(\-\d\.\d+(\.\d+)?)?(\.\w+)?\.(js|css)$
|
|
54
|
+
- (^|/)jquery\.(ui|effects)\.([^.]*)\.(js|css)$
|
|
55
|
+
- (^|/)jquery\.fn\.gantt\.js
|
|
56
|
+
- (^|/)jquery\.fancybox\.(js|css)
|
|
57
|
+
- (^|/)fuelux\.js
|
|
58
|
+
- (^|/)jquery\.fileupload(-\w+)?\.js$
|
|
59
|
+
- (^|/)jquery\.dataTables\.js
|
|
60
|
+
- (^|/)bootbox\.js
|
|
61
|
+
- (^|/)pdf\.worker\.js
|
|
62
|
+
- (^|/)slick\.\w+.js$
|
|
63
|
+
- (^|/)Leaflet\.Coordinates-\d+\.\d+\.\d+\.src\.js$
|
|
64
|
+
- (^|/)leaflet\.draw-src\.js
|
|
65
|
+
- (^|/)leaflet\.draw\.css
|
|
66
|
+
- (^|/)Control\.FullScreen\.css
|
|
67
|
+
- (^|/)Control\.FullScreen\.js
|
|
68
|
+
- (^|/)leaflet\.spin\.js
|
|
69
|
+
- (^|/)wicket-leaflet\.js
|
|
70
|
+
- (^|/)\.sublime-project
|
|
71
|
+
- (^|/)\.sublime-workspace
|
|
72
|
+
- (^|/)\.vscode/
|
|
73
|
+
- (^|/)prototype(.*)\.js$
|
|
74
|
+
- (^|/)effects\.js$
|
|
75
|
+
- (^|/)controls\.js$
|
|
76
|
+
- (^|/)dragdrop\.js$
|
|
77
|
+
- (.*?)\.d\.ts$
|
|
78
|
+
- (^|/)mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$
|
|
79
|
+
- (^|/)dojo\.js$
|
|
80
|
+
- (^|/)MochiKit\.js$
|
|
81
|
+
- (^|/)yahoo-([^.]*)\.js$
|
|
82
|
+
- (^|/)yui([^.]*)\.js$
|
|
83
|
+
- (^|/)ckeditor\.js$
|
|
84
|
+
- (^|/)tiny_mce([^.]*)\.js$
|
|
85
|
+
- (^|/)tiny_mce/(langs|plugins|themes|utils)
|
|
86
|
+
- (^|/)ace-builds/
|
|
87
|
+
- (^|/)fontello(.*?)\.css$
|
|
88
|
+
- (^|/)MathJax/
|
|
89
|
+
- (^|/)Chart\.js$
|
|
90
|
+
- (^|/)[Cc]ode[Mm]irror/(\d+\.\d+/)?(lib|mode|theme|addon|keymap|demo)
|
|
91
|
+
- (^|/)shBrush([^.]*)\.js$
|
|
92
|
+
- (^|/)shCore\.js$
|
|
93
|
+
- (^|/)shLegacy\.js$
|
|
94
|
+
- (^|/)angular([^.]*)\.js$
|
|
95
|
+
- (^|\/)d3(\.v\d+)?([^.]*)\.js$
|
|
96
|
+
- (^|/)react(-[^.]*)?\.js$
|
|
97
|
+
- (^|/)flow-typed/.*\.js$
|
|
98
|
+
- (^|/)modernizr\-\d\.\d+(\.\d+)?\.js$
|
|
99
|
+
- (^|/)modernizr\.custom\.\d+\.js$
|
|
100
|
+
- (^|/)knockout-(\d+\.){3}(debug\.)?js$
|
|
101
|
+
- (^|/)docs?/_?(build|themes?|templates?|static)/
|
|
102
|
+
- (^|/)admin_media/
|
|
103
|
+
- (^|/)env/
|
|
104
|
+
- (^|/)fabfile\.py$
|
|
105
|
+
- (^|/)waf$
|
|
106
|
+
- (^|/)\.osx$- \.xctemplate/
|
|
107
|
+
- \.imageset/
|
|
108
|
+
- (^|/)Carthage/
|
|
109
|
+
- (^|/)Sparkle/
|
|
110
|
+
- (^|/)Crashlytics\.framework/
|
|
111
|
+
- (^|/)Fabric\.framework/
|
|
112
|
+
- (^|/)BuddyBuildSDK\.framework/
|
|
113
|
+
- (^|/)Realm\.framework
|
|
114
|
+
- (^|/)RealmSwift\.framework
|
|
115
|
+
- (^|/)\.gitattributes$
|
|
116
|
+
- (^|/)\.gitignore$
|
|
117
|
+
- (^|/)\.gitmodules$
|
|
118
|
+
- (^|/)gradlew$
|
|
119
|
+
- (^|/)gradlew\.bat$
|
|
120
|
+
- (^|/)gradle/wrapper/
|
|
121
|
+
- (^|/)mvnw$
|
|
122
|
+
- (^|/)mvnw\.cmd$
|
|
123
|
+
- (^|/)\.mvn/wrapper/
|
|
124
|
+
- -vsdoc\.js$
|
|
125
|
+
- \.intellisense\.js$
|
|
126
|
+
- (^|/)jquery([^.]*)\.validate(\.unobtrusive)?\.js$
|
|
127
|
+
- (^|/)jquery([^.]*)\.unobtrusive\-ajax\.js$
|
|
128
|
+
- (^|/)[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$
|
|
129
|
+
- (^|/)[Pp]ackages\/.+\.\d+\/
|
|
130
|
+
- (^|/)extjs/.*?\.js$
|
|
131
|
+
- (^|/)extjs/.*?\.xml$
|
|
132
|
+
- (^|/)extjs/.*?\.txt$
|
|
133
|
+
- (^|/)extjs/.*?\.html$
|
|
134
|
+
- (^|/)extjs/.*?\.properties$
|
|
135
|
+
- (^|/)extjs/\.sencha/
|
|
136
|
+
- (^|/)extjs/docs/
|
|
137
|
+
- (^|/)extjs/builds/
|
|
138
|
+
- (^|/)extjs/cmd/
|
|
139
|
+
- (^|/)extjs/examples/
|
|
140
|
+
- (^|/)extjs/locale/
|
|
141
|
+
- (^|/)extjs/packages/
|
|
142
|
+
- (^|/)extjs/plugins/
|
|
143
|
+
- (^|/)extjs/resources/
|
|
144
|
+
- (^|/)extjs/src/
|
|
145
|
+
- (^|/)extjs/welcome/
|
|
146
|
+
- (^|/)html5shiv\.js$
|
|
147
|
+
- (^|/)[Tt]ests?/fixtures/
|
|
148
|
+
- (^|/)[Ss]pecs?/fixtures/
|
|
149
|
+
- (^|/)cordova([^.]*)\.js$
|
|
150
|
+
- (^|/)cordova\-\d\.\d(\.\d)?\.js$
|
|
151
|
+
- (^|/)foundation(\..*)?\.js$
|
|
152
|
+
- (^|/)Vagrantfile$
|
|
153
|
+
- (^|/)\.[Dd][Ss]_[Ss]tore$
|
|
154
|
+
- (^|/)vignettes/
|
|
155
|
+
- (^|/)inst/extdata/
|
|
156
|
+
- (^|/)octicons\.css
|
|
157
|
+
- (^|/)sprockets-octicons\.scss
|
|
158
|
+
- (^|/)activator$
|
|
159
|
+
- (^|/)activator\.bat$
|
|
160
|
+
- (^|/)proguard\.pro$
|
|
161
|
+
- (^|/)proguard-rules\.pro$
|
|
162
|
+
- (^|/)puphpet/
|
|
163
|
+
- (^|/)\.google_apis/
|
|
164
|
+
- (^|/)Jenkinsfile$
|
|
165
|
+
- (^|/)\.gitpod\.Dockerfile$
|
|
166
|
+
- (^|/)\.github/
|
package/package.json
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linguist-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.2",
|
|
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": {
|
|
7
|
+
"linguist-js": "bin/index.js",
|
|
7
8
|
"linguist": "bin/index.js"
|
|
8
9
|
},
|
|
9
10
|
"engines": {
|
|
10
11
|
"node": ">=12"
|
|
11
12
|
},
|
|
12
13
|
"scripts": {
|
|
13
|
-
"
|
|
14
|
+
"download-files": "npx tsx@2 build/download-files",
|
|
15
|
+
"prepare": "npm run download-files && npm test && npm run perf",
|
|
14
16
|
"perf": "tsc && node test/perf",
|
|
15
17
|
"test": "tsc && node test/folder && echo --- && node test/unit"
|
|
16
18
|
},
|
|
17
19
|
"files": [
|
|
18
20
|
"bin/",
|
|
19
21
|
"dist/**/*.js",
|
|
20
|
-
"dist/*.d.ts"
|
|
22
|
+
"dist/*.d.ts",
|
|
23
|
+
"ext/"
|
|
21
24
|
],
|
|
22
25
|
"repository": {
|
|
23
26
|
"type": "git",
|
|
@@ -37,7 +40,7 @@
|
|
|
37
40
|
"homepage": "https://github.com/Nixinova/Linguist#readme",
|
|
38
41
|
"dependencies": {
|
|
39
42
|
"binary-extensions": "^2.2.0",
|
|
40
|
-
"commander": "^9.
|
|
43
|
+
"commander": "^9.3.0",
|
|
41
44
|
"common-path-prefix": "^3.0.0",
|
|
42
45
|
"cross-fetch": "^3.1.5",
|
|
43
46
|
"ignore": "^5.2.0",
|
|
@@ -46,10 +49,9 @@
|
|
|
46
49
|
"node-cache": "^5.1.2"
|
|
47
50
|
},
|
|
48
51
|
"devDependencies": {
|
|
49
|
-
"@types/
|
|
50
|
-
"@types/
|
|
51
|
-
"@types/node": "ts4.6",
|
|
52
|
+
"@types/js-yaml": "^4.0.5",
|
|
53
|
+
"@types/node": "ts4.7",
|
|
52
54
|
"deep-object-diff": "^1.1.7",
|
|
53
|
-
"typescript": "~4.
|
|
55
|
+
"typescript": "~4.7.4"
|
|
54
56
|
}
|
|
55
57
|
}
|
package/readme.md
CHANGED
|
@@ -77,8 +77,7 @@ Running LinguistJS on this folder will return the following JSON:
|
|
|
77
77
|
### Notes
|
|
78
78
|
|
|
79
79
|
- File paths in the output use only forward slashes as delimiters, even on Windows.
|
|
80
|
-
-
|
|
81
|
-
- Do not rely on any language classification output from LinguistJS being unchanged between runs.
|
|
80
|
+
- Unless running in offline mode, do not rely on any language classification output from LinguistJS being unchanged between runs.
|
|
82
81
|
Language data is fetched each run from the latest classifications of [`github-linguist`](https://github.com/github/linguist).
|
|
83
82
|
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.
|
|
84
83
|
|
|
@@ -113,7 +112,9 @@ const { files, languages, unknown } = linguist(folder, options);
|
|
|
113
112
|
- `quick` (boolean):
|
|
114
113
|
Whether to skip complex language analysis such as the checking of heuristics and gitattributes statements (defaults to `false`).
|
|
115
114
|
Alias for `checkAttributes:false, checkIgnored:false, checkHeuristics:false, checkShebang:false, checkModeline:false`.
|
|
116
|
-
- `
|
|
115
|
+
- `offline` (boolean):
|
|
116
|
+
Whether to use pre-packaged metadata files instead of fetching them from GitHub at runtime (defaults to `false`).
|
|
117
|
+
- `keepVendored` (boolean):
|
|
117
118
|
Whether to keep vendored files (dependencies, etc) (defaults to `false`).
|
|
118
119
|
Does nothing when `fileContent` is set.
|
|
119
120
|
- `keepBinary` (boolean):
|
|
@@ -160,6 +161,8 @@ linguist --help
|
|
|
160
161
|
- `--quick`:
|
|
161
162
|
Whether to skip the checking of `.gitattributes` and `.gitignore` files for manual language classifications.
|
|
162
163
|
Alias for `--checkAttributes=false --checkIgnored=false --checkHeuristics=false --checkShebang=false --checkModeline=false`.
|
|
164
|
+
- `--offline`:
|
|
165
|
+
Use pre-packaged metadata files instead of fetching them from GitHub at runtime.
|
|
163
166
|
- `--keepVendored`:
|
|
164
167
|
Whether to include vendored files (auto-generated files, dependencies folder, etc).
|
|
165
168
|
- `--keepBinary`:
|