Skip to content

Commit 40959c8

Browse files
committed
style(boot): remove workaround warning comment
1 parent 102a768 commit 40959c8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/boot/src/booters/booter-utils.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
import {Constructor} from '@loopback/context';
6+
import { Constructor } from '@loopback/context';
77
import * as debugFactory from 'debug';
88
import * as path from 'path';
9-
import {promisify} from 'util';
9+
import { promisify } from 'util';
1010
const glob = promisify(require('glob'));
1111

1212
const debug = debugFactory('loopback:boot:booter-utils');
@@ -22,7 +22,7 @@ export async function discoverFiles(
2222
pattern: string,
2323
root: string,
2424
): Promise<string[]> {
25-
return await glob(pattern, {root: root});
25+
return await glob(pattern, { root: root });
2626
}
2727

2828
/**
@@ -44,6 +44,7 @@ export function isClass(target: any): target is Constructor<any> {
4444
* and then testing each exported member to see if it's a class or not.
4545
*
4646
* @param files An array of string of absolute file paths
47+
* @param projectRootDir The project root directory
4748
* @returns {Constructor<{}>[]} An array of Class constructors from a file
4849
*/
4950
export function loadClassesFromFiles(
@@ -54,8 +55,6 @@ export function loadClassesFromFiles(
5455
for (const file of files) {
5556
debug('Loading artifact file %j', path.relative(projectRootDir, file));
5657
const moduleObj = require(file);
57-
// WORKAROUND: use `for in` instead of Object.values().
58-
// See https://github.com/nodejs/node/issues/20278
5958
for (const k in moduleObj) {
6059
const exported = moduleObj[k];
6160
if (isClass(exported)) {

0 commit comments

Comments
 (0)