Unverified Commit 2555839a authored by Hong Minhee's avatar Hong Minhee
Browse files

Caution about shadowing in Activity Vocabulary

[ci skip]
parent 2fb4a2c4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ import deflist from "markdown-it-deflist";
import footnote from "markdown-it-footnote";
import { jsrRef } from "markdown-it-jsr-ref";
import process from "node:process";
import { ModuleKind, ModuleResolutionKind } from "typescript";
import { defineConfig } from "vitepress";
import { withMermaid } from "vitepress-plugin-mermaid";

+30 −1
Original line number Diff line number Diff line
@@ -17,8 +17,37 @@ list all of them here. Instead, we'll show a few examples of the objects that
are available in the library: `Create`, `Note`, and `Person`.  For the full
list of the objects, please refer to the [API reference].

[API reference]: https://jsr.io/@fedify/fedify/doc/vocab/~
> [!CAUTION]
>
> Some classes in the Activity Vocabulary have the same name as the built-in
> JavaScript classes.  For example, the `Object` class in the Activity
> Vocabulary is different from the built-in [`Object`] class.  Therefore, you
> should be careful when importing the classes in the Activity Vocabulary so
> that you don't unintentionally shadow the built-in JavaScript classes.
>
> Here's a list of the classes in the Activity Vocabulary that have the same
> name as the built-in JavaScript classes:
>
>  -  `Image`
>  -  `Object`
>
> In order to avoid the conflict, you can alias the classes in the Activity
> Vocabulary when importing them.  For example, you can alias the `Object`
> class as `ASObject` as follows:
>
> ~~~~ typescript twoslash
> import { Object as ASObject } from "@fedify/fedify";
> ~~~~
>
> Or, you can import the classes from the Activity Vocabulary with a prefix as
> follows:
>
> ~~~~ typescript
> import * as vocab from "@fedify/fedify/vocab";
> ~~~~

[API reference]: https://jsr.io/@fedify/fedify/doc/vocab/~
[`Object`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object

Instantiation
-------------
+55 −55
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ importers:
        version: 0.7.1
      '@shikijs/vitepress-twoslash':
        specifier: ^1.17.6
        version: 1.21.0(typescript@5.6.2)
        version: 1.21.0(typescript@5.6.3)
      '@teidesu/deno-types':
        specifier: ^1.46.3
        version: 1.46.3
@@ -85,10 +85,10 @@ importers:
        version: 4.0.4
      vitepress:
        specifier: ^1.3.1
        version: 1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.2)
        version: 1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.3)
      vitepress-plugin-mermaid:
        specifier: ^2.0.16
        version: 2.0.17(mermaid@10.9.1)(vitepress@1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.2))
        version: 2.0.17(mermaid@10.9.1)(vitepress@1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.3))
      x-forwarded-fetch:
        specifier: ^0.2.0
        version: 0.2.0
@@ -1587,8 +1587,8 @@ packages:
    peerDependencies:
      typescript: '*'

  typescript@5.6.2:
    resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==}
  typescript@5.6.3:
    resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==}
    engines: {node: '>=14.17'}
    hasBin: true

@@ -2183,11 +2183,11 @@ snapshots:
    dependencies:
      shiki: 1.21.0

  '@shikijs/twoslash@1.21.0(typescript@5.6.2)':
  '@shikijs/twoslash@1.21.0(typescript@5.6.3)':
    dependencies:
      '@shikijs/core': 1.21.0
      '@shikijs/types': 1.21.0
      twoslash: 0.2.12(typescript@5.6.2)
      twoslash: 0.2.12(typescript@5.6.3)
    transitivePeerDependencies:
      - supports-color
      - typescript
@@ -2197,17 +2197,17 @@ snapshots:
      '@shikijs/vscode-textmate': 9.2.2
      '@types/hast': 3.0.4

  '@shikijs/vitepress-twoslash@1.21.0(typescript@5.6.2)':
  '@shikijs/vitepress-twoslash@1.21.0(typescript@5.6.3)':
    dependencies:
      '@shikijs/twoslash': 1.21.0(typescript@5.6.2)
      floating-vue: 5.2.2(vue@3.5.10(typescript@5.6.2))
      '@shikijs/twoslash': 1.21.0(typescript@5.6.3)
      floating-vue: 5.2.2(vue@3.5.10(typescript@5.6.3))
      mdast-util-from-markdown: 2.0.1
      mdast-util-gfm: 3.0.0
      mdast-util-to-hast: 13.2.0
      shiki: 1.21.0
      twoslash: 0.2.12(typescript@5.6.2)
      twoslash-vue: 0.2.12(typescript@5.6.2)
      vue: 3.5.10(typescript@5.6.2)
      twoslash: 0.2.12(typescript@5.6.3)
      twoslash-vue: 0.2.12(typescript@5.6.3)
      vue: 3.5.10(typescript@5.6.3)
    transitivePeerDependencies:
      - '@nuxt/kit'
      - supports-color
@@ -2284,19 +2284,19 @@ snapshots:
    dependencies:
      '@types/node': 20.12.14

  '@typescript/vfs@1.6.0(typescript@5.6.2)':
  '@typescript/vfs@1.6.0(typescript@5.6.3)':
    dependencies:
      debug: 4.3.7
      typescript: 5.6.2
      typescript: 5.6.3
    transitivePeerDependencies:
      - supports-color

  '@ungap/structured-clone@1.2.0': {}

  '@vitejs/plugin-vue@5.1.4(vite@5.4.8(@types/node@22.7.4))(vue@3.5.10(typescript@5.6.2))':
  '@vitejs/plugin-vue@5.1.4(vite@5.4.8(@types/node@22.7.4))(vue@3.5.10(typescript@5.6.3))':
    dependencies:
      vite: 5.4.8(@types/node@22.7.4)
      vue: 3.5.10(typescript@5.6.2)
      vue: 3.5.10(typescript@5.6.3)

  '@volar/language-core@2.4.5':
    dependencies:
@@ -2357,7 +2357,7 @@ snapshots:
    dependencies:
      rfdc: 1.4.1

  '@vue/language-core@2.1.6(typescript@5.6.2)':
  '@vue/language-core@2.1.6(typescript@5.6.3)':
    dependencies:
      '@volar/language-core': 2.4.5
      '@vue/compiler-dom': 3.5.10
@@ -2368,7 +2368,7 @@ snapshots:
      muggle-string: 0.4.1
      path-browserify: 1.0.1
    optionalDependencies:
      typescript: 5.6.2
      typescript: 5.6.3

  '@vue/reactivity@3.5.10':
    dependencies:
@@ -2386,29 +2386,29 @@ snapshots:
      '@vue/shared': 3.5.10
      csstype: 3.1.3

  '@vue/server-renderer@3.5.10(vue@3.5.10(typescript@5.6.2))':
  '@vue/server-renderer@3.5.10(vue@3.5.10(typescript@5.6.3))':
    dependencies:
      '@vue/compiler-ssr': 3.5.10
      '@vue/shared': 3.5.10
      vue: 3.5.10(typescript@5.6.2)
      vue: 3.5.10(typescript@5.6.3)

  '@vue/shared@3.5.10': {}

  '@vueuse/core@11.1.0(vue@3.5.10(typescript@5.6.2))':
  '@vueuse/core@11.1.0(vue@3.5.10(typescript@5.6.3))':
    dependencies:
      '@types/web-bluetooth': 0.0.20
      '@vueuse/metadata': 11.1.0
      '@vueuse/shared': 11.1.0(vue@3.5.10(typescript@5.6.2))
      vue-demi: 0.14.10(vue@3.5.10(typescript@5.6.2))
      '@vueuse/shared': 11.1.0(vue@3.5.10(typescript@5.6.3))
      vue-demi: 0.14.10(vue@3.5.10(typescript@5.6.3))
    transitivePeerDependencies:
      - '@vue/composition-api'
      - vue

  '@vueuse/integrations@11.1.0(focus-trap@7.6.0)(vue@3.5.10(typescript@5.6.2))':
  '@vueuse/integrations@11.1.0(focus-trap@7.6.0)(vue@3.5.10(typescript@5.6.3))':
    dependencies:
      '@vueuse/core': 11.1.0(vue@3.5.10(typescript@5.6.2))
      '@vueuse/shared': 11.1.0(vue@3.5.10(typescript@5.6.2))
      vue-demi: 0.14.10(vue@3.5.10(typescript@5.6.2))
      '@vueuse/core': 11.1.0(vue@3.5.10(typescript@5.6.3))
      '@vueuse/shared': 11.1.0(vue@3.5.10(typescript@5.6.3))
      vue-demi: 0.14.10(vue@3.5.10(typescript@5.6.3))
    optionalDependencies:
      focus-trap: 7.6.0
    transitivePeerDependencies:
@@ -2417,9 +2417,9 @@ snapshots:

  '@vueuse/metadata@11.1.0': {}

  '@vueuse/shared@11.1.0(vue@3.5.10(typescript@5.6.2))':
  '@vueuse/shared@11.1.0(vue@3.5.10(typescript@5.6.3))':
    dependencies:
      vue-demi: 0.14.10(vue@3.5.10(typescript@5.6.2))
      vue-demi: 0.14.10(vue@3.5.10(typescript@5.6.3))
    transitivePeerDependencies:
      - '@vue/composition-api'
      - vue
@@ -2773,11 +2773,11 @@ snapshots:
      node-domexception: 1.0.0
      web-streams-polyfill: 3.3.3

  floating-vue@5.2.2(vue@3.5.10(typescript@5.6.2)):
  floating-vue@5.2.2(vue@3.5.10(typescript@5.6.3)):
    dependencies:
      '@floating-ui/dom': 1.1.1
      vue: 3.5.10(typescript@5.6.2)
      vue-resize: 2.0.0-alpha.1(vue@3.5.10(typescript@5.6.2))
      vue: 3.5.10(typescript@5.6.3)
      vue-resize: 2.0.0-alpha.1(vue@3.5.10(typescript@5.6.3))

  focus-trap@7.6.0:
    dependencies:
@@ -3534,24 +3534,24 @@ snapshots:

  twoslash-protocol@0.2.12: {}

  twoslash-vue@0.2.12(typescript@5.6.2):
  twoslash-vue@0.2.12(typescript@5.6.3):
    dependencies:
      '@vue/language-core': 2.1.6(typescript@5.6.2)
      twoslash: 0.2.12(typescript@5.6.2)
      '@vue/language-core': 2.1.6(typescript@5.6.3)
      twoslash: 0.2.12(typescript@5.6.3)
      twoslash-protocol: 0.2.12
      typescript: 5.6.2
      typescript: 5.6.3
    transitivePeerDependencies:
      - supports-color

  twoslash@0.2.12(typescript@5.6.2):
  twoslash@0.2.12(typescript@5.6.3):
    dependencies:
      '@typescript/vfs': 1.6.0(typescript@5.6.2)
      '@typescript/vfs': 1.6.0(typescript@5.6.3)
      twoslash-protocol: 0.2.12
      typescript: 5.6.2
      typescript: 5.6.3
    transitivePeerDependencies:
      - supports-color

  typescript@5.6.2: {}
  typescript@5.6.3: {}

  uc.micro@2.1.0: {}

@@ -3635,31 +3635,31 @@ snapshots:
      '@types/node': 22.7.4
      fsevents: 2.3.3

  vitepress-plugin-mermaid@2.0.17(mermaid@10.9.1)(vitepress@1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.2)):
  vitepress-plugin-mermaid@2.0.17(mermaid@10.9.1)(vitepress@1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.3)):
    dependencies:
      mermaid: 10.9.1
      vitepress: 1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.2)
      vitepress: 1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.3)
    optionalDependencies:
      '@mermaid-js/mermaid-mindmap': 9.3.0

  vitepress@1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.2):
  vitepress@1.3.4(@algolia/client-search@4.24.0)(@types/node@22.7.4)(postcss@8.4.47)(search-insights@2.17.2)(typescript@5.6.3):
    dependencies:
      '@docsearch/css': 3.6.2
      '@docsearch/js': 3.6.2(@algolia/client-search@4.24.0)(search-insights@2.17.2)
      '@shikijs/core': 1.21.0
      '@shikijs/transformers': 1.21.0
      '@types/markdown-it': 14.1.2
      '@vitejs/plugin-vue': 5.1.4(vite@5.4.8(@types/node@22.7.4))(vue@3.5.10(typescript@5.6.2))
      '@vitejs/plugin-vue': 5.1.4(vite@5.4.8(@types/node@22.7.4))(vue@3.5.10(typescript@5.6.3))
      '@vue/devtools-api': 7.4.6
      '@vue/shared': 3.5.10
      '@vueuse/core': 11.1.0(vue@3.5.10(typescript@5.6.2))
      '@vueuse/integrations': 11.1.0(focus-trap@7.6.0)(vue@3.5.10(typescript@5.6.2))
      '@vueuse/core': 11.1.0(vue@3.5.10(typescript@5.6.3))
      '@vueuse/integrations': 11.1.0(focus-trap@7.6.0)(vue@3.5.10(typescript@5.6.3))
      focus-trap: 7.6.0
      mark.js: 8.11.1
      minisearch: 7.1.0
      shiki: 1.21.0
      vite: 5.4.8(@types/node@22.7.4)
      vue: 3.5.10(typescript@5.6.2)
      vue: 3.5.10(typescript@5.6.3)
    optionalDependencies:
      postcss: 8.4.47
    transitivePeerDependencies:
@@ -3690,23 +3690,23 @@ snapshots:
      - typescript
      - universal-cookie

  vue-demi@0.14.10(vue@3.5.10(typescript@5.6.2)):
  vue-demi@0.14.10(vue@3.5.10(typescript@5.6.3)):
    dependencies:
      vue: 3.5.10(typescript@5.6.2)
      vue: 3.5.10(typescript@5.6.3)

  vue-resize@2.0.0-alpha.1(vue@3.5.10(typescript@5.6.2)):
  vue-resize@2.0.0-alpha.1(vue@3.5.10(typescript@5.6.3)):
    dependencies:
      vue: 3.5.10(typescript@5.6.2)
      vue: 3.5.10(typescript@5.6.3)

  vue@3.5.10(typescript@5.6.2):
  vue@3.5.10(typescript@5.6.3):
    dependencies:
      '@vue/compiler-dom': 3.5.10
      '@vue/compiler-sfc': 3.5.10
      '@vue/runtime-dom': 3.5.10
      '@vue/server-renderer': 3.5.10(vue@3.5.10(typescript@5.6.2))
      '@vue/server-renderer': 3.5.10(vue@3.5.10(typescript@5.6.3))
      '@vue/shared': 3.5.10
    optionalDependencies:
      typescript: 5.6.2
      typescript: 5.6.3

  web-streams-polyfill@3.3.3: {}