Merge pull request #112 from sharelatex/csh-issue-1309-node-10.15.0

Upgrade to Node 10 - CLSI
This commit is contained in:
Christopher Hoskin 2019-01-17 09:50:19 +00:00 committed by GitHub
commit 9333bf4882
6 changed files with 1991 additions and 1069 deletions

View file

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

View file

@ -146,7 +146,7 @@ app.get "/health_check", (req, res)->
app.get "/smoke_test_force", (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) ->
time = parseInt(req.query.time || "1000")
profiler.startProfiling("test")

View file

@ -87,7 +87,7 @@ module.exports = RequestParser =
throw "resource modified date could not be understood: #{resource.modified}"
if !resource.url? and !resource.content?
throw "all resources should have either a url or content attribute"
throw "all resources should have either a url or content attribute"
if resource.content? and typeof resource.content != "string"
throw "content attribute should be a string"
if resource.url? and typeof resource.url != "string"

File diff suppressed because it is too large Load diff

View file

@ -37,15 +37,15 @@
"sequelize": "^4.38.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",
"sqlite3": "^4.0.2",
"sqlite3": "^4.0.6",
"underscore": "^1.8.2",
"v8-profiler": "^5.2.4",
"v8-profiler-node8": "^6.0.1",
"wrench": "~1.5.4"
},
"devDependencies": {
"bunyan": "^0.22.1",
"chai": "~1.8.1",
"coffee-script": "1.6.0",
"coffeescript": "1.6.0",
"mocha": "^4.0.1",
"sandboxed-module": "~0.3.0",
"sinon": "~1.7.3",

View file

@ -33,7 +33,10 @@ compare = (originalPath, generatedPath, callback = (error, same) ->) ->
proc.stderr.on "data", (chunk) -> stderr += chunk
proc.on "exit", () ->
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
else
console.log "compare result", stderr