@tomjs/vite-plugin-vscode 4.2.1 → 4.3.0

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/dist/index.js CHANGED
@@ -305,16 +305,13 @@ ${file}`,
305
305
  port = 8098;
306
306
  }
307
307
  if (port) {
308
- html = html.replace(
309
- /<head>/i,
310
- `<head><script src="http://localhost:${port}"></script>`
311
- );
308
+ html = html.replace(/<head>/i, `<head><script src="http://localhost:${port}"></script>`);
312
309
  } else if (!devtoolsFlag) {
313
310
  devtoolsFlag = true;
314
311
  logger.warn("Only support react-devtools and vue-devtools!");
315
312
  }
316
313
  }
317
- return html.replace(/<\/title>/i, `</title><script>${devWebviewClient}</script>`);
314
+ return html.replace(/<head>/i, `<head><script>${devWebviewClient}</script>`);
318
315
  }
319
316
  },
320
317
  {
package/dist/index.mjs CHANGED
@@ -1,15 +1,15 @@
1
- // node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_postcss@8.5.3_tsx@4.19.4_typescript@5.7.3_yaml@2.7.1/node_modules/tsup/assets/esm_shims.js
2
- import { fileURLToPath } from "url";
1
+ // node_modules/.pnpm/tsup@8.5.0_@swc+core@1.11.24_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_typescript@5.7.3_yaml@2.8.0/node_modules/tsup/assets/esm_shims.js
3
2
  import path from "path";
3
+ import { fileURLToPath } from "url";
4
4
  var getFilename = () => fileURLToPath(import.meta.url);
5
5
  var getDirname = () => path.dirname(getFilename());
6
6
  var __dirname = /* @__PURE__ */ getDirname();
7
7
 
8
8
  // src/index.ts
9
- import fs from "node:fs";
10
- import os from "node:os";
11
- import path2 from "node:path";
12
- import { cwd } from "node:process";
9
+ import fs from "fs";
10
+ import os from "os";
11
+ import path2 from "path";
12
+ import { cwd } from "process";
13
13
  import { emptyDirSync, readFileSync, readJsonSync } from "@tomjs/node";
14
14
  import merge from "lodash.merge";
15
15
  import { parse as htmlParser } from "node-html-parser";
@@ -312,16 +312,13 @@ ${file}`,
312
312
  port = 8098;
313
313
  }
314
314
  if (port) {
315
- html = html.replace(
316
- /<head>/i,
317
- `<head><script src="http://localhost:${port}"></script>`
318
- );
315
+ html = html.replace(/<head>/i, `<head><script src="http://localhost:${port}"></script>`);
319
316
  } else if (!devtoolsFlag) {
320
317
  devtoolsFlag = true;
321
318
  logger.warn("Only support react-devtools and vue-devtools!");
322
319
  }
323
320
  }
324
- return html.replace(/<\/title>/i, `</title><script>${devWebviewClient}</script>`);
321
+ return html.replace(/<head>/i, `<head><script>${devWebviewClient}</script>`);
325
322
  }
326
323
  },
327
324
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomjs/vite-plugin-vscode",
3
- "version": "4.2.1",
3
+ "version": "4.3.0",
4
4
  "description": "Use vue/react to develop 'vscode extension webview', supporting esm/cjs",
5
5
  "author": {
6
6
  "name": "Tom Gao",
@@ -59,31 +59,31 @@
59
59
  "kolorist": "^1.8.0",
60
60
  "lodash.clonedeep": "^4.5.0",
61
61
  "lodash.merge": "^4.6.2",
62
- "node-html-parser": "^6.1.13",
63
- "tsup": "^8.4.0"
62
+ "node-html-parser": "^7.0.1",
63
+ "tsup": "^8.5.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@commitlint/cli": "^19.8.1",
67
67
  "@tomjs/commitlint": "^4.0.0",
68
- "@tomjs/eslint": "^5.0.0",
68
+ "@tomjs/eslint": "^5.2.0",
69
69
  "@tomjs/stylelint": "^6.0.0",
70
- "@tomjs/tsconfig": "^1.7.2",
70
+ "@tomjs/tsconfig": "^2.0.0",
71
71
  "@types/lodash.clonedeep": "^4.5.9",
72
72
  "@types/lodash.merge": "^4.6.9",
73
- "@types/node": "18.19.100",
73
+ "@types/node": "18.19.120",
74
74
  "@vitejs/plugin-vue": "^5.2.4",
75
75
  "cross-env": "^7.0.3",
76
- "eslint": "^9.26.0",
77
- "globals": "^15.15.0",
78
- "lint-staged": "^15.5.2",
76
+ "eslint": "^9.31.0",
77
+ "globals": "^16.3.0",
78
+ "lint-staged": "^16.1.2",
79
79
  "npm-run-all": "^4.1.5",
80
80
  "rimraf": "^6.0.1",
81
81
  "simple-git-hooks": "^2.13.0",
82
- "stylelint": "^16.19.1",
83
- "tsx": "^4.19.4",
82
+ "stylelint": "^16.22.0",
83
+ "tsx": "^4.20.3",
84
84
  "typescript": "~5.7.3",
85
85
  "vite": "^6.3.5",
86
- "vue-tsc": "^2.2.10"
86
+ "vue-tsc": "^2.2.12"
87
87
  },
88
88
  "scripts": {
89
89
  "dev": "pnpm clean && tsup --watch",