Skip to content

Commit

Permalink
deps: Upgrade and move underscore.js from static/third to npm
Browse files Browse the repository at this point in the history
- Remove `underscore.js` from `static/third` and fetch it from `npm`.
- Upgrade `underscore.js` to 1.8.3.
- Bump up the `PROVISION_VERSION` to 4.2.

Part of zulip#1709
  • Loading branch information
refeed authored and timabbott committed Jan 20, 2017
1 parent 911fcd3 commit 84e8024
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 1,562 deletions.
5 changes: 0 additions & 5 deletions docs/THIRDPARTY
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,6 @@ Files: static/third/spectrum/*
Copyright: 2013 Brian Grinstead
License: Expat

Files: static/third/underscore/underscore.js
Copyright: 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
License: Expat
Comment: https://github.com/jashkenas/underscore/blob/master/LICENSE

Files: static/third/xdate/*
Copyright: 2010 C. F., Wong
License: Expat
Expand Down
3 changes: 1 addition & 2 deletions docs/testing-with-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ For all the modules where you want to run actual code, add a statement
like the following to the top of your test file:

> add_dependencies({
> _: 'third/underscore/underscore.js',
> _: 'node_modules/underscore/underscore.js',
> util: 'js/util.js',
> Dict: 'js/dict.js',
> Handlebars: 'handlebars',
Expand Down Expand Up @@ -165,4 +165,3 @@ asserts, the *actual* value comes first, the *expected* value second.
The test runner (`index.js`) automatically runs all .js files in the
frontend\_tests/node directory.

2 changes: 1 addition & 1 deletion frontend_tests/node_tests/message_list_view.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _ = require('third/underscore/underscore.js');
var _ = require('node_modules/underscore/underscore.js');
var MessageListView = require('js/message_list_view.js');

add_dependencies({
Expand Down
2 changes: 1 addition & 1 deletion frontend_tests/zjsunit/finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var finder = (function () {

var exports = {};

var _ = require('third/underscore/underscore.js');
var _ = require('node_modules/underscore/underscore.js');
var fs = require('fs');
var path = require('path');

Expand Down
2 changes: 1 addition & 1 deletion frontend_tests/zjsunit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ global.assert = require('assert');
require('node_modules/string.prototype.codepointat/codepointat.js');

global.Dict = require('js/dict');
global._ = require('third/underscore/underscore.js');
global._ = require('node_modules/underscore/underscore.js');
var _ = global._;

// Find the files we need to run.
Expand Down
2 changes: 1 addition & 1 deletion frontend_tests/zjsunit/namespace.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var namespace = (function () {

var _ = require('third/underscore/underscore.js');
var _ = require('node_modules/underscore/underscore.js');
var exports = {};

var dependencies = [];
Expand Down
2 changes: 1 addition & 1 deletion frontend_tests/zjsunit/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var render = (function () {
var exports = {};

var fs = require('fs');
var _ = require('third/underscore/underscore.js');
var _ = require('node_modules/underscore/underscore.js');
var Handlebars = require('handlebars');

function template_dir() {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"jquery-validation": "1.15.1",
"plotly.js": "1.19.2",
"string.prototype.codepointat": "0.2.0",
"underscore": "1.8.3",
"webpack": "1.12.2",
"winchan": "0.2.0",
"zxcvbn": "4.4.1"
Expand Down
Loading

0 comments on commit 84e8024

Please sign in to comment.