From 0b654ec79ffe055fda086ec29e8598214d57bb86 Mon Sep 17 00:00:00 2001 From: bddjr Date: Fri, 17 Jan 2025 17:11:44 +0800 Subject: [PATCH] 1.3.3 upgrade base128-ascii@2.1.0 --- README.md | 10 +++++----- package-lock.json | 12 ++++++------ package.json | 4 ++-- src/getVersion.ts | 4 ++-- src/index.ts | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c784a77..1163397 100644 --- a/README.md +++ b/README.md @@ -96,15 +96,15 @@ vite v6.0.7 building for production... ✓ 45 modules transformed. rendering chunks (1)... -vite-plugin-singlefile-compression 1.3.2 building... +vite-plugin-singlefile-compression 1.3.3 building... - file:///d/bddjr/Desktop/code/js/vite-plugin-singlefile-compression/test/dist/index.html - 101.56 KiB -> 46.74 KiB + file:///D:/bddjr/Desktop/code/js/vite-plugin-singlefile-compression/test/dist/index.html + 101.56 KiB -> 46.32 KiB Finish. -dist/index.html 47.86 kB -✓ built in 634ms +dist/index.html 47.42 kB +✓ built in 696ms ``` ![](effect.jpg) diff --git a/package-lock.json b/package-lock.json index 75131c7..8e4eeeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "vite-plugin-singlefile-compression", - "version": "1.3.2", + "version": "1.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vite-plugin-singlefile-compression", - "version": "1.3.2", + "version": "1.3.3", "license": "MIT", "dependencies": { "@types/html-minifier-terser": "^7.0.2", "@types/node": "^22.9.3", - "base128-ascii": "^2.0.3", + "base128-ascii": "^2.1.0", "esbuild": "^0.24.0", "html-minifier-terser": "^7.2.0", "mime": "^4.0.4", @@ -808,9 +808,9 @@ "license": "MIT" }, "node_modules/base128-ascii": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/base128-ascii/-/base128-ascii-2.0.3.tgz", - "integrity": "sha512-LLFSKXteInKu9bDZNyqlAMJbEdWGYWZXnWChww7EHztB0fOJXImuFRaSh7xGhhFdBOKLR51UlFjSZMZsFX0tBw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/base128-ascii/-/base128-ascii-2.1.0.tgz", + "integrity": "sha512-ElW/XrHwQXdRmtil3oft/cMY0SMzOkc+CTYSbm2Kr96mFx4T2yossvKzwk8O2ZznLeSNHqv5eThe8lfiHuYYKg==", "license": "Unlicense", "dependencies": { "@types/node": "^22.10.5", diff --git a/package.json b/package.json index 55418eb..e2aa2e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vite-plugin-singlefile-compression", - "version": "1.3.2", + "version": "1.3.3", "main": "dist/index.js", "typings": "dist/index.d.ts", "files": [ @@ -42,7 +42,7 @@ "dependencies": { "@types/html-minifier-terser": "^7.0.2", "@types/node": "^22.9.3", - "base128-ascii": "^2.0.3", + "base128-ascii": "^2.1.0", "esbuild": "^0.24.0", "html-minifier-terser": "^7.2.0", "mime": "^4.0.4", diff --git a/src/getVersion.ts b/src/getVersion.ts index f4b6caf..5ae1a31 100644 --- a/src/getVersion.ts +++ b/src/getVersion.ts @@ -1,8 +1,8 @@ import fs from 'fs' -import path from 'path' +import { fileURLToPath } from 'url' export const { version } = JSON.parse( fs.readFileSync( - path.join(import.meta.dirname, "../package.json") + fileURLToPath(import.meta.resolve("../package.json")) ).toString() ) as { version: string } diff --git a/src/index.ts b/src/index.ts index 6c34ba0..ab60db2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -62,7 +62,7 @@ function setConfig(config: UserConfig) { async function generateBundle(bundle: OutputBundle, config: ResolvedConfig, options: innerOptions) { console.log(pc.cyan('\n\nvite-plugin-singlefile-compression ' + version) + pc.green(' building...')) - const distURL = pathToFileURL(path.resolve(config.build.outDir)).href + '/' + const distURL = pathToFileURL(config.build.outDir).href + '/' const globalDelete = new Set() const globalDoNotDelete = new Set()