From 29fff003f1e165b80fb3e3a53ddd5193661edae0 Mon Sep 17 00:00:00 2001 From: a flying potato <80830782+a-flying-potato@users.noreply.github.com> Date: Wed, 14 Apr 2021 18:37:24 +0200 Subject: [PATCH] :robot: 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/eb1b209cd7aa675a642d48b2a788c2c6112779f7/src/transforms/codemod:use-esm-import-syntax.js Please contact the author of the transform if you believe there was an error. --- src/api/decide.js | 2 +- src/api/from.js | 2 +- src/api/index.js | 8 ++++---- src/api/solve.js | 2 +- src/api/verify.js | 2 +- src/core/SAT0W/SAT0W.js | 2 +- src/core/SAT0W/index.js | 6 +++--- src/core/convert/KeysInstance.js | 2 +- src/core/convert/ParitiesInstance.js | 2 +- src/core/convert/SignsInstance.js | 2 +- src/core/convert/_keys_to_parity.js | 2 +- src/core/convert/index.js | 18 +++++++++--------- src/core/index.js | 10 +++++----- src/core/parse/index.js | 2 +- src/index.js | 4 ++-- test/src/DIMACS.js | 2 +- test/src/SAT.js | 2 +- test/src/SATLIB.js | 2 +- 18 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/api/decide.js b/src/api/decide.js index 7a6edf8..282033c 100644 --- a/src/api/decide.js +++ b/src/api/decide.js @@ -1,4 +1,4 @@ -import { solve } from './solve' ; +import { solve } from "./solve.js" ; export function decide ( instance ) { diff --git a/src/api/from.js b/src/api/from.js index 0e35d24..e0e59ca 100644 --- a/src/api/from.js +++ b/src/api/from.js @@ -1,4 +1,4 @@ -import { ParitiesInstance , _sign_to_parity, _keys_to_parity, _parse_DIMACS_CNF } from '../core' ; +import { ParitiesInstance , _sign_to_parity, _keys_to_parity, _parse_DIMACS_CNF } from "../core/index.js" ; /** * The input is converted to parity format in each case. diff --git a/src/api/index.js b/src/api/index.js index 4f57328..439b309 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,4 +1,4 @@ -export * from './decide' ; -export * from './from' ; -export * from './solve' ; -export * from './verify' ; +export * from "./decide.js" ; +export * from "./from.js" ; +export * from "./solve.js" ; +export * from "./verify.js" ; diff --git a/src/api/solve.js b/src/api/solve.js index 5b437e0..76eeb96 100644 --- a/src/api/solve.js +++ b/src/api/solve.js @@ -1,4 +1,4 @@ -import { SAT0W , setup_watchlist, setup_assignment } from '../core' ; +import { SAT0W , setup_watchlist, setup_assignment } from "../core/index.js" ; /** * Yields all satisfying assignments for the input instance. diff --git a/src/api/verify.js b/src/api/verify.js index a18195c..010d894 100644 --- a/src/api/verify.js +++ b/src/api/verify.js @@ -1,2 +1,2 @@ -import { _verify } from '../core' ; +import { _verify } from "../core/index.js" ; export const verify = ( { clauses } , certificate ) => _verify( clauses , certificate ) ; diff --git a/src/core/SAT0W/SAT0W.js b/src/core/SAT0W/SAT0W.js index 15f3100..02b773f 100644 --- a/src/core/SAT0W/SAT0W.js +++ b/src/core/SAT0W/SAT0W.js @@ -1,4 +1,4 @@ -import { update_watchlist } from './update_watchlist' ; +import { update_watchlist } from "./update_watchlist.js" ; export function* SAT0W ( n , clauses , watchlist , assignment , d ) { diff --git a/src/core/SAT0W/index.js b/src/core/SAT0W/index.js index c911bc6..5cf08be 100644 --- a/src/core/SAT0W/index.js +++ b/src/core/SAT0W/index.js @@ -1,3 +1,3 @@ -export * from './SAT0W' ; -export * from './setup_watchlist' ; -export * from './update_watchlist' ; +export * from "./SAT0W.js" ; +export * from "./setup_watchlist.js" ; +export * from "./update_watchlist.js" ; diff --git a/src/core/convert/KeysInstance.js b/src/core/convert/KeysInstance.js index 9a31956..44b6a07 100644 --- a/src/core/convert/KeysInstance.js +++ b/src/core/convert/KeysInstance.js @@ -1,4 +1,4 @@ -import { _certificate_to_keys } from './_certificate_to_keys' ; +import { _certificate_to_keys } from "./_certificate_to_keys.js" ; export class KeysInstance { diff --git a/src/core/convert/ParitiesInstance.js b/src/core/convert/ParitiesInstance.js index 6483489..8825072 100644 --- a/src/core/convert/ParitiesInstance.js +++ b/src/core/convert/ParitiesInstance.js @@ -1,4 +1,4 @@ -import { _count } from './_count' ; +import { _count } from "./_count.js" ; export class ParitiesInstance { diff --git a/src/core/convert/SignsInstance.js b/src/core/convert/SignsInstance.js index 3b22e71..6304544 100644 --- a/src/core/convert/SignsInstance.js +++ b/src/core/convert/SignsInstance.js @@ -1,4 +1,4 @@ -import { _count } from './_count' ; +import { _count } from "./_count.js" ; export class SignsInstance { diff --git a/src/core/convert/_keys_to_parity.js b/src/core/convert/_keys_to_parity.js index 2a0f874..00aee28 100644 --- a/src/core/convert/_keys_to_parity.js +++ b/src/core/convert/_keys_to_parity.js @@ -1,4 +1,4 @@ -import { KeysInstance } from './KeysInstance' ; +import { KeysInstance } from "./KeysInstance.js" ; export function _keys_to_parity ( clauses ) { diff --git a/src/core/convert/index.js b/src/core/convert/index.js index e13990d..9d1604c 100644 --- a/src/core/convert/index.js +++ b/src/core/convert/index.js @@ -1,9 +1,9 @@ -export * from './KeysInstance' ; -export * from './ParitiesInstance' ; -export * from './SignsInstance' ; -export * from './_certificate_to_keys' ; -export * from './_count' ; -export * from './_keys_to_parity' ; -export * from './_parity_to_keys' ; -export * from './_parity_to_sign' ; -export * from './_sign_to_parity' ; +export * from "./KeysInstance.js" ; +export * from "./ParitiesInstance.js" ; +export * from "./SignsInstance.js" ; +export * from "./_certificate_to_keys.js" ; +export * from "./_count.js" ; +export * from "./_keys_to_parity.js" ; +export * from "./_parity_to_keys.js" ; +export * from "./_parity_to_sign.js" ; +export * from "./_sign_to_parity.js" ; diff --git a/src/core/index.js b/src/core/index.js index 78fc17b..a546590 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -1,5 +1,5 @@ -export * from './SAT0W' ; -export * from './_verify' ; -export * from './convert' ; -export * from './parse' ; -export * from './setup_assignment' ; +export * from "./SAT0W/index.js" ; +export * from "./_verify.js" ; +export * from "./convert/index.js" ; +export * from "./parse/index.js" ; +export * from "./setup_assignment.js" ; diff --git a/src/core/parse/index.js b/src/core/parse/index.js index a63e13b..555b02a 100644 --- a/src/core/parse/index.js +++ b/src/core/parse/index.js @@ -1 +1 @@ -export * from './_parse_DIMACS_CNF' ; +export * from "./_parse_DIMACS_CNF.js" ; diff --git a/src/index.js b/src/index.js index a49e24e..644d324 100644 --- a/src/index.js +++ b/src/index.js @@ -1,2 +1,2 @@ -export * from './api' ; -export * from './core' ; +export * from "./api/index.js" ; +export * from "./core/index.js" ; diff --git a/test/src/DIMACS.js b/test/src/DIMACS.js index b8a51e9..667d0dc 100644 --- a/test/src/DIMACS.js +++ b/test/src/DIMACS.js @@ -1,5 +1,5 @@ import test from 'ava'; -import * as sat from '../../src'; +import * as sat from "../../src/index.js"; function text ( lines ) { return ( lines.join( '\n' ) ) + '\n' ; diff --git a/test/src/SAT.js b/test/src/SAT.js index cad6d50..5fceddd 100644 --- a/test/src/SAT.js +++ b/test/src/SAT.js @@ -1,5 +1,5 @@ import test from 'ava'; -import * as sat from '../../src'; +import * as sat from "../../src/index.js"; import * as compare from '@aureooms/js-compare' ; import { list } from '@aureooms/js-itertools' ; diff --git a/test/src/SATLIB.js b/test/src/SATLIB.js index 1ebce4a..6c084f8 100644 --- a/test/src/SATLIB.js +++ b/test/src/SATLIB.js @@ -1,5 +1,5 @@ import test from 'ava'; -import * as sat from '../../src'; +import * as sat from "../../src/index.js"; import * as compare from '@aureooms/js-compare' ; import { list } from '@aureooms/js-itertools' ;