Compare commits
1 Commits
issue-280-
...
c631cc7626
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c631cc7626 |
@@ -1,3 +1,6 @@
|
|||||||
|
# .git is deliberately NOT excluded: build.js shells out to `git rev-parse` for
|
||||||
|
# build-info stamping and the Dockerfile runs `make build`, so excluding it
|
||||||
|
# would make every built extension report commitHash "unknown".
|
||||||
node_modules
|
node_modules
|
||||||
.DS_Store
|
.DS_Store
|
||||||
dist
|
dist
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -11,7 +11,7 @@ setup:
|
|||||||
@script/setup
|
@script/setup
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@yarn install
|
@yarn install --frozen-lockfile
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@script/test
|
@script/test
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -31,10 +31,13 @@ list exists to detect symbol spoofing attacks and improve UX.
|
|||||||
```bash
|
```bash
|
||||||
git clone https://git.eeqj.de/sneak/autistmask.git
|
git clone https://git.eeqj.de/sneak/autistmask.git
|
||||||
cd autistmask
|
cd autistmask
|
||||||
make install
|
make setup
|
||||||
make build
|
make build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`make setup` is the entrypoint for a fresh clone: it installs dependencies from
|
||||||
|
the lockfile and installs the git pre-commit hook.
|
||||||
|
|
||||||
Load the extension:
|
Load the extension:
|
||||||
|
|
||||||
- **Chrome**: Navigate to `chrome://extensions/`, enable "Developer mode", click
|
- **Chrome**: Navigate to `chrome://extensions/`, enable "Developer mode", click
|
||||||
@@ -97,6 +100,19 @@ provide:
|
|||||||
- `script/precommit` — run by the git pre-commit hook; runs `script/check`
|
- `script/precommit` — run by the git pre-commit hook; runs `script/check`
|
||||||
- `script/install-precommit` — install the git pre-commit hook
|
- `script/install-precommit` — install the git pre-commit hook
|
||||||
|
|
||||||
|
The Makefile shims to those. It also carries a few targets that have no
|
||||||
|
`script/` counterpart and are Makefile-only conveniences:
|
||||||
|
|
||||||
|
- `make install` — `yarn install --frozen-lockfile` on its own, without the rest
|
||||||
|
of `script/bootstrap`. Frozen so a stale `yarn.lock` fails instead of being
|
||||||
|
silently rewritten. Use `make setup` for a fresh clone.
|
||||||
|
- `make hooks` — shims to `script/install-precommit`
|
||||||
|
- `make build` — build the extension into `dist/chrome/` and `dist/firefox/`
|
||||||
|
- `make build-debug` — the same build with `AUTISTMASK_DEBUG=1` (see
|
||||||
|
[Debug Builds](#debug-builds))
|
||||||
|
- `make clean` — remove `dist/`
|
||||||
|
- `make dev` — build in watch mode
|
||||||
|
|
||||||
## End-to-End Tests
|
## End-to-End Tests
|
||||||
|
|
||||||
`make test-e2e` builds `dist/chrome/` and drives the **real popup in a real
|
`make test-e2e` builds `dist/chrome/` and drives the **real popup in a real
|
||||||
|
|||||||
4
TODO.md
4
TODO.md
@@ -44,6 +44,10 @@ undefined identifiers, which is how
|
|||||||
|
|
||||||
# Completed Steps
|
# Completed Steps
|
||||||
|
|
||||||
|
- 2026-08-11: Policy compliance sweep — conditional verbose test rerun, local
|
||||||
|
Tailwind binary instead of `npx`, `--frozen-lockfile` on `make install`, and
|
||||||
|
the Makefile-only targets documented in the README
|
||||||
|
([#166](https://git.eeqj.de/sneak/AutistMask/issues/166)).
|
||||||
- 2026-08-11: `script/verify-build` diagnostics corrected: the both-markers
|
- 2026-08-11: `script/verify-build` diagnostics corrected: the both-markers
|
||||||
message now states what is and is not proven, an unreadable bundle is
|
message now states what is and is not proven, an unreadable bundle is
|
||||||
diagnosed as an I/O fault rather than as changed output, the `*.js` assumption
|
diagnosed as an I/O fault rather than as changed output, the `*.js` assumption
|
||||||
|
|||||||
11
build.js
11
build.js
@@ -121,8 +121,17 @@ async function build() {
|
|||||||
// build that never gets around to writing one cannot be verified against
|
// build that never gets around to writing one cannot be verified against
|
||||||
// a stale list.
|
// a stale list.
|
||||||
fs.rmSync(BUNDLE_MANIFEST, { force: true });
|
fs.rmSync(BUNDLE_MANIFEST, { force: true });
|
||||||
|
// The locally installed binary, not `npx` — npx silently fetches from the
|
||||||
|
// registry when the binary is absent, which is an unpinned network fetch
|
||||||
|
// in the middle of a build.
|
||||||
|
const tailwindBin = path.join(
|
||||||
|
__dirname,
|
||||||
|
"node_modules",
|
||||||
|
".bin",
|
||||||
|
"tailwindcss",
|
||||||
|
);
|
||||||
execSync(
|
execSync(
|
||||||
`npx @tailwindcss/cli -i ${tailwindInput} -o ${tailwindOutput} --minify`,
|
`"${tailwindBin}" -i "${tailwindInput}" -o "${tailwindOutput}" --minify`,
|
||||||
{ stdio: "inherit" },
|
{ stdio: "inherit" },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest --forceExit",
|
"test": "jest --forceExit",
|
||||||
|
"test:verbose": "jest --forceExit --verbose",
|
||||||
"build": "node build.js",
|
"build": "node build.js",
|
||||||
"lint": "prettier --check .",
|
"lint": "prettier --check .",
|
||||||
"fmt": "prettier --write .",
|
"fmt": "prettier --write .",
|
||||||
|
|||||||
@@ -7,7 +7,13 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|||||||
main() {
|
main() {
|
||||||
cd "$ROOT"
|
cd "$ROOT"
|
||||||
echo "Running tests..."
|
echo "Running tests..."
|
||||||
timeout 30 yarn run test 2>&1
|
timeout 30 yarn run test 2>&1 || {
|
||||||
|
echo "--- Rerunning with --verbose for details ---"
|
||||||
|
timeout 30 yarn run test:verbose 2>&1 || true
|
||||||
|
# Always fail: the first run already proved the tests are broken, so a
|
||||||
|
# flaky pass on the rerun must not turn the build green.
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user