[Groonga-commit] groonga/groonga-admin at de76c1b [master] Fix breaking changes about connect.static

Back to archive index
Kentaro Hayashi null+****@clear*****
Sun Feb 24 12:07:40 JST 2019


Kentaro Hayashi	2019-02-24 12:07:40 +0900 (Sun, 24 Feb 2019)

  Revision: de76c1baec576ff44a209b0aa7d0ac1bf22bf247
  https://github.com/groonga/groonga-admin/commit/de76c1baec576ff44a209b0aa7d0ac1bf22bf247

  Merged 349c722: Merge pull request #15 from groonga/fix-vulnerabilities

  Message:
    Fix breaking changes about connect.static
    
    Since grunt-contrib-connect depends on connect 3, connect.static is
    now no longer available. We use serve-static instead.
    
      ref. https://github.com/gruntjs/grunt-contrib-connect#roll-your-own

  Modified files:
    Gruntfile.js
    package.json

  Modified: Gruntfile.js (+8 -7)
===================================================================
--- Gruntfile.js    2019-02-24 11:25:01 +0900 (469cce2)
+++ Gruntfile.js    2019-02-24 12:07:40 +0900 (1c77771)
@@ -2,6 +2,7 @@
 'use strict';
 
 var shell = require('shelljs');
+var serveStatic = require('serve-static');
 
 // # Globbing
 // for performance reasons we're only matching one level down:
@@ -92,12 +93,12 @@ module.exports = function (grunt) {
           middleware: function (connect) {
             return [
               require('grunt-connect-proxy/lib/utils').proxyRequest,
-              connect.static('.tmp'),
+              serveStatic('.tmp'),
               connect().use(
                 '/bower_components',
-                connect.static('./bower_components')
+                serveStatic('./bower_components')
               ),
-              connect.static(appConfig.app)
+              serveStatic(appConfig.app)
             ];
           }
         }
@@ -107,13 +108,13 @@ module.exports = function (grunt) {
           port: 9001,
           middleware: function (connect) {
             return [
-              connect.static('.tmp'),
-              connect.static('test'),
+              serveStatic('.tmp'),
+              serveStatic('test'),
               connect().use(
                 '/bower_components',
-                connect.static('./bower_components')
+                serveStatic('./bower_components')
               ),
-              connect.static(appConfig.app)
+              serveStatic(appConfig.app)
             ];
           }
         }

  Modified: package.json (+1 -0)
===================================================================
--- package.json    2019-02-24 11:25:01 +0900 (868917f)
+++ package.json    2019-02-24 12:07:40 +0900 (200e121)
@@ -42,6 +42,7 @@
     "grunt-wiredep": "^3.0.1",
     "jshint-stylish": "^0.2.0",
     "load-grunt-tasks": "^4.0.0",
+    "serve-static": "^1.13.2",
     "shelljs": "^0.3.0",
     "time-grunt": "^0.3.1"
   },
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190224/eb53bbf8/attachment-0003.html>


More information about the Groonga-commit mailing list
Back to archive index