Skip to content
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

chore!: convert project to typescript #1641

Merged
merged 33 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1f99e49
chore!: convert project to typescript
robertsLando Jul 19, 2023
12d39a7
fix: add some types
robertsLando Jul 19, 2023
33451be
fix: other thypes
robertsLando Jul 19, 2023
05753e0
fix: end up lib refactor
robertsLando Jul 20, 2023
d851565
fix: build errors
robertsLando Jul 20, 2023
3961cdf
fix: add client events typed
robertsLando Jul 20, 2023
7b25f64
fix: abstract tests
robertsLando Jul 20, 2023
efa1587
fix: convert tests
robertsLando Jul 20, 2023
85faf2c
fix: some types
robertsLando Jul 20, 2023
7ce4259
fix: build
robertsLando Jul 20, 2023
2d1a028
fix: lint extensions
robertsLando Jul 20, 2023
5bc8309
fix: subscribe
robertsLando Jul 20, 2023
1b2fefb
fix: subscribe
robertsLando Jul 20, 2023
e7cd5ac
fix: unsubscribe
robertsLando Jul 20, 2023
35d94ef
fix: debug
robertsLando Jul 20, 2023
4efe6f5
fix: publish errors
robertsLando Jul 20, 2023
9ed7a5c
fix: reconnect
robertsLando Jul 20, 2023
0e29d75
fix: store tests
robertsLando Jul 20, 2023
dd94a7a
fix: secure client
robertsLando Jul 20, 2023
3fae70e
fix: add missing secure options
robertsLando Jul 20, 2023
94a00f2
fix: remove typescript tests from gh
robertsLando Jul 20, 2023
8422efa
chore: fix .mocharc
robertsLando Jul 20, 2023
9f0569c
fix: package.json exports
robertsLando Jul 20, 2023
960caab
fix: types versions
robertsLando Jul 20, 2023
1c56921
fix: write methods overload
robertsLando Jul 21, 2023
143de76
fix: camel case
robertsLando Jul 21, 2023
69e8556
fix: remove some useless tsconfig options
robertsLando Jul 21, 2023
7beb49a
fix: add `src` dir to npm to make abstract test accessible
robertsLando Jul 21, 2023
7b68504
refactor: remove unused imports
robertsLando Jul 21, 2023
40ee0bf
fix: add IStore interface
robertsLando Jul 21, 2023
5cf9232
docs: fix readme changelog
robertsLando Jul 21, 2023
2f8888e
refactor: add comments and reorder methods
robertsLando Jul 21, 2023
0f55a3b
fix: use `mqtt.js` as entrypoint also for browser
robertsLando Jul 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
/examples/
/doc/
/dist/
/test/typescript/
/build/

*.js
24 changes: 21 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin'],
env: {
browser: true,
commonjs: true,
es2021: true,
node: true,
mocha: true,
},
extends: ['airbnb-base', 'plugin:prettier/recommended'],
extends: [
'airbnb-base',
'airbnb-typescript/base',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended'
],
parserOptions: {
ecmaVersion: 'latest',
project: 'tsconfig.json',
sourceType: 'module',
tsconfigRootDir: __dirname
},
rules: {
'global-require': 'off',
Expand All @@ -29,5 +38,14 @@ module.exports = {
'no-continue': 'off',
'prefer-destructuring': 'off',
'no-use-before-define': 'off',
},
// Typescript rules
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/no-use-before-define': 'off',
}
}
2 changes: 1 addition & 1 deletion .github/workflows/mqttjs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
# only run on latest node version, no reason to run on all
timeout-minutes: 2
run: |
npm run browser-build
npm run build:browser
npm run unit-test:browser


Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ test/typescript/*.map
.vscode/
.npmrc

/build/

159 changes: 0 additions & 159 deletions bin/pub.js

This file was deleted.

141 changes: 0 additions & 141 deletions bin/sub.js

This file was deleted.

19 changes: 0 additions & 19 deletions lib/connect/tcp.js

This file was deleted.

Loading
Loading