Skip to content

Commit bb54911

Browse files
authored
Next 3.0.2 (#13) - support dark devtools colour scheme
- change layout: fixed toolbar, scrollable body - fix messaging in anonymous frames and local html files - update and improve local build tools
1 parent 0b32796 commit bb54911

21 files changed

+1219
-1303
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/bundle/js
22
.ts-built
33
*.min.js
4+
pnpm-lock.yaml

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"json.schemaDownload.enable": true
3-
}
3+
}

Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
ZIP_FILE="extension.zip"
2+
HASH_ALG=sha384
3+
BIN=node_modules/.bin
4+
5+
.PHONY:
6+
install all dev prod build format lint clean
7+
8+
install:
9+
npm i -g pnpm
10+
pnpm i
11+
12+
all: build
13+
14+
dev:
15+
NODE_OPTIONS="--loader=ts-node/esm" \
16+
$(BIN)/webpack --progress --watch --mode=development
17+
18+
prod:
19+
NODE_OPTIONS="--loader=ts-node/esm --no-warnings=ExperimentalWarning" \
20+
NODE_ENV="production" \
21+
$(BIN)/webpack --mode=production
22+
23+
build:
24+
make lint
25+
make prod
26+
make zip
27+
make print_zip_hash
28+
29+
zip:
30+
rm -rf $(ZIP_FILE)
31+
zip -r $(ZIP_FILE) ./bundle ./manifest.json > /dev/null
32+
33+
print_zip_hash:
34+
FILE_HASH=$$(openssl dgst -$(HASH_ALG) -binary $(ZIP_FILE) | openssl base64 -A); \
35+
echo "$(ZIP_FILE) $(HASH_ALG):$$FILE_HASH"
36+
37+
format:
38+
$(BIN)/prettier . --write
39+
40+
lint:
41+
$(BIN)/tsc -noEmit
42+
43+
clean:
44+
rm -rf ./node_modules
45+
rm -rf $(ZIP_FILE)
46+
rm -rf ./bundle/js/

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Chrome extension to compare objects in memory with console.diff(old, new) devtoo
2929
- Button to clear current result.
3030
- Indicator of the last update time.
3131
- Indicator of a fatal error (out of storage memory).
32+
- Devtools light/dark colour scheme support.
3233

3334
- Compare objects between multiple [sub]domains, chrome tabs, or single page reloads.
3435

@@ -66,9 +67,7 @@ Chrome extension to compare objects in memory with console.diff(old, new) devtoo
6667

6768
[i10]: https://github.com/zendive/jsdiff/issues/10
6869

69-
- Compared objects, after being serialized, and stored in `chrome.storage.local` wich has 10MB limit.
70-
71-
- Will not work on `file:///` prorocol and https://chrome.google.com/webstore site.
70+
- Compared objects, after being serialized, stored in `chrome.storage.local` wich has 10MB limit (before chrome v114 was 5MB).
7271

7372
### API
7473

@@ -102,7 +101,7 @@ console.diffLeft(Date.now());
102101
console.diffRight(Date.now());
103102
```
104103

105-
- **console.diff\_(\*)** - deprecated, left for backward compatibility, uses `nativeClone` based of JSON.parse(JSON.stringify(...)) serialization method
104+
- **console.diff\_(\*)** - uses deprecated `nativeClone` serialization method, based of JSON.parse(JSON.stringify(...)), left for backward compatibility
106105

107106
### Usage basics
108107

@@ -126,12 +125,11 @@ Historically, left side represents the old state and right side the new state.
126125
### How to build
127126

128127
- requires npm/nodejs
129-
- requires pnpm `npm i -g pnpm`
130128

131129
```sh
132-
pnpm i
133-
pnpm dev # local development
134-
pnpm zip # make extension.zip
130+
make install # to install dependencies
131+
make all # build for prod and make extension.zip
132+
make dev # local development
135133
```
136134

137135
### Protection

bundle/js/jsdiff-console.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/js/jsdiff-devtools.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/js/jsdiff-panel.js

Lines changed: 29 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/js/jsdiff-proxy.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifest.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
{
2-
"name": "console.diff(...)",
3-
"description": "Compare objects in memory with console.diff(old, new) devtools function",
4-
"version": "3.0.1",
52
"manifest_version": 3,
3+
"name": "console.diff(...)",
4+
"version": "3.0.2",
65
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlCx2Bl0li+3idvfrH9cQL/MzphafGFqMUA2P+0vbyhwxsxWl0llOaGQbkirX5qCoAVHoUCPqu3hCjpVCv35igPbfqDs5bdLZZmXt2F0HjEQnWI/eZKd9IKcKYMplEeL2BodmpU02VrP1UnUzQHZeeMWk9ybgWOqCimkwliILVubRj5dxNB9AidLwO4Z5iGq/OvW9AJMYdxKxrLP2lF6/GGNcCBg+iCJZwlQOhFB9LbUjytT4ws3bIEX4b5zmWLqGKR1NiZfGug2eCWXt9oEKg2WkbXmBBzFKqxnM/bBUrVR29N9qNgx0f42qnyhsW3Bo4kPzE3d0asXCV5nofLTLEwIDAQAB",
6+
"description": "Compare objects in memory with console.diff(old, new) devtools function",
77
"minimum_chrome_version": "100.0",
8+
"homepage_url": "https://github.com/zendive/jsdiff",
9+
"author": "[email protected]",
10+
"permissions": ["storage"],
11+
"host_permissions": ["*://*/*"],
812
"devtools_page": "bundle/jsdiff-devtools.html",
13+
"icons": {
14+
"28": "bundle/img/panel-icon28.png",
15+
"64": "bundle/img/panel-icon64.png",
16+
"128": "bundle/img/panel-icon128.png"
17+
},
918
"content_scripts": [
1019
{
1120
"world": "MAIN",
@@ -22,12 +31,5 @@
2231
"all_frames": true,
2332
"run_at": "document_start"
2433
}
25-
],
26-
"icons": {
27-
"28": "bundle/img/panel-icon28.png",
28-
"64": "bundle/img/panel-icon64.png",
29-
"128": "bundle/img/panel-icon128.png"
30-
},
31-
"permissions": ["storage"],
32-
"host_permissions": ["*://*/*"]
34+
]
3335
}

0 commit comments

Comments
 (0)