Skip to content

Commit bbaa26f

Browse files
committed
fix build error
1 parent 224a317 commit bbaa26f

30 files changed

+175
-19
lines changed

Diff for: packages/bellman-ford/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
4343
},
4444
"dependencies": {
45-
"@algorithm.ts/graph": "^2.0.14",
46-
"@algorithm.ts/queue": "^2.0.14"
45+
"@algorithm.ts/constant": "^2.0.14",
46+
"@algorithm.ts/queue": "^2.0.14",
47+
"@algorithm.ts/types": "^2.0.14"
4748
}
4849
}

Diff for: packages/bellman-ford/src/sugar.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BIGINT_ZERO } from '@algorithm.ts/_constant'
1+
import { BIGINT_ZERO } from '@algorithm.ts/constant'
22
import type { DeepReadonly } from '@algorithm.ts/types'
33
import { BellmanFord } from './BellmanFord'
44
import type { IBellmanFordGraph, IBellmanFordOptions, IBellmanFordResult } from './types'

Diff for: packages/binary-index-tree/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,8 @@
4040
"prebuild": "rimraf lib/",
4141
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
4242
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
43+
},
44+
"dependencies": {
45+
"@algorithm.ts/types": "^2.0.14"
4346
}
4447
}

Diff for: packages/binary-search/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@
3838
"prebuild": "rimraf lib/",
3939
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
4040
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
41+
},
42+
"dependencies": {
43+
"@algorithm.ts/constant": "^2.0.14"
4144
}
4245
}

Diff for: packages/binary-search/src/binary-search.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BIGINT_ONE } from '@algorithm.ts/_constant'
1+
import { BIGINT_ONE } from '@algorithm.ts/constant'
22
import type { IBinarySearchCheck, IBinarySearchCheckBigint } from './types'
33

44
/**

Diff for: packages/binary-search/src/lower-bound.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BIGINT_ONE } from '@algorithm.ts/_constant'
1+
import { BIGINT_ONE } from '@algorithm.ts/constant'
22
import type { IBinarySearchCheck, IBinarySearchCheckBigint } from './types'
33

44
/**

Diff for: packages/binary-search/src/upper-bound.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BIGINT_ONE } from '@algorithm.ts/_constant'
1+
import { BIGINT_ONE } from '@algorithm.ts/constant'
22
import type { IBinarySearchCheck, IBinarySearchCheckBigint } from './types'
33

44
/**

Diff for: packages/calculator/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@
4141
"prebuild": "rimraf lib/",
4242
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
4343
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
44+
},
45+
"dependencies": {
46+
"@algorithm.ts/constant": "^2.0.14",
47+
"@algorithm.ts/types": "^2.0.14"
4448
}
4549
}

Diff for: packages/calculator/src/operand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BIGINT_ZERO } from '@algorithm.ts/_constant'
1+
import { BIGINT_ZERO } from '@algorithm.ts/constant'
22
import type { IOperator } from '@algorithm.ts/types'
33

44
const DOT_CHAR_CODE = 46

Diff for: packages/constant/README.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<header>
2+
<h1 align="center">
3+
<a href="https://github.com/guanghechen/algorithm.ts/tree/release-3.x.x/packages/constant#readme">@algorithm.ts/constant</a>
4+
</h1>
5+
<div align="center">
6+
<a href="https://www.npmjs.com/package/@algorithm.ts/constant">
7+
<img
8+
alt="Npm Version"
9+
src="https://img.shields.io/npm/v/@algorithm.ts/constant.svg"
10+
/>
11+
</a>
12+
<a href="https://www.npmjs.com/package/@algorithm.ts/constant">
13+
<img
14+
alt="Npm Download"
15+
src="https://img.shields.io/npm/dm/@algorithm.ts/constant.svg"
16+
/>
17+
</a>
18+
<a href="https://www.npmjs.com/package/@algorithm.ts/constant">
19+
<img
20+
alt="Npm License"
21+
src="https://img.shields.io/npm/l/@algorithm.ts/constant.svg"
22+
/>
23+
</a>
24+
<a href="#install">
25+
<img
26+
alt="Module Formats: cjs, esm"
27+
src="https://img.shields.io/badge/module_formats-cjs%2C%20esm-green.svg"
28+
/>
29+
</a>
30+
<a href="https://github.com/nodejs/node">
31+
<img
32+
alt="Node.js Version"
33+
src="https://img.shields.io/node/v/@algorithm.ts/constant"
34+
/>
35+
</a>
36+
<a href="https://github.com/facebook/jest">
37+
<img
38+
alt="Tested with Jest"
39+
src="https://img.shields.io/badge/tested_with-jest-9c465e.svg"
40+
/>
41+
</a>
42+
<a href="https://github.com/prettier/prettier">
43+
<img
44+
alt="Code Style: prettier"
45+
src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"
46+
/>
47+
</a>
48+
</div>
49+
</header>
50+
<br/>
51+
52+
53+
Common constant.
54+
55+
## Install
56+
57+
* npm
58+
59+
```bash
60+
npm install --save @algorithm.ts/constant
61+
```
62+
63+
* yarn
64+
65+
```bash
66+
yarn add @algorithm.ts/constant
67+
```
68+
69+
70+
## Usage
71+
72+
73+
## Related
74+
75+
76+
[homepage]: https://github.com/guanghechen/algorithm.ts/tree/release-3.x.x/packages/constant#readme

Diff for: packages/constant/package.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "@algorithm.ts/constant",
3+
"version": "2.0.14",
4+
"description": "Common constant for the algorithm.ts packages.",
5+
"author": {
6+
"name": "guanghechen",
7+
"url": "https://github.com/guanghechen/"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/guanghechen/algorithm.ts/tree/release-3.x.x",
12+
"directory": "packages/constant"
13+
},
14+
"homepage": "https://github.com/guanghechen/algorithm.ts/tree/release-3.x.x/packages/constant#readme",
15+
"main": "lib/cjs/index.js",
16+
"module": "lib/esm/index.js",
17+
"types": "lib/types/index.d.ts",
18+
"source": "src/index.ts",
19+
"license": "MIT",
20+
"engines": {
21+
"node": ">= 14.15.0"
22+
},
23+
"files": [
24+
"lib/",
25+
"!lib/**/*.js.map",
26+
"!lib/**/*.d.ts.map",
27+
"package.json",
28+
"CHANGELOG.md",
29+
"LICENSE",
30+
"README.md"
31+
],
32+
"scripts": {
33+
"build": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js",
34+
"prebuild": "rimraf lib/",
35+
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
36+
"test": "echo 'No test needed.'"
37+
}
38+
}
File renamed without changes.

Diff for: packages/constant/tsconfig.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../../tsconfig",
3+
"include": ["src", "script", "__test__"]
4+
}

Diff for: packages/constant/tsconfig.src.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "../../tsconfig.settings",
3+
"compilerOptions": {
4+
"rootDir": "src"
5+
},
6+
"include": ["src"]
7+
}

Diff for: packages/dijkstra/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
4444
},
4545
"dependencies": {
46-
"@algorithm.ts/graph": "^2.0.14",
47-
"@algorithm.ts/queue": "^2.0.14"
46+
"@algorithm.ts/constant": "^2.0.14",
47+
"@algorithm.ts/queue": "^2.0.14",
48+
"@algorithm.ts/types": "^2.0.14"
4849
}
4950
}

Diff for: packages/dijkstra/src/sugar.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BIGINT_ZERO } from '@algorithm.ts/_constant'
1+
import { BIGINT_ZERO } from '@algorithm.ts/constant'
22
import type { DeepReadonly } from '@algorithm.ts/types'
33
import { Dijkstra } from './Dijkstra'
44
import type { IDijkstraGraph, IDijkstraOptions, IDijkstraResult } from './types'

Diff for: packages/dinic/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
4444
},
4545
"dependencies": {
46-
"@algorithm.ts/queue": "^2.0.14"
46+
"@algorithm.ts/queue": "^2.0.14",
47+
"@algorithm.ts/types": "^2.0.14"
4748
}
4849
}

Diff for: packages/dlx/src/DancingLinkX.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { IDancingLinkX } from '@algorithm.ts/dlx'
1+
import type { IDancingLinkX } from './types'
22

33
export interface IDancingLinkXProps {
44
/**

Diff for: packages/gcd/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@
3939
"prebuild": "rimraf lib/",
4040
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
4141
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
42+
},
43+
"dependencies": {
44+
"@algorithm.ts/constant": "^2.0.14"
4245
}
4346
}

Diff for: packages/gcd/src/euclidean.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BIGINT_ONE, BIGINT_ZERO } from '@algorithm.ts/_constant'
1+
import { BIGINT_ONE, BIGINT_ZERO } from '@algorithm.ts/constant'
22

33
/**
44
* Extended Euclidean algorithm for solving the smallest

Diff for: packages/gcd/src/gcd.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BIGINT_ZERO } from '@algorithm.ts/_constant'
1+
import { BIGINT_ZERO } from '@algorithm.ts/constant'
22

33
/**
44
* Find the greatest common divisor of x and y

Diff for: packages/graph/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@
4040
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
4141
},
4242
"dependencies": {
43-
"@algorithm.ts/queue": "^2.0.14"
43+
"@algorithm.ts/types": "^2.0.14"
4444
}
4545
}

Diff for: packages/isap/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
4444
},
4545
"dependencies": {
46-
"@algorithm.ts/queue": "^2.0.14"
46+
"@algorithm.ts/queue": "^2.0.14",
47+
"@algorithm.ts/types": "^2.0.14"
4748
}
4849
}

Diff for: packages/lcs/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@
3939
"prebuild": "rimraf lib/",
4040
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
4141
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
42+
},
43+
"dependencies": {
44+
"@algorithm.ts/types": "^2.0.14"
4245
}
4346
}

Diff for: packages/mcmf/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
4444
},
4545
"dependencies": {
46-
"@algorithm.ts/queue": "^2.0.14"
46+
"@algorithm.ts/queue": "^2.0.14",
47+
"@algorithm.ts/types": "^2.0.14"
4748
}
4849
}

Diff for: packages/queue/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@
4141
"prebuild": "rimraf lib/",
4242
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
4343
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
44+
},
45+
"dependencies": {
46+
"@algorithm.ts/types": "^2.0.14"
4447
}
4548
}

Diff for: packages/sliding-window/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@
3838
"prebuild": "rimraf lib/",
3939
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
4040
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
41+
},
42+
"dependencies": {
43+
"@algorithm.ts/types": "^2.0.14"
4144
}
4245
}

Diff for: packages/trie/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@
4141
"prebuild": "rimraf lib/",
4242
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
4343
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
44+
},
45+
"dependencies": {
46+
"@algorithm.ts/constant": "^2.0.14",
47+
"@algorithm.ts/types": "^2.0.14"
4448
}
4549
}

Diff for: packages/trie/src/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
CODEPOINT_LOWER_A,
55
CODEPOINT_UPPER_A,
66
CODEPOINT_UPPER_Z,
7-
} from '@algorithm.ts/_constant'
7+
} from '@algorithm.ts/constant'
88

99
// Calc idx of digit character.
1010
export const digitIdx = (c: string): number => c.codePointAt(0)! - CODEPOINT_DIGIT_0

Diff for: tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"sourceMap": true,
77
"paths": {
88
"@@/fixtures/*": ["fixtures/*"],
9-
"@algorithm.ts/_constant": ["packages/_constant/src"],
109
"@algorithm.ts/base64": ["packages/base64/src"],
1110
"@algorithm.ts/bellman-ford": ["packages/bellman-ford/src"],
1211
"@algorithm.ts/binary-index-tree": ["packages/binary-index-tree/src"],
1312
"@algorithm.ts/bipartite-matching": ["packages/bipartite-matching/src"],
1413
"@algorithm.ts/binary-search": ["packages/binary-search/src"],
1514
"@algorithm.ts/calculator": ["packages/calculator/src"],
15+
"@algorithm.ts/constant": ["packages/constant/src"],
1616
"@algorithm.ts/dijkstra": ["packages/dijkstra/src"],
1717
"@algorithm.ts/dinic": ["packages/dinic/src"],
1818
"@algorithm.ts/dlx": ["packages/dlx/src"],

0 commit comments

Comments
 (0)