Skip to content

Commit fa2c1f8

Browse files
authored
Merge pull request #2834 from jashkenas/prepare-1.10
Prepare 1.10 release (WIP)
2 parents 6b09e0e + e8da73c commit fa2c1f8

6 files changed

Lines changed: 65 additions & 17 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative
1+
Copyright (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative
22
Reporters & Editors
33

44
Permission is hereby granted, free of charge, to any person

index.html

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
<div id="sidebar" class="interface">
184184

185185
<a class="toc_title" href="#">
186-
Underscore.js <span class="version">(1.9.2)</span>
186+
Underscore.js <span class="version">(1.10.0)</span>
187187
</a>
188188
<ul class="toc_section">
189189
<li>&raquo; <a href="https://github.com/jashkenas/underscore">GitHub Repository</a></li>
@@ -441,13 +441,16 @@ <h2>Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and u
441441

442442
<table>
443443
<tr>
444-
<td><a href="underscore.js">Development Version (1.9.2)</a></td>
445-
<td><i>60kb, Uncompressed with Plentiful Comments</i></td>
444+
<td><a href="underscore.js">Development Version (1.10.0)</a></td>
445+
<td>
446+
<i>60kb, Uncompressed with Plentiful Comments</i>
447+
&nbsp;<small>(<a href="underscore.js.map">Source Map</a>)</small>
448+
</td>
446449
</tr>
447450
<tr>
448-
<td><a href="underscore-min.js">Production Version (1.9.2)</a></td>
451+
<td><a href="underscore-min.js">Production Version (1.10.0)</a></td>
449452
<td>
450-
<i>6.5kb, Minified and Gzipped</i>
453+
<i>6.78kb, Minified and Gzipped</i>
451454
&nbsp;<small>(<a href="underscore-min.js.map">Source Map</a>)</small>
452455
</td>
453456
</tr>
@@ -476,7 +479,13 @@ <h2>Installation</h2>
476479
<b>Bower</b> <tt>bower install underscore</tt>
477480
</li>
478481
<li>
479-
<b>Component</b> <tt>component install jashkenas/underscore</tt>
482+
<b>ExtendScript</b> <tt>#include "underscore.js"</tt>
483+
</li>
484+
<li>
485+
<b>Rollup</b> If you want to enable treeshaking and you don&rsquo;t
486+
need the full <tt>_</tt> object (with all Underscore functions as
487+
properties), you can import individual functions by name from
488+
<tt>underscore/modules/index</tt> instead of <tt>underscore</tt>.
480489
</li>
481490
</ul>
482491

@@ -1950,12 +1959,15 @@ <h2 id="utility">Utility Functions</h2>
19501959
<p id="noConflict">
19511960
<b class="header">noConflict</b><code>_.noConflict()</code>
19521961
<br />
1953-
Give control of the <tt>_</tt> variable back to its previous owner. Returns
1954-
a reference to the <b>Underscore</b> object.
1962+
Give control of the global <tt>_</tt> variable back to its previous
1963+
owner. Returns a reference to the <b>Underscore</b> object.
19551964
</p>
19561965
<pre>
19571966
var underscore = _.noConflict();
19581967
</pre>
1968+
<p>
1969+
The <tt>_.noConflict</tt> function is not present if you use the EcmaScript 6, AMD or CommonJS module system to import Underscore.
1970+
</p>
19591971

19601972
<p id="identity">
19611973
<b class="header">identity</b><code>_.identity(value)</code>
@@ -2392,8 +2404,39 @@ <h2 id="links">Links &amp; Suggested Reading</h2>
23922404

23932405
<h2 id="changelog">Change Log</h2>
23942406

2407+
<p id="1.10.0">
2408+
<b class="header">1.10.0</b> &mdash; <!--TODO: date--> &mdash; <a href="https://github.com/jashkenas/underscore/compare/1.9.2...1.10.0">Diff</a> &mdash; <a href="https://cdn.rawgit.com/jashkenas/underscore/1.10.0/index.html">Docs</a><br />
2409+
<ul>
2410+
<li>
2411+
Explicitly states in the documentation, and verifies in the
2412+
unittests, that <tt>_.sortedIndex(array, value)</tt> always returns
2413+
the lower bound, i.e., the smallest index, at which <tt>value</tt>
2414+
may be inserted in <tt>array</tt>.
2415+
</li>
2416+
<li>
2417+
Makes the notation of the <tt>_.max</tt> unittest consistent with
2418+
other unittests.
2419+
</li>
2420+
<li>
2421+
Fixes a bug that would cause infinite recursion if an overridden
2422+
implementation of <tt>_.iteratee</tt> attempted to fall back to the
2423+
original implementation.
2424+
</li>
2425+
<li>
2426+
Restores compatibility with EcmaScript 3 and ExtendScript.
2427+
</li>
2428+
<li>
2429+
Reformats the source code to use EcmaScript 6 <tt>export</tt>
2430+
notation. The <tt>underscore.js</tt> UMD bundle is now <i>compiled
2431+
from</i> underlying source modules instead of <i>being</i> the
2432+
source. From now on, Rollup users have the option to import from
2433+
the underlying source module in order to enable treeshaking.
2434+
</li>
2435+
</ul>
2436+
</p>
2437+
23952438
<p id="1.9.2">
2396-
<b class="header">1.9.2</b> &mdash; <small><i>Jan 6, 2020</i></small> &mdash; <a href="https://github.com/jashkenas/underscore/compare/1.9.1...1.9.2">Diff</a> &mdash; <a href="https://cdn.rawgit.com/jashkenas/underscore/1.9.1/index.html">Docs</a><br />
2439+
<b class="header">1.9.2</b> &mdash; <small><i>Jan 6, 2020</i></small> &mdash; <a href="https://github.com/jashkenas/underscore/compare/1.9.1...1.9.2">Diff</a> &mdash; <a href="https://cdn.rawgit.com/jashkenas/underscore/1.9.2/index.html">Docs</a><br />
23972440
<ul>
23982441
<li>
23992442
No code changes. Updated a test to help out
@@ -2444,6 +2487,10 @@ <h2 id="changelog">Change Log</h2>
24442487
Adds support for several environments including: WebWorkers,
24452488
browserify and ES6 imports.
24462489
</li>
2490+
<li>
2491+
Removes the <tt>component.json</tt> as the Component package
2492+
management system is discontinued.
2493+
</li>
24472494
<li>
24482495
The placeholder used for partial is now configurable by setting
24492496
<code>_.partial.placeholder</code>.

modules/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Underscore.js 1.9.2
1+
// Underscore.js 1.10.0
22
// https://underscorejs.org
3-
// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3+
// (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
44
// Underscore may be freely distributed under the MIT license.
55

66
// Baseline setup
@@ -46,7 +46,7 @@ export default function _(obj) {
4646
}
4747

4848
// Current version.
49-
export var VERSION = _.VERSION = '1.9.2';
49+
export var VERSION = _.VERSION = '1.10.0';
5050

5151
// Internal function that returns an efficient (for current engines) version
5252
// of the passed-in callback, to be repeatedly applied in other Underscore

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"license": "MIT",
5454
"files": [
5555
"underscore.js",
56+
"underscore.js.map",
5657
"underscore-min.js",
5758
"underscore-min.js.map",
5859
"modules/"

underscore.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)