@fedify/fedify 1.5.0-dev.699 → 1.5.0-dev.709

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/CHANGES.md CHANGED
@@ -41,6 +41,16 @@ To be released.
41
41
  [#211]: https://github.com/fedify-dev/fedify/issues/211
42
42
 
43
43
 
44
+ Version 1.4.6
45
+ -------------
46
+
47
+ Released on March 9, 2025.
48
+
49
+ - Fedify no more depends on `node:punycode` module, which is deprecated in
50
+ Node.js. Now it uses the built-in `node:url` module instead.
51
+ [[#212], [#214] by Fróði Karlsson]
52
+
53
+
44
54
  Version 1.4.5
45
55
  -------------
46
56
 
@@ -194,6 +204,16 @@ Released on February 5, 2025.
194
204
  [#195]: https://github.com/fedify-dev/fedify/issues/195
195
205
 
196
206
 
207
+ Version 1.3.13
208
+ --------------
209
+
210
+ Released on March 9, 2025.
211
+
212
+ - Fedify no more depends on `node:punycode` module, which is deprecated in
213
+ Node.js. Now it uses the built-in `node:url` module instead.
214
+ [[#212], [#214] by Fróði Karlsson]
215
+
216
+
197
217
  Version 1.3.12
198
218
  --------------
199
219
 
@@ -463,6 +483,16 @@ Released on November 30, 2024.
463
483
  [#193]: https://github.com/fedify-dev/fedify/issues/193
464
484
 
465
485
 
486
+ Version 1.2.17
487
+ --------------
488
+
489
+ Released on March 9, 2025.
490
+
491
+ - Fedify no more depends on `node:punycode` module, which is deprecated in
492
+ Node.js. Now it uses the built-in `node:url` module instead.
493
+ [[#212], [#214] by Fróði Karlsson]
494
+
495
+
466
496
  Version 1.2.16
467
497
  --------------
468
498
 
@@ -781,6 +811,16 @@ Released on October 31, 2024.
781
811
  [#118]: https://github.com/fedify-dev/fedify/issues/118
782
812
 
783
813
 
814
+ Version 1.1.17
815
+ --------------
816
+
817
+ Released on March 9, 2025.
818
+
819
+ - Fedify no more depends on `node:punycode` module, which is deprecated in
820
+ Node.js. Now it uses the built-in `node:url` module instead.
821
+ [[#212], [#214] by Fróði Karlsson]
822
+
823
+
784
824
  Version 1.1.16
785
825
  --------------
786
826
 
@@ -1140,6 +1180,19 @@ Released on October 20, 2024.
1140
1180
  [#150]: https://github.com/fedify-dev/fedify/issues/150
1141
1181
 
1142
1182
 
1183
+ Version 1.0.20
1184
+ --------------
1185
+
1186
+ Released on March 9, 2025.
1187
+
1188
+ - Fedify no more depends on `node:punycode` module, which is deprecated in
1189
+ Node.js. Now it uses the built-in `node:url` module instead.
1190
+ [[#212], [#214] by Fróði Karlsson]
1191
+
1192
+ [#212]: https://github.com/fedify-dev/fedify/issues/212
1193
+ [#214]: https://github.com/fedify-dev/fedify/pull/214
1194
+
1195
+
1143
1196
  Version 1.0.19
1144
1197
  --------------
1145
1198
 
@@ -3291,4 +3344,5 @@ Version 0.1.0
3291
3344
 
3292
3345
  Initial release. Released on March 8, 2024.
3293
3346
 
3294
- <!-- cSpell: ignore Dogeon Fabien Wressell Emelia Hana Heesun Kyunghee Jiyu -->
3347
+ <!-- cSpell: ignore Dogeon Fabien Wressell Emelia Fróði Karlsson -->
3348
+ <!-- cSpell: ignore Hana Heesun Kyunghee Jiyu -->
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.5.0-dev.699+a9e5f890",
3
+ "version": "1.5.0-dev.709+d405668c",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./mod.ts",
@@ -33,8 +33,13 @@ export async function validatePublicUrl(url) {
33
33
  // FIXME: This is a temporary workaround for the `Bun` runtime; for unknown
34
34
  // reasons, the Web Crypto API does not work as expected after a DNS lookup.
35
35
  // This workaround purposes to prevent unit tests from hanging up:
36
- if ("Bun" in dntShim.dntGlobalThis && hostname === "example.com") {
37
- return;
36
+ if ("Bun" in dntShim.dntGlobalThis) {
37
+ if (hostname === "example.com" || hostname.endsWith(".example.com")) {
38
+ return;
39
+ }
40
+ else if (hostname === "fedify-test.internal") {
41
+ throw new UrlError("Invalid or private address: fedify-test.internal");
42
+ }
38
43
  }
39
44
  // To prevent SSRF via DNS rebinding, we need to resolve all IP addresses
40
45
  // and ensure that they are all public:
@@ -1,5 +1,5 @@
1
1
  import { SpanStatusCode, trace } from "@opentelemetry/api";
2
- import { toASCII, toUnicode } from "node:punycode";
2
+ import { domainToASCII, domainToUnicode } from "node:url";
3
3
  import metadata from "../deno.js";
4
4
  import { lookupWebFinger } from "../webfinger/lookup.js";
5
5
  import { getTypeId } from "./type.js";
@@ -161,7 +161,7 @@ export function normalizeActorHandle(handle, options = {}) {
161
161
  throw new TypeError("Invalid actor handle.");
162
162
  }
163
163
  domain = domain.toLowerCase();
164
- domain = options.punycode ? toASCII(domain) : toUnicode(domain);
164
+ domain = options.punycode ? domainToASCII(domain) : domainToUnicode(domain);
165
165
  domain = domain.toLowerCase();
166
166
  const user = handle.substring(0, atPos);
167
167
  return options.trimLeadingAt ? `${user}@${domain}` : `@${user}@${domain}`;