Skip to content
This repository was archived by the owner on Jun 16, 2022. It is now read-only.

Commit 0340325

Browse files
committed
Update output dir in tsconfig
1 parent a0c6878 commit 0340325

File tree

3 files changed

+28
-30
lines changed

3 files changed

+28
-30
lines changed

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
"name": "go-snapshot-action",
33
"version": "1.0.0",
44
"description": "Go Snapshot Action",
5-
"main": "index.js",
5+
"main": "dist/index.js",
66
"scripts": {
77
"build": "tsc",
88
"format": "prettier --write '**/*.ts'",
99
"format-check": "prettier --check '**/*.ts'",
10-
"lint": "eslint --fix src/**/*.ts test/**/*.ts",
10+
"lint": "eslint --fix src/**/*.ts",
1111
"package": "ncc build --source-map --license licenses.txt",
12-
"test": "jest",
13-
"all": "npm run build && npm run format && npm run lint && npm run package && npm test"
12+
"all": "npm run build && npm run format && npm run lint && npm run package"
1413
},
1514
"repository": {
1615
"type": "git",

src/index.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
import { run } from "@github/dependency-snapshot-action";
1+
import { run } from '@github/dependency-snapshot-action'
22
import {
33
Entry,
44
ParsedDependencies,
5-
ProcessDependenciesContent,
6-
} from "@github/dependency-snapshot-action/dist/processor";
5+
ProcessDependenciesContent
6+
} from '@github/dependency-snapshot-action/dist/processor'
77

8-
let parseDependents: ProcessDependenciesContent;
8+
let parseDependents: ProcessDependenciesContent
99

1010
// eslint-disable-next-line prefer-const
1111
parseDependents = function (contents: string) {
12-
const stdoutArr: string[] = contents.split("\n");
12+
const stdoutArr: string[] = contents.split('\n')
1313
const splitStdoutArr: string[][] = stdoutArr.map(function (line) {
14-
return line.split(" ");
15-
});
14+
return line.split(' ')
15+
})
1616

17-
const entries: ParsedDependencies = {};
18-
const repoName = splitStdoutArr[0][0];
17+
const entries: ParsedDependencies = {}
18+
const repoName = splitStdoutArr[0][0]
1919
splitStdoutArr.forEach((line: string[]) => {
20-
if (line.length < 2 || line === undefined) return; // skip empty lines
20+
if (line.length < 2 || line === undefined) return // skip empty lines
2121

22-
let entry: Entry;
23-
let dependencyString = `pkg:golang/${line[0]}`;
22+
let entry: Entry
23+
let dependencyString = `pkg:golang/${line[0]}`
2424

25-
const matchFound = line[0].match(repoName);
25+
const matchFound = line[0].match(repoName)
2626
if (matchFound && matchFound.index != null) {
27-
dependencyString = `pkg:golang/${line[1]}`;
28-
entries[dependencyString] = new Entry(dependencyString, "direct");
29-
return;
27+
dependencyString = `pkg:golang/${line[1]}`
28+
entries[dependencyString] = new Entry(dependencyString, 'direct')
29+
return
3030
}
3131

3232
if (dependencyString in entries) {
33-
entry = entries[dependencyString];
33+
entry = entries[dependencyString]
3434
} else {
35-
entry = new Entry(dependencyString, "indirect");
36-
entries[dependencyString] = entry;
35+
entry = new Entry(dependencyString, 'indirect')
36+
entries[dependencyString] = entry
3737
}
3838

39-
entry.addDependency(new Entry(`pkg:golang/${line[1]}`, "indirect"));
40-
});
41-
return entries;
42-
};
39+
entry.addDependency(new Entry(`pkg:golang/${line[1]}`, 'indirect'))
40+
})
41+
return entries
42+
}
4343

44-
run(parseDependents, undefined, "go mod graph");
44+
run(parseDependents, undefined, 'go mod graph')

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
1010
},
1111
"exclude": [
12-
"node_modules",
13-
"**/*.test.ts"
12+
"node_modules"
1413
]
1514
}

0 commit comments

Comments
 (0)