Skip to content

Commit

Permalink
Use node: imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Apr 28, 2022
1 parent a6cece7 commit eaac0b9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions lib/config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* Copyright (c) 2012-2021 Digital Bazaar, Inc. All rights reserved.
*/
import {fileURLToPath} from 'url';
import path from 'path';
import {fileURLToPath} from 'node:url';
import path from 'node:path';

export const config = {};

Expand Down
10 changes: 5 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
*/
import * as brUtil from './util.js';
import {boolify, getByPath} from './helpers.js';
import cluster from 'cluster';
import cluster from 'node:cluster';
import {config} from './config.js';
import {container as loggers} from './loggers/index.js';
import {cpus} from 'os';
import {cpus} from 'node:os';
import {emitter as events} from './events.js';
import {fileURLToPath} from 'url';
import fs from 'fs';
import path from 'path';
import {fileURLToPath} from 'node:url';
import fs from 'node:fs';
import path from 'node:path';
import {program} from 'commander';
import {serializeError, deserializeError} from 'serialize-error';

Expand Down
6 changes: 3 additions & 3 deletions lib/loggers/fileLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import * as brUtil from '../util.js';
import * as formatters from './formatters.js';
import {config} from '../config.js';
import path from 'path';
import {promises as fs} from 'fs';
import {promisify} from 'util';
import path from 'node:path';
import {promises as fs} from 'node:fs';
import {promisify} from 'node:util';
import uidNumber from 'uid-number';
import winston from 'winston';

Expand Down
6 changes: 3 additions & 3 deletions lib/loggers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*/
import * as fileLogger from './fileLogger.js';
import * as formatters from './formatters.js';
import cluster from 'cluster';
import cluster from 'node:cluster';
import {config} from '../config.js';
import crypto from 'crypto';
import util from 'util';
import crypto from 'node:crypto';
import util from 'node:util';
import winston from 'winston';
import {WorkerTransport} from './WorkerTransport.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import {config} from './config.js';
import {serializeError} from 'serialize-error';
import util from 'util';
import util from 'node:util';

// export config utilities under `config` namespace
export * as config from './configUtil.js';
Expand Down
4 changes: 2 additions & 2 deletions test/test.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
*/
import {config} from '@bedrock/core';
import {fileURLToPath} from 'url';
import path from 'path';
import {fileURLToPath} from 'node:url';
import path from 'node:path';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

Expand Down

0 comments on commit eaac0b9

Please sign in to comment.