diff --git a/helpers/polyfills.js b/helpers/polyfills.js index d535d38f..56ddd85c 100644 --- a/helpers/polyfills.js +++ b/helpers/polyfills.js @@ -1,5 +1,5 @@ -import cluster from 'node:cluster'; import hasOwn from 'object.hasown'; +import cluster from 'cluster'; import Debug from 'debug'; const debug = Debug('lot-occupancy-system:polyfills'); export function applyPolyfills() { @@ -7,7 +7,8 @@ export function applyPolyfills() { debug('Applying Object.hasOwn(o, v) polyfill'); Object.hasOwn = hasOwn; } - if (!Object.hasOwn(cluster, 'setupPrimary') && Object.hasOwn(cluster, 'setupMaster')) { + if (!Object.hasOwn(cluster, 'setupPrimary') && + Object.hasOwn(cluster, 'setupMaster')) { debug('Applying cluster.setupPrimary() polyfill'); cluster.setupPrimary = cluster.setupMaster; } diff --git a/helpers/polyfills.ts b/helpers/polyfills.ts index 922cecb8..43f447cb 100644 --- a/helpers/polyfills.ts +++ b/helpers/polyfills.ts @@ -1,6 +1,8 @@ -import cluster from 'node:cluster' import hasOwn from 'object.hasown' +// eslint-disable-next-line unicorn/prefer-node-protocol +import cluster from 'cluster' + import Debug from 'debug' const debug = Debug('lot-occupancy-system:polyfills') @@ -10,7 +12,10 @@ export function applyPolyfills(): void { Object.hasOwn = hasOwn } - if (!Object.hasOwn(cluster, 'setupPrimary') && Object.hasOwn(cluster, 'setupMaster')) { + if ( + !Object.hasOwn(cluster, 'setupPrimary') && + Object.hasOwn(cluster, 'setupMaster') + ) { debug('Applying cluster.setupPrimary() polyfill') cluster.setupPrimary = cluster.setupMaster }