websocket-ts
Advanced tools
Comparing version 2.1.5 to 2.2.0
@@ -61,3 +61,3 @@ import { Backoff } from "./backoff/backoff"; | ||
/** | ||
* Whether the websocket was closed by the user. A websocket is closed by the user if the close(). | ||
* Whether the websocket was closed by the user. A websocket is closed by the user by calling close(). | ||
* | ||
@@ -64,0 +64,0 @@ * @return true if the websocket was closed by the user, false otherwise. |
@@ -152,3 +152,3 @@ "use strict"; | ||
/** | ||
* Whether the websocket was closed by the user. A websocket is closed by the user if the close(). | ||
* Whether the websocket was closed by the user. A websocket is closed by the user by calling close(). | ||
* | ||
@@ -155,0 +155,0 @@ * @return true if the websocket was closed by the user, false otherwise. |
@@ -61,3 +61,3 @@ import { Backoff } from "./backoff/backoff"; | ||
/** | ||
* Whether the websocket was closed by the user. A websocket is closed by the user if the close(). | ||
* Whether the websocket was closed by the user. A websocket is closed by the user by calling close(). | ||
* | ||
@@ -64,0 +64,0 @@ * @return true if the websocket was closed by the user, false otherwise. |
@@ -106,3 +106,3 @@ import { WebsocketEvent, } from "./websocket_event"; | ||
/** | ||
* Whether the websocket was closed by the user. A websocket is closed by the user if the close(). | ||
* Whether the websocket was closed by the user. A websocket is closed by the user by calling close(). | ||
* | ||
@@ -109,0 +109,0 @@ * @return true if the websocket was closed by the user, false otherwise. |
{ | ||
"name": "websocket-ts", | ||
"version": "2.1.5", | ||
"version": "2.2.0", | ||
"main": "dist/cjs/src/index.js", | ||
"types": "dist/cjs/src/index.d.ts", | ||
"module": "dist/esm/src/index.js", | ||
"type": "module", | ||
"exports": { | ||
"import": "./dist/esm/src/index.js", | ||
"require": "./dist/cjs/src/index.js" | ||
}, | ||
"license": "MIT", | ||
@@ -21,27 +26,29 @@ "keywords": [ | ||
"scripts": { | ||
"build": "npm run build:cjs && npm run build:esm", | ||
"build:cjs": "tsc -p tsconfig.cjs.json", | ||
"build:esm": "tsc -p tsconfig.esm.json", | ||
"build": "npm run build:cjs && npm run build:esm", | ||
"test": "jest", | ||
"test:coverage": "jest --coverage", | ||
"coveralls": "cat ./coverage/lcov.info | coveralls", | ||
"lint": "cross-env-shell eslint './src/{**/*,*}.{js,ts}' './tests/{**/*,*}.{js,ts}'" | ||
"lint": "cross-env-shell eslint", | ||
"test": "vitest", | ||
"test:coverage": "vitest --coverage" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^6.6.0", | ||
"@typescript-eslint/parser": "^6.6.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"@eslint/eslintrc": "^3.2.0", | ||
"@eslint/js": "^9.20.0", | ||
"@types/ws": "^8.5.14", | ||
"@typescript-eslint/eslint-plugin": "^8.24.0", | ||
"@typescript-eslint/parser": "^8.24.0", | ||
"@vitest/coverage-v8": "^3.0.5", | ||
"coveralls": "^3.1.1", | ||
"eslint": "^8.49.0", | ||
"@types/jest": "^29.5.4", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"ts-jest": "^29.1.1", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.2.2", | ||
"@types/ws": "^8.5.5", | ||
"ws": "^7.0.0", | ||
"cross-env": "^7.0.3" | ||
"cross-env": "^7.0.3", | ||
"eslint": "^9.20.1", | ||
"eslint-config-prettier": "^10.0.1", | ||
"eslint-plugin-prettier": "^5.2.3", | ||
"globals": "^15.15.0", | ||
"jsdom": "^26.0.0", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.7.3", | ||
"vitest": "^3.0.5", | ||
"ws": "^8.18.0" | ||
} | ||
} | ||
} |
@@ -31,3 +31,3 @@ <div> | ||
- **Well-Tested**: High test coverage, well-documented for extensibility. | ||
- **Module Support**: Supports CommonJS, and ES6 modules. | ||
- **Module Support**: Supports CommonJS and ES6 modules. | ||
@@ -211,3 +211,4 @@ ## Installation | ||
To compile the project, execute `npm run build`. The codebase includes unit tests for all | ||
components. To run these tests, use `npm run test`. | ||
To compile the project, execute `npm run build`. | ||
To run tests, use `npm run test`. |
@@ -50,4 +50,4 @@ import { Queue } from "./queue"; | ||
: this.tail < this.head | ||
? this.head - this.tail | ||
: this.elements.length - this.tail + this.head; | ||
? this.head - this.tail | ||
: this.elements.length - this.tail + this.head; | ||
} | ||
@@ -54,0 +54,0 @@ |
@@ -121,3 +121,3 @@ import { Backoff } from "./backoff/backoff"; | ||
/** | ||
* Whether the websocket was closed by the user. A websocket is closed by the user if the close(). | ||
* Whether the websocket was closed by the user. A websocket is closed by the user by calling close(). | ||
* | ||
@@ -124,0 +124,0 @@ * @return true if the websocket was closed by the user, false otherwise. |
@@ -46,3 +46,6 @@ { | ||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ | ||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ | ||
"paths": { | ||
// workaround for: https://github.com/vitest-dev/vitest/issues/4567 | ||
"rollup/parseAst": ["./node_modules/rollup/dist/parseAst"] | ||
}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ | ||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ | ||
@@ -67,3 +70,3 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ | ||
/* Advanced Options */ | ||
// "skipLibCheck": true, /* Skip type checking of declaration files. */ | ||
"skipLibCheck": true, /* Skip type checking of declaration files. */ | ||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ | ||
@@ -70,0 +73,0 @@ }, |
@@ -46,3 +46,6 @@ { | ||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ | ||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ | ||
"paths": { | ||
// workaround for: https://github.com/vitest-dev/vitest/issues/4567 | ||
"rollup/parseAst": ["./node_modules/rollup/dist/parseAst"] | ||
}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ | ||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ | ||
@@ -49,0 +52,0 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
288303
133
4642
212
Yes
17
1