Skip to content

Commit

Permalink
Merge branch 'main' into feat/nsfw-commands
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Dec 16, 2022
2 parents 1c3672c + 6540914 commit 928d187
Show file tree
Hide file tree
Showing 196 changed files with 6,917 additions and 2,360 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ body:
- brokers
- builders
- collection
- rest
- core
- formatters
- proxy
- proxy-container
- rest
- voice
- ws
validations:
Expand Down
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ body:
label: Which package is the feature request for?
options:
- discord.js
- brokers
- builders
- collection
- rest
- core
- formatters
- proxy
- proxy-container
- rest
- voice
- ws
validations:
Expand Down
13 changes: 9 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ apps:guide:
apps:website:
- apps/website/*
- apps/website/**/*

packages:brokers:
- packages/brokers/*
- packages/brokers/**/*
Expand All @@ -14,12 +13,18 @@ packages:builders:
packages:collection:
- packages/collection/*
- packages/collection/**/*
packages:core:
- packages/core/*
- packages/core/**/*
packages:discord.js:
- packages/discord.js/*
- packages/discord.js/**/*
packages:docgen:
- packages/docgen/*
- packages/docgen/**/*
packages:formatters:
- packages/formatters/*
- packages/formatters/**/*
packages:proxy:
- packages/proxy/*
- packages/proxy/**/*
Expand All @@ -29,9 +34,9 @@ packages:proxy-container:
packages:rest:
- packages/rest/*
- packages/rest/**/*
packages/ui:
- packages:ui/*
- packages:ui/**/*
packages:ui:
- packages/ui/*
- packages/ui/**/*
packages:util:
- packages/util/*
- packages/util/**/*
Expand Down
12 changes: 8 additions & 4 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
color: 0075ca
- name: dependencies
color: 276bd1
- name: discussion
color: b6b1f9
- name: discord
color: '5663e9'
- name: discussion
color: b6b1f9
- name: documentation
color: 0075ca
- name: duplicate
Expand All @@ -40,12 +40,12 @@
color: 4b1f8e
- name: help wanted
color: '008672'
- name: interactions
color: 80c042
- name: in progress
color: ffccd7
- name: in review
color: aed5fc
- name: interactions
color: 80c042
- name: invalid
color: e4e669
- name: need repro
Expand All @@ -56,10 +56,14 @@
color: fbca04
- name: packages:collection
color: fbca04
- name: packages:core
color: fbca04
- name: packages:discord.js
color: fbca04
- name: packages:docgen
color: fbca04
- name: packages:formatters
color: fbca04
- name: packages:proxy
color: fbca04
- name: packages:proxy-container
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,20 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
package: ['brokers', 'builders', 'collection', 'discord.js', 'proxy', 'rest', 'util', 'voice', 'ws']
package:
[
'brokers',
'builders',
'collection',
'core',
'discord.js',
'formatters',
'proxy',
'rest',
'util',
'voice',
'ws',
]
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
Expand Down Expand Up @@ -111,7 +124,7 @@ jobs:
id: extract-tag
uses: ./packages/actions/src/formatTag
with:
tag: ${{ env.GITHUB_REF_NAME }}
tag: ${{ github.ref_name }}

- name: Move docs to correct directory
if: ${{ github.ref_type == 'tag' && matrix.package == steps.extract-tag.outputs.package }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-auto-deprecate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
uses: ./packages/actions/src/yarnCache

- name: Deprecate versions
run: 'yarn npm-deprecate --name "*dev*" --package @discordjs/brokers @discordjs/builders @discordjs/collection discord.js @discordjs/proxy @discordjs/rest @discordjs/util @discordjs/voice @discordjs/ws'
run: 'yarn npm-deprecate --name "*dev*" --package @discordjs/brokers @discordjs/builders @discordjs/collection @discordjs/core @discordjs/formatters discord.js @discordjs/proxy @discordjs/rest @discordjs/util @discordjs/voice @discordjs/ws'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
folder: 'builders'
- package: '@discordjs/collection'
folder: 'collection'
- package: '@discordjs/core'
folder: 'core'
- package: '@discordjs/formatters'
folder: 'formatters'
- package: 'discord.js'
folder: 'discord.js'
- package: '@discordjs/proxy'
Expand Down
9 changes: 8 additions & 1 deletion apps/guide/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
module.exports = require('../../.prettierrc.json');
module.exports = {
...require('../../.prettierrc.json'),
plugins: [
'prettier-plugin-astro',
'prettier-plugin-tailwindcss', // MUST come last
],
pluginSearchDirs: false,
};
61 changes: 31 additions & 30 deletions apps/guide/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,37 @@ const rootDir = new URL('../../', import.meta.url);
export default defineConfig({
integrations: [
react(),
mdx(),
mdx({
remarkPlugins: [[remarkCodeHike, { autoImport: false, theme: shikiThemeDarkPlus, lineNumbers: true }]],
rehypePlugins: [
rehypeSlug,
[
rehypeAutolinkHeadings,
{
properties: {
class:
'relative inline-flex w-6 h-6 place-items-center place-content-center outline-0 text-black dark:text-white ml-2',
},
behavior: 'after',
group: ({ tagName }: { tagName: string }) =>
h('div', {
class: `[&>*]:inline-block [&>h1]:m-0 [&>h2]:m-0 [&>h3]:m-0 [&>h4]:m-0 level-${tagName}`,
tabIndex: -1,
}),
content: (heading: Node) => [
h(
`span.anchor-icon`,
{
ariaHidden: 'true',
},
LinkIcon,
),
createSROnlyLabel(toString(heading)),
],
},
],
],
}),
image({
serviceEntryPoint: '@astrojs/image/sharp',
}),
Expand All @@ -62,35 +92,6 @@ export default defineConfig({
compress(),
],
markdown: {
remarkPlugins: [[remarkCodeHike, { autoImport: false, theme: shikiThemeDarkPlus, lineNumbers: true }]],
rehypePlugins: [
rehypeSlug,
[
rehypeAutolinkHeadings,
{
properties: {
class:
'relative inline-flex w-6 h-6 place-items-center place-content-center outline-0 text-black dark:text-white ml-2',
},
behavior: 'after',
group: ({ tagName }: { tagName: string }) =>
h('div', {
class: `[&>*]:inline-block [&>h1]:m-0 [&>h2]:m-0 [&>h3]:m-0 [&>h4]:m-0 level-${tagName}`,
tabIndex: -1,
}),
content: (heading: Node) => [
h(
`span.anchor-icon`,
{
ariaHidden: 'true',
},
LinkIcon,
),
createSROnlyLabel(toString(heading)),
],
},
],
],
extendDefaultPlugins: true,
syntaxHighlight: false,
},
Expand Down
34 changes: 16 additions & 18 deletions apps/guide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,33 @@
},
"homepage": "https://discord.js.org",
"dependencies": {
"@astrojs/image": "^0.11.6",
"@astrojs/mdx": "^0.12.0",
"@astrojs/react": "^1.2.2",
"@code-hike/mdx": "^0.7.4",
"@discordjs/ui": "workspace:^",
"ariakit": "^2.0.0-next.41",
"cmdk": "^0.1.20",
"meilisearch": "^0.29.1",
"react": "^18.2.0",
"react-custom-scrollbars-2": "^4.5.0",
"react-dom": "^18.2.0",
"react-icons": "^4.6.0",
"react-use": "^17.4.0",
"sharp": "^0.31.2",
"shiki": "^0.11.1"
"react-icons": "^4.7.1",
"react-use": "^17.4.0"
},
"devDependencies": {
"@astrojs/image": "^0.12.0",
"@astrojs/mdx": "^0.12.0",
"@astrojs/prefetch": "^0.1.1",
"@astrojs/react": "^1.2.2",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/node": "16.18.3",
"@types/node": "16.18.4",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.9",
"@types/react-syntax-highlighter": "^15.5.5",
"@unocss/cli": "^0.46.5",
"@unocss/reset": "^0.46.5",
"@unocss/cli": "^0.47.5",
"@unocss/reset": "^0.47.5",
"@vitejs/plugin-react": "^2.2.0",
"@vitest/coverage-c8": "^0.25.3",
"astro": "^1.6.11",
"astro-compress": "^1.1.10",
"astro-critters": "^1.1.10",
"astro": "^1.6.12",
"astro-compress": "^1.1.15",
"astro-critters": "^1.1.15",
"cross-env": "^7.0.3",
"eslint": "^8.28.0",
"eslint-config-neon": "^0.1.40",
Expand All @@ -77,12 +73,14 @@
"html-escaper": "^3.0.3",
"prettier": "^2.8.0",
"prettier-plugin-astro": "^0.7.0",
"prettier-plugin-tailwindcss": "^0.1.13",
"prettier-plugin-tailwindcss": "^0.2.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
"sharp": "^0.31.2",
"shiki": "^0.11.1",
"typescript": "^4.9.3",
"unocss": "^0.46.5",
"vercel": "^28.5.6",
"unocss": "^0.47.5",
"vercel": "^28.7.0",
"vitest": "^0.25.3"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions apps/guide/src/components/SidebarLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const pageNext = curCategoryPages![curCategoryIndex + 1];
/>
)
}
<div class="justify-self-end self-end ml-auto">
<div class="ml-auto self-end justify-self-end">
{
pageNext && (
<PageButton
Expand All @@ -107,7 +107,7 @@ const pageNext = curCategoryPages![curCategoryIndex + 1];

<div class="h-76 md:h-52"></div>
<footer
class="dark:bg-dark-600 h-76 lg:pl-84 bg-light-600 fixed bottom-0 left-0 right-0 md:h-52 md:pl-4 md:pr-16 xl:pr-76"
class="dark:bg-dark-600 h-76 lg:pl-84 bg-light-600 xl:pr-76 fixed bottom-0 left-0 right-0 md:h-52 md:pl-4 md:pr-16"
>
<div class="mx-auto flex max-w-6xl flex-col place-items-center gap-12 pt-12 lg:place-content-center">
<div class="flex w-full flex-col place-content-between place-items-center gap-12 md:flex-row md:gap-0">
Expand Down
2 changes: 2 additions & 0 deletions apps/website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ typings/
build/
src/styles/unocss.css
.next/
src/assets/readme/

# Miscellaneous
.tmp/
coverage/
.vercel
public/searchIndex
.vscode
8 changes: 7 additions & 1 deletion apps/website/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
module.exports = require('../../.prettierrc.json');
module.exports = {
...require('../../.prettierrc.json'),
plugins: [
'prettier-plugin-tailwindcss', // MUST come last
],
pluginSearchDirs: false,
};
15 changes: 13 additions & 2 deletions apps/website/next.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
/* eslint-disable tsdoc/syntax */
import { fileURLToPath } from 'node:url';
import bundleAnalyzer from '@next/bundle-analyzer';

const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});

/**
* @type {import('next').NextConfig}
*/
export default {
export default withBundleAnalyzer({
reactStrictMode: true,
eslint: {
ignoreDuringBuilds: true,
},
// Until Next.js fixes their type issues
typescript: {
ignoreBuildErrors: true,
},
cleanDistDir: true,
outputFileTracing: true,
experimental: {
appDir: true,
serverComponentsExternalPackages: ['@microsoft/api-extractor-model', 'jju', 'shiki'],
outputFileTracingRoot: fileURLToPath(new URL('../../', import.meta.url)),
fallbackNodePolyfills: false,
},
images: {
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
};
});

0 comments on commit 928d187

Please sign in to comment.