Skip to content

Commit

Permalink
fix: touch up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sverweij committed Dec 5, 2023
1 parent d9e9d34 commit c782d77
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/extract/resolve/module-classifiers.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable max-lines */
import { isAbsolute, resolve as path_resolve } from "node:path";
import { join as posix_join } from "node:path/posix";
import { isMatch } from "picomatch";
Expand Down Expand Up @@ -196,7 +195,8 @@ function matchesTSConfigPaths(pModuleName, pPaths) {
// So, just like with subpath imports, the LHS of a path pattern is not a glob
// and the '*' functions as a string replacement only.
//
// TODO: 'any string' - does this include the empty string as well?
// TODO: 'any string' - does this include the empty string as well? Checks seem
// to indicate it doesn't, so we use `.+` instead of `.*`
return Object.keys(pPaths).some((pPathLHS) => {
// eslint-disable-next-line security/detect-non-literal-regexp
const lMatchRE = new RegExp(`^${pPathLHS.replace(/\*/g, ".+")}$`);
Expand Down Expand Up @@ -240,11 +240,6 @@ function matchesTSConfigBaseURL(
const strippedResolvedModuleName = stripIndex(
stripExtension(pResolvedModuleName),
);
// console.error(
// ...arguments,
// strippedModuleNameJoinedToBaseURL
// strippedResolvedModuleName
// );
return strippedModuleNameJoinedToBaseURL.endsWith(strippedResolvedModuleName);
}

Expand Down

0 comments on commit c782d77

Please sign in to comment.