@zenuml/core 3.47.5 → 3.47.7
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/bun.lock +3 -67
- package/dist/zenuml.esm.mjs +19250 -19051
- package/dist/zenuml.js +542 -543
- package/package.json +4 -4
- package/vite.config.lib.ts +15 -7
- package/vite.config.ts +9 -2
- package/dist/stats.html +0 -4949
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenuml/core",
|
|
3
|
-
"version": "3.47.
|
|
3
|
+
"version": "3.47.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"build:site": "bun run --bun vite build",
|
|
13
13
|
"build:gh-pages": "bun run --bun vite build --mode gh-pages",
|
|
14
14
|
"build": "bun run --bun vite build -c vite.config.lib.ts",
|
|
15
|
+
"build:release": "RELEASE=1 bun run --bun vite build -c vite.config.lib.ts",
|
|
16
|
+
"build:analyze": "RELEASE=1 ANALYZE=1 bun run --bun vite build -c vite.config.lib.ts",
|
|
15
17
|
"test": "bun test src test/unit",
|
|
16
18
|
"pw": "playwright test --reporter=list",
|
|
17
19
|
"pw:ci": "playwright test",
|
|
@@ -77,7 +79,7 @@
|
|
|
77
79
|
"clsx": "^2.1.1",
|
|
78
80
|
"color-string": "^2.1.4",
|
|
79
81
|
"dompurify": "^3.3.1",
|
|
80
|
-
"highlight.js": "^10.
|
|
82
|
+
"highlight.js": "^11.10.0",
|
|
81
83
|
"html-to-image": "^1.11.13",
|
|
82
84
|
"immer": "^10.2.0",
|
|
83
85
|
"jotai": "^2.16.1",
|
|
@@ -102,7 +104,6 @@
|
|
|
102
104
|
"@testing-library/react": "^16.3.1",
|
|
103
105
|
"@types/antlr4": "~4.11.6",
|
|
104
106
|
"@types/color-string": "^1.5.5",
|
|
105
|
-
"@types/highlight.js": "^10.1.0",
|
|
106
107
|
"@types/jsdom": "^21.1.7",
|
|
107
108
|
"@types/marked": "^4.3.2",
|
|
108
109
|
"@types/node": "^22.19.3",
|
|
@@ -131,7 +132,6 @@
|
|
|
131
132
|
"vite": "^6.4.1",
|
|
132
133
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
133
134
|
"vite-plugin-svgr": "^4.5.0",
|
|
134
|
-
"vite-svg-loader": "^5.1.0",
|
|
135
135
|
"vitest": "^3.2.4",
|
|
136
136
|
"wrangler": "^4.88"
|
|
137
137
|
}
|
package/vite.config.lib.ts
CHANGED
|
@@ -20,6 +20,9 @@ const gitBranch = process.env.DOCKER
|
|
|
20
20
|
? ""
|
|
21
21
|
: execSync("git branch --show-current").toString().trim();
|
|
22
22
|
|
|
23
|
+
const isReleaseBuild = process.env.RELEASE === "1";
|
|
24
|
+
const shouldAnalyzeBundle = process.env.ANALYZE === "1";
|
|
25
|
+
|
|
23
26
|
// Merge all cloud-provider icon SVGs into a single chunk instead of 500+
|
|
24
27
|
function manualChunks(id: string) {
|
|
25
28
|
if (
|
|
@@ -36,6 +39,7 @@ function manualChunks(id: string) {
|
|
|
36
39
|
|
|
37
40
|
export default defineConfig({
|
|
38
41
|
build: {
|
|
42
|
+
target: "esnext",
|
|
39
43
|
// https://vitejs.dev/guide/build.html#library-mode
|
|
40
44
|
lib: {
|
|
41
45
|
entry: resolve(__dirname, "src/core.tsx"),
|
|
@@ -44,7 +48,7 @@ export default defineConfig({
|
|
|
44
48
|
name: "ZenUML",
|
|
45
49
|
fileName: "zenuml",
|
|
46
50
|
},
|
|
47
|
-
sourcemap:
|
|
51
|
+
sourcemap: isReleaseBuild,
|
|
48
52
|
rollupOptions: {
|
|
49
53
|
output: [
|
|
50
54
|
{
|
|
@@ -69,12 +73,16 @@ export default defineConfig({
|
|
|
69
73
|
svgr(),
|
|
70
74
|
react(),
|
|
71
75
|
cssInjectedByJsPlugin(),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
...(shouldAnalyzeBundle
|
|
77
|
+
? [
|
|
78
|
+
visualizer({
|
|
79
|
+
filename: "dist/stats.html",
|
|
80
|
+
open: false,
|
|
81
|
+
gzipSize: true,
|
|
82
|
+
brotliSize: true,
|
|
83
|
+
}),
|
|
84
|
+
]
|
|
85
|
+
: []),
|
|
78
86
|
],
|
|
79
87
|
define: {
|
|
80
88
|
"process.env.NODE_ENV": '"production"',
|
package/vite.config.ts
CHANGED
|
@@ -16,6 +16,11 @@ const packageJson = JSON.parse(
|
|
|
16
16
|
readFileSync(resolve(__dirname, "package.json"), "utf-8"),
|
|
17
17
|
);
|
|
18
18
|
|
|
19
|
+
// e2e fixtures and test-compression.html are served via the Vite dev server
|
|
20
|
+
// (Playwright launches `bun run dev` — see playwright.config.ts), so they
|
|
21
|
+
// don't need to be part of the production site build. Set INCLUDE_E2E_HTML=1
|
|
22
|
+
// to bundle them into a built site (rare; only needed if hosting the
|
|
23
|
+
// fixtures statically instead of running them via dev server).
|
|
19
24
|
function getE2eHtmlFiles() {
|
|
20
25
|
const e2eFolder = resolve(__dirname, "e2e");
|
|
21
26
|
const strings = execSync(`find ${e2eFolder} -name '*.html'`)
|
|
@@ -26,14 +31,16 @@ function getE2eHtmlFiles() {
|
|
|
26
31
|
return strings;
|
|
27
32
|
}
|
|
28
33
|
|
|
29
|
-
const
|
|
34
|
+
const includeE2eHtml = process.env.INCLUDE_E2E_HTML === "1";
|
|
35
|
+
const e2eHtmlFiles = includeE2eHtml ? getE2eHtmlFiles() : [];
|
|
36
|
+
const optionalDevHtml = includeE2eHtml ? ["test-compression.html"] : [];
|
|
30
37
|
|
|
31
38
|
export default defineConfig(({ mode }) => ({
|
|
32
39
|
base: mode === "gh-pages" ? "/zenuml-core/" : "/",
|
|
33
40
|
build: {
|
|
34
41
|
target: "esnext",
|
|
35
42
|
rollupOptions: {
|
|
36
|
-
input: ["index.html", "embed.html", "renderer.html",
|
|
43
|
+
input: ["index.html", "embed.html", "renderer.html", ...optionalDevHtml, ...e2eHtmlFiles],
|
|
37
44
|
},
|
|
38
45
|
},
|
|
39
46
|
resolve: {
|