From 6057469b020652b14e83a94669b390562605ca1c Mon Sep 17 00:00:00 2001 From: retconned Date: Sat, 14 Sep 2024 02:17:18 +0100 Subject: [PATCH] enabled cjs, disabled tests temp --- examples/basic-bot.ts | 3 +-- package.json | 4 ++-- src/tests/utils.test.ts | 6 ------ tsup.config.ts | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 src/tests/utils.test.ts diff --git a/examples/basic-bot.ts b/examples/basic-bot.ts index 6a69658..4930bc3 100644 --- a/examples/basic-bot.ts +++ b/examples/basic-bot.ts @@ -8,7 +8,7 @@ client.on("ready", () => { console.log(`Bot ready & logged into ${client.user?.tag}!`); }); -client.login({ process.env.TOKEN, process.env.COOKIES }); +// client.login({ process.env.TOKEN, process.env.COOKIES }); client.on("ChatMessage", async (message: MessageData) => { console.log(`${message.sender.username}: ${message.content}`); @@ -36,7 +36,6 @@ client.on("ChatMessage", async (message: MessageData) => { client.permanentBan(bannedUser); } } - }); client.on("Subscription", async (subscription) => { diff --git a/package.json b/package.json index 8312281..c5bf2e9 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "lint:ts": "tsc", "lint:check": "eslint \"src/**/*.{ts,js}\"", "lint:fix": "eslint --fix \"src/**/*.{ts,js}\"", - "ci": "npm run build && npm run format:check && npm run check-exports && npm run lint:ts && npm run test", - "check-exports": "attw --pack .", + "ci": "npm run build && npm run format:check && npm run check-exports && npm run lint:ts", + "check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm", "test": "vitest run", "dev": "vitest", "local:release": "changeset version", diff --git a/src/tests/utils.test.ts b/src/tests/utils.test.ts deleted file mode 100644 index 47d5e6c..0000000 --- a/src/tests/utils.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -// import { add } from "../utils/utils.js"; -// import { test, expect } from "vitest"; - -// test("add", () => { -// expect(add(1, 2)).toBe(3); -// }); diff --git a/tsup.config.ts b/tsup.config.ts index 2ef38bf..db09caf 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from "tsup"; export default defineConfig({ entryPoints: ["src/index.ts"], - format: ["esm"], + format: ["cjs", "esm"], dts: true, outDir: "dist", clean: true,