@pubinfo/vite 2.1.3-beta.1 → 2.1.3

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -304,8 +304,16 @@ function hasGitRepository() {
304
304
  return false;
305
305
  }
306
306
  }
307
+ function hasGitCommit() {
308
+ try {
309
+ execSync("git rev-parse --verify HEAD", { stdio: "ignore" });
310
+ return true;
311
+ } catch {
312
+ return false;
313
+ }
314
+ }
307
315
  function getGitInfo() {
308
- if (!hasGitRepository()) return {
316
+ if (!hasGitRepository() || !hasGitCommit()) return {
309
317
  commit: "",
310
318
  commitShort: "",
311
319
  branch: ""
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pubinfo/vite",
3
3
  "type": "module",
4
- "version": "2.1.3-beta.1",
4
+ "version": "2.1.3",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -49,8 +49,8 @@
49
49
  "vite-plugin-fake-server": "^2.2.0",
50
50
  "vite-plugin-lib-inject-css": "^2.2.2",
51
51
  "vite-plugin-vue-devtools": "^8.0.0",
52
- "@pubinfo/devtools": "2.1.3-beta.1",
53
- "@pubinfo/shared": "2.1.3-beta.1"
52
+ "@pubinfo/devtools": "2.1.3",
53
+ "@pubinfo/shared": "2.1.3"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/fs-extra": "^11.0.4",