Skip to content

Commit a56b24c

Browse files
authored
chore: typescript, update deps, node versions in github actions (#183)
- Updates the configuration to allow typescript. - Updates all of the javascript files to typescript. - Removes the callback usage of the package. Now only the promise usage and the command line is available. (Major change). - Updates many of the dependencies (and removes a few including debug, event-stream, and async).
1 parent 8f8aaa1 commit a56b24c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+13254
-4497
lines changed

Diff for: .depcheckrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignores:
2+
- 'yargs'
3+
- 'progress'

Diff for: .eslintrc

+10-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
{
2-
"parserOptions": {
3-
"ecmaVersion": 2019
4-
},
5-
"env": {
6-
"mocha": true,
7-
"node": true,
8-
"es6": true
9-
},
10-
"globals": {
11-
"expect": true,
12-
"sinon": true
13-
},
14-
"rules": {
15-
"camelcase": 1,
16-
"new-cap": 0,
17-
"no-use-before-define": 0
18-
},
192
"extends": [
20-
"mongodb-js/node",
21-
"mongodb-js/browser"
22-
]
3+
"semistandard",
4+
"plugin:promise/recommended",
5+
"plugin:@typescript-eslint/recommended"
6+
],
7+
"rules": {
8+
"@typescript-eslint/no-explicit-any": 0,
9+
"@typescript-eslint/no-empty-function": 0,
10+
"no-return-assign": 0,
11+
"space-before-function-paren": ["error", "never"]
12+
}
2313
}

Diff for: .github/workflows/unit-tests.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
name: unit tests
1+
name: CI
22

33
on: [push, pull_request]
44

55
jobs:
6-
unitTest:
7-
runs-on: ubuntu-latest
8-
6+
test:
7+
name: Test
98
strategy:
9+
fail-fast: false
1010
matrix:
11-
node-version: [12.x, 14.x]
12-
11+
os: [ubuntu-latest, macos-latest, windows-latest]
12+
node-version: [14.x, 16.x, 18.x]
13+
runs-on: ${{matrix.os}}
1314
steps:
1415
- uses: actions/checkout@v2
1516
- name: Use Node.js ${{ matrix.node-version }}
16-
uses: actions/setup-node@v2
17+
uses: actions/setup-node@v1
1718
with:
1819
node-version: ${{ matrix.node-version }}
19-
- run: npm ci
20-
- run: npm run check
21-
- run: npm test
22-
- run: npm run coverage
20+
- name: Install Dependencies
21+
run: npm ci
22+
- name: Check
23+
run: npm run check
24+
- name: Test
25+
run: npm test
26+
- name: Coverage
27+
run: npm run coverage

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ node_modules
2828

2929
# Release artifacts
3030
.lone/
31-
dist/
31+
lib/
32+
.esm-wrapper.mjs
3233

3334
# Test output
3435
.nyc_output

Diff for: .jsfmtrc

-171
This file was deleted.

Diff for: .npmignore

-16
This file was deleted.

Diff for: README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,7 @@ Apache 2.0
348348
[bson-types]: http://docs.mongodb.org/manual/reference/bson-types/
349349
[ampersand-state]: http://ampersandjs.com/docs#ampersand-state
350350
[ampersand-collection]: http://ampersandjs.com/docs#ampersand-collection
351-
[tests]: https://github.com/mongodb-js/mongodb-schema/tree/master/test
352-
[schema]: https://github.com/mongodb-js/mongodb-language-model/blob/master/lib/schema.js
353-
[field]: https://github.com/mongodb-js/mongodb-language-model/blob/master/lib/field.js
354-
[type]: https://github.com/mongodb-js/mongodb-language-model/blob/master/lib/type.js
351+
[tests]: https://github.com/mongodb-js/mongodb-schema/tree/main/test
355352

356353
[travis_img]: https://secure.travis-ci.org/mongodb-js/mongodb-schema.svg?branch=master
357354
[travis_url]: https://travis-ci.org/mongodb-js/mongodb-schema

0 commit comments

Comments
 (0)