From 990c03da5860a804dc666362ddc887c28fcc3e24 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 1 May 2022 14:53:52 -0400 Subject: [PATCH] clean up TODOs --- source-map-support.js | 5 +---- test.js | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/source-map-support.js b/source-map-support.js index 902994a..b4995ec 100644 --- a/source-map-support.js +++ b/source-map-support.js @@ -129,8 +129,6 @@ function hasGlobalProcessEventEmitter() { } function tryFileURLToPath(v) { - // TODO technically, file URL can omit /s. - // Copy the isFileURL util from resolve-uri? if(isFileUrl(v)) { return fileURLToPath(v); } @@ -154,8 +152,7 @@ function isSchemeRelativeUrl(input) { /** @param {string} pathOrFileUrl */ function getCacheKey(pathOrFileUrl) { if(pathOrFileUrl.startsWith('node:')) return pathOrFileUrl; - // TODO unify with isFileURL checks elsewhere? as helper fn? - if(pathOrFileUrl.startsWith('file:/')) { + if(isFileUrl(pathOrFileUrl)) { // Must normalize spaces to %20, stuff like that return new URL(pathOrFileUrl).toString(); } else { diff --git a/test.js b/test.js index aa9bc97..7dabc6c 100644 --- a/test.js +++ b/test.js @@ -390,7 +390,6 @@ it('eval', async function() { ], [ 'Error: test', - // TODO re`^ at eval \(eval at (|exports\.test|test) \(${stackFramePathStartsWith()}(?:.*[/\\])?line1\.js:1001:101\)`, re`^ at ${stackFrameAtTest()} \(${stackFramePathStartsWith()}(?:.*[/\\])?line1\.js:1001:101\)$`