@jsenv/urls 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/urls",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,8 +8,7 @@
8
8
  "directory": "packages/urls"
9
9
  },
10
10
  "publishConfig": {
11
- "access": "public",
12
- "registry": "https://registry.npmjs.org"
11
+ "access": "public"
13
12
  },
14
13
  "author": {
15
14
  "name": "dmail",
@@ -30,4 +29,4 @@
30
29
  "test": "node --conditions=development ./scripts/test.mjs"
31
30
  },
32
31
  "dependencies": {}
33
- }
32
+ }
package/src/main.js CHANGED
@@ -3,7 +3,6 @@ export { generateInlineContentUrl } from "./inline_content_url_generator.js"
3
3
  export {
4
4
  stringifyUrlTrace,
5
5
  stringifyUrlSite,
6
- humanizeUrl,
7
6
  showSourceLocation,
8
7
  } from "./url_trace.js"
9
8
  export {
package/src/url_trace.js CHANGED
@@ -3,8 +3,6 @@
3
3
  // https://github.com/postcss/postcss/blob/fd30d3df5abc0954a0ec642a3cdc644ab2aacf9c/lib/terminal-highlight.js#L50
4
4
  // https://github.com/babel/babel/blob/eea156b2cb8deecfcf82d52aa1b71ba4995c7d68/packages/babel-code-frame/src/index.js#L1
5
5
 
6
- import { urlToFileSystemPath } from "./url_to_filesystem_path.js"
7
-
8
6
  export const stringifyUrlTrace = (trace) => {
9
7
  let string = ""
10
8
  trace.forEach(({ type, url, line, column, source }, index) => {
@@ -41,7 +39,7 @@ export const stringifyUrlSite = (
41
39
  color,
42
40
  } = {},
43
41
  ) => {
44
- let string = `${humanizeUrl(url)}`
42
+ let string = url
45
43
 
46
44
  if (typeof line === "number") {
47
45
  string += `:${line}`
@@ -67,15 +65,6 @@ export const stringifyUrlSite = (
67
65
  ${sourceLoc}`
68
66
  }
69
67
 
70
- export const humanizeUrl = (url) => {
71
- if (url.startsWith("file://")) {
72
- // we prefer file system path because vscode reliably make them clickable
73
- // and sometimes it won't for file:// urls
74
- return urlToFileSystemPath(url)
75
- }
76
- return url
77
- }
78
-
79
68
  export const showSourceLocation = ({
80
69
  content,
81
70
  line,