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/make-github-pseudonymous-again/rejuvenate/blob/d09fbf6436be892b61bbe02454e1d7d7229c50d8/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 Sep 10, 2022
1 parent 37585cb commit f4a51c2
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/adt/Forest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _makeset } from '../fundamentals'
import { _makeset } from '../fundamentals/index.js'

export function Node ( value ) {
this.parent = this ;
Expand Down
2 changes: 1 addition & 1 deletion src/adt/ForestAmortizedHalving.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RankedTreeNode , rankedtreeunion , rankedtreemakeset } from '../fundamentals'
import { RankedTreeNode , rankedtreeunion , rankedtreemakeset } from '../fundamentals/index.js'

export const Node = RankedTreeNode ;

Expand Down
2 changes: 1 addition & 1 deletion src/adt/ForestAmortizedRecursive.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RankedTreeNode , rankedtreeunion , rankedtreemakeset } from '../fundamentals'
import { RankedTreeNode , rankedtreeunion , rankedtreemakeset } from '../fundamentals/index.js'

export const Node = RankedTreeNode ;

Expand Down
2 changes: 1 addition & 1 deletion src/adt/ForestAmortizedSplitting.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RankedTreeNode , rankedtreeunion , rankedtreemakeset } from '../fundamentals'
import { RankedTreeNode , rankedtreeunion , rankedtreemakeset } from '../fundamentals/index.js'

export const Node = RankedTreeNode ;

Expand Down
2 changes: 1 addition & 1 deletion src/adt/ForestAmortizedTwoPasses.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RankedTreeNode , rankedtreeunion , rankedtreemakeset } from '../fundamentals'
import { RankedTreeNode , rankedtreeunion , rankedtreemakeset } from '../fundamentals/index.js'

export const Node = RankedTreeNode ;

Expand Down
2 changes: 1 addition & 1 deletion src/adt/LinkedList.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LinkedListNode , linkedlistmakeset } from '../fundamentals'
import { LinkedListNode , linkedlistmakeset } from '../fundamentals/index.js'

export const Node = LinkedListNode ;

Expand Down
2 changes: 1 addition & 1 deletion src/adt/LinkedListWithHead.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LinkedListNode , linkedlistbackfind , linkedlistmakeset } from '../fundamentals'
import { LinkedListNode , linkedlistbackfind , linkedlistmakeset } from '../fundamentals/index.js'

export const Node = LinkedListNode ;

Expand Down
2 changes: 1 addition & 1 deletion src/adt/LinkedListWithHeadAndLength.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { linkedlistbackfind , _makeset } from '../fundamentals'
import { linkedlistbackfind , _makeset } from '../fundamentals/index.js'

export function Node ( value ) {
this.length = 1 ;
Expand Down
16 changes: 8 additions & 8 deletions src/adt/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Forest from './Forest' ;
import ForestAmortizedHalving from './ForestAmortizedHalving' ;
import ForestAmortizedRecursive from './ForestAmortizedRecursive' ;
import ForestAmortizedSplitting from './ForestAmortizedSplitting' ;
import ForestAmortizedTwoPasses from './ForestAmortizedTwoPasses' ;
import LinkedList from './LinkedList' ;
import LinkedListWithHead from './LinkedListWithHead' ;
import LinkedListWithHeadAndLength from './LinkedListWithHeadAndLength' ;
import Forest from './Forest.js' ;
import ForestAmortizedHalving from './ForestAmortizedHalving.js' ;
import ForestAmortizedRecursive from './ForestAmortizedRecursive.js' ;
import ForestAmortizedSplitting from './ForestAmortizedSplitting.js' ;
import ForestAmortizedTwoPasses from './ForestAmortizedTwoPasses.js' ;
import LinkedList from './LinkedList.js' ;
import LinkedListWithHead from './LinkedListWithHead.js' ;
import LinkedListWithHeadAndLength from './LinkedListWithHeadAndLength.js' ;

export default {
Forest ,
Expand Down
14 changes: 7 additions & 7 deletions src/fundamentals/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import LinkedListNode from './LinkedListNode' ;
import RankedTreeNode from './RankedTreeNode' ;
import _makeset from './_makeset' ;
import linkedlistbackfind from './linkedlistbackfind' ;
import linkedlistmakeset from './linkedlistmakeset' ;
import rankedtreemakeset from './rankedtreemakeset' ;
import rankedtreeunion from './rankedtreeunion' ;
import LinkedListNode from './LinkedListNode.js' ;
import RankedTreeNode from './RankedTreeNode.js' ;
import _makeset from './_makeset.js' ;
import linkedlistbackfind from './linkedlistbackfind.js' ;
import linkedlistmakeset from './linkedlistmakeset.js' ;
import rankedtreemakeset from './rankedtreemakeset.js' ;
import rankedtreeunion from './rankedtreeunion.js' ;

export default {
LinkedListNode ,
Expand Down
4 changes: 2 additions & 2 deletions src/fundamentals/linkedlistmakeset.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _makeset from './_makeset' ;
import LinkedListNode from './LinkedListNode' ;
import _makeset from './_makeset.js' ;
import LinkedListNode from './LinkedListNode.js' ;

const linkedlistmakeset = _makeset( LinkedListNode ) ;
export default linkedlistmakeset ;
4 changes: 2 additions & 2 deletions src/fundamentals/rankedtreemakeset.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _makeset from './_makeset' ;
import RankedTreeNode from './RankedTreeNode' ;
import _makeset from './_makeset.js' ;
import RankedTreeNode from './RankedTreeNode.js' ;

const rankedtreemakeset = _makeset( RankedTreeNode ) ;
export default rankedtreemakeset ;
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
LinkedList ,
LinkedListWithHead ,
LinkedListWithHeadAndLength ,
} from './adt' ;
} from './adt/index.js' ;

import {
LinkedListNode ,
Expand All @@ -17,9 +17,9 @@ import {
linkedlistmakeset ,
rankedtreemakeset ,
rankedtreeunion ,
} from './fundamentals' ;
} from './fundamentals/index.js' ;

import { _prototype } from './tools'
import { _prototype } from './tools/index.js'

export default {
Forest ,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _prototype from './_prototype' ;
import _prototype from './_prototype.js' ;

export default {
_prototype ,
Expand Down
2 changes: 1 addition & 1 deletion test/src/disjointset.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
ForestAmortizedHalving ,
_prototype ,
_makeset ,
} from '../../src' ;
} from '../../src/index.js' ;

function macro ( t , Node , makeset , union , find ) {

Expand Down

0 comments on commit f4a51c2

Please sign in to comment.