Skip to content

Commit

Permalink
WIP: 145702c convert ldapserver to esm
Browse files Browse the repository at this point in the history
  • Loading branch information
bubonicfred committed Jun 18, 2024
1 parent 145702c commit e03a05b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"@babel",
"promise",
"deprecate",
"jsdoc"
"jsdoc",
"mocha"

],

Expand All @@ -37,8 +38,8 @@
"sourceType": "module"
},
"rules": {
"node/no-unsupported-features/es-syntax": "off",
"node/no-missing-import": "off",
"node/no-unsupported-features/es-syntax": "on",
"node/no-missing-import": "on",
"lodash/prefer-lodash-method": "off",
"lodash/prefer-lodash-typecheck": "off",
"lodash/prefer-get": "off",
Expand Down
12 changes: 6 additions & 6 deletions tests/support/end2end-server.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import task from "./lib/task.js";

import run from "./lib/task.js";
import { createInterface, on } from "readline";
function logTask(taskname) {
return (data) => {
process.stdout.write(`${taskname}: ${data}`);
};
}

const tasks = [
task.run("npm", ["run", "test:end2end:ldap"], logTask("ldap")),
task.run("npm", ["run", "test:end2end:meteor"], logTask("meteor")),
run("npm", ["run", "test:end2end:ldap"], logTask("ldap")),
run("npm", ["run", "test:end2end:meteor"], logTask("meteor")),
];

function shutdown() {
Expand All @@ -30,12 +30,12 @@ function shutdown() {
}

if (process.platform === "win32") {
const readline = require("readline").createInterface({
createInterface({
input: process.stdin,
output: process.stdout,
});

readline.on("SIGINT", shutdown);
on("SIGINT", shutdown);
}

process.on("uncaughtException", shutdown);
Expand Down
3 changes: 2 additions & 1 deletion tests/support/ldap-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* @module ldap-server
*/

import { createServer, InsufficientAccessRightsError, UnwillingToPerformError, NoSuchObjectError, InvalidCredentialsError } from "ldapjs";
import pkg from 'ldapjs';
const { createServer, InsufficientAccessRightsError, UnwillingToPerformError, NoSuchObjectError, InvalidCredentialsError } = pkg

/**
* Array of user objects representing LDAP users.
Expand Down

0 comments on commit e03a05b

Please sign in to comment.