Просмотр исходного кода

Merge branch 'master' into feat/page-editor-with-react

Yuki Takei 8 лет назад
Родитель
Сommit
508f968ff1
6 измененных файлов с 243 добавлено и 214 удалено
  1. 9 0
      CHANGES.md
  2. 4 2
      lib/models/user.js
  3. 6 3
      lib/util/search.js
  4. 3 3
      package.json
  5. 1 1
      resource/js/util/CrowiRenderer.js
  6. 220 205
      yarn.lock

+ 9 - 0
CHANGES.md

@@ -1,10 +1,19 @@
 CHANGES
 CHANGES
 ========
 ========
 
 
+## 2.3.4-RC
+
+* Support: Switch and upgrade libs
+    * 8fold-marked -> marked
+    * react-bootstrap
+    * etc..
+
 ## 2.3.3
 ## 2.3.3
 
 
 * Fix: The XSS Library escapes inline code blocks
 * Fix: The XSS Library escapes inline code blocks
     * Degraded by 2.3.0
     * Degraded by 2.3.0
+* Fix: NPE occurs on Elasticsearch when initial access
+* Fix: Couldn't invite users(failed to create)
 
 
 ## 2.3.2
 ## 2.3.2
 
 

+ 4 - 2
lib/models/user.js

@@ -587,7 +587,7 @@ module.exports = function(crowi) {
       emailList,
       emailList,
       function(email, next) {
       function(email, next) {
         var newUser = new User()
         var newUser = new User()
-          ,password;
+          ,tmpUsername, password;
 
 
         email = email.trim();
         email = email.trim();
 
 
@@ -605,8 +605,10 @@ module.exports = function(crowi) {
             return next();
             return next();
           }
           }
 
 
+          tmpUsername = 'temp_' + Math.random().toString(36).slice(-16);
           password = Math.random().toString(36).slice(-16);
           password = Math.random().toString(36).slice(-16);
 
 
+          newUser.username = tmpUsername;
           newUser.email = email;
           newUser.email = email;
           newUser.setPassword(password);
           newUser.setPassword(password);
           newUser.createdAt = Date.now();
           newUser.createdAt = Date.now();
@@ -619,7 +621,7 @@ module.exports = function(crowi) {
                 password: null,
                 password: null,
                 user: null,
                 user: null,
               });
               });
-              debug('save failed!! ', email);
+              debug('save failed!! ', err);
             } else {
             } else {
               createdUserList.push({
               createdUserList.push({
                 email: email,
                 email: email,

+ 6 - 3
lib/util/search.js

@@ -207,13 +207,10 @@ SearchClient.prototype.deletePages = function(pages)
 SearchClient.prototype.addAllPages = function()
 SearchClient.prototype.addAllPages = function()
 {
 {
   var self = this;
   var self = this;
-  var offset = 0;
   var Page = this.crowi.model('Page');
   var Page = this.crowi.model('Page');
   var cursor = Page.getStreamOfFindAll();
   var cursor = Page.getStreamOfFindAll();
   var body = [];
   var body = [];
 
 
-  var counter = 0;
-
   return new Promise(function(resolve, reject) {
   return new Promise(function(resolve, reject) {
     cursor.on('data', function (doc) {
     cursor.on('data', function (doc) {
       if (!doc.creator || !doc.revision || !self.shouldIndexed(doc)) {
       if (!doc.creator || !doc.revision || !self.shouldIndexed(doc)) {
@@ -228,6 +225,12 @@ SearchClient.prototype.addAllPages = function()
     }).on('close', function () {
     }).on('close', function () {
       // all done
       // all done
 
 
+      // return if body is empty
+      // see: https://github.com/weseek/crowi-plus/issues/228
+      if (body.length == 0) {
+        return resolve();
+      }
+
       // 最後に送信
       // 最後に送信
       self.client.bulk({
       self.client.bulk({
         body: body,
         body: body,

+ 3 - 3
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "crowi-plus",
   "name": "crowi-plus",
-  "version": "2.3.2-RC",
+  "version": "2.3.4-RC",
   "description": "Enhanced Crowi",
   "description": "Enhanced Crowi",
   "tags": [
   "tags": [
     "wiki",
     "wiki",
@@ -47,7 +47,6 @@
     "webpack": "webpack"
     "webpack": "webpack"
   },
   },
   "dependencies": {
   "dependencies": {
-    "8fold-marked": "^0.3.7",
     "@slack/client": "^3.14.0",
     "@slack/client": "^3.14.0",
     "assets-webpack-plugin": "~3.5.1",
     "assets-webpack-plugin": "~3.5.1",
     "async": "^2.3.0",
     "async": "^2.3.0",
@@ -94,6 +93,7 @@
     "inline-attachment": "~2.0.3",
     "inline-attachment": "~2.0.3",
     "jquery-ui": "^1.12.1",
     "jquery-ui": "^1.12.1",
     "jquery.cookie": "~1.4.1",
     "jquery.cookie": "~1.4.1",
+    "marked": "^0.3.12",
     "md5": "^2.2.1",
     "md5": "^2.2.1",
     "method-override": "^2.3.10",
     "method-override": "^2.3.10",
     "mkdirp": "~0.5.1",
     "mkdirp": "~0.5.1",
@@ -112,7 +112,7 @@
     "pino-clf": "^1.0.2",
     "pino-clf": "^1.0.2",
     "plantuml-encoder": "^1.2.4",
     "plantuml-encoder": "^1.2.4",
     "react": "^16.0.0",
     "react": "^16.0.0",
-    "react-bootstrap": "^0.31.3",
+    "react-bootstrap": "^0.32.0",
     "react-bootstrap-typeahead": "^2.0.2",
     "react-bootstrap-typeahead": "^2.0.2",
     "react-clipboard.js": "^1.1.2",
     "react-clipboard.js": "^1.1.2",
     "react-codemirror2": "^3.0.7",
     "react-codemirror2": "^3.0.7",

+ 1 - 1
resource/js/util/CrowiRenderer.js

@@ -1,4 +1,4 @@
-import marked from '8fold-marked';
+import marked from 'marked';
 import hljs from 'highlight.js';
 import hljs from 'highlight.js';
 import * as entities from 'entities';
 import * as entities from 'entities';
 
 

Разница между файлами не показана из-за своего большого размера
+ 220 - 205
yarn.lock


Некоторые файлы не были показаны из-за большого количества измененных файлов