Skip to content

Commit 071e3ae

Browse files
😒 chore: Rename package.
1 parent 55100e2 commit 071e3ae

File tree

10 files changed

+652
-1707
lines changed

10 files changed

+652
-1707
lines changed

.esdoc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"autoPrivate": true
1818
},
1919
"brand": {
20-
"title": "@aureooms/js-topological-sorting"
20+
"title": "@graph-algorithm/topological-sorting"
2121
},
2222
"test": {
2323
"type": "ava",

README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
:oden: [@aureooms/js-topological-sorting](https://make-github-pseudonymous-again.github.io/js-topological-sorting)
1+
:oden: [@graph-algorithm/topological-sorting](https://graph-algorithm.github.io/topological-sorting)
22
==
33

44
Topological sorting algorithms for JavaScript.
5-
See [docs](https://make-github-pseudonymous-again.github.io/js-topological-sorting/index.html).
5+
See [docs](https://graph-algorithm.github.io/topological-sorting/index.html).
66

77
> :warning: The code requires `regeneratorRuntime` to be defined, for instance by importing
88
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
99
1010
```js
1111
// Sort anything that can be iterated over with `for (const [u, v] of ...)`
12-
import {sorted} from '@aureooms/js-topological-sorting';
12+
import {sorted} from '@graph-algorithm/topological-sorting';
1313
sorted(["ab", "bc"]); // abc
1414

1515
// Add a comparison function to break ties.
16-
import {increasing} from '@aureooms/js-compare';
16+
import {increasing} from '@total-order/primitive';
1717
sorted(["ab", "cd"], increasing); // abcd
1818

19-
import {decreasing} from '@aureooms/js-compare';
19+
import {decreasing} from '@total-order/primitive';
2020
sorted(["ab", "cd"], decreasing); // cdab
2121
```
2222

23-
[![License](https://img.shields.io/github/license/make-github-pseudonymous-again/js-topological-sorting.svg)](https://raw.githubusercontent.com/make-github-pseudonymous-again/js-topological-sorting/main/LICENSE)
24-
[![Version](https://img.shields.io/npm/v/@aureooms/js-topological-sorting.svg)](https://www.npmjs.org/package/@aureooms/js-topological-sorting)
25-
[![Tests](https://img.shields.io/github/workflow/status/make-github-pseudonymous-again/js-topological-sorting/ci:test?event=push&label=tests)](https://github.com/make-github-pseudonymous-again/js-topological-sorting/actions/workflows/ci:test.yml?query=branch:main)
26-
[![Dependencies](https://img.shields.io/david/make-github-pseudonymous-again/js-topological-sorting.svg)](https://david-dm.org/make-github-pseudonymous-again/js-topological-sorting)
27-
[![Dev dependencies](https://img.shields.io/david/dev/make-github-pseudonymous-again/js-topological-sorting.svg)](https://david-dm.org/make-github-pseudonymous-again/js-topological-sorting?type=dev)
28-
[![GitHub issues](https://img.shields.io/github/issues/make-github-pseudonymous-again/js-topological-sorting.svg)](https://github.com/make-github-pseudonymous-again/js-topological-sorting/issues)
29-
[![Downloads](https://img.shields.io/npm/dm/@aureooms/js-topological-sorting.svg)](https://www.npmjs.org/package/@aureooms/js-topological-sorting)
23+
[![License](https://img.shields.io/github/license/graph-algorithm/topological-sorting.svg)](https://raw.githubusercontent.com/graph-algorithm/topological-sorting/main/LICENSE)
24+
[![Version](https://img.shields.io/npm/v/@graph-algorithm/topological-sorting.svg)](https://www.npmjs.org/package/@graph-algorithm/topological-sorting)
25+
[![Tests](https://img.shields.io/github/workflow/status/graph-algorithm/topological-sorting/ci:test?event=push&label=tests)](https://github.com/graph-algorithm/topological-sorting/actions/workflows/ci:test.yml?query=branch:main)
26+
[![Dependencies](https://img.shields.io/david/graph-algorithm/topological-sorting.svg)](https://david-dm.org/graph-algorithm/topological-sorting)
27+
[![Dev dependencies](https://img.shields.io/david/dev/graph-algorithm/topological-sorting.svg)](https://david-dm.org/graph-algorithm/topological-sorting?type=dev)
28+
[![GitHub issues](https://img.shields.io/github/issues/graph-algorithm/topological-sorting.svg)](https://github.com/graph-algorithm/topological-sorting/issues)
29+
[![Downloads](https://img.shields.io/npm/dm/@graph-algorithm/topological-sorting.svg)](https://www.npmjs.org/package/@graph-algorithm/topological-sorting)
3030

31-
[![Code issues](https://img.shields.io/codeclimate/issues/make-github-pseudonymous-again/js-topological-sorting.svg)](https://codeclimate.com/github/make-github-pseudonymous-again/js-topological-sorting/issues)
32-
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/make-github-pseudonymous-again/js-topological-sorting.svg)](https://codeclimate.com/github/make-github-pseudonymous-again/js-topological-sorting/trends/churn)
33-
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/make-github-pseudonymous-again/js-topological-sorting/main.svg)](https://codecov.io/gh/make-github-pseudonymous-again/js-topological-sorting)
34-
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/make-github-pseudonymous-again/js-topological-sorting.svg)](https://codeclimate.com/github/make-github-pseudonymous-again/js-topological-sorting/trends/technical_debt)
35-
[![Documentation](https://make-github-pseudonymous-again.github.io/js-topological-sorting/badge.svg)](https://make-github-pseudonymous-again.github.io/js-topological-sorting/source.html)
36-
[![Package size](https://img.shields.io/bundlephobia/minzip/@aureooms/js-topological-sorting)](https://bundlephobia.com/result?p=@aureooms/js-topological-sorting)
31+
[![Code issues](https://img.shields.io/codeclimate/issues/graph-algorithm/topological-sorting.svg)](https://codeclimate.com/github/graph-algorithm/topological-sorting/issues)
32+
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/graph-algorithm/topological-sorting.svg)](https://codeclimate.com/github/graph-algorithm/topological-sorting/trends/churn)
33+
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/graph-algorithm/topological-sorting/main.svg)](https://codecov.io/gh/graph-algorithm/topological-sorting)
34+
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/graph-algorithm/topological-sorting.svg)](https://codeclimate.com/github/graph-algorithm/topological-sorting/trends/technical_debt)
35+
[![Documentation](https://graph-algorithm.github.io/topological-sorting/badge.svg)](https://graph-algorithm.github.io/topological-sorting/source.html)
36+
[![Package size](https://img.shields.io/bundlephobia/minzip/@graph-algorithm/topological-sorting)](https://bundlephobia.com/result?p=@graph-algorithm/topological-sorting)

doc/manual/example.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Examples
22

3-
> More examples in [the test files](https://github.com/make-github-pseudonymous-again/js-topological-sorting/tree/main/test/src).
3+
> More examples in [the test files](https://github.com/graph-algorithm/topological-sorting/tree/main/test/src).

doc/manual/installation.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ or [jspm](https://jspm.org/docs).
88

99
### yarn
1010
```terminal
11-
yarn add @aureooms/js-topological-sorting
11+
yarn add @graph-algorithm/topological-sorting
1212
```
1313

1414
### npm
1515
```terminal
16-
npm install @aureooms/js-topological-sorting --save
16+
npm install @graph-algorithm/topological-sorting --save
1717
```
1818

1919
### jspm
2020
```terminal
21-
jspm install npm:@aureooms/js-topological-sorting
21+
jspm install npm:@graph-algorithm/topological-sorting
2222
```

doc/manual/usage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'regenerator-runtime/runtime.js' ;
1212

1313
Then, import the library where needed
1414
```js
15-
const topologicalSorting = require( '@aureooms/js-topological-sorting' ) ;
15+
const topologicalSorting = require( '@graph-algorithm/topological-sorting' ) ;
1616
// or
17-
import * as topologicalSorting from '@aureooms/js-topological-sorting' ;
17+
import * as topologicalSorting from '@graph-algorithm/topological-sorting' ;
1818
```

doc/scripts/header.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ const domReady = function (callback) {
1010
domReady(() => {
1111
const projectname = document.createElement('a');
1212
projectname.classList.add('project-name');
13-
projectname.text = 'aureooms/js-topological-sorting';
13+
projectname.text = 'graph-algorithm/topological-sorting';
1414
projectname.href = './index.html';
1515

1616
const header = document.querySelector('header');
1717
header.insertBefore(projectname, header.firstChild);
1818

1919
const testlink = document.querySelector('header > a[data-ice="testLink"]');
2020
testlink.href =
21-
'https://coveralls.io/github/make-github-pseudonymous-again/js-topological-sorting';
21+
'https://coveralls.io/github/graph-algorithm/topological-sorting';
2222
testlink.target = '_BLANK';
2323

2424
const searchBox = document.querySelector('.search-box');

package.json

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"name": "@aureooms/js-topological-sorting",
2+
"name": "@graph-algorithm/topological-sorting",
33
"description": "Topological sorting for JavaScript",
44
"version": "0.2.2",
55
"license": "AGPL-3.0",
6-
"author": "aureooms",
7-
"homepage": "https://make-github-pseudonymous-again.github.io/js-topological-sorting",
6+
"author": "make-github-pseudonymous-again",
7+
"homepage": "https://graph-algorithm.github.io/topological-sorting",
88
"repository": {
99
"type": "git",
10-
"url": "https://github.com/make-github-pseudonymous-again/js-topological-sorting"
10+
"url": "https://github.com/graph-algorithm/topological-sorting"
1111
},
1212
"bugs": {
13-
"url": "https://github.com/make-github-pseudonymous-again/js-topological-sorting/issues"
13+
"url": "https://github.com/graph-algorithm/topological-sorting/issues"
1414
},
1515
"keywords": [
1616
"acyclic",
@@ -61,19 +61,23 @@
6161
"test": "ava"
6262
},
6363
"dependencies": {
64-
"@aureooms/js-pairing-heap": "^3.0.0",
65-
"@data-structure/pairs": "^4.0.0"
64+
"@collection-abstraction/pairs": "^5.0.0",
65+
"@heap-data-structure/pairing-heap": "^4.0.0"
6666
},
6767
"devDependencies": {
68-
"@aureooms/js-collections-counter": "5.0.0",
69-
"@aureooms/js-compare": "2.0.1",
70-
"@aureooms/js-itertools": "5.1.1",
7168
"@babel/cli": "7.14.8",
7269
"@babel/core": "7.14.8",
7370
"@babel/preset-env": "7.14.8",
7471
"@babel/register": "7.14.5",
72+
"@collection-abstraction/counter": "6.0.0",
7573
"@commitlint/cli": "13.1.0",
74+
"@iterable-iterator/list": "^1.0.1",
75+
"@iterable-iterator/map": "^1.0.1",
76+
"@iterable-iterator/range": "^2.0.1",
7677
"@js-library/commitlint-config": "0.0.4",
78+
"@total-order/key": "^1.0.0",
79+
"@total-order/lex": "^1.0.0",
80+
"@total-order/primitive": "^1.0.1",
7781
"ava": "3.15.0",
7882
"babel-plugin-transform-remove-console": "6.9.4",
7983
"babel-plugin-unassert": "3.1.0",
@@ -88,7 +92,7 @@
8892
"fixpack": "4.0.0",
8993
"husky": "7.0.1",
9094
"lint-staged": "11.1.1",
91-
"microbundle": "0.13.3",
95+
"microbundle": "0.13.1",
9296
"np": "7.5.0",
9397
"pinst": "2.1.6",
9498
"power-assert": "1.6.1",

src/sorted.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {PairingHeap as Heap} from '@aureooms/js-pairing-heap';
2-
import {EfficientlyInvertiblePairs as Pairs} from '@data-structure/pairs';
1+
import {PairingHeap as Heap} from '@heap-data-structure/pairing-heap';
2+
import {EfficientlyInvertiblePairs as Pairs} from '@collection-abstraction/pairs';
33

44
import subroutine from './subroutine.js';
55

@@ -19,7 +19,7 @@ export default function* sorted(edges, breakTies = undefined) {
1919

2020
if (graph.size > 0) {
2121
throw new Error(
22-
'@aureooms/js-topological-sorting#sorted: input graph contains a cycle',
22+
'@graph-algorithm/topological-sorting#sorted: input graph contains a cycle',
2323
);
2424
}
2525
}

test/src/api/sorted.js

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import test from 'ava';
22

3-
import {map, list, range} from '@aureooms/js-itertools';
4-
import {
5-
increasing,
6-
decreasing,
7-
colexicographical,
8-
fn,
9-
} from '@aureooms/js-compare';
10-
import {EfficientlyInvertiblePairs as Pairs} from '@data-structure/pairs';
11-
import counter from '@aureooms/js-collections-counter';
3+
import {map} from '@iterable-iterator/map';
4+
import {list} from '@iterable-iterator/list';
5+
import {range} from '@iterable-iterator/range';
6+
import {increasing, decreasing} from '@total-order/primitive';
7+
import {colexicographical} from '@total-order/lex';
8+
import {key} from '@total-order/key';
9+
import {EfficientlyInvertiblePairs as Pairs} from '@collection-abstraction/pairs';
10+
import {counter} from '@collection-abstraction/counter';
1211
import {sorted} from '../../../src/index.js';
1312

1413
// https://en.wikipedia.org/wiki/Topological_sorting
@@ -98,7 +97,7 @@ test('Coffman-Graham Algorithm step 2', (t) => {
9897
const N = (u) => order.get(u);
9998

10099
const linearOrderOnDecreasingSequences = colexicographical(increasing);
101-
const colexOrder = fn(linearOrderOnDecreasingSequences, N);
100+
const colexOrder = key(linearOrderOnDecreasingSequences, N);
102101

103102
const breakTies = (u, v) => colexOrder(u, v) || increasing(u, v);
104103

0 commit comments

Comments
 (0)