Skip to content

Commit 4e791d8

Browse files
committed
fix: update dependencies and fix build
1 parent aabebd2 commit 4e791d8

File tree

15 files changed

+82
-104
lines changed

15 files changed

+82
-104
lines changed
File renamed without changes.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
npm: true
1414
secrets:
1515
github-token: ${{ secrets.BOT_TOKEN }}
16-
npm-token: ${{ secrets.NPM_BOT_TOKEN }}
16+
npm-token: ${{ secrets.NPM_BOT_TOKEN }}

.github/workflows/typedoc.yml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,15 @@
1-
name: Deploy TypeDoc on GitHub pages
1+
name: TypeDoc
22

33
on:
44
workflow_dispatch:
55
release:
66
types: [published]
77

8-
env:
9-
NODE_VERSION: 20.x
10-
ENTRY_FILE: 'src/index.ts'
11-
128
jobs:
13-
deploy:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-node@v4
18-
with:
19-
node-version: ${{ env.NODE_VERSION }}
20-
- name: Install dependencies
21-
run: npm install
22-
- name: Build documentation
23-
uses: zakodium/typedoc-action@v2
24-
with:
25-
entry: ${{ env.ENTRY_FILE }}
26-
- name: Deploy to GitHub pages
27-
uses: JamesIves/github-pages-deploy-action@releases/v4
28-
with:
29-
token: ${{ secrets.BOT_TOKEN }}
30-
branch: gh-pages
31-
folder: docs
32-
clean: true
9+
typedoc:
10+
# Documentation: https://github.com/zakodium/workflows#typedoc
11+
uses: zakodium/workflows/.github/workflows/typedoc.yml@typedoc-v1
12+
with:
13+
entry: 'src/index.ts'
14+
secrets:
15+
github-token: ${{ secrets.BOT_TOKEN }}

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CHANGELOG.md

.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"arrowParens": "always",
3+
"semi": true,
4+
"singleQuote": true,
5+
"tabWidth": 2,
6+
"trailingComma": "all"
7+
}

package.json

Lines changed: 33 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,47 @@
11
{
22
"name": "linear-sum-assignment",
33
"version": "1.0.7",
4+
"license": "MIT",
45
"description": "it performs a linear sum assignment even if the cost matrix is rectangular.",
5-
"main": "./lib/index.js",
6-
"module": "./lib-esm/index.js",
7-
"types": "./lib/index.d.ts",
86
"keywords": [],
97
"author": "J Alejandro Bolanos A <jobo322>",
10-
"license": "MIT",
8+
"type": "module",
9+
"exports": {
10+
".": "./lib/index.js"
11+
},
1112
"files": [
12-
"src",
1313
"lib",
14-
"lib-esm"
14+
"src"
1515
],
1616
"scripts": {
17-
"clean": "rimraf lib lib-esm",
1817
"check-types": "tsc --noEmit",
19-
"eslint": "eslint src --ext ts --cache",
20-
"eslint-fix": "npm run eslint -- --fix",
18+
"clean": "rimraf coverage dist lib",
19+
"eslint": "eslint . --cache",
20+
"eslint-fix": "eslint . --cache --fix",
2121
"prepack": "npm run tsc",
22-
"prettier": "prettier --check src",
23-
"prettier-write": "prettier --write src",
24-
"test": "npm run test-coverage && npm run eslint",
25-
"test-coverage": "npm run test-only -- --coverage",
26-
"test-only": "jest",
27-
"tsc": "npm run clean && npm run tsc-cjs && npm run tsc-esm",
28-
"tsc-cjs": "tsc --project tsconfig.cjs.json",
29-
"tsc-esm": "tsc --project tsconfig.esm.json"
22+
"prettier": "prettier --check .",
23+
"prettier-write": "prettier --write .",
24+
"test": "npm run test-only && npm run check-types && npm run eslint && npm run prettier",
25+
"test-only": "vitest run --coverage",
26+
"tsc": "npm run clean && npm run tsc-build",
27+
"tsc-build": "tsc --project tsconfig.build.json"
28+
},
29+
"dependencies": {
30+
"cheminfo-types": "^1.8.1",
31+
"ml-matrix": "^6.12.1",
32+
"ml-spectra-processing": "^14.18.0"
33+
},
34+
"devDependencies": {
35+
"@types/node": "^24.9.1",
36+
"@vitest/coverage-v8": "^3.2.4",
37+
"@zakodium/tsconfig": "^1.0.2",
38+
"eslint": "^8.57.0",
39+
"eslint-config-cheminfo-typescript": "^12.2.0",
40+
"jest-matcher-deep-close-to": "^3.0.2",
41+
"prettier": "^3.6.2",
42+
"rimraf": "^6.0.1",
43+
"typescript": "^5.9.3",
44+
"vitest": "^3.2.4"
3045
},
3146
"repository": {
3247
"type": "git",
@@ -35,32 +50,5 @@
3550
"bugs": {
3651
"url": "https://github.com/mljs/linear-sum-assignment/issues"
3752
},
38-
"homepage": "https://github.com/mljs/linear-sum-assignment#readme",
39-
"jest": {
40-
"preset": "ts-jest",
41-
"testEnvironment": "node"
42-
},
43-
"prettier": {
44-
"arrowParens": "always",
45-
"semi": true,
46-
"singleQuote": true,
47-
"tabWidth": 2,
48-
"trailingComma": "all"
49-
},
50-
"dependencies": {
51-
"cheminfo-types": "^1.7.3",
52-
"ml-matrix": "^6.11.0",
53-
"ml-spectra-processing": "^14.2.2"
54-
},
55-
"devDependencies": {
56-
"@types/jest": "^29.5.12",
57-
"eslint": "^8.57.0",
58-
"eslint-config-cheminfo-typescript": "^12.2.0",
59-
"jest": "^29.7.0",
60-
"jest-matcher-deep-close-to": "^3.0.2",
61-
"prettier": "^3.2.5",
62-
"rimraf": "^5.0.5",
63-
"ts-jest": "^29.1.2",
64-
"typescript": "^5.4.2"
65-
}
53+
"homepage": "https://github.com/mljs/linear-sum-assignment#readme"
6654
}

src/__tests__/index.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { toMatchCloseTo } from 'jest-matcher-deep-close-to';
1+
import { describe, expect, it } from 'vitest';
22

3-
import { linearSumAssignment } from '..';
4-
5-
expect.extend({ toMatchCloseTo });
3+
import { linearSumAssignment } from '../index.ts';
64

75
describe('linear sum problem', () => {
86
it('same number of rows and columns', () => {

src/getShortestPath.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { DoubleArray } from 'cheminfo-types';
1+
import type { DoubleArray } from 'cheminfo-types';
22
import type { Matrix } from 'ml-matrix';
33
import { xSequentialFillFromTo } from 'ml-spectra-processing';
44

5-
interface GetShortestPathOptions {
5+
export interface GetShortestPathOptions {
66
currUnAssCol: number;
77
dualVariableForColumns: DoubleArray;
88
dualVariableForRows: DoubleArray;

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { DoubleArray } from 'cheminfo-types';
1+
import type { DoubleArray } from 'cheminfo-types';
22
import { Matrix } from 'ml-matrix';
33

4-
import { getShortestPath } from './getShortestPath';
4+
import { getShortestPath } from './getShortestPath.ts';
55

6-
interface Options {
6+
export interface LinearSumAssignmentOptions {
77
/**
88
* if true it will generate the assignment by the maximization of the cost.
99
* @default true
@@ -21,7 +21,7 @@ export function linearSumAssignment(
2121
* Cost matrix
2222
*/
2323
input: DoubleArray[] | Matrix,
24-
options: Options = {},
24+
options: LinearSumAssignmentOptions = {},
2525
) {
2626
const { maximaze = true } = options;
2727

tsconfig.build.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["src"],
4+
"exclude": ["**/__tests__", "**/*.test.*"]
5+
}

0 commit comments

Comments
 (0)