-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: keep up with recent dove (#77)
* init new * chore: update dependencies * chore: update dependencies * refactor: modernize repo - unbuild - vitest - restricter eslint - named exports instead of default exports - export * from * fix: right filters * fix(channels): assign ability to connection from authResult * ci: update coverage & add build job * test: add lcov to coverage * test: coverage threshold 90
- Loading branch information
1 parent
b3ffacd
commit 1a1f9bc
Showing
113 changed files
with
21,486 additions
and
16,839 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"node": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["security", "@typescript-eslint", "unicorn", "prettier"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:security/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": { | ||
"quotes": ["warn", "double", "avoid-escape"], | ||
"indent": ["warn", 2, { "SwitchCase": 1 }], | ||
"semi": ["warn", "always"], | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
"no-console": "off", | ||
"camelcase": "warn", | ||
"require-atomic-updates": "off", | ||
"prefer-destructuring": [ | ||
"warn", | ||
{ | ||
"AssignmentExpression": { "object": false, "array": false }, | ||
"VariableDeclarator": { "object": true, "array": true } | ||
}, | ||
{ | ||
"enforceForRenamedProperties": false | ||
} | ||
], | ||
"security/detect-object-injection": "off", | ||
"object-curly-spacing": ["warn", "always"], | ||
"prefer-const": ["warn"], | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"warn", | ||
{ "prefer": "type-imports" } | ||
], | ||
"unicorn/prefer-node-protocol": "warn" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["test/**/*.ts"], | ||
"rules": { | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/no-empty-function": "off" | ||
} | ||
} | ||
], | ||
"settings": { | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts", ".tsx"] | ||
}, | ||
"import/resolver": { | ||
"typescript": { | ||
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist` | ||
"project": "./tsconfig.json" | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,34 +6,43 @@ name: Node.js CI | |
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [12.x, 14.x, 16.x] | ||
node-version: [14.x, 16.x, 18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm test | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm run test | ||
|
||
coverage: | ||
needs: [ test ] | ||
name: coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: '12' | ||
- run: npm ci | ||
- uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: npm run coverage | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: "18" | ||
- run: npm ci | ||
- uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: npm run coverage | ||
|
||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: "18" | ||
- run: npm ci | ||
- run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ $RECYCLE.BIN/ | |
# dot_env | ||
.env.* | ||
|
||
/dist | ||
dist | ||
|
||
.cache | ||
.temp | ||
docs/.vitepress/dist |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,16 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "pwa-node", | ||
"resolveSourceMapLocations": [ | ||
"${workspaceFolder}/**", | ||
"!**/node_modules/**" | ||
], | ||
"request": "launch", | ||
"name": "Mocha Tests", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/mocha", | ||
"args": [ | ||
"--require", | ||
"ts-node/register", | ||
"--timeout", | ||
"999999", | ||
"--colors", | ||
"--recursive" | ||
], | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"env": { | ||
"NODE_ENV": "test", | ||
"TS_NODE_PROJECT": "tsconfig.test.json" | ||
}, | ||
"outputCapture": "std", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
] | ||
}, | ||
] | ||
} | ||
|
||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Debug Current Test File", | ||
"autoAttachChildProcesses": true, | ||
"skipFiles": ["<node_internals>/**", "**/node_modules/**"], | ||
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs", | ||
"args": ["run", "${relativeFile}"], | ||
"smartStep": true, | ||
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"search.exclude": { | ||
"**/node_modules": true, | ||
"**/public": true, | ||
"**/package-lock.json": true | ||
}, | ||
"workbench.colorCustomizations": { | ||
"activityBar.background": "#29b757", | ||
"titleBar.activeBackground": "#29b757", | ||
"titleBar.activeForeground": "#FAFBF4" | ||
} | ||
"search.exclude": { | ||
"**/node_modules": true, | ||
"**/public": true, | ||
"**/package-lock.json": true | ||
}, | ||
"workbench.colorCustomizations": { | ||
"activityBar.background": "#29b757", | ||
"titleBar.activeBackground": "#29b757", | ||
"titleBar.activeForeground": "#FAFBF4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { defineBuildConfig } from "unbuild"; | ||
import pkg from "./package.json"; | ||
|
||
export default defineBuildConfig({ | ||
entries: ["./lib/index"], | ||
outDir: "./dist", | ||
declaration: true, | ||
externals: [ | ||
...Object.keys(pkg.dependencies), | ||
...Object.keys(pkg.devDependencies), | ||
], | ||
rollup: { | ||
emitCJS: true, | ||
}, | ||
}); |
Oops, something went wrong.