Skip to content

Commit

Permalink
Always use mjs imports
Browse files Browse the repository at this point in the history
This is needed for Node/NPM 16 compat
  • Loading branch information
t-8ch committed Sep 17, 2021
1 parent 83c6775 commit cfc29ef
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/core/errors/index.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import OperationError from "./OperationError.mjs";
import DishError from "./DishError.mjs";
import ExcludedOperationError from "./ExcludedOperationError";
import ExcludedOperationError from "./ExcludedOperationError.mjs";

export {
OperationError,
Expand Down
4 changes: 2 additions & 2 deletions src/node/config/scripts/generateNodeIndex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ let code = `/**
import NodeDish from "./NodeDish.mjs";
import { _wrap, help, bake, _explainExcludedFunction } from "./api.mjs";
import File from "./File.mjs";
import { OperationError, DishError, ExcludedOperationError } from "../core/errors/index";
import { OperationError, DishError, ExcludedOperationError } from "../core/errors/index.mjs";
import {
// import as core_ to avoid name clashes after wrap.
`;
Expand All @@ -52,7 +52,7 @@ includedOperations.forEach((op) => {
});

code +=`
} from "../core/operations/index";
} from "../core/operations/index.mjs";
global.File = File;
Expand Down
2 changes: 1 addition & 1 deletion tests/node/tests/operations.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
CSSMinify,
toBase64,
toHex
} from "../../../src/node/index";
} from "../../../src/node/index.mjs";
import chef from "../../../src/node/index.mjs";
import TestRegister from "../../lib/TestRegister.mjs";
import File from "../../../src/node/File.mjs";
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/tests/AvroToJSON.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license Apache-2.0
*/

import TestRegister from "../../lib/TestRegister";
import TestRegister from "../../lib/TestRegister.mjs";

TestRegister.addTests([
{
Expand Down
4 changes: 2 additions & 2 deletions tests/operations/tests/BaconCipher.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* @copyright Karsten Silkenbäumer 2019
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister";
import { BACON_ALPHABETS, BACON_TRANSLATIONS } from "../../../src/core/lib/Bacon";
import TestRegister from "../../lib/TestRegister.mjs";
import { BACON_ALPHABETS, BACON_TRANSLATIONS } from "../../../src/core/lib/Bacon.mjs";

const alphabets = Object.keys(BACON_ALPHABETS);
const translations = BACON_TRANSLATIONS;
Expand Down

0 comments on commit cfc29ef

Please sign in to comment.