max-priority-queue-typed 1.21.4 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js ADDED
@@ -0,0 +1,65 @@
1
+ module.exports = {
2
+ 'extends': [
3
+ 'plugin:@typescript-eslint/recommended',
4
+ 'prettier'
5
+ ],
6
+ 'rules': {
7
+ 'react/display-name': 'off',
8
+ '@next/next/no-img-element': 'off',
9
+ 'react/no-unescaped-entities': 'off',
10
+ 'import/no-anonymous-default-export': 'off',
11
+ '@typescript-eslint/no-unused-vars': 'error',
12
+ '@typescript-eslint/ban-ts-comment': 'off',
13
+ '@typescript-eslint/no-explicit-any': 'off',
14
+ '@typescript-eslint/no-non-null-assertion': 'off',
15
+ // add new line above comment
16
+ 'lines-around-comment': [
17
+ 'error',
18
+ {
19
+ 'beforeLineComment': false,
20
+ 'beforeBlockComment': true,
21
+ 'allowBlockStart': true,
22
+ 'allowClassStart': true,
23
+ 'allowObjectStart': true,
24
+ 'allowArrayStart': true
25
+ }
26
+ ],
27
+ // add new line above return
28
+ 'newline-before-return': 'off',
29
+ // add new line below import
30
+ 'import/newline-after-import': [
31
+ 'error',
32
+ {
33
+ 'count': 1
34
+ }
35
+ ],
36
+ '@typescript-eslint/ban-types': [
37
+ 'error',
38
+ {
39
+ 'extendDefaults': true,
40
+ 'types': {
41
+ '{}': false
42
+ }
43
+ }
44
+ ]
45
+ },
46
+ 'plugins': [
47
+ 'import'
48
+ ],
49
+ 'settings': {
50
+ 'import/parsers': {
51
+ '@typescript-eslint/parser': [
52
+ '.ts',
53
+ '.tsx'
54
+ ]
55
+ },
56
+ 'import/resolver': {
57
+ 'typescript': {
58
+ 'alwaysTryTypes': true,
59
+ 'project': [
60
+ './tsconfig.json'
61
+ ]
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,6 @@
1
+ src/types/data-structures/abstract-binary-tree.ts
2
+ src/types/data-structures/binary-tree.ts
3
+ src/types/data-structures/bst.ts
4
+ src/types/data-structures/avl-tree.ts
5
+ src/types/data-structures/tree-multiset.ts
6
+ src/types/data-structures/rb-tree.ts
package/.prettierrc.js ADDED
@@ -0,0 +1,16 @@
1
+ module.exports = {
2
+ arrowParens: 'avoid',
3
+ bracketSpacing: true,
4
+ htmlWhitespaceSensitivity: 'css',
5
+ insertPragma: false,
6
+ bracketSameLine: false,
7
+ jsxSingleQuote: true,
8
+ printWidth: 120,
9
+ proseWrap: 'preserve',
10
+ quoteProps: 'as-needed',
11
+ requirePragma: false,
12
+ singleQuote: true,
13
+ tabWidth: 2,
14
+ trailingComma: 'none',
15
+ useTabs: false
16
+ }
package/README.md CHANGED
@@ -8,7 +8,7 @@ This is a standalone Max Priority Queue data structure from the data-structure-t
8
8
  ## install
9
9
  ### npm
10
10
  ```bash
11
- npm i max-priority-queue
11
+ npm i max-priority-queue --save
12
12
  ```
13
13
  ### yarn
14
14
  ```bash
package/jest.config.js CHANGED
@@ -1,5 +1,7 @@
1
1
  module.exports = {
2
- preset: 'ts-jest',
3
- testEnvironment: 'node',
4
- testMatch: ['<rootDir>/tests/**/*.test.ts'],
5
- };
2
+ preset: 'ts-jest',
3
+ testEnvironment: 'node',
4
+ testMatch: ['<rootDir>/test/**/*.test.ts', '<rootDir>/test/**/*.test.js'],
5
+ collectCoverage: true,
6
+ coverageDirectory: 'coverage'
7
+ };
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "max-priority-queue-typed",
3
- "version": "1.21.4",
3
+ "version": "1.32.0",
4
4
  "description": "Max Priority Queue. Javascript & Typescript Data Structure.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "build": "rm -rf dist && npx tsc",
8
+ "lint": "eslint --fix \"src/**/*.{js,ts}\"",
9
+ "format": "prettier --write \"src/**/*.{js,ts}\"",
8
10
  "test": "jest",
9
11
  "build:docs": "typedoc --out docs ./src",
10
12
  "deps:check": "dependency-cruiser src",
@@ -47,13 +49,19 @@
47
49
  "devDependencies": {
48
50
  "@types/jest": "^29.5.3",
49
51
  "@types/node": "^20.4.9",
50
- "dependency-cruiser": "^13.1.2",
52
+ "@typescript-eslint/eslint-plugin": "^5.6.0",
53
+ "@typescript-eslint/parser": "^5.11.0",
54
+ "eslint": "^7.32.0",
55
+ "eslint-config-prettier": "^8.3.0",
56
+ "eslint-import-resolver-alias": "^1.1.2",
57
+ "eslint-import-resolver-typescript": "^2.5.0",
58
+ "eslint-plugin-import": "^2.25.4",
51
59
  "jest": "^29.6.2",
60
+ "prettier": "^3.0.3",
52
61
  "ts-jest": "^29.1.1",
53
- "typedoc": "^0.24.8",
54
62
  "typescript": "^4.9.5"
55
63
  },
56
64
  "dependencies": {
57
- "data-structure-typed": "^1.21.4"
65
+ "data-structure-typed": "^1.32.0"
58
66
  }
59
67
  }
@@ -0,0 +1,5 @@
1
+ describe('Operation Test', () => {
2
+ it('should perform various operations well', () => {
3
+ expect(true).toBeTruthy();
4
+ });
5
+ });