Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
21e8 committed Dec 7, 2024
1 parent 70bc079 commit 536a767
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 26 deletions.
22 changes: 8 additions & 14 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
/* eslint-env node */
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
moduleFileExtensions: ['ts', 'js'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
},
],
'^.+\\.ts$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
testPathIgnorePatterns: ['\\.d\\.ts$', '/node_modules/'],
testMatch: ['**/__tests__/**/*.test.ts'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
}
};
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
{
"name": "0xalice-tgram-bot",
"version": "0.2.2",
"version": "0.2.3",
"description": "Batched Telegram notification bot for 0xAlice",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.js"
"default": "./dist/index.js"
}
},
"scripts": {
"build": "tsc",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"test": "jest",
"lint": "eslint src/**/*.ts",
"format": "prettier --write 'src/**/*.ts'",
"prepare": "yarn build",
Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
export * from './types';
export { MessageBatcher } from './batcher';
export { TelegramBatcher } from './telegram';
export type {
Message,
BatcherConfig,
NotificationLevel,
MessageProcessor
} from './types';
11 changes: 5 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ES2020",
"target": "es2018",
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
"declarationMap": true,
Expand All @@ -10,9 +10,8 @@
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "src/**/*.test.ts"]
"include": ["src"],
"exclude": ["node_modules", "dist", "src/__tests__"]
}

0 comments on commit 536a767

Please sign in to comment.