linguist-js 2.4.2 → 2.5.0
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 +34 -22
- package/dist/types.d.ts +1 -0
- package/ext/documentation.yml +17 -0
- package/ext/generated.rb +351 -0
- package/ext/heuristics.yml +669 -0
- package/ext/languages.yml +7480 -0
- package/ext/vendor.yml +165 -0
- package/package.json +8 -5
- package/readme.md +5 -1
package/ext/vendor.yml
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
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$
|
package/package.json
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linguist-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
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 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.2.0",
|
|
41
44
|
"common-path-prefix": "^3.0.0",
|
|
42
45
|
"cross-fetch": "^3.1.5",
|
|
43
46
|
"ignore": "^5.2.0",
|
|
@@ -50,6 +53,6 @@
|
|
|
50
53
|
"@types/js-yaml": "ts4.6",
|
|
51
54
|
"@types/node": "ts4.6",
|
|
52
55
|
"deep-object-diff": "^1.1.7",
|
|
53
|
-
"typescript": "~4.6.
|
|
56
|
+
"typescript": "~4.6.4"
|
|
54
57
|
}
|
|
55
58
|
}
|
package/readme.md
CHANGED
|
@@ -113,7 +113,9 @@ const { files, languages, unknown } = linguist(folder, options);
|
|
|
113
113
|
- `quick` (boolean):
|
|
114
114
|
Whether to skip complex language analysis such as the checking of heuristics and gitattributes statements (defaults to `false`).
|
|
115
115
|
Alias for `checkAttributes:false, checkIgnored:false, checkHeuristics:false, checkShebang:false, checkModeline:false`.
|
|
116
|
-
- `
|
|
116
|
+
- `offline` (boolean):
|
|
117
|
+
Whether to use pre-packaged metadata files instead of fetching them from GitHub at runtime (defaults to `false`).
|
|
118
|
+
- `keepVendored` (boolean):
|
|
117
119
|
Whether to keep vendored files (dependencies, etc) (defaults to `false`).
|
|
118
120
|
Does nothing when `fileContent` is set.
|
|
119
121
|
- `keepBinary` (boolean):
|
|
@@ -160,6 +162,8 @@ linguist --help
|
|
|
160
162
|
- `--quick`:
|
|
161
163
|
Whether to skip the checking of `.gitattributes` and `.gitignore` files for manual language classifications.
|
|
162
164
|
Alias for `--checkAttributes=false --checkIgnored=false --checkHeuristics=false --checkShebang=false --checkModeline=false`.
|
|
165
|
+
- `--offline`:
|
|
166
|
+
Use pre-packaged metadata files instead of fetching them from GitHub at runtime.
|
|
163
167
|
- `--keepVendored`:
|
|
164
168
|
Whether to include vendored files (auto-generated files, dependencies folder, etc).
|
|
165
169
|
- `--keepBinary`:
|