bare-url 2.0.3 → 2.0.5

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/CMakeLists.txt CHANGED
@@ -1,8 +1,8 @@
1
1
  cmake_minimum_required(VERSION 3.25)
2
2
 
3
- project(bare_url C)
3
+ find_package(cmake-bare REQUIRED PATHS node_modules/cmake-bare)
4
4
 
5
- include(bare)
5
+ project(bare_url C)
6
6
 
7
7
  if(NOT TARGET utf)
8
8
  add_subdirectory(vendor/libutf EXCLUDE_FROM_ALL)
@@ -16,6 +16,8 @@ add_bare_module(bare_url)
16
16
 
17
17
  target_sources(
18
18
  ${bare_url}
19
+ PUBLIC
20
+ $<TARGET_OBJECTS:url>
19
21
  PRIVATE
20
22
  binding.c
21
23
  )
@@ -23,5 +25,5 @@ target_sources(
23
25
  target_link_libraries(
24
26
  ${bare_url}
25
27
  PUBLIC
26
- url_static
28
+ url
27
29
  )
package/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  /* global Bare */
2
2
  const path = require('bare-path')
3
- const safetyCatch = require('safety-catch')
4
3
  const binding = require('./binding')
5
4
  const errors = require('./lib/errors')
6
5
 
@@ -214,7 +213,7 @@ const URL = module.exports = exports = class URL {
214
213
  try {
215
214
  this._href = binding.parse(String(href), base ? String(base) : null, this._components, shouldThrow)
216
215
  } catch (err) {
217
- safetyCatch(err)
216
+ if (err instanceof TypeError) throw err
218
217
 
219
218
  throw errors.INVALID_URL()
220
219
  }
@@ -224,7 +223,7 @@ const URL = module.exports = exports = class URL {
224
223
  try {
225
224
  this._parse(href, null, true)
226
225
  } catch (err) {
227
- safetyCatch(err)
226
+ if (err instanceof TypeError) throw err
228
227
  }
229
228
  }
230
229
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-url",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "WHATWG URL implementation for JavaScript",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -30,11 +30,11 @@
30
30
  },
31
31
  "homepage": "https://github.com/holepunchto/bare-url",
32
32
  "dependencies": {
33
- "bare-path": "^3.0.0",
34
- "safety-catch": "^1.0.2"
33
+ "bare-path": "^3.0.0"
35
34
  },
36
35
  "devDependencies": {
37
36
  "brittle": "^3.3.2",
37
+ "cmake-bare": "^1.1.6",
38
38
  "standard": "^17.1.0"
39
39
  }
40
40
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file