|  | 
| 564 | 564 |     module.paths = Module._nodeModulePaths(cwd); | 
| 565 | 565 |     var script = process._eval; | 
| 566 | 566 |     var body = script; | 
| 567 |  | -    script = 'global.__filename = ' + JSON.stringify(name) + ';\n' + | 
|  | 567 | +    script = `global.__filename = ${JSON.stringify(name)};\n` + | 
| 568 | 568 |              'global.exports = exports;\n' + | 
| 569 | 569 |              'global.module = module;\n' + | 
| 570 | 570 |              'global.__dirname = __dirname;\n' + | 
| 571 | 571 |              'global.require = require;\n' + | 
| 572 | 572 |              'return require("vm").runInThisContext(' + | 
| 573 |  | -             JSON.stringify(body) + ', { filename: ' + | 
| 574 |  | -             JSON.stringify(name) + ' });\n'; | 
|  | 573 | +             `${JSON.stringify(body)}, { filename: ` + | 
|  | 574 | +             `${JSON.stringify(name)} });\n`; | 
| 575 | 575 |     // Defer evaluation for a tick.  This is a workaround for deferred | 
| 576 | 576 |     // events not firing when evaluating scripts from the command line, | 
| 577 | 577 |     // see https://github.com/nodejs/node/issues/1600. | 
| 578 | 578 |     process.nextTick(function() { | 
| 579 |  | -      var result = module._compile(script, name + '-wrapper'); | 
|  | 579 | +      var result = module._compile(script, `${name}-wrapper`); | 
| 580 | 580 |       if (process._print_eval) console.log(result); | 
| 581 | 581 |     }); | 
| 582 | 582 |   } | 
|  | 
| 768 | 768 |             sig.slice(0, 3) === 'SIG') { | 
| 769 | 769 |           err = process._kill(pid, startup.lazyConstants()[sig]); | 
| 770 | 770 |         } else { | 
| 771 |  | -          throw new Error('Unknown signal: ' + sig); | 
|  | 771 | +          throw new Error(`Unknown signal: ${sig}`); | 
| 772 | 772 |         } | 
| 773 | 773 |       } | 
| 774 | 774 | 
 | 
|  | 
| 873 | 873 |   } | 
| 874 | 874 | 
 | 
| 875 | 875 |   function NativeModule(id) { | 
| 876 |  | -    this.filename = id + '.js'; | 
|  | 876 | +    this.filename = `${id}.js`; | 
| 877 | 877 |     this.id = id; | 
| 878 | 878 |     this.exports = {}; | 
| 879 | 879 |     this.loaded = false; | 
|  | 
| 893 | 893 |     } | 
| 894 | 894 | 
 | 
| 895 | 895 |     if (!NativeModule.exists(id)) { | 
| 896 |  | -      throw new Error('No such native module ' + id); | 
|  | 896 | +      throw new Error(`No such native module ${id}`); | 
| 897 | 897 |     } | 
| 898 | 898 | 
 | 
| 899 |  | -    process.moduleLoadList.push('NativeModule ' + id); | 
|  | 899 | +    process.moduleLoadList.push(`NativeModule ${id}`); | 
| 900 | 900 | 
 | 
| 901 | 901 |     var nativeModule = new NativeModule(id); | 
| 902 | 902 | 
 | 
|  | 
0 commit comments