Skip to content

Commit f522d04

Browse files
committed
Replace @std/encoding with byte-encodings
Also bumped the minimum supported version of Node.js from 20 to 22.
1 parent a0a1961 commit f522d04

17 files changed

Lines changed: 24 additions & 22 deletions

File tree

.devcontainer/bin/postCreateCommand.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
export BUN_VERSION="v1.1.29"
6-
export NODE_VERSION="20"
6+
export NODE_VERSION="22"
77
export NVM_VERSION="v0.40.0"
88
export PNPM_VERSION="9.11.0"
99

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ To be released.
3434
- Added `HttpMessageSignaturesSpecDeterminer` interface.
3535
- Added `--first-knock` option to `fedify lookup` command.
3636

37+
- The minimum supported version of Node.js is now 22.0.0.
38+
3739
[RFC 9421]: https://www.rfc-editor.org/rfc/rfc9421
3840
[#208]: https://github.com/fedify-dev/fedify/issues/208
3941
[#227]: https://github.com/fedify-dev/fedify/issues/227

docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ bun add @fedify/fedify
111111
### Node.js
112112

113113
Fedify can also be used in Node.js. As a prerequisite, you need to have Node.js
114-
20.0.0 or later installed on your system. Then you can install Fedify via
114+
22.0.0 or later installed on your system. Then you can install Fedify via
115115
the following command:
116116

117117
~~~~ sh

docs/tutorial/microblog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ for this tutorial.
102102
> Node.js is widely used. Recently, cloud edge functions like
103103
> [Cloudflare Workers] have also gained popularity as JavaScript runtimes.
104104
105-
To use Fedify, you need Node.js version 20.0.0 or higher. There are
105+
To use Fedify, you need Node.js version 22.0.0 or higher. There are
106106
[various installation methods]—choose the one that suits you best.
107107

108108
Once Node.js is installed, you'll have access to the `node` and `npm` commands:

fedify/codegen/field.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { encodeBase58 } from "@std/encoding/base58";
1+
import { encodeBase58 } from "byte-encodings/base58";
22
import type { PropertySchema, TypeSchema } from "./schema.ts";
33
import { areAllScalarTypes, getTypeNames } from "./type.ts";
44

fedify/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
"@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.27.0",
2626
"@phensley/language-tag": "npm:@phensley/language-tag@^1.9.0",
2727
"@std/assert": "jsr:@std/assert@^0.226.0",
28-
"@std/encoding": "jsr:@std/encoding@1.0.7",
2928
"@std/http": "jsr:@std/http@^1.0.6",
3029
"@std/testing": "jsr:@std/testing@^0.224.0",
3130
"@std/url": "jsr:@std/url@^0.225.1",
3231
"@std/yaml": "jsr:@std/yaml@^0.224.3",
3332
"asn1js": "npm:asn1js@^3.0.5",
33+
"byte-encodings": "npm:byte-encodings@^1.0.11",
3434
"fast-check": "npm:fast-check@^3.22.0",
3535
"json-canon": "npm:json-canon@^1.0.1",
3636
"jsonld": "npm:jsonld@^8.3.2",

fedify/dnt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ await build({
6262
],
6363
engines: {
6464
"deno": ">=2.0.0",
65-
"node": ">=20.0.0",
65+
"node": ">=22.0.0",
6666
"bun": ">=1.1.0",
6767
},
6868
},

fedify/federation/collection.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { assertEquals } from "@std/assert";
2-
import { decodeHex } from "@std/encoding/hex";
2+
import { decodeHex } from "byte-encodings/hex";
33
import { test } from "../testing/mod.ts";
44
import { buildCollectionSynchronizationHeader, digest } from "./collection.ts";
55

fedify/federation/collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { encodeHex } from "@std/encoding/hex";
1+
import { encodeHex } from "byte-encodings/hex";
22

33
/**
44
* A page of items.

fedify/runtime/key.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { decodeBase64, encodeBase64 } from "@std/encoding/base64";
2-
import { decodeBase64Url } from "@std/encoding/base64url";
3-
import { decodeHex } from "@std/encoding/hex";
41
import { Integer, Sequence } from "asn1js";
5-
import { decode, encode } from "../runtime/multibase/index.ts";
2+
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
3+
import { decodeBase64Url } from "byte-encodings/base64url";
4+
import { decodeHex } from "byte-encodings/hex";
65
import { addPrefix, getCodeFromData, rmPrefix } from "multicodec";
76
import { createPublicKey } from "node:crypto";
87
import { PublicKeyInfo } from "pkijs";
8+
import { decode, encode } from "../runtime/multibase/index.ts";
99
import { validateCryptoKey } from "../sig/key.ts";
1010

1111
const algorithms: Record<

0 commit comments

Comments
 (0)