Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
feat: migrate to ESM to allow for Alex upgrade (#811)
Browse files Browse the repository at this point in the history
* test: add mongo compose file to make testing easier

* build: update dependencies

* fix: mongoose remove changed to deleteOne

* build: update husky

* feat: switch to esm

* fix: fix jest esm setup

* fix: use verbatimModuleSyntax false for jest
  • Loading branch information
dan-mba authored Jun 29, 2024
1 parent 225c4d7 commit 2914a5f
Show file tree
Hide file tree
Showing 37 changed files with 8,967 additions and 9,237 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
ignorePatterns: ['.eslintrc.cjs','jest.config.ts'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,5 @@ lerna-debug.log*

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

.env
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
6 changes: 0 additions & 6 deletions babel.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
export default { extends: ['@commitlint/config-conventional'] };
19 changes: 19 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { JestConfigWithTsJest } from "ts-jest";

const config: JestConfigWithTsJest = {
verbose: true,
transform: {
"^.+\\.ts?$": [
"ts-jest",
{
useESM: true,
},
],
},
extensionsToTreatAsEsm: [".ts"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
};

export default config;
7 changes: 7 additions & 0 deletions mongo-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# docker compose -f mongo-compose.yml up
version: "1.0"
services:
mongodb:
image: mongo:6.0
ports:
- "27017:27017"
Loading

0 comments on commit 2914a5f

Please sign in to comment.