Switch to node 10

This commit is contained in:
Christopher Hoskin
2019-01-16 15:11:49 +00:00
parent 4bd67d5e7e
commit 4c8b619ee8
5 changed files with 1990 additions and 1068 deletions

View File

@@ -1,4 +1,4 @@
FROM node:6.15.1 as app FROM node:10.15.0 as app
WORKDIR /app WORKDIR /app
@@ -12,7 +12,7 @@ COPY . /app
RUN npm run compile:all RUN npm run compile:all
FROM node:6.15.1 FROM node:10.15.0
COPY --from=app /app /app COPY --from=app /app /app

View File

@@ -146,7 +146,7 @@ app.get "/health_check", (req, res)->
app.get "/smoke_test_force", (req, res)-> app.get "/smoke_test_force", (req, res)->
smokeTest.run(require.resolve(__dirname + "/test/smoke/js/SmokeTests.js"))(req, res) smokeTest.run(require.resolve(__dirname + "/test/smoke/js/SmokeTests.js"))(req, res)
profiler = require "v8-profiler" profiler = require "v8-profiler-node8"
app.get "/profile", (req, res) -> app.get "/profile", (req, res) ->
time = parseInt(req.query.time || "1000") time = parseInt(req.query.time || "1000")
profiler.startProfiling("test") profiler.startProfiling("test")

3039
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -37,15 +37,15 @@
"sequelize": "^4.38.0", "sequelize": "^4.38.0",
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.1.0", "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.1.0",
"smoke-test-sharelatex": "git+https://github.com/sharelatex/smoke-test-sharelatex.git#v0.2.0", "smoke-test-sharelatex": "git+https://github.com/sharelatex/smoke-test-sharelatex.git#v0.2.0",
"sqlite3": "^4.0.2", "sqlite3": "^4.0.6",
"underscore": "^1.8.2", "underscore": "^1.8.2",
"v8-profiler": "^5.2.4", "v8-profiler-node8": "^6.0.1",
"wrench": "~1.5.4" "wrench": "~1.5.4"
}, },
"devDependencies": { "devDependencies": {
"bunyan": "^0.22.1", "bunyan": "^0.22.1",
"chai": "~1.8.1", "chai": "~1.8.1",
"coffee-script": "1.6.0", "coffeescript": "1.6.0",
"mocha": "^4.0.1", "mocha": "^4.0.1",
"sandboxed-module": "~0.3.0", "sandboxed-module": "~0.3.0",
"sinon": "~1.7.3", "sinon": "~1.7.3",

View File

@@ -33,7 +33,10 @@ compare = (originalPath, generatedPath, callback = (error, same) ->) ->
proc.stderr.on "data", (chunk) -> stderr += chunk proc.stderr.on "data", (chunk) -> stderr += chunk
proc.on "exit", () -> proc.on "exit", () ->
if stderr.trim() == "0 (0)" if stderr.trim() == "0 (0)"
fs.unlink diff_file # remove output diff if test matches expected image # remove output diff if test matches expected image
fs.unlink diff_file, (err) ->
if err
throw err
callback null, true callback null, true
else else
console.log "compare result", stderr console.log "compare result", stderr