Skip to content

Commit cee5775

Browse files
authored
Merge branch 'main' into feat/more-structures
2 parents 43f0071 + 02fc101 commit cee5775

File tree

34 files changed

+541
-215
lines changed

34 files changed

+541
-215
lines changed

.github/workflows/deprecate-tag.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/deprecate-version.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
uses: ./packages/actions/src/pnpmCache
4949

5050
- name: Deprecate
51-
run: pnpm exec npm-deprecate --name "${{inputs.version}}" --message "${{inputs.message || 'This version is deprecated. Please use a newer version.'}}" --package ${{inputs.package}}
52-
env:
53-
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
51+
uses: ./packages/actions/src/deprecateVersion
52+
with:
53+
package: ${{ inputs.package }}
54+
version: ${{ inputs.version }}
55+
message: ${{ inputs.message }}
56+
node-auth-token: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/remove-tag.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Remove tag
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag:
6+
description: The tag to remove
7+
required: true
8+
type: string
9+
message:
10+
description: Deprecation message
11+
required: false
12+
type: string
13+
jobs:
14+
removal:
15+
runs-on: ubuntu-latest
16+
if: github.repository_owner == 'discordjs'
17+
strategy:
18+
matrix:
19+
package:
20+
- '@discordjs/brokers'
21+
- '@discordjs/builders'
22+
- '@discordjs/collection'
23+
- '@discordjs/core'
24+
- 'create-discord-app'
25+
- 'create-discord-bot'
26+
- '@discordjs/formatters'
27+
- 'discord.js'
28+
- '@discordjs/next'
29+
- '@discordjs/proxy'
30+
- '@discordjs/rest'
31+
- '@discordjs/structures'
32+
- '@discordjs/util'
33+
- '@discordjs/voice'
34+
- '@discordjs/ws'
35+
fail-fast: false
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v5
39+
40+
- name: Install Node.js
41+
uses: actions/setup-node@v6
42+
with:
43+
node-version: 24
44+
registry-url: 'https://registry.npmjs.org'
45+
46+
- name: Install dependencies
47+
uses: ./packages/actions/src/pnpmCache
48+
49+
- name: Remove tag
50+
run: pnpm dist-tag rm "${{ matrix.package }}" "${{ inputs.tag }}"
51+
env:
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
53+
54+
- name: Deprecate version
55+
uses: ./packages/actions/src/deprecateVersion
56+
with:
57+
package: ${{ matrix.package }}
58+
version: '*-${{ inputs.tag }}.*'
59+
message: ${{ inputs.message }}
60+
node-auth-token: ${{ secrets.NPM_PUBLISH_TOKEN }}

apps/guide/content/docs/legacy/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"pages": [
33
"[MessageCircleQuestion][FAQ](/legacy/popular-topics/faq)",
44
"[ArrowDownToLine][Updating to v14](/legacy/additional-info/changes-in-v14)",
5-
"[LibraryBig][Documentation](https://discord.js.org/docs)",
5+
"external:[LibraryBig][Documentation](https://discord.js.org/docs)",
66
"[Info][Introduction](/legacy)",
77
"---Setup---",
88
"preparations",

apps/guide/content/docs/legacy/popular-topics/display-components.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To use the display components, you need to pass the `IsComponentsV2` message fla
2020

2121
## The component `id`
2222

23-
All components can be passed an optional, unique, `id` field holding a 32-bit integer identifier to later identify them in interaction responses. Do not confuse this with the `custom_id` field for interactive components! You can find more information about this [in the discord api documentation](https://discord.com/developers/docs/components/reference#anatomy-of-a-component). Discord will automatically populate the `id` of components that don't have the `id` specified in the payload sequentially starting from `1`. The `id` value `0` is treated as empty. The order components are automatically filled in is an implementation detail and not officially document. If you want to work with the `id` (for example to find and replace the content of a specific component lateron), you should explicitly specify it.
23+
All components can be passed an optional, unique, `id` field holding a 32-bit integer identifier to later identify them in interaction responses. Do not confuse this with the `custom_id` field for interactive components! You can find more information about this [in the discord api documentation](https://discord.com/developers/docs/components/reference#anatomy-of-a-component). Discord will automatically populate the `id` of components that don't have the `id` specified in the payload sequentially starting from `1`. The `id` value `0` is treated as empty. The order components are automatically filled in is an implementation detail and not officially document. If you want to work with the `id` (for example to find and replace the content of a specific component later on), you should explicitly specify it.
2424

2525
In the following sections, we will explain all available display component types in detail and show you some examples on how you can use them.
2626

apps/guide/content/docs/legacy/popular-topics/threads.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const thread = await channel.threads.create({
9393
console.log(`Created thread: ${thread.name}`);
9494
```
9595

96-
They can also be created from an existing message with the `Message#startThread` method, but will be "orphaned" if that message is deleted. The thread is not deleted along with the message and will still be available through the hcannels thread list!
96+
They can also be created from an existing message with the `Message#startThread` method, but will be "orphaned" if that message is deleted. The thread is not deleted along with the message and will still be available through the channels thread list!
9797

9898
```js
9999
// [!code word:startThread]

apps/guide/content/docs/voice/audio-resources.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const resource = createAudioResource('/home/user/voice/music.mp3', {
8181
},
8282
});
8383

84-
// Not recommended - listen to errors from the audio player instead for most usecases!
84+
// Not recommended - listen to errors from the audio player instead for most use cases!
8585
resource.playStream.on('error', (error) => {
8686
console.error('Error:', error.message, 'with track', resource.metadata.title);
8787
});

apps/guide/content/docs/voice/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"title": "Voice",
33
"description": "Working with the voice library",
44
"pages": [
5-
"[LibraryBig][Documentation](https://discord.js.org/docs/packages/voice/main)",
5+
"external:[LibraryBig][Documentation](https://discord.js.org/docs/packages/voice/main)",
66
"---Working with Voice---",
77
"index",
88
"life-cycles",

apps/website/src/components/EntrypointSelect.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
import { Loader2Icon } from 'lucide-react';
44
import { useParams, useRouter } from 'next/navigation';
55
import { Select, SelectList, SelectOption, SelectTrigger } from '@/components/ui/Select';
6+
import type { EntryPoint } from '@/util/fetchEntryPoints';
67
import { parseDocsPathParams } from '@/util/parseDocsPathParams';
78

89
export function EntryPointSelect({
910
entryPoints,
1011
isLoading,
1112
}: {
12-
readonly entryPoints: { readonly entryPoint: string }[];
13+
readonly entryPoints: EntryPoint[];
1314
readonly isLoading: boolean;
1415
}) {
1516
const router = useRouter();

apps/website/src/components/Sidebar.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { VersionSelect } from '@/components/VersionSelect';
1212
import { SidebarHeader as BasSidebarHeader } from '@/components/ui/Sidebar';
1313
import { buttonStyles } from '@/styles/ui/button';
1414
import { PACKAGES_WITH_ENTRY_POINTS } from '@/util/constants';
15+
import type { EntryPoint } from '@/util/fetchEntryPoints';
1516

1617
export function SidebarHeader() {
1718
const params = useParams<{
@@ -21,7 +22,7 @@ export function SidebarHeader() {
2122

2223
const hasEntryPoints = PACKAGES_WITH_ENTRY_POINTS.includes(params.packageName);
2324

24-
const { data: entryPoints, isLoading: isLoadingEntryPoints } = useQuery({
25+
const { data: entryPoints, isLoading: isLoadingEntryPoints } = useQuery<EntryPoint[]>({
2526
queryKey: ['entryPoints', params.packageName, params.version],
2627
queryFn: async () => {
2728
const response = await fetch(`/api/docs/entrypoints?packageName=${params.packageName}&version=${params.version}`);
@@ -43,7 +44,10 @@ export function SidebarHeader() {
4344
<BasSidebarHeader className="bg-[#f3f3f4] p-4 dark:bg-[#121214]">
4445
<div className="flex flex-col gap-2">
4546
<div className="flex place-content-between place-items-center p-1">
46-
<Link className="text-xl font-bold" href={`/docs/packages/${params.packageName}/${params.version}`}>
47+
<Link
48+
className="text-xl font-bold"
49+
href={`/docs/packages/${params.packageName}/${params.version}${hasEntryPoints ? `/${entryPoints?.[0]?.entryPoint ?? ''}` : ''}`}
50+
>
4751
{params.packageName}
4852
</Link>
4953
<div className="flex place-items-center gap-2">

0 commit comments

Comments
 (0)