ast-search 0.2.2 → 0.2.4
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/build/main.js +5 -0
- package/package.json +2 -2
package/build/main.js
CHANGED
|
@@ -16,10 +16,13 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
16
16
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
17
|
};
|
|
18
18
|
import yargs from "yargs/yargs";
|
|
19
|
+
import { createRequire } from "module";
|
|
19
20
|
import { walkRepoFiles } from "./walk.js";
|
|
20
21
|
import { getAstFromPath } from "./file.js";
|
|
21
22
|
import { runQuery, validateSelector } from "./search.js";
|
|
22
23
|
import { formatMatches } from "./output.js";
|
|
24
|
+
const require = createRequire(import.meta.url);
|
|
25
|
+
const { version } = require("../package.json");
|
|
23
26
|
export function searchRepo(selector, dir) {
|
|
24
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
28
|
var _a, e_1, _b, _c;
|
|
@@ -115,6 +118,8 @@ const y = yargs(process.argv.slice(2))
|
|
|
115
118
|
"reformat all files containing async functions",
|
|
116
119
|
],
|
|
117
120
|
])
|
|
121
|
+
.version(version)
|
|
122
|
+
.alias("version", "V")
|
|
118
123
|
.help();
|
|
119
124
|
if (process.env.NODE_ENV !== "test") {
|
|
120
125
|
y.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ast-search",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "main.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"license": "ISC",
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "https://github.com/shiplet/ast-search.git"
|
|
25
|
+
"url": "https://github.com/willey-shiplet/ast-search.git"
|
|
26
26
|
},
|
|
27
27
|
"packageManager": "pnpm@10.33.0",
|
|
28
28
|
"dependencies": {
|