mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 12:08:41 -09:00
use node v18
This commit is contained in:
parent
f48b181322
commit
a3810de39c
6 changed files with 17 additions and 14 deletions
2
.github/workflows/nodejs.yml
vendored
2
.github/workflows/nodejs.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
|
@ -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});
|
||||
|
|
|
|||
|
|
@ -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}}))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"target": "ES2021",
|
||||
"target": "ES2022",
|
||||
"typeRoots": [
|
||||
"./node_modules/@types"
|
||||
]
|
||||
|
|
|
|||
13
yarn.lock
13
yarn.lock
|
|
@ -1097,7 +1097,12 @@
|
|||
resolved "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f"
|
||||
integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==
|
||||
|
||||
"@types/node@16.18.25", "@types/node@^16.9.2":
|
||||
"@types/node@18.16.16":
|
||||
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==
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue