-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🚧 Backend work on omnibox apis * 🚚 Move config files into `.config` * ✅ Create a chrome level test runner * 👷 Add unit tests to CI * 🔨 Correct build script config path * 👷 Run chrome tests under `xvfb`
- Loading branch information
Showing
26 changed files
with
1,938 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,23 +9,27 @@ | |
"scripts:build": "tsc -p ./tsconfigs/tsconfig.scripts.json", | ||
"script:setup": "node ./.scripts/setup.js", | ||
"script:license-check": "node ./.scripts/license-check.js", | ||
"script:unit-test": "node ./.scripts/unit-test.js", | ||
"app:start": "MOZ_ENABLE_WAYLAND=1 ./.store/rt/quark-runtime -no-remote", | ||
"app:startX": "./.store/rt/quark-runtime -no-remote", | ||
"build": "rm -rf dist && concurrently -c auto pnpm:build-*", | ||
"build-content": "webpack --mode production", | ||
"build-content": "webpack --mode production -c ./.config/webpack.config.cjs", | ||
"build-modules": "tsc -p ./tsconfigs/tsconfig.modules.json", | ||
"build-actors": "tsc -p ./tsconfigs/tsconfig.actors.json", | ||
"dev": "concurrently -c auto pnpm:dev-*", | ||
"dev-content": "webpack serve --mode development", | ||
"dev-content": "webpack serve --mode development -c ./.config/webpack.config.cjs", | ||
"dev-modules": "tsc -w -p ./tsconfigs/tsconfig.modules.json", | ||
"dev-actors": "tsc -w -p ./tsconfigs/tsconfig.actors.json", | ||
"rt:slink": "rm --force ./.store/artifact.tar.bz2 && ln -s ../../experiment-runtime/dist/experiment-runtime-1.0.0.en-US.linux-x86_64.tar.bz2 ./.store/artifact.tar.bz2", | ||
"format": "pnpm script:license-check --fix && prettier . --write" | ||
"format": "pnpm script:license-check --fix && prettier . --write", | ||
"data": "concurrently -c auto pnpm:data:*", | ||
"data:tld": "wget https://data.iana.org/TLD/tlds-alpha-by-domain.txt -O ./src/content/shared/search/providers/data/tld.txt" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@tinyhttp/app": "^2.2.1", | ||
"@tsconfig/svelte": "^5.0.2", | ||
"@types/node": "^20.8.4", | ||
"concurrently": "^8.2.1", | ||
|
@@ -50,7 +54,8 @@ | |
"webpack": "^5.89.0", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^4.15.1", | ||
"webpack-license-plugin": "^4.4.2" | ||
"webpack-license-plugin": "^4.4.2", | ||
"zora": "^5.2.0" | ||
}, | ||
"dependencies": { | ||
"@catppuccin/palette": "^0.2.0", | ||
|
@@ -63,5 +68,17 @@ | |
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
}, | ||
"prettier": { | ||
"semi": false, | ||
"singleQuote": true, | ||
"overrides": [ | ||
{ | ||
"files": "src/prefs.js", | ||
"options": { | ||
"semi": true | ||
} | ||
} | ||
] | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import { argv, exit } from 'node:process' | ||
import { App } from '@tinyhttp/app' | ||
import { type ExecaChildProcess, execa } from 'execa' | ||
|
||
// If you update this port, you should update the port in the test runner | ||
const TEST_PORT = 3948 | ||
const TEST_RUNNER_URL = 'chrome://browser/content/tests/index.html' | ||
|
||
const shouldWatch = argv.includes('--watch') | ||
let testProcess: ExecaChildProcess<string> | ||
|
||
// This is the way that the test runner communicates with the test app | ||
new App() | ||
.get('/config', (_, res) => void res.send({ shouldWatch })) | ||
.post('/results', (req, res) => { | ||
req.on('data', (chunk: Buffer) => { | ||
console.log(chunk.toString()) | ||
}) | ||
req.on('close', () => { | ||
res.send('ok') | ||
|
||
if (!shouldWatch) { | ||
testProcess?.kill() | ||
exit() | ||
} | ||
}) | ||
}) | ||
.listen(TEST_PORT) | ||
|
||
if (!shouldWatch) { | ||
testProcess = execa('./.store/rt/quark-runtime', [ | ||
'--no-remote', | ||
'--chrome', | ||
TEST_RUNNER_URL, | ||
]) | ||
|
||
// Timeout to ensure that tests actually start | ||
setTimeout(() => { | ||
testProcess?.kill() | ||
exit(1) | ||
}, 10_000) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.