mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-16 12:29:36 +00:00
Merge pull request #2034 from overleaf/as-upgrade-babel
Upgrade babel to v7 GitOrigin-RevId: 1626f0d3343a5cb32a71dba5a8f32657b2d7237c
This commit is contained in:
parent
3422c17dc4
commit
48481e431e
5 changed files with 2479 additions and 1492 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"presets": [
|
||||
"react",
|
||||
["env", { "modules": false }]
|
||||
"@babel/react",
|
||||
["@babel/env", { "modules": false }]
|
||||
],
|
||||
"plugins": ["angularjs-annotate"]
|
||||
}
|
3918
services/web/package-lock.json
generated
3918
services/web/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -26,6 +26,10 @@
|
|||
"format:fix": "prettier-eslint '**/*.js' --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/cli": "^7.5.5",
|
||||
"@babel/core": "^7.5.5",
|
||||
"@babel/preset-env": "^7.5.5",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@overleaf/o-error": "^2.1.0",
|
||||
"archiver": "0.9.0",
|
||||
"async": "0.6.2",
|
||||
|
@ -98,6 +102,7 @@
|
|||
"settings-sharelatex": "^1.1.0",
|
||||
"temp": "^0.8.3",
|
||||
"underscore": "1.6.0",
|
||||
"url-parse": "^1.4.7",
|
||||
"uuid": "^3.0.1",
|
||||
"v8-profiler-node8": "^6.0.1",
|
||||
"valid-url": "^1.0.9",
|
||||
|
@ -108,12 +113,8 @@
|
|||
"devDependencies": {
|
||||
"acorn": "^6.1.0",
|
||||
"acorn-walk": "^6.1.1",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-loader": "^7.1.2",
|
||||
"babel-loader": "^8.0.6",
|
||||
"babel-plugin-angularjs-annotate": "^0.10.0",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-preset-react": "^6.16.0",
|
||||
"chai": "3.5.0",
|
||||
"chai-spies": "^1.0.0",
|
||||
"clean-css-cli": "^4.2.1",
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
constructor-super,
|
||||
handle-callback-err,
|
||||
max-len,
|
||||
no-constant-condition,
|
||||
no-eval,
|
||||
no-return-assign,
|
||||
no-this-before-super,
|
||||
no-undef,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
|
@ -73,19 +68,7 @@ define([
|
|||
}
|
||||
|
||||
constructor(ide, doc_id) {
|
||||
{
|
||||
// Hack: trick Babel/TypeScript into allowing this before super.
|
||||
if (false) {
|
||||
super()
|
||||
}
|
||||
let thisFn = (() => {
|
||||
return this
|
||||
}).toString()
|
||||
let thisName = thisFn
|
||||
.slice(thisFn.indexOf('return') + 6 + 1, thisFn.indexOf(';'))
|
||||
.trim()
|
||||
eval(`${thisName} = this;`)
|
||||
}
|
||||
super()
|
||||
this.ide = ide
|
||||
this.doc_id = doc_id
|
||||
this.connected = this.ide.socket.socket.connected
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
constructor-super,
|
||||
max-len,
|
||||
no-constant-condition,
|
||||
no-eval,
|
||||
no-return-assign,
|
||||
no-this-before-super,
|
||||
no-undef,
|
||||
no-unused-vars,
|
||||
*/
|
||||
|
@ -35,21 +30,9 @@ define(['utils/EventEmitter', 'libs/sharejs'], function(EventEmitter, ShareJs) {
|
|||
this.prototype.FATAL_OP_TIMEOUT = 30000
|
||||
}
|
||||
constructor(doc_id, docLines, version, socket) {
|
||||
super()
|
||||
// Dencode any binary bits of data
|
||||
// See http://ecmanaut.blogspot.co.uk/2006/07/encoding-decoding-utf8-in-javascript.html
|
||||
{
|
||||
// Hack: trick Babel/TypeScript into allowing this before super.
|
||||
if (false) {
|
||||
super()
|
||||
}
|
||||
let thisFn = (() => {
|
||||
return this
|
||||
}).toString()
|
||||
let thisName = thisFn
|
||||
.slice(thisFn.indexOf('return') + 6 + 1, thisFn.indexOf(';'))
|
||||
.trim()
|
||||
eval(`${thisName} = this;`)
|
||||
}
|
||||
this.doc_id = doc_id
|
||||
this.socket = socket
|
||||
this.type = 'text'
|
||||
|
|
Loading…
Add table
Reference in a new issue