Skip to content

Commit e4f8233

Browse files
authored
Merge pull request #549 from dahlia/main
Add backward compatibility for @fedify/fedify/vocab module
2 parents 7a38301 + 73a42ca commit e4f8233

5 files changed

Lines changed: 36 additions & 5 deletions

File tree

CHANGES.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ To be released.
9090
- Removed `@fedify/fedify/x/sveltekit` in favor of `@fedify/sveltekit`.
9191
- Removed `@fedify/fedify/x/fresh` (Fresh integration). [[#466]]
9292

93+
- Deprecated the `@fedify/fedify/vocab` module in favor of the new
94+
`@fedify/vocab` package. The `@fedify/fedify/vocab` module now re-exports
95+
all exports from `@fedify/vocab` for backward compatibility, but will be
96+
removed in a future version. Please migrate to `@fedify/vocab` directly.
97+
[[#437], [#517] by ChanHaeng Lee]
98+
9399
- The `KvStore.list()` method is now required instead of optional.
94100
This method was added as optional in version 1.10.0 to give existing
95101
implementations time to add support. All official `KvStore` implementations
@@ -119,13 +125,15 @@ To be released.
119125
[#393]: https://github.com/fedify-dev/fedify/pulls/393
120126
[#433]: https://github.com/fedify-dev/fedify/pull/433
121127
[#434]: https://github.com/fedify-dev/fedify/pull/434
128+
[#437]: https://github.com/fedify-dev/fedify/issues/437
122129
[#441]: https://github.com/fedify-dev/fedify/issues/441
123130
[#444]: https://github.com/fedify-dev/fedify/issues/444
124131
[#445]: https://github.com/fedify-dev/fedify/pull/445
125132
[#451]: https://github.com/fedify-dev/fedify/pull/451
126133
[#466]: https://github.com/fedify-dev/fedify/issues/466
127134
[#499]: https://github.com/fedify-dev/fedify/issues/499
128135
[#506]: https://github.com/fedify-dev/fedify/pull/506
136+
[#517]: https://github.com/fedify-dev/fedify/pull/517
129137
[#536]: https://github.com/fedify-dev/fedify/issues/536
130138
[#538]: https://github.com/fedify-dev/fedify/issues/538
131139
[#540]: https://github.com/fedify-dev/fedify/pull/540
@@ -283,18 +291,16 @@ To be released.
283291
including parsing and generating WebFinger documents.
284292
[[#517] by ChanHaeng Lee]
285293

286-
[#517]: https://github.com/fedify-dev/fedify/pull/517
287-
288294
### @fedify/vocab
289295

290296
- Created ActivityPub Vocabulary API package as the *@fedify/vocab* package.
291297
This package contains the generated Activity Vocabulary classes and
292298
related types, separated from the main *@fedify/fedify* package to
293299
improve modularity and enable custom vocabulary extensions.
300+
The previous `@fedify/fedify/vocab` module is now deprecated and
301+
re-exports all exports from this package for backward compatibility.
294302
[[#437], [#517] by ChanHaeng Lee]
295303

296-
[#437]: https://github.com/fedify-dev/fedify/issues/437
297-
298304
### @fedify/sqlite
299305

300306
- Added `SqliteMessageQueue` class implementing `MessageQueue` interface

packages/fedify/deno.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"./nodeinfo": "./src/nodeinfo/mod.ts",
1010
"./otel": "./src/otel/mod.ts",
1111
"./sig": "./src/sig/mod.ts",
12-
"./utils": "./src/utils/mod.ts"
12+
"./utils": "./src/utils/mod.ts",
13+
"./vocab": "./src/vocab/mod.ts"
1314
},
1415
"imports": {
1516
"@multiformats/base-x": "npm:@multiformats/base-x@^4.0.1",

packages/fedify/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@
107107
"import": "./dist/utils/mod.js",
108108
"require": "./dist/utils/mod.cjs",
109109
"default": "./dist/utils/mod.js"
110+
},
111+
"./vocab": {
112+
"types": {
113+
"import": "./dist/vocab/mod.d.ts",
114+
"require": "./dist/vocab/mod.d.cts",
115+
"default": "./dist/vocab/mod.d.ts"
116+
},
117+
"import": "./dist/vocab/mod.js",
118+
"require": "./dist/vocab/mod.cjs",
119+
"default": "./dist/vocab/mod.js"
110120
}
111121
},
112122
"dependencies": {

packages/fedify/src/vocab/mod.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* A set of type-safe object mappings for the [Activity
3+
* Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary/).
4+
*
5+
* @deprecated This module has been moved to the `@fedify/vocab` package.
6+
* Please use `@fedify/vocab` instead of `@fedify/fedify/vocab`.
7+
* This module will be removed in a future version.
8+
* See {@link https://github.com/fedify-dev/fedify/issues/437}
9+
* and {@link https://github.com/fedify-dev/fedify/pull/517}
10+
* for more details.
11+
* @module
12+
*/
13+
export * from "@fedify/vocab";

packages/fedify/tsdown.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default [
1212
"./src/otel/mod.ts",
1313
"./src/utils/mod.ts",
1414
"./src/sig/mod.ts",
15+
"./src/vocab/mod.ts",
1516
],
1617
dts: true,
1718
format: ["esm", "cjs"],

0 commit comments

Comments
 (0)