refactor: use node scheme imports in spec (#38487)
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
parent
bf1ba4a857
commit
d78f37ec8f
105 changed files with 533 additions and 352 deletions
|
@ -22,7 +22,7 @@ import {
|
|||
} from 'electron/main';
|
||||
|
||||
import { clipboard, crashReporter, nativeImage, shell } from 'electron/common';
|
||||
import * as path from 'path';
|
||||
import * as path from 'node:path';
|
||||
|
||||
// Quick start
|
||||
// https://github.com/electron/electron/blob/main/docs/tutorial/quick-start.md
|
||||
|
@ -1136,7 +1136,7 @@ session.defaultSession.on('will-download', (event, item, webContents) => {
|
|||
console.log('will-download', webContents.id);
|
||||
event.preventDefault();
|
||||
require('got')(item.getURL()).then((data: any) => {
|
||||
require('fs').writeFileSync('/somewhere', data);
|
||||
require('node:fs').writeFileSync('/somewhere', data);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const path = require('path');
|
||||
const childProcess = require('child_process');
|
||||
const path = require('node:path');
|
||||
const childProcess = require('node:child_process');
|
||||
|
||||
const typeCheck = () => {
|
||||
const tscExec = path.resolve(require.resolve('typescript'), '../../bin/tsc');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue