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/1fe650dc2407c6c6395828a28777fe8137a3bd2f/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 May 21, 2021
1 parent 91773e8 commit 8e720b6
Show file tree
Hide file tree
Showing 31 changed files with 81 additions and 81 deletions.
2 changes: 1 addition & 1 deletion src/_apply.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _transpose } from './_transpose' ;
import { _transpose } from './_transpose.js' ;

/**
* Applies a given sequence (in the given order) of transpositions (given as
Expand Down
2 changes: 1 addition & 1 deletion src/_invertcycles.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _transpose } from './_transpose' ;
import { _transpose } from './_transpose.js' ;

/**
* Inverts given cycles in a given permutation ___in-place___. Can be used as
Expand Down
4 changes: 2 additions & 2 deletions src/_next.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { _transpose } from './_transpose' ;
import { _reverse } from './_reverse' ;
import { _transpose } from './_transpose.js' ;
import { _reverse } from './_reverse.js' ;

/**
* Updates the input permutation to the next one ___in-place___. Returns true
Expand Down
2 changes: 1 addition & 1 deletion src/_permutations.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _next } from './_next' ;
import { _next } from './_next.js' ;

/**
* Yields all permutations starting from a given one and ending at the last
Expand Down
2 changes: 1 addition & 1 deletion src/_reverse.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _transpose } from './_transpose' ;
import { _transpose } from './_transpose.js' ;

/**
* Reverses input permutation ___in-place___ from input index <code>i</code>
Expand Down
4 changes: 2 additions & 2 deletions src/apply.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { identity } from './identity' ;
import { _apply } from './_apply' ;
import { identity } from './identity.js' ;
import { _apply } from './_apply.js' ;

/**
* Apply a given sequence (in the given order) of transpositions (given as
Expand Down
4 changes: 2 additions & 2 deletions src/bitreversal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { permutation } from './permutation' ;
import { _bitreversal } from './_bitreversal' ;
import { permutation } from './permutation.js' ;
import { _bitreversal } from './_bitreversal.js' ;

/**
* Returns a newly allocated array containing the bitreversal permutation for
Expand Down
4 changes: 2 additions & 2 deletions src/compose.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { permutation } from './permutation' ;
import { _compose } from './_compose' ;
import { permutation } from './permutation.js' ;
import { _compose } from './_compose.js' ;

/**
* Compose two input permutations. The resulting permutation is output as an
Expand Down
4 changes: 2 additions & 2 deletions src/copy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { permutation } from './permutation' ;
import { _copy } from './_copy' ;
import { permutation } from './permutation.js' ;
import { _copy } from './_copy.js' ;

/**
* Make a copy of the input permutation.
Expand Down
4 changes: 2 additions & 2 deletions src/cycles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { _cycles } from './_cycles' ;
import { used } from './used' ;
import { _cycles } from './_cycles.js' ;
import { used } from './used.js' ;


/**
Expand Down
4 changes: 2 additions & 2 deletions src/identity.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { permutation } from './permutation' ;
import { _identity } from './_identity' ;
import { permutation } from './permutation.js' ;
import { _identity } from './_identity.js' ;

/**
* Returns the identity permutation of a given size.
Expand Down
66 changes: 33 additions & 33 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
export * from './_apply' ;
export * from './_bitreversal' ;
export * from './_compose' ;
export * from './_copy' ;
export * from './_cycles' ;
export * from './_identity' ;
export * from './_invert' ;
export * from './_invertcycles' ;
export * from './_itranspositions' ;
export * from './_next' ;
export * from './_permutations' ;
export * from './_reverse' ;
export * from './_transpose' ;
export * from './_transposition' ;
export * from './_transpositions' ;
export * from './_used' ;
export * from './apply' ;
export * from './bitreversal' ;
export * from './compose' ;
export * from './copy' ;
export * from './cycles' ;
export * from './identity' ;
export * from './invert' ;
export * from './itranspositions' ;
export * from './next' ;
export * from './permutation' ;
export * from './permutations' ;
export * from './reverse' ;
export * from './reversed' ;
export * from './transpose' ;
export * from './transposition' ;
export * from './transpositions' ;
export * from './used' ;
export * from './_apply.js' ;
export * from './_bitreversal.js' ;
export * from './_compose.js' ;
export * from './_copy.js' ;
export * from './_cycles.js' ;
export * from './_identity.js' ;
export * from './_invert.js' ;
export * from './_invertcycles.js' ;
export * from './_itranspositions.js' ;
export * from './_next.js' ;
export * from './_permutations.js' ;
export * from './_reverse.js' ;
export * from './_transpose.js' ;
export * from './_transposition.js' ;
export * from './_transpositions.js' ;
export * from './_used.js' ;
export * from './apply.js' ;
export * from './bitreversal.js' ;
export * from './compose.js' ;
export * from './copy.js' ;
export * from './cycles.js' ;
export * from './identity.js' ;
export * from './invert.js' ;
export * from './itranspositions.js' ;
export * from './next.js' ;
export * from './permutation.js' ;
export * from './permutations.js' ;
export * from './reverse.js' ;
export * from './reversed.js' ;
export * from './transpose.js' ;
export * from './transposition.js' ;
export * from './transpositions.js' ;
export * from './used.js' ;
4 changes: 2 additions & 2 deletions src/invert.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { permutation } from './permutation' ;
import { _invert } from './_invert' ;
import { permutation } from './permutation.js' ;
import { _invert } from './_invert.js' ;

/**
* Computes the inverse <code>tau</code> of the input permutation
Expand Down
4 changes: 2 additions & 2 deletions src/itranspositions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { _itranspositions } from './_itranspositions' ;
import { used } from './used' ;
import { _itranspositions } from './_itranspositions.js' ;
import { used } from './used.js' ;

/**
* Computes the sequence of transpositions that if applied to
Expand Down
6 changes: 3 additions & 3 deletions src/next.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { copy } from './copy' ;
import { _next } from './_next' ;
import { reverse } from './reverse' ;
import { copy } from './copy.js' ;
import { _next } from './_next.js' ;
import { reverse } from './reverse.js' ;

/**
* Computes the permutation that follows the input permutation. If the input
Expand Down
6 changes: 3 additions & 3 deletions src/permutations.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { identity } from './identity' ;
import { _permutations } from './_permutations' ;
import { copy } from './copy' ;
import { identity } from './identity.js' ;
import { _permutations } from './_permutations.js' ;
import { copy } from './copy.js' ;

/**
* Generate all permutations on <code>n</code> elements.
Expand Down
2 changes: 1 addition & 1 deletion src/reverse.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _reverse } from './_reverse' ;
import { _reverse } from './_reverse.js' ;

/**
* Reverses input permutation ___in-place___.
Expand Down
4 changes: 2 additions & 2 deletions src/reversed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { copy } from './copy' ;
import { reverse } from './reverse' ;
import { copy } from './copy.js' ;
import { reverse } from './reverse.js' ;

/**
* Outputs a new permutation that is the reverse of the input permutation.
Expand Down
4 changes: 2 additions & 2 deletions src/transpose.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { copy } from './copy' ;
import { _transpose } from './_transpose' ;
import { copy } from './copy.js' ;
import { _transpose } from './_transpose.js' ;

/**
* Creates a copy of the input permutation, applies an input transpose,
Expand Down
4 changes: 2 additions & 2 deletions src/transposition.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { identity } from './identity' ;
import { _transposition } from './_transposition' ;
import { identity } from './identity.js' ;
import { _transposition } from './_transposition.js' ;

/**
* Outputs the permutation on input <code>n</code> numbers that only transposes
Expand Down
6 changes: 3 additions & 3 deletions src/transpositions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { _transpositions } from './_transpositions' ;
import { cycles } from './cycles' ;
import { used } from './used' ;
import { _transpositions } from './_transpositions.js' ;
import { cycles } from './cycles.js' ;
import { used } from './used.js' ;

/**
* Computes the transposition decomposition of the input permutation as an
Expand Down
2 changes: 1 addition & 1 deletion src/used.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _used } from './_used' ;
import { _used } from './_used.js' ;

/**
* Generates an helper array of given size (used in {@link _cycle}, {@link cycle}).
Expand Down
2 changes: 1 addition & 1 deletion test/src/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
apply ,
identity ,
transpositions
} from '../../src' ;
} from '../../src/index.js' ;
import { shuffle } from '@aureooms/js-random' ;

function macro ( t , size ) {
Expand Down
2 changes: 1 addition & 1 deletion test/src/bitreversal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava' ;
import { bitreversal } from '../../src' ;
import { bitreversal } from '../../src/index.js' ;

test( 'bitreversal' , t => {

Expand Down
2 changes: 1 addition & 1 deletion test/src/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import test from 'ava' ;
import {
copy ,
identity
} from '../../src' ;
} from '../../src/index.js' ;
import { shuffle } from '@aureooms/js-random' ;

function macro ( t , size ) {
Expand Down
2 changes: 1 addition & 1 deletion test/src/invert.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
identity ,
invert ,
itranspositions
} from '../../src' ;
} from '../../src/index.js' ;

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

Expand Down
2 changes: 1 addition & 1 deletion test/src/next.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava' ;
import { identity , next } from '../../src' ;
import { identity , next } from '../../src/index.js' ;
import {increasing} from '@total-order/primitive'
import { fixedlexicographical } from '@total-order/lex' ;
import { issorted } from '@aureooms/js-sort' ;
Expand Down
2 changes: 1 addition & 1 deletion test/src/permutations.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava' ;
import { identity , next , permutations } from '../../src' ;
import { identity , next , permutations } from '../../src/index.js' ;
import {increasing} from '@total-order/primitive'
import { fixedlexicographical } from '@total-order/lex' ;
import { issorted } from '@aureooms/js-sort' ;
Expand Down
2 changes: 1 addition & 1 deletion test/src/reversed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava' ;
import { identity , reversed } from '../../src' ;
import { identity , reversed } from '../../src/index.js' ;
import { shuffle } from '@aureooms/js-random' ;

function macro ( t , size ) {
Expand Down
2 changes: 1 addition & 1 deletion test/src/transpose.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava' ;
import { copy , compose , identity , transpose } from '../../src' ;
import { copy , compose , identity , transpose } from '../../src/index.js' ;
import { randint , shuffle } from '@aureooms/js-random' ;

function macro ( t , size ) {
Expand Down
2 changes: 1 addition & 1 deletion test/src/transposition.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava' ;
import { identity , compose , transposition } from '../../src' ;
import { identity , compose , transposition } from '../../src/index.js' ;
import { randint } from '@aureooms/js-random' ;

function macro ( t , size ) {
Expand Down

0 comments on commit 8e720b6

Please sign in to comment.