Skip to content

adborroto/PLAT 5 Convert to Typescript #367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 23, 2025
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jspm_packages
.idea

# Node 6 transpiled code.
dist/node
dist/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18.2
18.20.0
File renamed without changes.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Here are some examples of cursor-based APIs:

`npm install mongo-cursor-pagination --save`

## Project language

This project has been converted to TypeScript to enhance type safety and improve developer tooling. All source files are now `.ts` files.

## Usage

### find()
Expand Down
12 changes: 8 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
module.exports = {
preset: 'ts-jest',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
clearMocks: true,
collectCoverageFrom: ['src/**/*.js'],
collectCoverageFrom: ['src/**/*.ts'],
coverageDirectory: 'coverage',
testRegex: '/((test|spec)s?|src)/.*([Tt]est|[Ss]pec)\\.(ts|js)$',
testEnvironment: 'node',
moduleNameMapper: {
'^mongodbMapped$': `mongodb${process.env.DRIVER_VERSION || ''}`,
},
testTimeout: 15000,
};
Loading