metascope 0.6.0 → 0.6.2
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/.DS_Store +0 -0
- package/dist/bin/cli.js +280 -281
- package/dist/lib/package.js +1 -1
- package/dist/lib/templates/frontmatter.js +1 -1
- package/dist/lib/templates/project.js +1 -1
- package/dist/lib/utilities/tree-sitter-wasm.js +10 -3
- package/package.json +10 -10
package/dist/lib/package.js
CHANGED
|
@@ -41,7 +41,7 @@ const frontmatter = defineTemplate((context, templateData) => {
|
|
|
41
41
|
Maintainer: mixedStringsToArray(toBasicNames(codemeta.maintainer)) ?? null,
|
|
42
42
|
Version: codemeta.version ?? null,
|
|
43
43
|
Account: github?.ownerLogin ?? null,
|
|
44
|
-
Public:
|
|
44
|
+
Public: github === void 0 ? false : !github.isPrivate,
|
|
45
45
|
Fork: github?.isFork ?? false,
|
|
46
46
|
Published: Boolean(obsidianPluginRegistry?.url ?? nodeNpmRegistry?.url ?? pythonPypiRegistry?.url),
|
|
47
47
|
Status: toStatus(codemeta.codeRepository, codemeta.author, [...codemeta.contributor ?? [], ...codemeta.maintainer ?? []], github?.isFork ?? false, templateData.authorName, templateData.githubAccount),
|
|
@@ -25,7 +25,7 @@ const project = defineTemplate((context, templateData) => {
|
|
|
25
25
|
isAuthoredByMe: isAuthoredBy(codemeta.author, templateData.authorName),
|
|
26
26
|
isOnMyGitHub: isOnGithubAccountOf(codemeta.codeRepository, templateData.githubAccount),
|
|
27
27
|
isOnNpm: nodeNpmRegistry?.url !== void 0,
|
|
28
|
-
isPublic:
|
|
28
|
+
isPublic: github === void 0 ? false : !github.isPrivate,
|
|
29
29
|
isRemoteAhead: gitStats?.isRemoteAhead,
|
|
30
30
|
issueCount: github?.issueCountOpen,
|
|
31
31
|
lastCommitDate: gitStats?.commitDateLast,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dirname, resolve } from "node:path";
|
|
1
|
+
import { dirname, resolve, sep } from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
import { Language, Parser } from "web-tree-sitter";
|
|
4
4
|
//#region src/lib/utilities/tree-sitter-wasm.ts
|
|
@@ -7,10 +7,17 @@ import { Language, Parser } from "web-tree-sitter";
|
|
|
7
7
|
* Provides singleton initialization and cached language loading.
|
|
8
8
|
*/
|
|
9
9
|
let initialized = false;
|
|
10
|
+
/**
|
|
11
|
+
* Find the grammar directory from a module's directory path.
|
|
12
|
+
* Exported for testing — not part of the public API.
|
|
13
|
+
*/
|
|
14
|
+
function findGrammarDirectory(moduleDirectory) {
|
|
15
|
+
const distributionSegment = `${sep}dist${sep}`;
|
|
16
|
+
return resolve(moduleDirectory.includes(distributionSegment) ? moduleDirectory.slice(0, moduleDirectory.indexOf(distributionSegment) + distributionSegment.length - 1) : resolve(moduleDirectory, "..", ".."), "grammars");
|
|
17
|
+
}
|
|
10
18
|
/** Resolve a grammar WASM file path relative to the dist/ directory. */
|
|
11
19
|
function resolveGrammar(filename) {
|
|
12
|
-
|
|
13
|
-
return resolve(thisDirectory.includes("/dist/") ? thisDirectory.slice(0, thisDirectory.indexOf("/dist/") + 5) : resolve(thisDirectory, "..", ".."), "grammars", filename);
|
|
20
|
+
return resolve(findGrammarDirectory(dirname(fileURLToPath(import.meta.url))), filename);
|
|
14
21
|
}
|
|
15
22
|
/** Initialize web-tree-sitter (idempotent) and return a new Parser instance. */
|
|
16
23
|
async function initParser() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "metascope",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "A CLI tool and TypeScript library to easily extract metadata from all kinds of software repositories.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"metadata",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@bacons/xcode": "1.0.0-alpha.33",
|
|
46
|
-
"@kitschpatrol/tokei": "^2.0.
|
|
46
|
+
"@kitschpatrol/tokei": "^2.0.1",
|
|
47
47
|
"@sindresorhus/is": "^7.2.0",
|
|
48
48
|
"@types/mdast": "^4.0.4",
|
|
49
49
|
"@types/node": "~22.17.2",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"@types/yargs": "^17.0.35",
|
|
52
52
|
"case-police": "^2.2.0",
|
|
53
53
|
"defu": "^6.1.6",
|
|
54
|
-
"fast-xml-parser": "^5.5.
|
|
54
|
+
"fast-xml-parser": "^5.5.10",
|
|
55
55
|
"find-workspaces": "^0.3.1",
|
|
56
56
|
"git-url-parse": "^16.1.0",
|
|
57
57
|
"gray-matter-es": "^0.2.1",
|
|
58
58
|
"jiti": "^2.6.1",
|
|
59
|
-
"lognow": "^0.6.
|
|
59
|
+
"lognow": "^0.6.1",
|
|
60
60
|
"octokit": "^5.0.5",
|
|
61
61
|
"package-json": "^10.0.1",
|
|
62
62
|
"picomatch": "^4.0.4",
|
|
@@ -64,17 +64,17 @@
|
|
|
64
64
|
"plist": "^3.1.0",
|
|
65
65
|
"pretty-ms": "^9.3.0",
|
|
66
66
|
"read-pkg": "^10.1.0",
|
|
67
|
-
"read-pyproject": "^0.3.
|
|
67
|
+
"read-pyproject": "^0.3.2",
|
|
68
68
|
"remark-parse": "^11.0.0",
|
|
69
69
|
"semver": "^7.7.4",
|
|
70
|
-
"simple-git": "^3.
|
|
70
|
+
"simple-git": "^3.35.2",
|
|
71
71
|
"smol-toml": "^1.6.1",
|
|
72
72
|
"spdx-license-list": "^6.11.0",
|
|
73
73
|
"string-ts": "^2.3.1",
|
|
74
74
|
"tinyexec": "^1.0.4",
|
|
75
75
|
"tinyglobby": "^0.2.15",
|
|
76
76
|
"unified": "^11.0.5",
|
|
77
|
-
"updates": "^17.13.
|
|
77
|
+
"updates": "^17.13.5",
|
|
78
78
|
"web-tree-sitter": "^0.26.8",
|
|
79
79
|
"yaml": "^2.8.3",
|
|
80
80
|
"yargs": "^18.0.0",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@arethetypeswrong/core": "^0.18.2",
|
|
85
85
|
"@fast-csv/parse": "^5.0.5",
|
|
86
|
-
"@kitschpatrol/shared-config": "^7.
|
|
86
|
+
"@kitschpatrol/shared-config": "^7.1.0",
|
|
87
87
|
"@types/jsonld": "^1.5.15",
|
|
88
|
-
"@types/picomatch": "^4.0.
|
|
88
|
+
"@types/picomatch": "^4.0.3",
|
|
89
89
|
"@types/semver": "^7.7.1",
|
|
90
90
|
"bumpp": "^11.0.1",
|
|
91
91
|
"jsonld": "^9.0.0",
|
|
92
|
-
"mdat-plugin-cli-help": "^2.
|
|
92
|
+
"mdat-plugin-cli-help": "^2.1.1",
|
|
93
93
|
"msw": "2.12.14",
|
|
94
94
|
"publint": "^0.3.18",
|
|
95
95
|
"tree-sitter-python": "^0.25.0",
|