@thi.ng/hdiff 1.1.8 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-04-01T21:42:04Z
3
+ - **Last updated**: 2025-04-30T12:52:32Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -11,6 +11,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
11
11
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
12
12
  and/or version bumps of transitive dependencies.
13
13
 
14
+ ## [1.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hdiff@1.2.0) (2025-04-16)
15
+
16
+ #### 🚀 Features
17
+
18
+ - add project credits in generated HTML header ([da63079](https://github.com/thi-ng/umbrella/commit/da63079))
19
+
14
20
  ## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hdiff@1.1.0) (2025-02-11)
15
21
 
16
22
  #### 🚀 Features
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 205 standalone projects, maintained as part
10
+ > This is one of 206 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
@@ -67,7 +67,7 @@ For Node.js REPL:
67
67
  const hdiff = await import("@thi.ng/hdiff");
68
68
  ```
69
69
 
70
- Package sizes (brotli'd, pre-treeshake): ESM: 1.39 KB
70
+ Package sizes (brotli'd, pre-treeshake): ESM: 1.42 KB
71
71
 
72
72
  ### CLI installation & usage
73
73
 
package/cli.js CHANGED
@@ -15,7 +15,19 @@ if (args.length === 3) {
15
15
  const [rev1, rev2] = args;
16
16
  src1 = readFileSync(rev1).toString();
17
17
  src2 = readFileSync(rev2).toString();
18
- headerBody = ["header", ["h1", "File diff"], ["code", `${rev1} \u21CC ${rev2}`]];
18
+ headerBody = [
19
+ "header",
20
+ [
21
+ "h1",
22
+ "File diff",
23
+ [
24
+ "small",
25
+ "Made with ",
26
+ ["a", { href: "https://thi.ng/hdiff" }, "thi.ng/hdiff"]
27
+ ]
28
+ ],
29
+ ["code", `${rev1} \u21CC ${rev2}`]
30
+ ];
19
31
  } else {
20
32
  console.log("Usage:\n hdiff file1 file2\n hdiff relpath gitrev1 gitrev2");
21
33
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hdiff",
3
- "version": "1.1.8",
3
+ "version": "1.2.1",
4
4
  "description": "String diffing w/ hiccup output for further processing, e.g. with @thi.ng/hdom, @thi.ng/hiccup. Includes CLI util to generate HTML, with theme support and code folding",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,17 +40,17 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.11.25",
44
- "@thi.ng/diff": "^5.1.92",
45
- "@thi.ng/hiccup": "^5.3.10",
46
- "@thi.ng/hiccup-css": "^2.7.45",
47
- "@thi.ng/strings": "^3.9.10"
43
+ "@thi.ng/api": "^8.11.27",
44
+ "@thi.ng/diff": "^5.1.94",
45
+ "@thi.ng/hiccup": "^5.3.12",
46
+ "@thi.ng/hiccup-css": "^2.7.47",
47
+ "@thi.ng/strings": "^3.9.12"
48
48
  },
49
49
  "devDependencies": {
50
- "@types/node": "^22.13.14",
51
- "esbuild": "^0.25.2",
52
- "typedoc": "^0.28.1",
53
- "typescript": "^5.8.2"
50
+ "@types/node": "^22.15.3",
51
+ "esbuild": "^0.25.3",
52
+ "typedoc": "^0.28.3",
53
+ "typescript": "^5.8.3"
54
54
  },
55
55
  "keywords": [
56
56
  "cli",
@@ -96,5 +96,5 @@
96
96
  "status": "alpha",
97
97
  "year": 2018
98
98
  },
99
- "gitHead": "87aa2d0e64a357476c10fd57aabdfded13c79f7d\n"
99
+ "gitHead": "4354686a6fb1f82c09ea48f92f87786191b231a0\n"
100
100
  }
package/theme.js CHANGED
@@ -31,9 +31,11 @@ const compileTheme = (theme) => css(
31
31
  margin: "0 0 0.25rem 0",
32
32
  padding: "0 0 0.25rem 0",
33
33
  "border-bottom": "1px dotted currentColor",
34
- "font-weight": 100
34
+ "font-weight": 100,
35
+ "letter-spacing": "-0.05rem"
35
36
  }
36
37
  ],
38
+ ["small", { "margin-left": "1rem", "font-size": "60%" }],
37
39
  ["code", { "font-size": "66%" }]
38
40
  ],
39
41
  ["main", { "margin-top": "5rem" }],