Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! module: implement "exports" proposal for CommonJS
  • Loading branch information
hybrist committed Jul 23, 2019
commit b7258f9b069b66b059da89dc8e951cc6a8307bcd
3 changes: 1 addition & 2 deletions lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
'use strict';

const {
ArrayPrototype,
JSON,
Object,
Reflect,
Expand Down Expand Up @@ -369,7 +368,7 @@ function resolveExports(nmPath, request, absoluteRequest) {

if (dirMatch !== '') {
const dirMapping = pkgExports[dirMatch];
const remainder = ArrayPrototype.slice(mappingKey, dirMatch.length);
const remainder = StringPrototype.slice(mappingKey, dirMatch.length);
const expectedPrefix = path.resolve(basePath, dirMapping);
Comment thread
hybrist marked this conversation as resolved.
Outdated
const resolved = path.resolve(expectedPrefix, remainder);
if (StringPrototype.startsWith(resolved, expectedPrefix)) {
Expand Down