bare-url 0.1.1 → 0.3.0

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.
Files changed (2) hide show
  1. package/index.js +3 -2
  2. package/package.json +5 -1
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
- const path = require('path')
1
+ const path = require('bare-path')
2
+ const os = require('bare-os')
2
3
  const constants = require('./lib/constants')
3
4
  const errors = require('./lib/errors')
4
5
  const parse = require('./lib/parse')
@@ -212,7 +213,7 @@ exports.fileURLToPath = function fileURLToPath (url) {
212
213
 
213
214
  const pathname = path.normalize(decodeURIComponent(url.pathname))
214
215
 
215
- if (process.platform === 'win32') {
216
+ if (os.platform() === 'win32') {
216
217
  if (url.hostname) return `\\\\${url.hostname}${pathname}`
217
218
 
218
219
  return pathname.slice(1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-url",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "URL parser for JavaScript",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -20,6 +20,10 @@
20
20
  "url": "https://github.com/holepunchto/bare-url/issues"
21
21
  },
22
22
  "homepage": "https://github.com/holepunchto/bare-url",
23
+ "dependencies": {
24
+ "bare-os": "^2.0.0",
25
+ "bare-path": "^2.0.0"
26
+ },
23
27
  "devDependencies": {
24
28
  "brittle": "^3.3.2",
25
29
  "standard": "^17.1.0"