Skip to content

Commit

Permalink
fix(server): use flatted for json.stringify
Browse files Browse the repository at this point in the history
Remove json3 dep and use, probably was needed for older node code.
Fixes #3215
  • Loading branch information
johnjbarton committed Nov 26, 2018
1 parent 30ff73b commit 7a084e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const spawn = require('child_process').spawn
const tmp = require('tmp')
const fs = require('fs')
const path = require('path')
const {stringify} = require('flatted/cjs')

const BundleUtils = require('./utils/bundle-utils')
const NetUtils = require('./utils/net-utils')
const root = global || window || this
Expand Down Expand Up @@ -63,7 +65,7 @@ class Server extends KarmaEventEmitter {

const config = cfg.parseConfig(cliOptions.configFile, cliOptions)

this.log.debug('Final config', JSON.stringify(config, null, 2))
this.log.debug('Final config', stringify(config, null, 2))

let modules = [{
helper: ['value', helper],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@
"eslint-plugin-promise": "^3.4.2",
"eslint-plugin-react": "^7.0.1",
"eslint-plugin-standard": "^3.0.1",
"flatted": "^2.0.0",
"grunt": "^1.0.0",
"grunt-auto-release": "^0.0.7",
"grunt-browserify": "^5.0.0",
Expand All @@ -428,7 +429,6 @@
"http2": "^3.3.6",
"husky": "^0.14.3",
"jasmine-core": "^2.3.4",
"json3": "^3.3.2",
"karma-browserify": "^5.0.1",
"karma-browserstack-launcher": "^1.0.0",
"karma-chai": "^0.1.0",
Expand Down
1 change: 0 additions & 1 deletion test/client/karma.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// shim all the things
require('core-js/es5')
global.JSON = require('json3')
var sinon = require('sinon')
var assert = require('assert')

Expand Down

0 comments on commit 7a084e0

Please sign in to comment.