Skip to content

Commit

Permalink
🤖 refactor: Use ESM import syntax.
Browse files Browse the repository at this point in the history
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/aureooms/rejuvenate/blob/eb1b209cd7aa675a642d48b2a788c2c6112779f7/src/transforms/codemod:use-esm-import-syntax.js
Please contact the author of the transform if you believe there was an error.
  • Loading branch information
a-flying-potato authored and make-github-pseudonymous-again committed Apr 15, 2021
1 parent 9a469c1 commit c56ca31
Show file tree
Hide file tree
Showing 25 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion src/cardinality/approx/bipartite.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import general from './general';
import general from "./general.js";

export default general;
2 changes: 1 addition & 1 deletion src/cardinality/approx/general.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import general from '../opt/general';
import general from "../opt/general.js";

const generalApprox = (edges, _eps) => general(edges);
export default generalApprox;
4 changes: 2 additions & 2 deletions src/cardinality/approx/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import bipartite from './bipartite';
import general from './general';
import bipartite from "./bipartite.js";
import general from "./general.js";

export default general;

Expand Down
4 changes: 2 additions & 2 deletions src/cardinality/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import approx from './approx';
import opt from './opt';
import approx from "./approx/index.js";
import opt from "./opt/index.js";

export default opt;

Expand Down
2 changes: 1 addition & 1 deletion src/cardinality/opt/bipartite.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import general from './general';
import general from "./general.js";

export default general;
4 changes: 2 additions & 2 deletions src/cardinality/opt/general.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import blossomNoChecks from '../../core/blossomNoChecks';
import addDefaultWeight from '../../addDefaultWeight';
import blossomNoChecks from "../../core/blossomNoChecks.js";
import addDefaultWeight from "../../addDefaultWeight.js";

const general = (edges) => blossomNoChecks(addDefaultWeight(edges), true);

Expand Down
4 changes: 2 additions & 2 deletions src/cardinality/opt/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import bipartite from './bipartite';
import general from './general';
import bipartite from "./bipartite.js";
import general from "./general.js";

export default general;

Expand Down
20 changes: 10 additions & 10 deletions src/core/blossom/blossom.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import assert from 'assert';
import min from './min';
import rotate from './rotate';
import verifyOptimum from './verifyOptimum';
import checkDelta2 from './checkDelta2';
import checkDelta3 from './checkDelta3';
import statistics from './statistics';
import endpoints from './endpoints';
import neighbours from './neighbours';
import blossomLeaves from './blossomLeaves';
import blossomEdges from './blossomEdges';
import min from "./min.js";
import rotate from "./rotate.js";
import verifyOptimum from "./verifyOptimum.js";
import checkDelta2 from "./checkDelta2.js";
import checkDelta3 from "./checkDelta3.js";
import statistics from "./statistics.js";
import endpoints from "./endpoints.js";
import neighbours from "./neighbours.js";
import blossomLeaves from "./blossomLeaves.js";
import blossomEdges from "./blossomEdges.js";

// Adapted from http://jorisvr.nl/maximummatching.html
// All credit for the implementation goes to Joris van Rantwijk [http://jorisvr.nl].
Expand Down
2 changes: 1 addition & 1 deletion src/core/blossom/blossomEdges.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import blossomLeaves from './blossomLeaves';
import blossomLeaves from "./blossomLeaves.js";

export default function* blossomEdges(nvertex, blossomchilds, neighbend, bv) {
for (const v of blossomLeaves(nvertex, blossomchilds, bv)) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/blossom/checkDelta3.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import blossomLeaves from './blossomLeaves';
import blossomLeaves from "./blossomLeaves.js";

// Check optimized delta3 against a trivial computation.
const checkDelta3 = ({
Expand Down
12 changes: 6 additions & 6 deletions src/core/blossom/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import blossom from './blossom';
import checkDelta2 from './checkDelta2';
import checkDelta3 from './checkDelta3';
import min from './min';
import rotate from './rotate';
import verifyOptimum from './verifyOptimum';
import blossom from "./blossom.js";
import checkDelta2 from "./checkDelta2.js";
import checkDelta3 from "./checkDelta3.js";
import min from "./min.js";
import rotate from "./rotate.js";
import verifyOptimum from "./verifyOptimum.js";

export default blossom;

Expand Down
2 changes: 1 addition & 1 deletion src/core/blossom/verifyOptimum.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import min from './min';
import min from "./min.js";

// Verify that the optimum solution has been reached.
const verifyOptimum = ({
Expand Down
2 changes: 1 addition & 1 deletion src/core/blossomNoChecks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import blossom from './blossom';
import blossom from "./blossom/index.js";

const blossomNoChecks = blossom(false, false);

Expand Down
4 changes: 2 additions & 2 deletions src/core/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import blossom from './blossom';
import blossomNoChecks from './blossomNoChecks';
import blossom from "./blossom/index.js";
import blossomNoChecks from "./blossomNoChecks.js";

/* eslint import/no-anonymous-default-export: [2, {"allowObject": true}] */
export default {
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import cardinality from './cardinality';
import core from './core';
import weight from './weight';
import iter from './iter';
import addDefaultWeight from './addDefaultWeight';
import cardinality from "./cardinality/index.js";
import core from "./core/index.js";
import weight from "./weight/index.js";
import iter from "./iter.js";
import addDefaultWeight from "./addDefaultWeight.js";

export default weight;

Expand Down
2 changes: 1 addition & 1 deletion src/weight/approx/bipartite.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import general from './general';
import general from "./general.js";

export default general;
2 changes: 1 addition & 1 deletion src/weight/approx/general.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import general from '../opt/general';
import general from "../opt/general.js";

const generalApprox = (edges, _eps) => general(edges);
export default generalApprox;
4 changes: 2 additions & 2 deletions src/weight/approx/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import bipartite from './bipartite';
import general from './general';
import bipartite from "./bipartite.js";
import general from "./general.js";

export default general;

Expand Down
4 changes: 2 additions & 2 deletions src/weight/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import approx from './approx';
import opt from './opt';
import approx from "./approx/index.js";
import opt from "./opt/index.js";

export default opt;

Expand Down
2 changes: 1 addition & 1 deletion src/weight/opt/bipartite.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import general from './general';
import general from "./general.js";

export default general;
2 changes: 1 addition & 1 deletion src/weight/opt/general.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import blossomNoChecks from '../../core/blossomNoChecks';
import blossomNoChecks from "../../core/blossomNoChecks.js";

const general = (edges) => blossomNoChecks(edges);

Expand Down
4 changes: 2 additions & 2 deletions src/weight/opt/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import bipartite from './bipartite';
import general from './general';
import bipartite from "./bipartite.js";
import general from "./general.js";

export default general;

Expand Down
6 changes: 3 additions & 3 deletions test/src/cardinality.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import test from 'ava';
import {enumerate} from '@aureooms/js-itertools';

import maximumCardinalityMatching from '../../src/cardinality';
import {addDefaultWeight} from '../../src';
import blossom from '../../src/core/blossom';
import maximumCardinalityMatching from "../../src/cardinality/index.js";
import {addDefaultWeight} from "../../src/index.js";
import blossom from "../../src/core/blossom/index.js";

const macro = (t, algorithm, edges, expected) => {
const input = edges.map((edge) => edge.slice()); // Deepcopy
Expand Down
4 changes: 2 additions & 2 deletions test/src/readme.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from 'ava';

import maximumMatching, {iter} from '../../src';
import maximumCardinalityMatching from '../../src/cardinality';
import maximumMatching, {iter} from "../../src/index.js";
import maximumCardinalityMatching from "../../src/cardinality/index.js";

test('weight', (t) => {
const edges = [
Expand Down
4 changes: 2 additions & 2 deletions test/src/weight.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import test from 'ava';
import {enumerate} from '@aureooms/js-itertools';

import maximumMatching from '../../src';
import blossom from '../../src/core/blossom';
import maximumMatching from "../../src/index.js";
import blossom from "../../src/core/blossom/index.js";

const macro = (t, algorithm, edges, expected) => {
const input = edges.map((edge) => edge.slice()); // Deepcopy
Expand Down

0 comments on commit c56ca31

Please sign in to comment.