-
Notifications
You must be signed in to change notification settings - Fork 378
/
index.html
361 lines (288 loc) · 17 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!doctype html>
<head>
<meta charset="utf-8">
<link rel=stylesheet href="doc/docs.css">
<title>Tern</title>
</head>
<div id=top>
<div id=head>
<a href="https://ternjs.net" class=title>Tern: <span class=subtitle>Intelligent JavaScript tooling</span>
</a><a href="doc/demo/index.html">Demo
</a><a href="doc/manual.html">Docs
</a><a href="https://github.com/ternjs/tern">Code</a>
</div>
</div>
<p>Tern is a stand-alone <strong>code-analysis engine</strong> for
JavaScript. It is intended to be used with a <a href="#plugins">code
editor plugin</a> to enhance the editor's support for intelligent
JavaScript editing. Features provided are:</p>
<ul>
<li>Autocompletion on variables and properties
<li>Function argument hints
<li>Querying the type of an expression
<li>Finding the definition of something
<li>Automatic refactoring
</ul>
<p>Tern is open-source (<a href="LICENSE">MIT license</a>), written in
JavaScript, and capable of running both
on <a href="https://nodejs.org">node.js</a> and in
the <a href="doc/demo/index.html">browser</a>.</p>
<h2><a id="plugins"></a>Editor plugins</h2>
<p>There is currently Tern support for the following editors:</p>
<ul>
<li><a href="doc/manual.html#emacs">Emacs</a>
<li><a href="https://github.com/ternjs/tern_for_vim">Vim</a>
<li><a href="https://github.com/ternjs/tern_for_sublime">Sublime Text</a>
<li><a href="http://brackets.io/">Brackets</a> (built in to the base editor)
<li><a href="https://github.com/mortalapeman/LT-TernJS">Light Table</a>
<li><a href="https://github.com/angelozerr/tern.java">Eclipse (and general Java API)</a>
<li><a href="https://github.com/fab1an/JavaScript-Tern-Completion.tmbundle">TextMate</a>
<li><a href="https://www.sourcelair.com/">SourceLair</a> (built in to the base editor)
<li><a href="https://chocolatapp.com">Chocolat</a> (built in to the base editor)
</ul>
<p>Follow the links to find instructions on how to install the
plugins.</p>
<h2><a id="support"></a>Community and support</h2>
<p>For reporting bugs, please use
the <a href="https://github.com/ternjs/tern/issues?state=open">github
issue tracker</a>.</p>
<p>Code contributions are welcome, preferably
through <a href="https://github.com/ternjs/tern/pulls">pull
requests</a>.</p>
<h2><a id="docs"></a>Documentation</h2>
<p>The <a href="doc/manual.html">reference manual</a> should be your
first stop for figuring out how to use Tern.</p>
<p>If you are interested in the way the system works internally, take
a look at this <a href="https://marijnhaverbeke.nl/blog/tern.html">blog
post</a> or the video
of <a href="https://www.youtube.com/watch?v=wW5VbogkDQ4">the talk</a>
I gave about it at the Curry On conference.</p>
<h2><a id="releases"></a>Release history</h2>
<p class="release">27-12-2019: <a href="https://github.com/ternjs/tern/tree/0.24.3">Version 0.24.3</a></p>
<p class="release-note">Small update release that fixes crashes when spread operator in object literal</p>
<p class="release">13-10-2019: <a href="https://github.com/ternjs/tern/tree/0.24.2">Version 0.24.2</a></p>
<p class="release-note">Small update release that fixes crashes when writing catch clause</p>
<p class="release">10-07-2019: <a href="https://github.com/ternjs/tern/tree/0.24.1">Version 0.24.1</a></p>
<p class="release-note">Small update release that fixes crashes when using doc_comment plugin</p>
<p class="release">30-05-2019: <a href="https://github.com/ternjs/tern/tree/0.24.0">Version 0.24</a></p>
<ul class="release-note">
<li>Make bootstrapping of a Tern server easiert .</li>
<li>Support complete string property name in object notation.</li>
<li>Update def files for Date, DOM Node ...</li>
<li>More robust JSDoc handler</li>
<li>Fix bug where condense codes with spread operator.</li>
<li>Fix bug where rename cause object property also affected.</li>
</ul>
<p class="release">10-11-2018: <a href="https://github.com/ternjs/tern/tree/0.23.0">Version 0.23</a></p>
<ul class="release-note">
<li>Upgrade Acorn to version 6.</li>
<li>Fix some crash issues caused by ECMAScript 6 syntax.</li>
<li>Update React definition.</li>
<li>Add Clipboard API to browser definition.</li>
</ul>
<p class="release">27-09-2018: <a href="https://github.com/ternjs/tern/tree/0.22.3">Version 0.22.3</a></p>
<p class="release-note">Small update release that fixes crashes
affecting spread operator in object notation, rest operator in object pattern and export default anonymous class or function.</p>
<p class="release">28-08-2018: <a href="https://github.com/ternjs/tern/tree/0.22.0">Version 0.22</a></p>
<ul class="release-note">
<li>Support async functions and async iteration.</li>
<li>Make the base type definitions match the current standards.</li>
<li>Make sure dynamic properties don't show up when completing object literal property names.</li>
<li>Pre-emptively start analyzing on startup.</li>
<li>Fix bug where renaming a variable might rename properties in the code.</li>
</ul>
<p class="release">18-02-2017: <a href="https://github.com/ternjs/tern/tree/0.21.0">Version 0.21</a></p>
<ul class="release-note">
<li>Support JSDoc-style object property docs in <code>doc_comments</code> plugin.</li>
<li>Various fixes and completions in the type definitions.</li>
<li>Fix bug where server self-resets left old state on AST.</li>
<li>Improve and document the <code>webpack</code> plugin.</li>
<li>Fix issue where file offsets were interpreted wrong when the file contained astral plane characters.</li>
</ul>
<p class="release">16-08-2016: <a href="https://github.com/ternjs/tern/tree/0.20.0">Version 0.20</a></p>
<ul class="release-note">
<li><strong>Breaking:</strong> The <code>ecma5.json</code>
and <code>ecma6.json</code> definition files were combined
into <code>ecmascript.json</code>. If you are explicitly loading
these, for example in a web page, you'll have to update your
filenames.</li>
<li>Improved the typing of <code>Promise.resolve</code> calls</li>
<li>Support webpack config files in the webpack plugin</li>
<li>Make the Emacs mode mode robust when files are renamed</li>
<li>New option <code>inLiteral</code> in the JSON protocol to turn
off completions inside string/regexp literals</li>
<li>Define the ECMA7 <code>Array.includes</code> method</li>
</ul>
<p class="release">11-07-2016: <a href="https://github.com/ternjs/tern/tree/0.19.0">Version 0.19</a></p>
<ul class="release-note">
<li><strong>Breaking:</strong> Drops the <code>from_ts</code> utility</li>
<li>New command line flag: <code>--ignore-stdin</code> to not exit when stdin is closed</li>
<li>Fix another crash related to omitted array elements</li>
<li>Improve handling of shorthand object properties during rename</li>
</ul>
<p class="release">15-03-2016: <a href="https://github.com/ternjs/tern/tree/0.18.0">Version 0.18</a></p>
<ul class="release-note">
<li>Improve typing of <code>this</code> bindings in arrow functions</li>
<li>Fix crash when fetching the type of a module without known type</li>
<li>Fix bug in scoping of renames, which erroneously included the scope's function name</li>
<li>Full <a href="https://github.com/ternjs/tern/compare/0.17.0...0.18.0">list of patches</a></li>
</ul>
<p class="release">04-01-2016: <a href="https://github.com/ternjs/tern/tree/0.17.0">Version 0.17</a></p>
<ul class="release-note">
<li>Support <code>@class</code> and <code>@constructor</code> JSDoc directives</li>
<li>Improve completion and finding of module exports and methods</li>
<li>Server objects now have a <code>deleteDefs</code> method</li>
<li>New plugin: webpack</li>
<li>Full <a href="https://github.com/ternjs/tern/compare/0.16.0...0.17.0">list of patches</a></li>
</ul>
<p class="release">27-10-2015: <a href="https://github.com/ternjs/tern/tree/0.16.0">Version 0.16</a></p>
<ul class="release-note">
<li>Support completion of imported names and package names from <code>package.json</code></li>
<li>Allow importing non-ES6 modules using <code>import foo from "bar"</code> syntax</li>
<li>Fix several crashes</li>
<li>Small improvements to the browser and ECMA6 definitions</li>
<li>Full <a href="https://github.com/ternjs/tern/compare/0.15.0...0.16.0">list of patches</a></li>
</ul>
<p class="release">02-09-2015: <a href="https://github.com/ternjs/tern/tree/0.15.0">Version 0.15</a></p>
<ul class="release-note">
<li>Fix crash bug triggered by string/number properties in object literals</li>
<li>Fix other crash bug triggered by holes in arrays</li>
<li>Support doc comments above classes and class methods</li>
<li>Full <a href="https://github.com/ternjs/tern/compare/0.14.0...0.15.0">list of patches</a></li>
</ul>
<p class="release">31-08-2015: <a href="https://github.com/ternjs/tern/tree/0.14.0">Version 0.14</a></p>
<ul class="release-note">
<li>Support for ECMAScript 6 constructs and standard library
<ul>
<li>Block scopes and let/const bindings
<li>Destructuring and default values
<li>Tuples/heterogenously typed arrays
<li>Rest arguments
<li>Generators
<li>Symbols and symbol properties
<li>For/of iteration
<li>Classes and super calls
<li>Extended object literal notation
<li>Arrow functions
<li>Template strings
<li>All methods and types added by the ES6 spec
<li>Improved existing support for Promises
</ul>
</li>
<li>Overhauled module system for <a href="doc/manual.html#plugin_commonjs">CommonJS modules</a>, separated it from node plugin</li>
<li>Add support for <a href="doc/manual.html#plugin_es_modules">ES6 modules</a></li>
<li><a href="doc/manual.html#plugins">Plugins</a> can now have dependencies. If your setup needs to explicitly load them, adjust accordingly</li>
<li>The <code>node_exports</code> query type was renamed to <code>exports</code> (and works on ES6 modules)</li>
<li>The <a href="doc/manual.html#tern.registerPlugin"><code>registerPlugin</code></a> interface was changed. The old style (returning an object) will be supported until 1.0</li>
<li>Improved completion of module names in CommonJS and ES6 module context</li>
<li>Phantom objects were added to support <code>foo.bar.baz = 10</code> if <code>foo.bar</code> doesn't have a type</li>
<li>Fix broken handling of non-ASCII requests in the Emacs mode</li>
<li>Full <a href="https://github.com/ternjs/tern/compare/0.13.0...0.14.0">list of patches</a></li>
</ul>
<p class="release">28-07-2015: <a href="https://github.com/ternjs/tern/tree/0.13.0">Version 0.13</a></p>
<ul class="release-note">
<li>Parse input as ES6 (but ignore most ES6 constructs for now)</li>
<li>Improved type inference for promises</li>
<li>Fix another source of exponential complexity blowup</li>
<li>Complete module names in the requirejs plugin</li>
<li>Improved type guessing for overridden properties</li>
<li>Fix a bug in the Emacs mode that caused cursor jumping in some situations</li>
<li>Full <a href="https://github.com/ternjs/tern/compare/0.12.0...0.13.0">list of patches</a></li>
</ul>
<p class="release">25-06-2015: <a href="https://github.com/ternjs/tern/tree/0.12.0">Version 0.12</a></p>
<ul class="release-note">
<li>Fix another infinite recursion bug</li>
<li>Rework doc comment stripping, allow passing <code>docFormat: "full"</code>
in a query to receive full strings.</li>
<li>Add a <code>preParse</code> hook that plugins can register.</li>
<li>Prevent observed calls from 'polluting' union types from JSON definitions.</li>
<li>Full <a href="https://github.com/ternjs/tern/compare/0.11.0...0.12.0">list of patches</a></li>
</ul>
<p class="release">29-04-2015: <a href="https://github.com/ternjs/tern/tree/0.11.0">Version 0.11</a></p>
<ul class="release-note">
<li>Fix infinite recursion bug in type's <code>toString</code> methods</li>
<li>Support <code>defineProperties</code></li>
<li>Full <a href="https://github.com/ternjs/tern/compare/0.10.0...0.11.0">list of patches</a></li>
</ul>
<p class="release">25-03-2015: <a href="https://github.com/ternjs/tern/tree/0.10.0">Version 0.10</a></p>
<ul class="release-note">
<li>Fix a problem where the existence of an incompatible Acorn 1.0.0 on NPM breaks new installs</li>
<li>Solve another infinitely-expanding-graph bug</li>
<li>Rewrite type parser (for .json definitions) to be more predictable</li>
<li>Full <a href="https://github.com/ternjs/tern/compare/0.9.0...0.10.0">list of patches</a></li>
</ul>
<p class="release">02-03-2015: <a href="https://github.com/ternjs/tern/tree/0.9.0">Version 0.9</a></p>
<ul class="release-note">
<li>Add support for union types. The strings for types will now
often contain <code>|</code> characters separating alternatives.
Such types are also allowed in JSDoc comments.</li>
<li>Add rough ECMAScript 6 type
definition, which adds some new variables and properties from ES6.
(note that this is still a far way off from real ES6 support.)</li>
<li>Various small bugfixes (<a href="https://github.com/ternjs/tern/compare/0.8.0...0.9.0">full list of patches</a>)</li>
</ul>
<p class="release">13-01-2015: <a href="https://github.com/ternjs/tern/tree/0.8.0">Version 0.8</a></p>
<ul class="release-note">
<li>Support <code>@self</code> and <code>@typedef</code> in doc_comments plugin</li>
<li>Improved purging of stale properties on file reload</li>
<li>Much improved completion of properties in object literals</li>
<li>Added <code>fullDocs</code> option to retrieve entire doc comment blocks</li>
<li>Improved support for <code>defineProperty</code> and getter/setter properties</li>
<li>Support deleting files through requests to the server</li>
<li>Support <code>module</code> object in RequireJS's simplified CommonJS mode</li>
<li>Various small bugfixes (<a href="https://github.com/ternjs/tern/compare/0.7.0...0.8.0">full list of patches</a>)</li>
</ul>
<p class="release">14-08-2014: <a href="https://github.com/ternjs/tern/tree/0.7.0">Version 0.7</a></p>
<ul class="release-note">
<li>Further refinements of the RequireJS plugin's path resolution</li>
<li>Add <code>isKeyword</code> and <code>isProperty</code> fields to completion query JSON responses</li>
<li>Various small bugfixes (<a href="https://github.com/ternjs/tern/compare/0.6.2...0.7.0">full list of patches</a>)</li>
</ul>
<p class="release">06-06-2014: <a href="https://github.com/ternjs/tern/tree/0.6.2">Version 0.6.2</a></p>
<p class="release-note">Small update release that fixes a crash
affecting asynchronous loading of files.</p>
<p class="release">06-06-2014: <a href="https://github.com/ternjs/tern/tree/0.6.0">Version 0.6</a></p>
<ul class="release-note">
<li>Solves overload from pulling in huge dependency trees</li>
<li>Fixes various issues with stale information sticking around after file reload</li>
<li>Add support for a <code>~/.tern-config</code> default <a href="doc/manual.html#project_file">config file</a></li>
<li>Support a <a href="doc/manual.html#protocol"><code>timeout</code></a> field in requests, to limit their running time</li>
<li>Make it possible to load <a href="doc/manual.html#plugin_third_party">plugins</a> installed with <code>npm</code></li>
<li>Lots of small bugfixes (<a href="https://github.com/ternjs/tern/compare/0.5.0...0.6.0">full list of patches</a>)</li>
</ul>
<p class="release">10-10-2013: <a href="https://github.com/ternjs/tern/tree/0.5.0">Version 0.5</a></p>
<ul class="release-note">
<li>Improvements to the node plugin.</li>
<li>Experimental <a href="doc/manual.html#plugin_angular">Angular.js plugin</a>.</li>
<li>Rewrite of the <a href="doc/manual.html#condense"><code>condense</code></a> tool, tests added.</li>
<li>Better handling of “global” <code>this</code> in non-method calls.</li>
<li>Support <code>Array.<content></code>
and <code>Object.<key,value></code>-style types in
the <a href="doc/manual.html#plugin_doc_comment">doc_comment
plugin</a>.</li>
</ul>
<p class="release">12-08-2013: <a href="https://github.com/ternjs/tern/tree/0.4.0">Version 0.4</a></p>
<ul class="release-note">
<li>Several fixes for exponential running time on some inputs.</li>
<li>New IDO completion frontend for the Emacs mode.</li>
<li>Add missing <code>buffer</code> and <code>timers</code> modules to node plugin.</li>
<li>A few fixes to the <code>bin/condense</code> tool.
</ul>
<p class="release">10-07-2013: <a href="https://github.com/ternjs/tern/tree/0.3.0">Version 0.3</a></p>
<ul class="release-note">
<li>Better <code>this</code> handling.</li>
<li>Added underscore definition file.</li>
<li>Improved dependency resolution in node plugin.</li>
<li><code>node_exports</code> query type added.</li>
<li>Glob patterns in <code>loadEagerly</code>/<code>dontLoad</code> settings.</li>
</ul>
<p class="release">11-06-2013: <a href="https://github.com/ternjs/tern/tree/0.2.0">Version 0.2</a></p>
<ul class="release-note">
<li>Make the codebase Windows-safe.</li>
<li>Improved handling of large codebases.</li>
<li>Move comment parsing logic into a plugin (<code>doc_comment</code>).</li>
<li>Many bugfixes.</li>
</ul>
<p class="release">03-05-2013: <a href="https://github.com/ternjs/tern/tree/0.1.0">Version 0.1</a></p>
<p class="release-note">First numbered release. Should be considered
beta status, but usable enough to test.</p>