Skip to content

Commit 8e720b6

Browse files
🤖 refactor: Use ESM import syntax.
These changes were automatically generated by a transform whose code can be found at: - https://github.com/aureooms/rejuvenate/blob/1fe650dc2407c6c6395828a28777fe8137a3bd2f/src/transforms/codemod:use-esm-import-syntax.js Please contact the author of the transform if you believe there was an error.
1 parent 91773e8 commit 8e720b6

31 files changed

+81
-81
lines changed

src/_apply.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { _transpose } from './_transpose' ;
1+
import { _transpose } from './_transpose.js' ;
22

33
/**
44
* Applies a given sequence (in the given order) of transpositions (given as

src/_invertcycles.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { _transpose } from './_transpose' ;
1+
import { _transpose } from './_transpose.js' ;
22

33
/**
44
* Inverts given cycles in a given permutation ___in-place___. Can be used as

src/_next.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { _transpose } from './_transpose' ;
2-
import { _reverse } from './_reverse' ;
1+
import { _transpose } from './_transpose.js' ;
2+
import { _reverse } from './_reverse.js' ;
33

44
/**
55
* Updates the input permutation to the next one ___in-place___. Returns true

src/_permutations.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { _next } from './_next' ;
1+
import { _next } from './_next.js' ;
22

33
/**
44
* Yields all permutations starting from a given one and ending at the last

src/_reverse.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { _transpose } from './_transpose' ;
1+
import { _transpose } from './_transpose.js' ;
22

33
/**
44
* Reverses input permutation ___in-place___ from input index <code>i</code>

src/apply.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { identity } from './identity' ;
2-
import { _apply } from './_apply' ;
1+
import { identity } from './identity.js' ;
2+
import { _apply } from './_apply.js' ;
33

44
/**
55
* Apply a given sequence (in the given order) of transpositions (given as

src/bitreversal.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { permutation } from './permutation' ;
2-
import { _bitreversal } from './_bitreversal' ;
1+
import { permutation } from './permutation.js' ;
2+
import { _bitreversal } from './_bitreversal.js' ;
33

44
/**
55
* Returns a newly allocated array containing the bitreversal permutation for

src/compose.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { permutation } from './permutation' ;
2-
import { _compose } from './_compose' ;
1+
import { permutation } from './permutation.js' ;
2+
import { _compose } from './_compose.js' ;
33

44
/**
55
* Compose two input permutations. The resulting permutation is output as an

src/copy.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { permutation } from './permutation' ;
2-
import { _copy } from './_copy' ;
1+
import { permutation } from './permutation.js' ;
2+
import { _copy } from './_copy.js' ;
33

44
/**
55
* Make a copy of the input permutation.

src/cycles.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { _cycles } from './_cycles' ;
2-
import { used } from './used' ;
1+
import { _cycles } from './_cycles.js' ;
2+
import { used } from './used.js' ;
33

44

55
/**

src/identity.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { permutation } from './permutation' ;
2-
import { _identity } from './_identity' ;
1+
import { permutation } from './permutation.js' ;
2+
import { _identity } from './_identity.js' ;
33

44
/**
55
* Returns the identity permutation of a given size.

src/index.js

+33-33
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
export * from './_apply' ;
2-
export * from './_bitreversal' ;
3-
export * from './_compose' ;
4-
export * from './_copy' ;
5-
export * from './_cycles' ;
6-
export * from './_identity' ;
7-
export * from './_invert' ;
8-
export * from './_invertcycles' ;
9-
export * from './_itranspositions' ;
10-
export * from './_next' ;
11-
export * from './_permutations' ;
12-
export * from './_reverse' ;
13-
export * from './_transpose' ;
14-
export * from './_transposition' ;
15-
export * from './_transpositions' ;
16-
export * from './_used' ;
17-
export * from './apply' ;
18-
export * from './bitreversal' ;
19-
export * from './compose' ;
20-
export * from './copy' ;
21-
export * from './cycles' ;
22-
export * from './identity' ;
23-
export * from './invert' ;
24-
export * from './itranspositions' ;
25-
export * from './next' ;
26-
export * from './permutation' ;
27-
export * from './permutations' ;
28-
export * from './reverse' ;
29-
export * from './reversed' ;
30-
export * from './transpose' ;
31-
export * from './transposition' ;
32-
export * from './transpositions' ;
33-
export * from './used' ;
1+
export * from './_apply.js' ;
2+
export * from './_bitreversal.js' ;
3+
export * from './_compose.js' ;
4+
export * from './_copy.js' ;
5+
export * from './_cycles.js' ;
6+
export * from './_identity.js' ;
7+
export * from './_invert.js' ;
8+
export * from './_invertcycles.js' ;
9+
export * from './_itranspositions.js' ;
10+
export * from './_next.js' ;
11+
export * from './_permutations.js' ;
12+
export * from './_reverse.js' ;
13+
export * from './_transpose.js' ;
14+
export * from './_transposition.js' ;
15+
export * from './_transpositions.js' ;
16+
export * from './_used.js' ;
17+
export * from './apply.js' ;
18+
export * from './bitreversal.js' ;
19+
export * from './compose.js' ;
20+
export * from './copy.js' ;
21+
export * from './cycles.js' ;
22+
export * from './identity.js' ;
23+
export * from './invert.js' ;
24+
export * from './itranspositions.js' ;
25+
export * from './next.js' ;
26+
export * from './permutation.js' ;
27+
export * from './permutations.js' ;
28+
export * from './reverse.js' ;
29+
export * from './reversed.js' ;
30+
export * from './transpose.js' ;
31+
export * from './transposition.js' ;
32+
export * from './transpositions.js' ;
33+
export * from './used.js' ;

src/invert.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { permutation } from './permutation' ;
2-
import { _invert } from './_invert' ;
1+
import { permutation } from './permutation.js' ;
2+
import { _invert } from './_invert.js' ;
33

44
/**
55
* Computes the inverse <code>tau</code> of the input permutation

src/itranspositions.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { _itranspositions } from './_itranspositions' ;
2-
import { used } from './used' ;
1+
import { _itranspositions } from './_itranspositions.js' ;
2+
import { used } from './used.js' ;
33

44
/**
55
* Computes the sequence of transpositions that if applied to

src/next.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { copy } from './copy' ;
2-
import { _next } from './_next' ;
3-
import { reverse } from './reverse' ;
1+
import { copy } from './copy.js' ;
2+
import { _next } from './_next.js' ;
3+
import { reverse } from './reverse.js' ;
44

55
/**
66
* Computes the permutation that follows the input permutation. If the input

src/permutations.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { identity } from './identity' ;
2-
import { _permutations } from './_permutations' ;
3-
import { copy } from './copy' ;
1+
import { identity } from './identity.js' ;
2+
import { _permutations } from './_permutations.js' ;
3+
import { copy } from './copy.js' ;
44

55
/**
66
* Generate all permutations on <code>n</code> elements.

src/reverse.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { _reverse } from './_reverse' ;
1+
import { _reverse } from './_reverse.js' ;
22

33
/**
44
* Reverses input permutation ___in-place___.

src/reversed.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { copy } from './copy' ;
2-
import { reverse } from './reverse' ;
1+
import { copy } from './copy.js' ;
2+
import { reverse } from './reverse.js' ;
33

44
/**
55
* Outputs a new permutation that is the reverse of the input permutation.

src/transpose.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { copy } from './copy' ;
2-
import { _transpose } from './_transpose' ;
1+
import { copy } from './copy.js' ;
2+
import { _transpose } from './_transpose.js' ;
33

44
/**
55
* Creates a copy of the input permutation, applies an input transpose,

src/transposition.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { identity } from './identity' ;
2-
import { _transposition } from './_transposition' ;
1+
import { identity } from './identity.js' ;
2+
import { _transposition } from './_transposition.js' ;
33

44
/**
55
* Outputs the permutation on input <code>n</code> numbers that only transposes

src/transpositions.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { _transpositions } from './_transpositions' ;
2-
import { cycles } from './cycles' ;
3-
import { used } from './used' ;
1+
import { _transpositions } from './_transpositions.js' ;
2+
import { cycles } from './cycles.js' ;
3+
import { used } from './used.js' ;
44

55
/**
66
* Computes the transposition decomposition of the input permutation as an

src/used.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { _used } from './_used' ;
1+
import { _used } from './_used.js' ;
22

33
/**
44
* Generates an helper array of given size (used in {@link _cycle}, {@link cycle}).

test/src/apply.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
apply ,
44
identity ,
55
transpositions
6-
} from '../../src' ;
6+
} from '../../src/index.js' ;
77
import { shuffle } from '@aureooms/js-random' ;
88

99
function macro ( t , size ) {

test/src/bitreversal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava' ;
2-
import { bitreversal } from '../../src' ;
2+
import { bitreversal } from '../../src/index.js' ;
33

44
test( 'bitreversal' , t => {
55

test/src/copy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import test from 'ava' ;
22
import {
33
copy ,
44
identity
5-
} from '../../src' ;
5+
} from '../../src/index.js' ;
66
import { shuffle } from '@aureooms/js-random' ;
77

88
function macro ( t , size ) {

test/src/invert.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
identity ,
88
invert ,
99
itranspositions
10-
} from '../../src' ;
10+
} from '../../src/index.js' ;
1111

1212
import { shuffle } from '@aureooms/js-random' ;
1313

test/src/next.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava' ;
2-
import { identity , next } from '../../src' ;
2+
import { identity , next } from '../../src/index.js' ;
33
import {increasing} from '@total-order/primitive'
44
import { fixedlexicographical } from '@total-order/lex' ;
55
import { issorted } from '@aureooms/js-sort' ;

test/src/permutations.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava' ;
2-
import { identity , next , permutations } from '../../src' ;
2+
import { identity , next , permutations } from '../../src/index.js' ;
33
import {increasing} from '@total-order/primitive'
44
import { fixedlexicographical } from '@total-order/lex' ;
55
import { issorted } from '@aureooms/js-sort' ;

test/src/reversed.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava' ;
2-
import { identity , reversed } from '../../src' ;
2+
import { identity , reversed } from '../../src/index.js' ;
33
import { shuffle } from '@aureooms/js-random' ;
44

55
function macro ( t , size ) {

test/src/transpose.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava' ;
2-
import { copy , compose , identity , transpose } from '../../src' ;
2+
import { copy , compose , identity , transpose } from '../../src/index.js' ;
33
import { randint , shuffle } from '@aureooms/js-random' ;
44

55
function macro ( t , size ) {

test/src/transposition.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava' ;
2-
import { identity , compose , transposition } from '../../src' ;
2+
import { identity , compose , transposition } from '../../src/index.js' ;
33
import { randint } from '@aureooms/js-random' ;
44

55
function macro ( t , size ) {

0 commit comments

Comments
 (0)