You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2017/02/10 11:58:26 UTC
fauxton commit: updated refs/heads/master to 7e7e774
Repository: couchdb-fauxton
Updated Branches:
refs/heads/master 6a5ab79af -> 7e7e774e5
lodash updates switching from _.contains to _.includes
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/7e7e774e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/7e7e774e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/7e7e774e
Branch: refs/heads/master
Commit: 7e7e774e5f4ceafce80bf55554f376cac277ca04
Parents: 6a5ab79
Author: Ryan Millay <ry...@gmail.com>
Authored: Thu Feb 9 16:08:49 2017 -0500
Committer: Garren Smith <ga...@gmail.com>
Committed: Fri Feb 10 06:57:56 2017 -0500
----------------------------------------------------------------------
app/addons/components/components/codeeditor.js | 2 +-
app/addons/documents/changes/stores.js | 2 +-
app/addons/documents/index-editor/stores.js | 2 +-
app/addons/documents/index-results/stores.js | 8 ++++----
app/addons/fauxton/notifications/stores.js | 4 ++--
app/addons/replication/api.js | 2 +-
app/addons/replication/components/newreplication.js | 2 +-
app/addons/replication/stores.js | 4 ++--
index.js | 2 +-
tasks/fauxton.js | 4 ++--
10 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/app/addons/components/components/codeeditor.js
----------------------------------------------------------------------
diff --git a/app/addons/components/components/codeeditor.js b/app/addons/components/components/codeeditor.js
index 8a0680e..893826b 100644
--- a/app/addons/components/components/codeeditor.js
+++ b/app/addons/components/components/codeeditor.js
@@ -192,7 +192,7 @@ export const CodeEditor = React.createClass({
},
isIgnorableError (msg) {
- return _.contains(this.props.ignorableErrors, msg);
+ return _.includes(this.props.ignorableErrors, msg);
},
removeIgnorableAnnotations () {
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/app/addons/documents/changes/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/changes/stores.js b/app/addons/documents/changes/stores.js
index 05a6a3b..8d3272e 100644
--- a/app/addons/documents/changes/stores.js
+++ b/app/addons/documents/changes/stores.js
@@ -103,7 +103,7 @@ var ChangesStore = FauxtonAPI.Store.extend({
},
hasFilter: function (filter) {
- return _.contains(this._filters, filter);
+ return _.includes(this._filters, filter);
},
getDatabaseName: function () {
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/app/addons/documents/index-editor/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-editor/stores.js b/app/addons/documents/index-editor/stores.js
index b327d74..fb68204 100644
--- a/app/addons/documents/index-editor/stores.js
+++ b/app/addons/documents/index-editor/stores.js
@@ -126,7 +126,7 @@ Stores.IndexEditorStore = FauxtonAPI.Store.extend({
if (!this.hasReduce()) {
return false;
}
- return !_.contains(this.builtInReduces(), this.getReduce());
+ return !_.includes(this.builtInReduces(), this.getReduce());
},
hasReduce: function () {
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/app/addons/documents/index-results/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-results/stores.js b/app/addons/documents/index-results/stores.js
index 3348e79..eb1856f 100644
--- a/app/addons/documents/index-results/stores.js
+++ b/app/addons/documents/index-results/stores.js
@@ -460,11 +460,11 @@ Stores.IndexResultsStore = FauxtonAPI.Store.extend({
shownCount = _.uniq(this._tableViewSelectedFields).length;
allFieldCount = this._tableSchema.length;
- if (_.contains(this._tableSchema, '_id', '_rev')) {
+ if (_.includes(this._tableSchema, '_id', '_rev')) {
allFieldCount = allFieldCount - 1;
}
- if (_.contains(this._tableSchema, '_id', '_rev')) {
+ if (_.includes(this._tableSchema, '_id', '_rev')) {
shownCount = shownCount + 1;
}
@@ -606,7 +606,7 @@ Stores.IndexResultsStore = FauxtonAPI.Store.extend({
},
getHasMetadata: function (schema) {
- return _.contains(schema, '_id', '_rev');
+ return _.includes(schema, '_id', '_rev');
},
hasBulkDeletableDoc: function (docs) {
@@ -703,7 +703,7 @@ Stores.IndexResultsStore = FauxtonAPI.Store.extend({
return;
}
- if (!_.contains(selected, doc.id)) {
+ if (!_.includes(selected, doc.id)) {
foundAllOnThisPage = false;
}
}.bind(this));
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/app/addons/fauxton/notifications/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/notifications/stores.js b/app/addons/fauxton/notifications/stores.js
index f99fd27..5c634ab 100644
--- a/app/addons/fauxton/notifications/stores.js
+++ b/app/addons/fauxton/notifications/stores.js
@@ -48,7 +48,7 @@ Stores.NotificationStore = FauxtonAPI.Store.extend({
},
addNotification: function (info) {
- if (_.isEmpty(info.type) || !_.contains(validNotificationTypes, info.type)) {
+ if (_.isEmpty(info.type) || !_.includes(validNotificationTypes, info.type)) {
console.warn('Invalid message type: ', info);
return;
}
@@ -108,7 +108,7 @@ Stores.NotificationStore = FauxtonAPI.Store.extend({
},
setNotificationFilter: function (filter) {
- if ((_.isEmpty(filter) || !_.contains(validNotificationTypes, filter)) && filter !== 'all') {
+ if ((_.isEmpty(filter) || !_.includes(validNotificationTypes, filter)) && filter !== 'all') {
console.warn('Invalid notification filter: ', filter);
return;
}
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/app/addons/replication/api.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/api.js b/app/addons/replication/api.js
index 4e969cb..e5ccce0 100644
--- a/app/addons/replication/api.js
+++ b/app/addons/replication/api.js
@@ -84,7 +84,7 @@ export const getTarget = ({replicationTarget, localTarget, remoteTarget, replica
};
export const createTarget = (replicationTarget) => {
- if (_.contains([
+ if (_.includes([
Constants.REPLICATION_TARGET.NEW_LOCAL_DATABASE,
Constants.REPLICATION_TARGET.NEW_REMOTE_DATABASE],
replicationTarget)) {
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/app/addons/replication/components/newreplication.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/components/newreplication.js b/app/addons/replication/components/newreplication.js
index 1ad7680..075898d 100644
--- a/app/addons/replication/components/newreplication.js
+++ b/app/addons/replication/components/newreplication.js
@@ -91,7 +91,7 @@ export default class NewReplicationController extends React.Component {
databases
} = this.props;
- if (replicationTarget === Constants.REPLICATION_TARGET.NEW_LOCAL_DATABASE && _.contains(databases, localTarget)) {
+ if (replicationTarget === Constants.REPLICATION_TARGET.NEW_LOCAL_DATABASE && _.includes(databases, localTarget)) {
FauxtonAPI.addNotification({
msg: 'The <code>' + localTarget + '</code> database already exists locally. Please enter another database name.',
type: 'error',
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/app/addons/replication/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/stores.js b/app/addons/replication/stores.js
index 26376d2..715ea23 100644
--- a/app/addons/replication/stores.js
+++ b/app/addons/replication/stores.js
@@ -119,11 +119,11 @@ const ReplicationStore = FauxtonAPI.Store.extend({
},
isLocalSourceKnown () {
- return _.contains(this._databases, this._localSource);
+ return _.includes(this._databases, this._localSource);
},
isLocalTargetKnown () {
- return _.contains(this._databases, this._localTarget);
+ return _.includes(this._databases, this._localTarget);
},
getReplicationTarget () {
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/index.js
----------------------------------------------------------------------
diff --git a/index.js b/index.js
index c50506f..9896100 100644
--- a/index.js
+++ b/index.js
@@ -31,7 +31,7 @@ module.exports = function (options) {
var fileTypes = ['.js', '.css', '.png', '.swf', '.eot', '.woff', '.svg', '.ttf', '.swf'];
function isFile (url) {
- return _.contains(fileTypes, path.extname(url));
+ return _.includes(fileTypes, path.extname(url));
}
// create proxy to couch for all couch requests
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7e7e774e/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 5b03b03..3fbad30 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -222,7 +222,7 @@ module.exports = function (grunt) {
if (_.has(testBlacklist, addon.name) && _.isArray(testBlacklist[addon.name]) && testBlacklist[addon.name].length > 0) {
// a '*' means the user wants to blacklist all tests in the addon
- if (_.contains(testBlacklist[addon.name], '*')) {
+ if (_.includes(testBlacklist[addon.name], '*')) {
return;
}
@@ -230,7 +230,7 @@ module.exports = function (grunt) {
addonFolders.push(addonTestsFolder);
_.each(fs.readdirSync(addonTestsFolder), function (file) {
- if (_.contains(testBlacklist[addon.name], file)) {
+ if (_.includes(testBlacklist[addon.name], file)) {
// the relative path is added to work around an oddity with nightwatch. It evaluates all exclude paths
// relative to the current src_folder being examined, so we need to return to the root first
excludeTests.push('../../../../../' + addonTestsFolder + '/' + file);