Merge histories with @corneliusroemer's Hyper fork

Merge pull request #76 from quine-global/cornelius-merge
Merge histories with @corneliusroemer's Hyper fork
This commit is contained in:
Philip Peterson 2024-11-23 01:13:09 -09:00 committed by GitHub
commit 96259b94d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 1884 additions and 1024 deletions

View file

@ -5,17 +5,31 @@ updates:
schedule: schedule:
interval: weekly interval: weekly
time: '11:00' time: '11:00'
open-pull-requests-limit: 30
target-branch: canary target-branch: canary
versioning-strategy: increase versioning-strategy: increase
commit-message:
prefix: "chore(deps-dev):"
groups:
minorAndPatch:
update-types:
- "minor"
- "patch"
open-pull-requests-limit: 100
- package-ecosystem: npm - package-ecosystem: npm
directory: "/app" directory: "/app"
schedule: schedule:
interval: weekly interval: weekly
time: '11:00' time: '11:00'
open-pull-requests-limit: 30
target-branch: canary target-branch: canary
versioning-strategy: increase versioning-strategy: increase
commit-message:
prefix: "chore(deps):"
groups:
minorAndPatch:
update-types:
- "minor"
- "patch"
open-pull-requests-limit: 100
- package-ecosystem: github-actions - package-ecosystem: github-actions
directory: "/" directory: "/"
schedule: schedule:

View file

@ -14,14 +14,14 @@ jobs:
WORKFLOW_RUN_INFO: ${{ toJSON(github.event.workflow_run) }} WORKFLOW_RUN_INFO: ${{ toJSON(github.event.workflow_run) }}
run: echo "$WORKFLOW_RUN_INFO" run: echo "$WORKFLOW_RUN_INFO"
- name: Download Artifacts - name: Download Artifacts
uses: dawidd6/action-download-artifact@v3.1.4 uses: dawidd6/action-download-artifact@v6
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: nodejs.yml workflow: nodejs.yml
run_id: ${{ github.event.workflow_run.id }} run_id: ${{ github.event.workflow_run.id }}
name: e2e name: e2e
- name: Get PR number - name: Get PR number
uses: dawidd6/action-download-artifact@v3.1.4 uses: dawidd6/action-download-artifact@v6
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: nodejs.yml workflow: nodejs.yml

View file

@ -2,20 +2,19 @@ name: Node CI
on: on:
push: push:
branches: branches:
- master workflow_dispatch:
- canary
pull_request:
defaults: defaults:
run: run:
shell: bash shell: bash
env: env:
NODE_VERSION: 18.x NODE_VERSION: 20.x
jobs: jobs:
build: build:
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
strategy: strategy:
matrix: matrix:
os: os:
- macos-latest
- ubuntu-latest - ubuntu-latest
- macos-latest - macos-latest
#TODO re-enable these: #TODO re-enable these:
@ -29,7 +28,12 @@ jobs:
with: with:
node-version: ${{ env.NODE_VERSION }} node-version: ${{ env.NODE_VERSION }}
- name: Fix node-gyp and Python - name: Fix node-gyp and Python
run: python3 -m pip install packaging setuptools --break-system-packages || python3 -m pip install packaging setuptools run: |
if [[ "$RUNNER_OS" == "macOS" ]]; then
brew install python-setuptools python-packaging
else
python3 -m pip install $EXTRA_ARGS packaging setuptools
fi
- name: Get yarn cache directory path - name: Get yarn cache directory path
id: yarn-cache-dir-path id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
@ -85,7 +89,7 @@ jobs:
dist/*.exe dist/*.exe
- name: Run E2E Tests - name: Run E2E Tests
if: runner.os != 'Linux' if: runner.os != 'Linux'
run: yarn run test:e2e run: yarn run test:e2e --verbose
- name: Run E2E Tests on Linux - name: Run E2E Tests on Linux
if: runner.os == 'Linux' if: runner.os == 'Linux'
uses: GabrielBB/xvfb-action@v1.6 uses: GabrielBB/xvfb-action@v1.6
@ -94,9 +98,9 @@ jobs:
env: env:
SHELL: /bin/bash SHELL: /bin/bash
- name: Archive E2E test screenshot - name: Archive E2E test screenshot
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: e2e name: e2e-${{ matrix.os }}-${{ strategy.job-index }}
path: dist/tmp/*.png path: dist/tmp/*.png
- name: Save the pr number in an artifact - name: Save the pr number in an artifact
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
@ -104,7 +108,7 @@ jobs:
PR_NUM: ${{ github.event.number }} PR_NUM: ${{ github.event.number }}
run: echo $PR_NUM > pr_num.txt run: echo $PR_NUM > pr_num.txt
- name: Upload the pr num - name: Upload the pr num
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
with: with:
name: pr_num name: pr_num
@ -153,7 +157,7 @@ jobs:
- name: Compile - name: Compile
run: yarn run build run: yarn run build
- name: rebuild node-pty - name: rebuild node-pty
uses: pguyot/arm-runner-action@v2.5.2 uses: pguyot/arm-runner-action@v2.6.5
with: with:
image_additional_mb: 2000 image_additional_mb: 2000
base_image: ${{ matrix.image }} base_image: ${{ matrix.image }}

1
.husky/pre-commit Normal file
View file

@ -0,0 +1 @@
yarn test

View file

@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn test

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
18.18

View file

@ -13,7 +13,7 @@
"postinstall": "npx patch-package" "postinstall": "npx patch-package"
}, },
"dependencies": { "dependencies": {
"@babel/parser": "7.24.4", "@babel/parser": "7.25.4",
"@electron/remote": "2.1.2", "@electron/remote": "2.1.2",
"ast-types": "^0.16.1", "ast-types": "^0.16.1",
"async-retry": "1.3.3", "async-retry": "1.3.3",
@ -29,19 +29,22 @@
"lodash": "4.17.21", "lodash": "4.17.21",
"ms": "2.1.3", "ms": "2.1.3",
"native-process-working-directory": "^1.0.2", "native-process-working-directory": "^1.0.2",
"node-pty": "1.0.0", "node-pty": "1.1.0-beta21",
"os-locale": "5.0.0", "os-locale": "5.0.0",
"parse-url": "8.1.0", "parse-url": "9.2.0",
"queue": "6.0.2", "queue": "6.0.2",
"react": "18.2.0", "react": "18.3.1",
"react-dom": "18.2.0", "react-dom": "18.3.1",
"recast": "0.23.6", "recast": "0.23.9",
"semver": "7.6.0", "semver": "7.6.3",
"shell-env": "3.0.1", "shell-env": "3.0.1",
"sudo-prompt": "^9.2.1", "sudo-prompt": "^9.2.1",
"uuid": "9.0.1" "uuid": "10.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"native-reg": "1.1.1" "native-reg": "1.1.1"
},
"devDependencies": {
"node-gyp": "^10.2.0"
} }
} }

View file

@ -1,15 +0,0 @@
diff --git a/node_modules/node-pty/src/win/conpty.cc b/node_modules/node-pty/src/win/conpty.cc
index 47af75c..884d542 100644
--- a/node_modules/node-pty/src/win/conpty.cc
+++ b/node_modules/node-pty/src/win/conpty.cc
@@ -472,10 +472,6 @@ static NAN_METHOD(PtyKill) {
}
}
- DisconnectNamedPipe(handle->hIn);
- DisconnectNamedPipe(handle->hOut);
- CloseHandle(handle->hIn);
- CloseHandle(handle->hOut);
CloseHandle(handle->hShell);
}

View file

@ -1,8 +1,10 @@
{ {
"extends": "../tsconfig.base.json", "extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"declaration": true,
"declarationDir": "../dist/tmp/appdts/", "declarationDir": "../dist/tmp/appdts/",
"outDir": "../target/", "outDir": "../target/",
"composite": true,
"noImplicitAny": false "noImplicitAny": false
}, },
"include": [ "include": [
@ -10,5 +12,9 @@
"./package.json", "./package.json",
"../typings/extend-electron.d.ts", "../typings/extend-electron.d.ts",
"../typings/ext-modules.d.ts" "../typings/ext-modules.d.ts"
],
"exclude": [
"../dist/**/*",
"../target/**/*"
] ]
} }

View file

@ -1,6 +1,6 @@
// Packages // Packages
import electron, {app} from 'electron'; import electron, {app} from 'electron';
import type {BrowserWindow, AutoUpdater} from 'electron'; import type {BrowserWindow, AutoUpdater as OriginalAutoUpdater} from 'electron';
import retry from 'async-retry'; import retry from 'async-retry';
import ms from 'ms'; import ms from 'ms';
@ -11,6 +11,20 @@ import {getDefaultProfile} from './config';
import {version} from './package.json'; import {version} from './package.json';
import {getDecoratedConfig} from './plugins'; import {getDecoratedConfig} from './plugins';
// Necessary due to typescript not handling overloads well
type AutoUpdaterEvent =
| 'error'
| 'checking-for-update'
| 'before-quit-for-update'
| 'update-downloaded'
| 'update-available'
| 'update-not-available';
interface AutoUpdater extends OriginalAutoUpdater {
on(event: AutoUpdaterEvent, listener: Function): this;
removeListener(event: AutoUpdaterEvent, listener: Function): this;
}
const {platform} = process; const {platform} = process;
const isLinux = platform === 'linux'; const isLinux = platform === 'linux';

File diff suppressed because it is too large Load diff

View file

@ -6,21 +6,23 @@
"start": "echo 'please run `yarn run dev` in one tab and then `yarn run app` in another one'", "start": "echo 'please run `yarn run dev` in one tab and then `yarn run app` in another one'",
"app": "cross-env ELECTRONMON_LOGLEVEL=error electronmon target", "app": "cross-env ELECTRONMON_LOGLEVEL=error electronmon target",
"dev": "concurrently -n \"Webpack,TypeScript\" -c \"cyan.bold,blue.bold\" \"webpack -w\" \"tsc --build -v --pretty --watch --preserveWatchOutput\" -k", "dev": "concurrently -n \"Webpack,TypeScript\" -c \"cyan.bold,blue.bold\" \"webpack -w\" \"tsc --build -v --pretty --watch --preserveWatchOutput\" -k",
"ts": "tsc --build -v --pretty --preserveWatchOutput",
"build": "cross-env NODE_ENV=production webpack && tsc -b -v && cross-env BABEL_ENV=production babel target/renderer/bundle.js --out-file target/renderer/bundle.js --no-comments --minified", "build": "cross-env NODE_ENV=production webpack && tsc -b -v && cross-env BABEL_ENV=production babel target/renderer/bundle.js --out-file target/renderer/bundle.js --no-comments --minified",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.json", "lint": "eslint . --fix --ext .js,.jsx,.ts,.tsx,.json",
"test": "yarn run lint && yarn run test:unit", "test": "yarn run lint && yarn run test:unit",
"test:unit": "ava", "test:unit": "ava",
"test:unit:watch": "yarn run test:unit -- --watch", "test:unit:watch": "yarn run test:unit -- --watch",
"test:e2e": "ava --config ava-e2e.config.js", "test:e2e": "ava --config ava-e2e.config.js",
"postinstall": "yarn run v8-snapshot && webpack --config-name hyper-app && electron-builder install-app-deps && yarn run rebuild-node-pty && cpy --cwd=target node_modules \"../../app/\" && husky install && yarn run generate-schema", "postinstall": "yarn run v8-snapshot && webpack --config-name hyper-app && electron-builder install-app-deps && yarn run rebuild-node-pty && cpy --cwd=target node_modules \"../../app/\" && husky && yarn run generate-schema",
"rebuild-node-pty": "electron-rebuild -f -o node-pty -m target", "rebuild-node-pty": "electron-rebuild -f -o node-pty -m target",
"dist": "yarn run build && electron-builder", "dist": "yarn run build && electron-builder",
"clean": "node ./bin/rimraf-standalone.js node_modules && node ./bin/rimraf-standalone.js ./app/node_modules && node ./bin/rimraf-standalone.js ./app/renderer", "clean": "node ./bin/rimraf-standalone.js node_modules && node ./bin/rimraf-standalone.js ./app/node_modules && node ./bin/rimraf-standalone.js ./app/renderer && node ./bin/rimraf-standalone.js ./target && node ./bin/rimraf-standalone.js ./dist",
"v8-snapshot": "cross-env npm_config_arch=x64 yarn run v8-snapshot:arch && cross-env npm_config_arch=arm64 yarn run v8-snapshot:arch", "v8-snapshot": "cross-env npm_config_arch=x64 yarn run v8-snapshot:arch && cross-env npm_config_arch=arm64 yarn run v8-snapshot:arch",
"v8-snapshot:arch": "yarn run mk-snapshot && yarn run cp-snapshot", "v8-snapshot:arch": "yarn run mk-snapshot && yarn run cp-snapshot",
"mk-snapshot": "cross-env ELECTRON_CUSTOM_VERSION=$npm_package_devDependencies_electron node node_modules/electron-mksnapshot/download-mksnapshot.js && node bin/mk-snapshot.js", "mk-snapshot": "cross-env ELECTRON_CUSTOM_VERSION=$npm_package_devDependencies_electron node node_modules/electron-mksnapshot/download-mksnapshot.js && node bin/mk-snapshot.js",
"cp-snapshot": "node bin/cp-snapshot.js", "cp-snapshot": "node bin/cp-snapshot.js",
"generate-schema": "typescript-json-schema ./typings/config.d.ts rawConfig -o ./app/config/schema.json --required" "generate-schema": "typescript-json-schema ./typings/config.d.ts rawConfig -o ./app/config/schema.json --required",
"uuaw": "uuaw"
}, },
"license": "MIT", "license": "MIT",
"author": { "author": {
@ -33,33 +35,33 @@
"@redux-devtools/extension": "^3.3.0", "@redux-devtools/extension": "^3.3.0",
"args": "5.0.3", "args": "5.0.3",
"chalk": "5.3.0", "chalk": "5.3.0",
"clsx": "2.1.0", "clsx": "2.1.1",
"color": "4.2.3", "color": "4.2.3",
"columnify": "1.6.0", "columnify": "1.6.0",
"css-loader": "7.1.1", "css-loader": "7.1.2",
"got": "12.4.1", "got": "12.4.1",
"json-loader": "0.5.7", "json-loader": "0.5.7",
"lodash": "4.17.21", "lodash": "4.17.21",
"mousetrap": "chabou/mousetrap#useCapture", "mousetrap": "chabou/mousetrap#useCapture",
"ms": "2.1.3", "ms": "2.1.3",
"open": "8.4.2", "open": "8.4.2",
"ora": "8.0.1", "ora": "8.1.0",
"php-escape-shell": "1.0.0", "php-escape-shell": "1.0.0",
"react": "18.2.0", "react": "18.3.1",
"react-dom": "18.2.0", "react-dom": "18.3.1",
"react-redux": "8.1.3", "react-redux": "8.1.3",
"react-use": "^17.5.0", "react-use": "^17.5.1",
"redux": "4.2.1", "redux": "4.2.1",
"redux-thunk": "2.4.2", "redux-thunk": "2.4.2",
"registry-url": "^6.0.1", "registry-url": "^6.0.1",
"reselect": "4.1.8", "reselect": "4.1.8",
"seamless-immutable": "7.1.4", "seamless-immutable": "7.1.4",
"semver": "7.6.0", "semver": "7.6.3",
"shebang-loader": "0.0.1", "shebang-loader": "0.0.1",
"styled-jsx": "5.1.2", "styled-jsx": "5.1.6",
"stylis": "3.5.4", "stylis": "3.5.4",
"typescript-json-schema": "0.65.1", "typescript-json-schema": "0.65.1",
"uuid": "9.0.1", "uuid": "10.0.0",
"webpack-cli": "5.1.4", "webpack-cli": "5.1.4",
"@xterm/xterm": "5.4.0", "@xterm/xterm": "5.4.0",
"@xterm/addon-canvas": "0.6.0", "@xterm/addon-canvas": "0.6.0",
@ -74,30 +76,30 @@
"devDependencies": { "devDependencies": {
"@ava/babel": "2.0.0", "@ava/babel": "2.0.0",
"@ava/typescript": "^4.1.0", "@ava/typescript": "^4.1.0",
"@babel/cli": "7.24.1", "@babel/cli": "7.24.8",
"@babel/core": "7.24.4", "@babel/core": "7.25.2",
"@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-numeric-separator": "^7.18.6", "@babel/plugin-proposal-numeric-separator": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7", "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/plugin-proposal-optional-chaining": "7.21.0", "@babel/plugin-proposal-optional-chaining": "7.21.0",
"@babel/preset-react": "7.24.1", "@babel/preset-react": "7.24.7",
"@babel/preset-typescript": "7.24.1", "@babel/preset-typescript": "7.24.7",
"@electron/rebuild": "^3.6.0", "@electron/rebuild": "^3.6.0",
"@types/args": "5.0.3", "@types/args": "5.0.3",
"@types/async-retry": "1.4.3", "@types/async-retry": "1.4.8",
"@types/color": "3.0.6", "@types/color": "3.0.6",
"@types/columnify": "^1.5.4", "@types/columnify": "^1.5.4",
"@types/fs-extra": "11.0.4", "@types/fs-extra": "11.0.4",
"@types/lodash": "^4.17.0", "@types/lodash": "^4.17.7",
"@types/mousetrap": "1.6.15", "@types/mousetrap": "1.6.15",
"@types/ms": "0.7.34", "@types/ms": "0.7.34",
"@types/node": "22.9.2", "@types/node": "22.9.2",
"@types/plist": "3.0.5", "@types/plist": "3.0.5",
"@types/react": "18.2.79", "@types/react": "18.3.4",
"@types/react-dom": "18.2.25", "@types/react-dom": "18.3.0",
"@types/seamless-immutable": "7.1.19", "@types/seamless-immutable": "7.1.19",
"@types/styled-jsx": "2.2.9", "@types/styled-jsx": "2.2.9",
"@types/uuid": "9.0.8", "@types/uuid": "10.0.0",
"@typescript-eslint/eslint-plugin": "7.0.0", "@typescript-eslint/eslint-plugin": "7.0.0",
"@typescript-eslint/parser": "6.21.0", "@typescript-eslint/parser": "6.21.0",
"ava": "6.2.0", "ava": "6.2.0",
@ -106,36 +108,39 @@
"copy-webpack-plugin": "12.0.2", "copy-webpack-plugin": "12.0.2",
"cpy-cli": "^5.0.0", "cpy-cli": "^5.0.0",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"electron": "22.3.25", "electron": "28.3.3",
"electron-builder": "^24.13.3", "electron-builder": "^24.13.3",
"electron-link": "^0.6.0", "electron-link": "^0.6.0",
"electron-mksnapshot": "29.3.0", "electron-mksnapshot": "^28.3.0",
"electronmon": "^2.0.2", "electronmon": "^2.0.3",
"eslint": "8.57.0", "eslint": "8.57.0",
"eslint-config-prettier": "9.1.0", "eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "^3.6.1", "eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.29.1", "eslint-plugin-import": "^2.29.1",
"eslint-plugin-json-schema-validator": "^4.8.3", "eslint-plugin-json-schema-validator": "^4.8.3",
"eslint-plugin-jsonc": "^2.15.1", "eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-lodash": "^7.4.0", "eslint-plugin-lodash": "^7.4.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "7.34.1", "eslint-plugin-react": "7.35.0",
"husky": "9.0.11", "husky": "^9.1.5",
"inquirer": "9.2.18", "husky-init": "^8.0.0",
"node-addon-api": "8.0.0", "inquirer": "10.1.8",
"node-addon-api": "8.1.0",
"node-gyp": "^10.2.0",
"null-loader": "4.0.1", "null-loader": "4.0.1",
"parse-url": "8.1.0", "parse-url": "9.2.0",
"playwright": "1.43.1", "playwright": "1.46.1",
"plist": "3.1.0", "plist": "3.1.0",
"prettier": "3.2.5", "prettier": "3.3.3",
"proxyquire": "2.1.3", "proxyquire": "2.1.3",
"style-loader": "4.0.0", "style-loader": "4.0.0",
"terser": "5.30.3", "terser": "5.31.6",
"terser-webpack-plugin": "^5.3.10", "terser-webpack-plugin": "^5.3.10",
"ts-node": "10.9.2", "ts-node": "10.9.2",
"typescript": "5.4.5", "typescript": "5.5.4",
"webpack": "5.91.0" "uuaw": "^1.2.2",
"webpack": "5.94.0"
}, },
"electronmon": { "electronmon": {
"patterns": [ "patterns": [
@ -143,5 +148,10 @@
"!lib/**", "!lib/**",
"!dist/**" "!dist/**"
] ]
} },
"resolutions": {
"@types/retry": "0.12.5",
"node-abi": "^3.67.0"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
} }

View file

@ -33,7 +33,7 @@ test.before(async () => {
executablePath: pathToBinary executablePath: pathToBinary
}); });
await app.firstWindow(); await app.firstWindow();
await new Promise((resolve) => setTimeout(resolve, 5000)); await new Promise((resolve) => setTimeout(resolve, 15000));
}); });
test.after(async () => { test.after(async () => {

View file

@ -1,7 +1,8 @@
{ {
"extends": "./tsconfig.base.json", "extends": "./tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./dist/tmp/root/" "outDir": "./dist/tmp/root/",
"composite": true
}, },
"include": [ "include": [
"./app/", "./app/",

View file

@ -58,10 +58,6 @@ const config: webpack.Configuration[] = [
{ {
from: './app/static', from: './app/static',
to: './static' to: './static'
},
{
from: './app/patches',
to: './patches'
} }
] ]
}) })

2001
yarn.lock

File diff suppressed because it is too large Load diff