use bun as package manager and runner for the docke rcontainer, plus some tweak on the github action

This commit is contained in:
Platane
2025-02-20 19:34:18 +07:00
committed by GitHub
parent 74bc4f0651
commit 85da3901f5
29 changed files with 25796 additions and 10209 deletions

View File

@@ -1,11 +1,8 @@
import * as fs from "fs";
import * as path from "path";
import { it, expect } from "bun:test";
import { generateContributionSnake } from "../generateContributionSnake";
import { parseOutputsOption } from "../outputsOptions";
import { config } from "dotenv";
config({ path: __dirname + "/../../../.env" });
jest.setTimeout(2 * 60 * 1000);
const silent = (handler: () => void | Promise<void>) => async () => {
const originalConsoleLog = console.log;
@@ -43,5 +40,6 @@ it(
fs.writeFileSync(outputs[0]!.filename, results[0]!);
fs.writeFileSync(outputs[1]!.filename, results[1]!);
fs.writeFileSync(outputs[2]!.filename, results[2]!);
})
}),
{ timeout: 2 * 60 * 1000 }
);

View File

@@ -1,4 +1,5 @@
import { parseEntry } from "../outputsOptions";
import { it, expect } from "bun:test";
it("should parse options as json", () => {
expect(

View File

@@ -10,11 +10,9 @@
"@snk/types": "1.0.0"
},
"devDependencies": {
"@vercel/ncc": "0.38.1",
"dotenv": "16.4.5"
"@vercel/ncc": "0.38.1"
},
"scripts": {
"build": "ncc build --external canvas --external gifsicle --out dist ./index.ts",
"run:build": "INPUT_GITHUB_USER_NAME=platane INPUT_OUTPUTS='dist/out.svg' node dist/index.js"
"build": "ncc build --external canvas --external gifsicle --out dist ./index.ts"
}
}