es2021 compilation

This commit is contained in:
Eugene Pankov
2021-07-06 09:40:54 +02:00
parent bf762cc4c7
commit 89f369abe6
15 changed files with 87 additions and 753 deletions

View File

@@ -414,9 +414,9 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
data = `\x1b[200~${data}\x1b[201~`
}
if (this.hostApp.platform === Platform.Windows) {
data = data.replace(/\r\n/g, '\r')
data = data.replaceAll('\r\n', '\r')
} else {
data = data.replace(/\n/g, '\r')
data = data.replaceAll('\n', '\r')
}
if (!this.alternateScreenActive) {

View File

@@ -77,7 +77,7 @@ export class TerminalStreamProcessor {
gutter: 4,
divide: colors.gray(' '),
emptyHuman: colors.gray(''),
}).replace(/\n/g, '\r\n')),
}).replaceAll('\n', '\r\n')),
Buffer.from('\r\n\n'),
]))
} else {

View File

@@ -23,7 +23,7 @@ export class PathDropDecorator extends TerminalDecorator {
if (path.includes(' ')) {
path = `"${path}"`
}
path = path.replace(/\\/g, '\\\\')
path = path.replaceAll('\\', '\\\\')
terminal.sendInput(path + ' ')
}
}

View File

@@ -83,7 +83,7 @@ import { TerminalCLIHandler } from './cli'
],
})
export default class TerminalModule { // eslint-disable-line @typescript-eslint/no-extraneous-class
private constructor (
constructor (
hotkeys: HotkeysService,
) {
const events = [

View File

@@ -1,4 +1,3 @@
const path = require('path')
const config = require('../webpack.plugin.config')
module.exports = config({
name: 'terminal',
@@ -9,4 +8,3 @@ module.exports = config({
],
})
module.exports.resolve.modules.push('node_modules/xterm/src')
module.exports.module.rules.find(x => x.use.loader === 'awesome-typescript-loader').use.options.paths['*'].push(path.resolve(__dirname, './node_modules/xterm/src/*'))