@youtyan/code-viewer 0.2.1 → 0.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youtyan/code-viewer",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Local browser-based code and git diff viewer",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,11 +28,11 @@
28
28
  ],
29
29
  "scripts": {
30
30
  "build": "bun run build:web && bun run build:server",
31
- "build:web": "bun build --target=browser --format=iife --outfile=web/app.js web-src/app.ts && bun build --target=browser --format=esm --outfile=web/mermaid.js web-src/mermaid-entry.ts && bun build --target=browser --format=esm --outfile=web/shiki.js web-src/shiki-entry.ts",
31
+ "build:web": "bun build --target=browser --format=iife --outfile=web/app.js web-src/app.ts && bun build --target=browser --format=esm --outfile=web/mermaid.js web-src/mermaid-entry.ts && bun build --target=browser --format=esm --outfile=web/shiki.js web-src/shiki-entry.ts && node scripts/generate-third-party-notices.mjs",
32
32
  "build:server": "bun build --target=node --format=esm --outfile=dist/code-viewer.js web-src/server/cli.ts",
33
33
  "check": "bun run typecheck",
34
34
  "typecheck": "tsc --noEmit",
35
- "check:bundle": "bun build --target=browser --format=iife --outfile=/tmp/code-viewer-app.js web-src/app.ts && cmp /tmp/code-viewer-app.js web/app.js && bun build --target=browser --format=esm --outfile=/tmp/code-viewer-mermaid.js web-src/mermaid-entry.ts && cmp /tmp/code-viewer-mermaid.js web/mermaid.js && bun build --target=browser --format=esm --outfile=/tmp/code-viewer-shiki.js web-src/shiki-entry.ts && cmp /tmp/code-viewer-shiki.js web/shiki.js",
35
+ "check:bundle": "node scripts/check-bundle.mjs",
36
36
  "check:format": "biome format .",
37
37
  "dev": "bun run web-src/server/dev.ts",
38
38
  "preview": "bun run web-src/server/dev.ts",
@@ -55,14 +55,17 @@
55
55
  "license": "MIT",
56
56
  "devDependencies": {
57
57
  "@biomejs/biome": "2.4.14",
58
- "@types/bun": "latest",
59
- "@types/markdown-it": "^14.1.2",
60
- "markdown-it": "^14.1.1",
61
- "markdown-it-anchor": "^9.2.0",
62
- "markdown-it-footnote": "^4.0.0",
63
- "mermaid": "^11.14.0",
64
- "shiki": "^4.0.2",
65
- "typescript": "^5.0.0"
58
+ "@types/bun": "1.3.13",
59
+ "@types/markdown-it": "14.1.2",
60
+ "markdown-it": "14.1.1",
61
+ "markdown-it-anchor": "9.2.0",
62
+ "markdown-it-footnote": "4.0.0",
63
+ "mermaid": "11.14.0",
64
+ "shiki": "4.0.2",
65
+ "typescript": "5.9.3"
66
+ },
67
+ "optionalDependencies": {
68
+ "better-sqlite3": "12.9.0"
66
69
  },
67
70
  "engines": {
68
71
  "node": ">=20.0.0"
@@ -1,12 +1,19 @@
1
1
  # Vendored Browser Assets
2
2
 
3
- These files are committed so git-diff-preview works offline and does not load
4
- CDN assets from the browser.
3
+ These browser assets are served locally so git-diff-preview works offline and
4
+ does not load CDN assets from the browser. Some assets are committed here, and
5
+ the generated bundles next to this directory are produced at build / pack time.
5
6
 
6
7
  | Package | Version | Files | License |
7
8
  | --- | --- | --- | --- |
8
9
  | diff2html | 3.4.56 | `diff2html/diff2html.min.css`, `diff2html/diff2html-ui.min.js` | MIT, https://github.com/rtfpessoa/diff2html |
9
10
  | highlight.js | 11.9.0 | `highlight.js/highlight.min.js`, `highlight.js/styles/github*.min.css` | BSD-3-Clause, https://github.com/highlightjs/highlight.js |
11
+ | Browser bundle dependencies | fixed by `bun.lock` | generated `../app.js`, `../mermaid.js`, `../shiki.js` | see `THIRD_PARTY_NOTICES.txt` |
10
12
 
11
13
  `diff2html-ui.min.js` is the UI bundle from the npm package. `highlight.min.js`
12
14
  is the standard browser build for highlight.js 11.9.0.
15
+
16
+ `../app.js`, `../mermaid.js`, and `../shiki.js` are generated by
17
+ `bun run build:web` and are included in npm tarballs, but are not tracked in git.
18
+ `THIRD_PARTY_NOTICES.txt` is generated from the installed npm packages during
19
+ the same build.