screw-up 0.10.0 → 0.11.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/analyzer.d.ts.map +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{internal-Dli6fSLz.cjs → internal--D7IlmDn.cjs} +10 -15
- package/dist/{internal-Dli6fSLz.cjs.map → internal--D7IlmDn.cjs.map} +1 -1
- package/dist/{internal-CzKyZ9wb.js → internal-D-ECO0sh.js} +10 -15
- package/dist/{internal-CzKyZ9wb.js.map → internal-D-ECO0sh.js.map} +1 -1
- package/package.json +6 -6
package/dist/analyzer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAkeA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAU,gBAAgB,MAAM,EAAE,6BAA6B,OAAO,
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAkeA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAU,gBAAgB,MAAM,EAAE,6BAA6B,OAAO,iBA8DhG,CAAC"}
|
package/dist/cli.cjs
CHANGED
|
@@ -7,7 +7,7 @@ const child_process = require("child_process");
|
|
|
7
7
|
const glob = require("glob");
|
|
8
8
|
const stream = require("stream");
|
|
9
9
|
const zlib = require("zlib");
|
|
10
|
-
const internal = require("./internal
|
|
10
|
+
const internal = require("./internal--D7IlmDn.cjs");
|
|
11
11
|
/*!
|
|
12
12
|
* name: tar-vern
|
|
13
13
|
* version: 0.3.0
|
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import { spawn } from "child_process";
|
|
|
6
6
|
import { glob } from "glob";
|
|
7
7
|
import { Readable } from "stream";
|
|
8
8
|
import { createGzip } from "zlib";
|
|
9
|
-
import { a as resolveRawPackageJsonObject } from "./internal-
|
|
9
|
+
import { a as resolveRawPackageJsonObject } from "./internal-D-ECO0sh.js";
|
|
10
10
|
/*!
|
|
11
11
|
* name: tar-vern
|
|
12
12
|
* version: 0.3.0
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const promises = require("fs/promises");
|
|
3
3
|
const path = require("path");
|
|
4
|
-
const internal = require("./internal
|
|
4
|
+
const internal = require("./internal--D7IlmDn.cjs");
|
|
5
5
|
const generateBanner = (metadata, outputKeys) => {
|
|
6
6
|
const parts = [];
|
|
7
7
|
for (const key of outputKeys) {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readdir, readFile, writeFile, mkdir } from "fs/promises";
|
|
2
2
|
import { join, dirname } from "path";
|
|
3
|
-
import { r as resolvePackageMetadata } from "./internal-
|
|
3
|
+
import { r as resolvePackageMetadata } from "./internal-D-ECO0sh.js";
|
|
4
4
|
const generateBanner = (metadata, outputKeys) => {
|
|
5
5
|
const parts = [];
|
|
6
6
|
for (const key of outputKeys) {
|
|
@@ -1453,14 +1453,6 @@ const formatVersion = (version) => {
|
|
|
1453
1453
|
}
|
|
1454
1454
|
return result;
|
|
1455
1455
|
};
|
|
1456
|
-
const isGitRepository = async (repositoryPath) => {
|
|
1457
|
-
try {
|
|
1458
|
-
await git__namespace.statusMatrix({ fs: fs__namespace, dir: repositoryPath });
|
|
1459
|
-
return true;
|
|
1460
|
-
} catch (e) {
|
|
1461
|
-
return false;
|
|
1462
|
-
}
|
|
1463
|
-
};
|
|
1464
1456
|
const getCommit = async (repositoryPath, hash) => {
|
|
1465
1457
|
try {
|
|
1466
1458
|
const commit = await git__namespace.readCommit({ fs: fs__namespace, dir: repositoryPath, oid: hash });
|
|
@@ -1627,20 +1619,23 @@ const lookupVersionLabelRecursive = async (cwd, commit, reachedCommits) => {
|
|
|
1627
1619
|
};
|
|
1628
1620
|
const getGitMetadata = async (repositoryPath, checkWorkingDirectoryStatus) => {
|
|
1629
1621
|
const metadata = {};
|
|
1630
|
-
|
|
1622
|
+
let gitRootPath;
|
|
1623
|
+
try {
|
|
1624
|
+
gitRootPath = await git__namespace.findRoot({ fs: fs__namespace, filepath: repositoryPath });
|
|
1625
|
+
} catch (e) {
|
|
1631
1626
|
return metadata;
|
|
1632
1627
|
}
|
|
1633
1628
|
try {
|
|
1634
|
-
const currentCommit = await getCurrentCommit(
|
|
1629
|
+
const currentCommit = await getCurrentCommit(gitRootPath);
|
|
1635
1630
|
if (!currentCommit) {
|
|
1636
1631
|
return metadata;
|
|
1637
1632
|
}
|
|
1638
1633
|
const reachedCommits = /* @__PURE__ */ new Map();
|
|
1639
|
-
let version = await lookupVersionLabelRecursive(
|
|
1634
|
+
let version = await lookupVersionLabelRecursive(gitRootPath, currentCommit, reachedCommits);
|
|
1640
1635
|
const gitMetadata = { tags: [], branches: [] };
|
|
1641
1636
|
metadata.git = gitMetadata;
|
|
1642
1637
|
if (version) {
|
|
1643
|
-
const hasModified = checkWorkingDirectoryStatus && await hasModifiedFiles(
|
|
1638
|
+
const hasModified = checkWorkingDirectoryStatus && await hasModifiedFiles(gitRootPath);
|
|
1644
1639
|
if (hasModified) {
|
|
1645
1640
|
version = incrementLastVersionComponent(version);
|
|
1646
1641
|
}
|
|
@@ -1654,9 +1649,9 @@ const getGitMetadata = async (repositoryPath, checkWorkingDirectoryStatus) => {
|
|
|
1654
1649
|
date: dayjs(currentCommit.date).format("YYYY-MM-DDTHH:mm:ssZ[Z]"),
|
|
1655
1650
|
message: currentCommit.message
|
|
1656
1651
|
};
|
|
1657
|
-
const relatedTags = await getRelatedTags(
|
|
1652
|
+
const relatedTags = await getRelatedTags(gitRootPath, currentCommit.hash);
|
|
1658
1653
|
gitMetadata.tags = relatedTags.map((tag) => tag.name);
|
|
1659
|
-
const relatedBranches = await getRelatedBranches(
|
|
1654
|
+
const relatedBranches = await getRelatedBranches(gitRootPath, currentCommit.hash);
|
|
1660
1655
|
gitMetadata.branches = relatedBranches;
|
|
1661
1656
|
} catch (error) {
|
|
1662
1657
|
console.warn("Failed to extract git metadata:", error);
|
|
@@ -1829,4 +1824,4 @@ const resolveRawPackageJsonObject = async (projectRoot, checkWorkingDirectorySta
|
|
|
1829
1824
|
};
|
|
1830
1825
|
exports.resolvePackageMetadata = resolvePackageMetadata;
|
|
1831
1826
|
exports.resolveRawPackageJsonObject = resolveRawPackageJsonObject;
|
|
1832
|
-
//# sourceMappingURL=internal
|
|
1827
|
+
//# sourceMappingURL=internal--D7IlmDn.cjs.map
|