This is an automated email from the ASF dual-hosted git repository.

100pah pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 13d69f1a Upgrade dep to 6.1.0 and tweak the build script.
13d69f1a is described below

commit 13d69f1a718749a180e9374ba6560a2961b96f21
Author: 100pah <[email protected]>
AuthorDate: Mon May 25 18:29:31 2026 +0800

    Upgrade dep to 6.1.0 and tweak the build script.
---
 README.md             |  8 +++++++-
 package-lock.json     | 21 +++++++++------------
 package.json          |  2 +-
 tool/build-example.js | 50 ++++++++++++++++++++++++++++----------------------
 4 files changed, 45 insertions(+), 36 deletions(-)

diff --git a/README.md b/README.md
index ef56d84a..2d2a936b 100644
--- a/README.md
+++ b/README.md
@@ -261,6 +261,11 @@ node e2e/main.js --skip npm --tests bar3D*
 
 ## Release
 
+Update echarts version in `package.json` to the latest version, and then
+```
+npm i --force
+```
+
 If any metadata is added/deleted/changed, we need to call the command below to 
sync that change to `echarts-examples/src/data/chart-list-data.js` and 
`echarts-examples/src/data/chart-list-data-gl.js`
 ```shell
 npm run build:examplelist
@@ -274,7 +279,8 @@ If any thumbnail in [example exporation 
page](https://echarts.apache.org/example
 # This process is time consuming.
 npm run build:example > result.log 2>&1
 # Note: it also calls build:examplelist internally.
-# Note: if encoutering problems, make sure your local installed puppeteer is 
in correct #   verion, and there is no local puppeteer installed in folder 
`echarts-examples/tool`.
+# Note: if encoutering problems, make sure your local installed puppeteer is 
in a correct
+#       version, and there is no local puppeteer installed in folder 
`echarts-examples/tool`.
 
 # Note: If only build for default theme:
 node tool/build-example.js -t default
diff --git a/package-lock.json b/package-lock.json
index 870c54f0..05db01f6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -40,7 +40,7 @@
         "css-loader": "^3.5.3",
         "cwebp-bin": "^6.1.1",
         "download-git-repo": "^3.0.2",
-        "echarts": "^6.0.0",
+        "echarts": "^6.1.0",
         "echarts-stat": "^1.2.0",
         "esbuild": "^0.8.34",
         "file-loader": "^6.2.0",
@@ -4743,14 +4743,13 @@
       "integrity": 
"sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
     },
     "node_modules/echarts": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/echarts/-/echarts-6.0.0.tgz";,
-      "integrity": 
"sha512-Tte/grDQRiETQP4xz3iZWSvoHrkCQtwqd6hs+mifXcjrCuo2iKWbajFObuLJVBlDIJlOzgQPd1hsaKt/3+OMkQ==",
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/echarts/-/echarts-6.1.0.tgz";,
+      "integrity": 
"sha512-q0yaFPggC9FUdsWH4blavRWFmxdrIodbkoKNAjJudAI6CA9gNPxHtV2RcZNEepZVlk4yvBYkOkbk6HIVpIyHZA==",
       "dev": true,
-      "license": "Apache-2.0",
       "dependencies": {
         "tslib": "2.3.0",
-        "zrender": "6.0.0"
+        "zrender": "6.1.0"
       }
     },
     "node_modules/echarts-stat": {
@@ -11589,11 +11588,10 @@
       }
     },
     "node_modules/zrender": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/zrender/-/zrender-6.0.0.tgz";,
-      "integrity": 
"sha512-41dFXEEXuJpNecuUQq6JlbybmnHaqqpGlbH1yxnA5V9MMP4SbohSVZsJIwz+zdjQXSSlR1Vc34EgH1zxyTDvhg==",
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/zrender/-/zrender-6.1.0.tgz";,
+      "integrity": 
"sha512-oEGMDB6pOP2S6OwRR4PdVv610zrjnA3Bh+JnSG12fYJlBKjtNAoEb5fSUoCOOINlH96I2fU38/A2UpRKs67xYQ==",
       "dev": true,
-      "license": "BSD-3-Clause",
       "dependencies": {
         "tslib": "2.3.0"
       }
@@ -11602,8 +11600,7 @@
       "version": "2.3.0",
       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz";,
       "integrity": 
"sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==",
-      "dev": true,
-      "license": "0BSD"
+      "dev": true
     }
   }
 }
diff --git a/package.json b/package.json
index 81078eb4..d36cef32 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
     "css-loader": "^3.5.3",
     "cwebp-bin": "^6.1.1",
     "download-git-repo": "^3.0.2",
-    "echarts": "^6.0.0",
+    "echarts": "^6.1.0",
     "echarts-stat": "^1.2.0",
     "esbuild": "^0.8.34",
     "file-loader": "^6.2.0",
diff --git a/tool/build-example.js b/tool/build-example.js
index a1c85c5e..1378fe09 100644
--- a/tool/build-example.js
+++ b/tool/build-example.js
@@ -96,6 +96,15 @@ async function convertToWebP(filePath) {
   ]);
 }
 
+function unlink(filePath) {
+  try {
+    fs.unlinkSync(filePath);
+  } catch (e) {
+    console.error('[ERROR] fs.unlinkSync("' + filePath + '");');
+    console.error(chalk.red(e));
+  }
+}
+
 async function takeScreenshot(
   browser,
   ffmpeg,
@@ -173,13 +182,13 @@ async function takeScreenshot(
     }
   });
 
-  console.log(`Generating ${theme} thumbs.....${basename}`);
+  console.log(`[--- Generating ${theme} thumbs: ${basename} ---]`);
   // 
https://stackoverflow.com/questions/46160929/puppeteer-wait-for-all-images-to-load-then-take-screenshot
   try {
     try {
       await page.goto(url, {
         waitUntil: 'networkidle0',
-        timeout: 20000
+        timeout: 30000
       });
     } catch (e) {
       console.error(chalk.red(e));
@@ -232,12 +241,8 @@ async function takeScreenshot(
       }
     }
 
-    try {
-      fs.unlinkSync(filePathOld);
-    } catch (e) {}
-
-    fs.unlinkSync(filePathTmpRaw);
-    fs.unlinkSync(filePathTmp);
+    unlink(filePathTmpRaw);
+    unlink(filePathTmp);
 
     if (hasVideo) {
       await checkingDownload;
@@ -254,27 +259,36 @@ async function takeScreenshot(
           `ffmpeg -y -i "${fileBase}.webm" -s 
${OUTPUT_IMAGE_WIDTH}x${OUTPUT_IMAGE_HEIGHT} -f webp "${fileBase}.webp"`
         );
       } catch (e) {
-        console.error(e);
+        console.error(chalk.red(e));
       }
       console.log(`WebP file created: ${fileBase}.webp`);
-      try {
-        fs.unlinkSync(webmFile);
-      } catch (e) {}
+
+      unlink(webmFile);
     }
   } catch (e) {
-    console.error(url);
-    console.error(e.toString());
+    console.error('[ERROR] on URL: ' + url);
+    console.error(e);
   }
   await page.close();
 }
 
 (async () => {
+
   const rootDir = path.join(__dirname, '../');
   // TODO puppeteer will have Navigation Timeout Exceeded: 30000ms exceeded 
error in these examples.
   const screenshotBlackList = [];
 
   let server; // Declare server at function scope
 
+  process.on('SIGINT', function () {
+    console.log('SIGINT Close.');
+    if (server) {
+      server.close();
+    }
+    // Close through ctrl + c;
+    process.exit();
+  });
+
   const examplesRoot = `${rootDir}public/examples`;
   const filesPrimary = await globby(`js/${isGL ? 'gl/' : ''}*.js`, {
     cwd: examplesRoot,
@@ -512,12 +526,4 @@ export default ${JSON.stringify(exampleList, null, 2)}
     // ffmpeg.exit(0);
   }
 
-  process.on('SIGINT', function () {
-    console.log('Closing');
-    if (server) {
-      server.close();
-    }
-    // Close through ctrl + c;
-    process.exit();
-  });
 })();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to