Skip to content

Commit

Permalink
rename variable 'register' to 'service'
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Dec 3, 2020
1 parent bf4efec commit cee6007
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1031,15 +1031,15 @@ function registerExtensions (
*/
function registerExtension (
ext: string,
register: Service,
service: Service,
originalHandler: (m: NodeModule, filename: string) => any
) {
const old = require.extensions[ext] || originalHandler // tslint:disable-line

require.extensions[ext] = function (m: any, filename) { // tslint:disable-line
if (register.ignored(filename)) return old(m, filename)
if (service.ignored(filename)) return old(m, filename)

if (register.options.experimentalEsmLoader) {
if (service.options.experimentalEsmLoader) {
assertScriptCanLoadAsCJS(filename)
}

Expand All @@ -1048,7 +1048,7 @@ function registerExtension (
m._compile = function (code: string, fileName: string) {
debug('module._compile', fileName)

return _compile.call(this, register.compile(code, fileName), fileName)
return _compile.call(this, service.compile(code, fileName), fileName)
}

return old(m, filename)
Expand Down

0 comments on commit cee6007

Please sign in to comment.