Skip to content

Commit

Permalink
feat: switch to TypeScript and ESM
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Minimum Node version is now 14.16.x and
ESM exports might require updates to your tooling
  • Loading branch information
aldeed committed Jul 7, 2022
1 parent 6e97dd9 commit 4bd8dc1
Show file tree
Hide file tree
Showing 15 changed files with 8,261 additions and 12,046 deletions.
19 changes: 0 additions & 19 deletions .babelrc

This file was deleted.

14 changes: 0 additions & 14 deletions .editorconfig

This file was deleted.

21 changes: 11 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
{
"extends": "airbnb-base",
"env": {
"node": true,
"mocha": true
},
"globals": {
"expect": false,
"describe": false
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"airbnb-base",
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"consistent-return": 0,
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["**/*.test.js"]
"devDependencies": ["**/*.test.js", "**/*.test.ts"]
}
],
"import/extensions": 0,
"import/no-unresolved": 0,
"max-len": 0,
"no-console": 0,
"no-param-reassign": 0,
Expand Down
6 changes: 6 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extension": ["ts"],
"loader": "ts-node/esm",
"require": "ts-node/register",
"spec": "lib/**/*.test.ts"
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.0
16.15.1
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"standard.enable": false
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-2021 Eric Dobbertin
Copyright (c) 2013-2022 Eric Dobbertin

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
17 changes: 17 additions & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import MongoObject from './mongo-object.js';

export {
appendAffectedKey,
cleanNulls,
expandKey,
extractOp,
genericKeyAffectsOtherGenericKey,
isBasicObject,
keyToPosition,
makeKeyGeneric,
reportNulls,
} from './util.js';

export { MongoObject };

export default MongoObject;
Loading

0 comments on commit 4bd8dc1

Please sign in to comment.