From 38ecabf205336c2cf51f2a18919da3dcb1a7db97 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 4 May 2020 12:22:42 -0400 Subject: Simplify ts-compiler's normalizeString (#5072) --- cli/js/compiler/bundler.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'cli/js/compiler/bundler.ts') diff --git a/cli/js/compiler/bundler.ts b/cli/js/compiler/bundler.ts index c9578fe20..3f05a3be3 100644 --- a/cli/js/compiler/bundler.ts +++ b/cli/js/compiler/bundler.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { SYSTEM_LOADER } from "./bootstrap.ts"; -import { commonPath, normalizeString, CHAR_FORWARD_SLASH } from "./util.ts"; +import { commonPath, normalizeString } from "./util.ts"; import { assert } from "../util.ts"; let rootExports: string[] | undefined; @@ -10,12 +10,7 @@ function normalizeUrl(rootName: string): string { const match = /^(\S+:\/{2,3})(.+)$/.exec(rootName); if (match) { const [, protocol, path] = match; - return `${protocol}${normalizeString( - path, - false, - "/", - (code) => code === CHAR_FORWARD_SLASH - )}`; + return `${protocol}${normalizeString(path)}`; } else { return rootName; } -- cgit v1.2.3