Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6339fc9
update deps
zendive Feb 7, 2026
d5e548e
fix deno check errors
zendive Feb 7, 2026
d885d14
minimize `Error: cannot format delta type: unknown` errors:
zendive Feb 10, 2026
8072c48
include `:` symbol as part of HTML (was CSS) to make search for prope…
zendive Feb 10, 2026
76b9a79
update objectHash of jsondiffpatch
zendive Feb 10, 2026
7e447cc
use light-dark CSS function instead of relaying on theme class
zendive Feb 10, 2026
71cc3b3
deprecate custom HtmlFormatter for jsondiffpatch
zendive Feb 10, 2026
7aa3523
deprecate onColourSchemeChange.ts
zendive Feb 10, 2026
9a621bf
label potential error's origin
zendive Feb 10, 2026
fb35631
make/tree: filter relevant by extension
zendive Feb 10, 2026
dd2af48
bump version
zendive Feb 10, 2026
586ad91
tune build instructions
zendive Feb 10, 2026
9ede593
update objectHash with the most standard property names that may uniq…
zendive Feb 10, 2026
be285d6
update `allListeners` type + error handling
zendive Feb 11, 2026
07da76c
add `deno audit` to `make prod`
zendive Feb 13, 2026
f793135
continue collision with Object.prototype
zendive Feb 15, 2026
4d8de2f
copy delta in RFC6902 format
zendive Feb 15, 2026
9689be7
review
zendive Feb 16, 2026
21eb5a1
review catalogue's typing
zendive Feb 17, 2026
2e2d726
continue collision with Object.prototype
zendive Feb 17, 2026
a0d1fce
review
zendive Feb 18, 2026
74eb12f
failsafe `formatRFC6902`
zendive Feb 18, 2026
9c44527
introduce `castrateObject`
zendive Feb 18, 2026
caceaa6
update deps
zendive Feb 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 30 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,54 +1,71 @@
.PHONY:
install clean install dev valid test prod all
tune2chrome tune2firefox
.DEFAULT_GOAL := dev

CHROME_ZIP = "extension.chrome.zip"
# Ensure environment dependencies exist
REQUIRED_BINS := deno jq zip tree
$(foreach bin,$(REQUIRED_BINS),$(if $(shell command -v $(bin) 2> /dev/null),,$(error Missing dependency: `$(bin)`)))

CHROME_MANIFEST = ./manifest.chrome.json
FIREFOX_ZIP = "extension.firefox.zip"
CHROME_MANIFEST_VERSION != jq -j '.version' $(CHROME_MANIFEST)
CHROME_ZIP = "extension.chrome-$(CHROME_MANIFEST_VERSION).zip"
FIREFOX_MANIFEST = ./manifest.firefox.json
DENO_DEV = NODE_ENV=development deno run --watch
DENO_PROD = NODE_ENV=production deno run
DENO_OPTIONS = --allow-env --allow-read --allow-run
FIREFOX_MANIFEST_VERSION != jq -j '.version' $(FIREFOX_MANIFEST)
FIREFOX_ZIP = "extension.firefox-$(FIREFOX_MANIFEST_VERSION).zip"
DENO_DEV = BUILD_MODE=development deno run --watch --allow-env --allow-read --allow-run
DENO_PROD = BUILD_MODE=production deno run --allow-env --allow-read --allow-run
OUTPUT_DIR = ./public/
BUILD_DIR = ./public/build/
BUILD_SCRIPT = ./build.ts

.PHONY: clean
clean:
rm -rf ./node_modules ./deno.lock $(BUILD_DIR) $(CHROME_ZIP) $(FIREFOX_ZIP)

.PHONY: install
install:
deno install --allow-scripts

.PHONY: update
update:
deno update --latest

.PHONY: dev
dev:
rm -rf $(BUILD_DIR)
$(DENO_DEV) $(DENO_OPTIONS) $(BUILD_SCRIPT)
$(DENO_DEV) $(BUILD_SCRIPT)

.PHONY: valid
valid:
deno fmt --unstable-component
deno lint
deno check

.PHONY: test
test: valid
deno test --no-check --trace-leaks --reporter=dot

.PHONY: prod
prod: test
rm -rf $(BUILD_DIR)
$(DENO_PROD) $(DENO_OPTIONS) $(BUILD_SCRIPT)
$(DENO_PROD) $(BUILD_SCRIPT)
deno audit

.PHONY: tune2chrome
tune2chrome:
cp $(CHROME_MANIFEST) manifest.json

.PHONY: tune2firefox
tune2firefox:
cp $(FIREFOX_MANIFEST) manifest.json

.PHONY: all
all: prod
make tune2firefox
$(MAKE) tune2firefox
rm -rf $(FIREFOX_ZIP)
zip -r $(FIREFOX_ZIP) $(OUTPUT_DIR) ./manifest.json > /dev/null

make tune2chrome
$(MAKE) tune2chrome
rm -rf $(CHROME_ZIP)
zip -r $(CHROME_ZIP) $(OUTPUT_DIR) ./manifest.json > /dev/null
zip --delete $(CHROME_ZIP) "$(BUILD_DIR)firefox/*" > /dev/null

tree -Dis $(BUILD_DIR) *.zip
tree -Dis $(BUILD_DIR) *.zip | grep -E "\\.css|\\.js|\\.zip"
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,18 @@ declare global {
}
```

### Build requirements
- Linux: [deno](https://docs.deno.com/runtime/getting_started/installation/), `make`, `jq`, `zip`, `tree`

### Build instructions

- Linux
- [Deno](https://docs.deno.com/runtime/getting_started/installation/) 2.2.8
Here is a short list to help you get started, for a full set of make commands refer to [./Makefile](./Makefile):

```sh
make install # install dependencies
make all # build for prod and make extension.${browser}.zip
make tune2chrome # or tune2firefox for relevant manifest.json file
make dev # local development
make clean install # install dependencies
make tune2chrome # or tune2firefox to generate relevant manifest.json file
make dev # build in development mode and watch for changes
make all # build in production mode and make extension zip files
```

#### Based on
Expand Down
9 changes: 5 additions & 4 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { build, type BuildOptions, context, stop } from 'esbuild';
import manifest from './manifest.json' with { type: 'json' };
import { vue3Plugin } from 'esbuild-plugin-vue-iii';

const nodeEnv = Deno.env.get('NODE_ENV');
const isProd = nodeEnv === 'production';
const isProd = Deno.env.get('BUILD_MODE') === 'production';
const buildMode = isProd ? 'production' : 'development';
const logLevel = isProd ? 'warning' : 'debug';
const buildOptions: BuildOptions = {
plugins: [
vue3Plugin({
Expand Down Expand Up @@ -35,11 +36,11 @@ const buildOptions: BuildOptions = {
platform: 'browser',
format: 'iife',
target: 'esnext',
conditions: [`${nodeEnv}`],
conditions: [buildMode],
minify: isProd,
sourcemap: false,
treeShaking: true,
logLevel: isProd ? 'warning' : 'debug',
logLevel,
};

if (isProd) {
Expand Down
7 changes: 4 additions & 3 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"lib": ["dom", "dom.iterable", "dom.asynciterable", "deno.ns"],
"strict": true
},
"exclude": ["tmp/"],
"lint": {
"include": [
"src/",
Expand Down Expand Up @@ -32,10 +33,10 @@
]
},
"imports": {
"esbuild": "https://deno.land/x/esbuild@v0.25.2/mod.js",
"esbuild": "npm:esbuild@0.27.3",
"esbuild-plugin-vue-iii": "npm:esbuild-plugin-vue-iii@0.5.0",

"@std/expect": "jsr:@std/expect@1.0.15",
"@std/testing": "jsr:@std/testing@1.0.11"
"@std/expect": "jsr:@std/expect@1.0.18",
"@std/testing": "jsr:@std/testing@1.0.17"
}
}
Loading
Loading