screw-up 1.0.0 → 1.1.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-DxAKRQPj.js → analyzer-BIXh0cn6.js} +21 -5
- package/dist/{analyzer-DxAKRQPj.js.map → analyzer-BIXh0cn6.js.map} +1 -1
- package/dist/{analyzer-BxxtJjNH.cjs → analyzer-DtoN0my1.cjs} +21 -5
- package/dist/{analyzer-BxxtJjNH.cjs.map → analyzer-DtoN0my1.cjs.map} +1 -1
- package/dist/analyzer.d.ts +2 -2
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/cli-internal.d.ts +2 -2
- package/dist/cli.d.ts +2 -2
- package/dist/generated/packageMetadata.d.ts +4 -4
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/internal.d.ts +2 -2
- package/dist/main.cjs +4 -4
- package/dist/main.d.ts +2 -2
- package/dist/main.js +4 -4
- package/dist/{packageMetadata-CwQxZ4Fj.js → packageMetadata-C-jcs8Th.js} +4 -4
- package/dist/{packageMetadata-CwQxZ4Fj.js.map → packageMetadata-C-jcs8Th.js.map} +1 -1
- package/dist/{packageMetadata-CxY3Y3Qr.cjs → packageMetadata-Hteuv2eS.cjs} +4 -4
- package/dist/{packageMetadata-CxY3Y3Qr.cjs.map → packageMetadata-Hteuv2eS.cjs.map} +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/vite-plugin.d.ts +2 -2
- package/package.json +6 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: screw-up
|
|
3
|
-
* version: 1.
|
|
3
|
+
* version: 1.1.0
|
|
4
4
|
* description: Simply package metadata inserter on Vite plugin
|
|
5
5
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
6
6
|
* license: MIT
|
|
7
7
|
* repository.url: https://github.com/kekyo/screw-up.git
|
|
8
|
-
* git.commit.hash:
|
|
8
|
+
* git.commit.hash: 379e392faba0e8bd008ed386eb113cdee3c79de9
|
|
9
9
|
*/
|
|
10
10
|
import { existsSync } from "fs";
|
|
11
11
|
import * as fs from "fs/promises";
|
|
@@ -1742,7 +1742,15 @@ const getRelatedTags = async (repositoryPath, commitHash) => {
|
|
|
1742
1742
|
for (const tagName of tags) {
|
|
1743
1743
|
try {
|
|
1744
1744
|
const tagOid = await git.resolveRef({ fs, dir: repositoryPath, ref: `refs/tags/${tagName}` });
|
|
1745
|
-
|
|
1745
|
+
let targetCommitOid = tagOid;
|
|
1746
|
+
try {
|
|
1747
|
+
const tagObject = await git.readTag({ fs, dir: repositoryPath, oid: tagOid });
|
|
1748
|
+
if (tagObject && tagObject.tag.object) {
|
|
1749
|
+
targetCommitOid = tagObject.tag.object;
|
|
1750
|
+
}
|
|
1751
|
+
} catch (e) {
|
|
1752
|
+
}
|
|
1753
|
+
if (targetCommitOid === commitHash) {
|
|
1746
1754
|
const version = parseVersion(tagName);
|
|
1747
1755
|
if (version && isValidVersion(version)) {
|
|
1748
1756
|
tagInfos.push({
|
|
@@ -1773,7 +1781,15 @@ const getRelatedTagsForVersioning = async (repositoryPath, commitHash) => {
|
|
|
1773
1781
|
for (const tagName of tags) {
|
|
1774
1782
|
try {
|
|
1775
1783
|
const tagOid = await git.resolveRef({ fs, dir: repositoryPath, ref: `refs/tags/${tagName}` });
|
|
1776
|
-
|
|
1784
|
+
let targetCommitOid = tagOid;
|
|
1785
|
+
try {
|
|
1786
|
+
const tagObject = await git.readTag({ fs, dir: repositoryPath, oid: tagOid });
|
|
1787
|
+
if (tagObject && tagObject.tag.object) {
|
|
1788
|
+
targetCommitOid = tagObject.tag.object;
|
|
1789
|
+
}
|
|
1790
|
+
} catch (e) {
|
|
1791
|
+
}
|
|
1792
|
+
if (targetCommitOid === commitHash) {
|
|
1777
1793
|
const version = parseVersion(tagName);
|
|
1778
1794
|
if (version && isValidVersion(version)) {
|
|
1779
1795
|
tagInfos.push({
|
|
@@ -1940,4 +1956,4 @@ export {
|
|
|
1940
1956
|
getFetchGitMetadata as g,
|
|
1941
1957
|
resolvePackageMetadata as r
|
|
1942
1958
|
};
|
|
1943
|
-
//# sourceMappingURL=analyzer-
|
|
1959
|
+
//# sourceMappingURL=analyzer-BIXh0cn6.js.map
|