refactor: remove wurl dependency

This was mainly used in now removed code, any other uses were fixed with the URL constructor

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares
2026-06-22 23:10:28 +02:00
committed by Philip Molares
parent 0749c31100
commit cda70628fa
3 changed files with 4 additions and 13 deletions

View File

@@ -204,8 +204,7 @@
"viz.js": "1.8.2",
"webpack": "4.47.0",
"webpack-cli": "4.10.0",
"webpack-merge": "5.10.0",
"wurl": "2.5.4"
"webpack-merge": "5.10.0"
},
"optionalDependencies": {
"bufferutil": "4.1.0",

View File

@@ -18,7 +18,6 @@ import hex2rgb from '../vendor/ot/hex2rgb'
import { saveAs } from 'file-saver'
import chance from 'chance'
import store from 'store'
import url from 'wurl'
import { Spinner } from 'spin.js'
import _ from 'lodash'
@@ -1798,7 +1797,7 @@ $('#gistImportModalConfirm').click(function () {
false
)
} else {
const hostname = url('hostname', gisturl)
const hostname = new URL(gisturl).hostname
if (hostname !== 'gist.github.com') {
showMessageModal(
'<i class="fa fa-github"></i> Import from Gist',
@@ -1809,7 +1808,8 @@ $('#gistImportModalConfirm').click(function () {
)
} else {
ui.spinner.show()
$.get('https://api.github.com/gists/' + url('-1', gisturl))
const gistId = new URL(gisturl).pathname.split('/').pop()
$.get('https://api.github.com/gists/' + gistId)
.done(function (data) {
if (data.files) {
let contents = ''

View File

@@ -1619,7 +1619,6 @@ __metadata:
webpack-cli: "npm:4.10.0"
webpack-merge: "npm:5.10.0"
winston: "npm:3.19.0"
wurl: "npm:2.5.4"
xss: "npm:1.0.15"
dependenciesMeta:
bufferutil:
@@ -17826,13 +17825,6 @@ __metadata:
languageName: node
linkType: hard
"wurl@npm:2.5.4":
version: 2.5.4
resolution: "wurl@npm:2.5.4"
checksum: 10/d8b151720dc252a53e35c3df3cc77390afa4b6f0af35f891c7ef172c6b6fb9c432539dde16f94ec6c123380084ba1e77ab71eebc55305d2cd349e5b07332f99c
languageName: node
linkType: hard
"xml-crypto@npm:^6.1.2":
version: 6.1.2
resolution: "xml-crypto@npm:6.1.2"