Skip to content

Commit e9a2463

Browse files
committed
Meta tweak
1 parent 69ea2b3 commit e9a2463

File tree

3 files changed

+92
-125
lines changed

3 files changed

+92
-125
lines changed

package.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "prettier-regression-testing",
3+
"private": true,
34
"version": "1.0.0",
45
"repository": "ssh://[email protected]/sosukesuzuki/prettier-regression-testing.git",
56
"license": "MIT",
@@ -19,26 +20,26 @@
1920
"update-projects": "node scripts/update-projects-json.mjs"
2021
},
2122
"dependencies": {
22-
"@actions/artifact": "^4.0.0",
23-
"@actions/core": "^1.11.1",
24-
"@actions/github": "^4.0.0",
25-
"ajv": "^8.17.1",
26-
"nano-spawn": "^2.0.0"
23+
"@actions/artifact": "4.0.0",
24+
"@actions/core": "1.11.1",
25+
"@actions/github": "4.0.0",
26+
"ajv": "8.17.1",
27+
"nano-spawn": "2.0.0"
2728
},
2829
"devDependencies": {
29-
"@eslint/js": "^9.39.0",
30-
"@types/node": "^24.9.2",
31-
"@typescript-eslint/eslint-plugin": "^8.46.2",
32-
"@typescript-eslint/parser": "^8.46.2",
33-
"eslint": "^9.39.0",
34-
"eslint-config-prettier": "^10.1.8",
35-
"globals": "^16.5.0",
36-
"npm-run-all": "^4.1.5",
37-
"outdent": "^0.8.0",
30+
"@eslint/js": "9.39.0",
31+
"@types/node": "24.9.2",
32+
"@typescript-eslint/eslint-plugin": "8.46.2",
33+
"@typescript-eslint/parser": "8.46.2",
34+
"eslint": "9.39.0",
35+
"eslint-config-prettier": "10.1.8",
36+
"globals": "16.5.0",
37+
"npm-run-all": "4.1.5",
38+
"outdent": "0.8.0",
3839
"prettier": "3.6.2",
39-
"typescript": "^5.9.3",
40-
"typescript-eslint": "^8.46.2",
41-
"vitest": "^4.0.6"
40+
"typescript": "5.9.3",
41+
"typescript-eslint": "8.46.2",
42+
"vitest": "4.0.6"
4243
},
4344
"packageManager": "[email protected]"
4445
}

src/artifact.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as artifact from "@actions/artifact";
1+
import { DefaultArtifactClient } from "@actions/artifact";
22
import * as github from "@actions/github";
33
import * as path from "path";
44
import * as fs from "fs";
@@ -11,24 +11,23 @@ export async function uploadToArtifact(
1111
return undefined;
1212
}
1313

14-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1514
const GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE!;
1615

1716
const filePaths = texts.map((text) => ({
18-
filePath: path.join(GITHUB_WORKSPACE, Date.now().toString() + ".txt"),
17+
file: Date.now().toString() + ".txt",
1918
text,
2019
}));
2120

22-
for (const { filePath, text } of filePaths) {
23-
fs.writeFileSync(filePath, text, "utf-8");
21+
for (const { file, text } of filePaths) {
22+
fs.writeFileSync(path.join(GITHUB_WORKSPACE, file), text, "utf-8");
2423
}
2524

26-
const artifactClient = new artifact.DefaultArtifactClient();
27-
const artifactName = "artifact" + Date.now().toString();
25+
const artifactClient = new DefaultArtifactClient();
26+
const artifactName = "reports" + Date.now().toString();
2827

2928
await artifactClient.uploadArtifact(
3029
artifactName,
31-
filePaths.map(({ filePath }) => filePath),
30+
filePaths.map(({ file }) => file),
3231
GITHUB_WORKSPACE,
3332
);
3433

0 commit comments

Comments
 (0)