Skip to content

Commit

Permalink
use node v18
Browse files Browse the repository at this point in the history
  • Loading branch information
LabhanshAgrawal committed May 30, 2023
1 parent f48b181 commit a3810de
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ${{matrix.os}}
strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
os:
- macos-12
- ubuntu-20.04
Expand Down
4 changes: 2 additions & 2 deletions app/config/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import _ from 'lodash';

const _extract = (script?: vm.Script): Record<string, any> => {
const module: Record<string, any> = {};
script?.runInNewContext({module});
script?.runInNewContext({module}, {displayErrors: true});
if (!module.exports) {
throw new Error('Error reading configuration: `module.exports` not set');
}
Expand All @@ -16,7 +16,7 @@ const _extract = (script?: vm.Script): Record<string, any> => {

const _syntaxValidation = (cfg: string) => {
try {
return new vm.Script(cfg, {filename: '.hyper.js', displayErrors: true});
return new vm.Script(cfg, {filename: '.hyper.js'});
} catch (_err) {
const err = _err as {name: string};
notify(`Error loading config: ${err.name}`, `${err}`, {error: err});
Expand Down
8 changes: 3 additions & 5 deletions app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,13 @@ async function installDevExtensions(isDev_: boolean) {
if (!isDev_) {
return [];
}
const installer = await import('electron-devtools-installer');
const {default: installer, REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS} = await import('electron-devtools-installer');

const extensions = ['REACT_DEVELOPER_TOOLS', 'REDUX_DEVTOOLS'] as const;
const extensions = [REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS];
const forceDownload = Boolean(process.env.UPGRADE_EXTENSIONS);

return Promise.all(
extensions.map((name) =>
installer.default(installer[name], {forceDownload, loadExtensionOptions: {allowFileAccess: true}})
)
extensions.map((extension) => installer(extension, {forceDownload, loadExtensionOptions: {allowFileAccess: true}}))
);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"@types/lodash": "^4.14.195",
"@types/mousetrap": "1.6.11",
"@types/ms": "0.7.31",
"@types/node": "16.18.25",
"@types/node": "18.16.16",
"@types/plist": "3.0.2",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"resolveJsonModule": true,
"sourceMap": true,
"strict": true,
"target": "ES2021",
"target": "ES2022",
"typeRoots": [
"./node_modules/@types"
]
Expand Down
13 changes: 9 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,12 @@
resolved "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f"
integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==

"@types/[email protected]", "@types/node@^16.9.2":
"@types/[email protected]":
version "18.16.16"
resolved "https://registry.npmjs.org/@types/node/-/node-18.16.16.tgz#3b64862856c7874ccf7439e6bab872d245c86d8e"
integrity sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==

"@types/node@^16.9.2":
version "16.18.25"
resolved "https://registry.npmjs.org/@types/node/-/node-16.18.25.tgz#8863940fefa1234d3fcac7a4b7a48a6c992d67af"
integrity sha512-rUDO6s9Q/El1R1I21HG4qw/LstTHCPO/oQNAwI/4b2f9EWvMnqt4d3HJwPMawfZ3UvodB8516Yg+VAq54YM+eA==
Expand Down Expand Up @@ -1188,9 +1193,9 @@
integrity sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==

"@types/verror@^1.10.3":
version "1.10.4"
resolved "https://registry.npmjs.org/@types/verror/-/verror-1.10.4.tgz#805c0612b3a0c124cf99f517364142946b74ba3b"
integrity sha512-OjJdqx6QlbyZw9LShPwRW+Kmiegeg3eWNI41MQQKaG3vjdU2L9SRElntM51HmHBY1cu7izxQJ1lMYioQh3XMBg==
version "1.10.6"
resolved "https://registry.npmjs.org/@types/verror/-/verror-1.10.6.tgz#3e600c62d210c5826460858f84bcbb65805460bb"
integrity sha512-NNm+gdePAX1VGvPcGZCDKQZKYSiAWigKhKaz5KF94hG6f2s8de9Ow5+7AbXoeKxL8gavZfk4UquSAygOF2duEQ==

"@types/yauzl@^2.9.1":
version "2.9.1"
Expand Down

0 comments on commit a3810de

Please sign in to comment.