1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
From:
Subject: Debian changes
The Debian packaging of node-braintree-sanitize-url is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.
A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:
% git clone https://git.dgit.debian.org/node-braintree-sanitize-url
% cd node-braintree-sanitize-url
% git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'
(If you have dgit, use `dgit clone node-braintree-sanitize-url`, rather than plain `git clone`.)
We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.
---
diff --git a/src/index.ts b/src/index.ts
index 83faca9..138a829 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -21,7 +21,12 @@ function decodeHtmlCharacters(str: string) {
}
function isValidUrl(url: string): boolean {
- return URL.canParse(url);
+ try {
+ new URL(url);
+ return true;
+ } catch {
+ return false;
+ }
}
function decodeURI(uri: string): string {
diff --git a/tsconfig.json b/tsconfig.json
index 76db379..60d2bce 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,9 +3,11 @@
"outDir": "./dist",
"allowJs": true,
"strict": true,
- "target": "es5",
+ "target": "ES2019",
+ "moduleResolution": "node",
"resolveJsonModule": true,
- "lib": ["es2015", "dom"]
+ "lib": ["ES2023", "DOM"],
+ "skipLibCheck": true
},
"include": ["./src/**/*"],
"exclude": ["**/__tests__/*"]
|