Skip to content

Commit

Permalink
Merge branch 'main' into feat/application-endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Aug 22, 2023
2 parents 450e819 + f6c7c14 commit 14c4835
Show file tree
Hide file tree
Showing 226 changed files with 3,318 additions and 2,843 deletions.
1 change: 1 addition & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/commitlintrc.json",
"extends": ["@commitlint/config-angular"],
"rules": {
"type-enum": [
Expand Down
11 changes: 0 additions & 11 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
issue-triage:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.1
- uses: github/issue-labeler@v3.2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
configuration-path: .github/issue-labeler.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lighthouse-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- name: Audit production URLs with Lighthouse
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@v9
uses: treosh/lighthouse-ci-action@v10
with:
urls: |
https://discordjs.dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Audit preview URL with Lighthouse
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@v9
uses: treosh/lighthouse-ci-action@v10
with:
urls: |
${{ steps.get_preview_url.outputs.vercel_preview_url }}
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ dist-docs
.vscode
!.vscode/extensions.json
!.vscode/settings.json
!packages/create-discord-bot/template/**/.vscode
.idea
.DS_Store
.turbo
tsconfig.tsbuildinfo
coverage
out
package.tgz

# Deno
deno.lock

# Bun
bun.lockb

# yarn
.pnp.*
Expand Down
3 changes: 2 additions & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "https://json.schemastore.org/lintstagedrc.schema.json",
"*": "prettier --ignore-unknown --write",
"{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx}": "eslint --ext .mjs,.js,.cjs,.ts,.tsx --fix",
"{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx}": "eslint --fix",
"src/**.ts": "vitest related --run --config ../../vitest.config.ts"
}
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/prettierrc.json",
"printWidth": 120,
"useTabs": true,
"singleQuote": true,
Expand Down
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"eslint.workingDirectories": [{ "pattern": "./apps/*" }, { "pattern": "./packages/*" }],
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.experimental.useFlatConfig": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
Expand All @@ -14,5 +14,9 @@
"files.insertFinalNewline": true,
"files.eol": "\n",
"npm.packageManager": "yarn",
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"deno.enablePaths": ["./packages/create-discord-bot/template/Deno"],
"deno.lint": true,
"deno.unstable": false,
"deno.config": "./packages/create-discord-bot/template/Deno/deno.jsonc"
}
1 change: 1 addition & 0 deletions apps/guide/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
METADATA_BASE_URL=http://localhost:3000
1 change: 0 additions & 1 deletion apps/guide/.eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions apps/guide/.eslintrc.json

This file was deleted.

File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion apps/guide/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ module.exports = withBundleAnalyzer(
withContentlayer({
reactStrictMode: true,
experimental: {
appDir: true,
typedRoutes: true,
},
images: {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;",
},
poweredByHeader: false,
}),
);
37 changes: 19 additions & 18 deletions apps/guide/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@discordjs/guide",
"version": "0.1.0",
"description": "Imagine a guide... that explores the many possibilities for your discord.js bot",
Expand All @@ -16,8 +17,8 @@
"dev:next": "next dev",
"dev:css": "yarn generate:css --watch",
"generate:css": "unocss 'src/**/*.tsx' 'contentlayer.config.ts' '../../packages/ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../../unocss.config.ts",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --format=pretty",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix --format=pretty",
"lint": "prettier --check . && cross-env TIMING=1 eslint --format=pretty src",
"format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src",
"fmt": "yarn format"
},
"type": "commonjs",
Expand Down Expand Up @@ -52,9 +53,9 @@
"@vercel/og": "^0.5.11",
"ariakit": "^2.0.0-next.44",
"cmdk": "^0.2.0",
"contentlayer": "0.3.1",
"next": "^13.4.17",
"next-contentlayer": "0.3.1",
"contentlayer": "^0.3.4",
"next": "^13.4.19",
"next-contentlayer": "^0.3.4",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-custom-scrollbars-2": "^4.5.0",
Expand All @@ -65,33 +66,33 @@
"sharp": "^0.32.5"
},
"devDependencies": {
"@next/bundle-analyzer": "^13.4.17",
"@next/bundle-analyzer": "^13.4.19",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/html-escaper": "^3.0.0",
"@types/node": "18.17.5",
"@types/node": "18.17.6",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@unocss/cli": "^0.55.1",
"@unocss/eslint-config": "^0.55.1",
"@unocss/reset": "^0.55.1",
"@unocss/cli": "^0.55.2",
"@unocss/eslint-plugin": "^0.55.2",
"@unocss/reset": "^0.55.2",
"@vitejs/plugin-react": "^4.0.4",
"@vitest/coverage-v8": "^0.34.2",
"concurrently": "^8.2.0",
"concurrently": "^8.2.1",
"cross-env": "^7.0.3",
"eslint": "^8.47.0",
"eslint-config-neon": "^0.1.47",
"eslint-config-neon": "^0.1.54",
"eslint-formatter-pretty": "^5.0.0",
"happy-dom": "^10.10.2",
"happy-dom": "^10.10.4",
"hast-util-to-string": "^2.0.0",
"hastscript": "^7.2.0",
"hastscript": "^8.0.0",
"html-escaper": "^3.0.3",
"lighthouse": "^10.4.0",
"prettier": "^2.8.8",
"lighthouse": "^11.0.0",
"prettier": "^3.0.2",
"turbo": "^1.10.12",
"typescript": "^5.1.6",
"unocss": "^0.55.1",
"vercel": "^31.4.0",
"unocss": "^0.55.2",
"vercel": "^32.0.0",
"vitest": "^0.34.2"
},
"engines": {
Expand Down
3 changes: 3 additions & 0 deletions apps/guide/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import '~/styles/ch.css';
import '~/styles/main.css';

export const metadata: Metadata = {
metadataBase: new URL(
process.env.METADATA_BASE_URL ? process.env.METADATA_BASE_URL : `http://localhost:${process.env.PORT ?? 3_000}`,
),
title: 'discord.js',
description: DESCRIPTION,
viewport: {
Expand Down
3 changes: 2 additions & 1 deletion apps/guide/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { VscGithubInverted } from '@react-icons/all-files/vsc/VscGithubInverted';
import { VscMenu } from '@react-icons/all-files/vsc/VscMenu';
import { Button } from 'ariakit/button';
import type { Route } from 'next';
import dynamic from 'next/dynamic';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
Expand All @@ -23,7 +24,7 @@ export default function Header() {
.map((path, idx, original) => (
<Link
className="rounded outline-none hover:underline focus:ring focus:ring-width-2 focus:ring-blurple"
href={`/${original.slice(0, idx + 1).join('/')}`}
href={`/${original.slice(0, idx + 1).join('/')}` as Route}
key={`${path}-${idx}`}
>
{path}
Expand Down
3 changes: 2 additions & 1 deletion apps/guide/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';

import { allContents } from 'contentlayer/generated';
import type { Route } from 'next';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { Section } from './Section';
Expand Down Expand Up @@ -45,7 +46,7 @@ export function Sidebar() {
? 'bg-blurple text-white'
: 'dark:hover:bg-dark-200 dark:active:bg-dark-100 hover:bg-light-700 active:bg-light-800'
}`}
href={member.href}
href={member.href as Route}
key={`${member.title}-${index}`}
onClick={() => setOpened(false)}
title={member.title}
Expand Down
1 change: 1 addition & 0 deletions apps/website/.env.development
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
NEXT_PUBLIC_LOCAL_DEV=true
METADATA_BASE_URL=http://localhost:3000
1 change: 0 additions & 1 deletion apps/website/.eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions apps/website/.eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion apps/website/.lintstagedrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions apps/website/.lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../../.lintstagedrc.json' assert { type: 'json' };
1 change: 0 additions & 1 deletion apps/website/.prettierrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions apps/website/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../../.prettierrc.json' assert { type: 'json' };
3 changes: 2 additions & 1 deletion apps/website/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ const withBundleAnalyzer = bundleAnalyzer({
export default withBundleAnalyzer({
reactStrictMode: true,
experimental: {
appDir: true,
typedRoutes: true,
serverComponentsExternalPackages: ['@microsoft/api-extractor-model', 'jju'],
},
images: {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;",
},
poweredByHeader: false,
async redirects() {
return [
{
Expand Down
35 changes: 18 additions & 17 deletions apps/website/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@discordjs/website",
"version": "0.1.0",
"description": "Imagine a bot... the most popular way to build discord bots",
Expand All @@ -18,8 +19,8 @@
"dev:next": "next dev",
"dev:css": "yarn generate:css --watch",
"generate:css": "unocss 'src/**/*.tsx' '../../packages/ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../../unocss.config.ts",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --format=pretty",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix --format=pretty",
"lint": "prettier --check . && cross-env TIMING=1 eslint --format=pretty src",
"format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src",
"fmt": "yarn format"
},
"type": "module",
Expand Down Expand Up @@ -49,9 +50,9 @@
"@discordjs/api-extractor-utils": "workspace:^",
"@discordjs/scripts": "workspace:^",
"@discordjs/ui": "workspace:^",
"@microsoft/api-extractor-model": "7.27.6",
"@microsoft/tsdoc": "0.14.2",
"@planetscale/database": "1.7.0",
"@microsoft/api-extractor-model": "^7.27.6",
"@microsoft/tsdoc": "^0.14.2",
"@planetscale/database": "^1.11.0",
"@react-icons/all-files": "^4.1.0",
"@vercel/analytics": "^1.0.2",
"@vercel/edge-config": "^0.2.1",
Expand All @@ -61,7 +62,7 @@
"class-variance-authority": "^0.7.0",
"cmdk": "^0.2.0",
"meilisearch": "^0.34.1",
"next": "^13.4.17",
"next": "^13.4.19",
"next-mdx-remote": "^4.4.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
Expand All @@ -75,29 +76,29 @@
"swr": "^2.2.1"
},
"devDependencies": {
"@next/bundle-analyzer": "^13.4.17",
"@next/bundle-analyzer": "^13.4.19",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/node": "18.17.5",
"@types/node": "18.17.6",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@unocss/cli": "^0.55.1",
"@unocss/eslint-config": "^0.55.1",
"@unocss/reset": "^0.55.1",
"@unocss/cli": "^0.55.2",
"@unocss/eslint-plugin": "^0.55.2",
"@unocss/reset": "^0.55.2",
"@vitejs/plugin-react": "^4.0.4",
"@vitest/coverage-v8": "^0.34.2",
"concurrently": "^8.2.0",
"concurrently": "^8.2.1",
"cpy-cli": "^5.0.0",
"cross-env": "^7.0.3",
"eslint": "^8.47.0",
"eslint-config-neon": "^0.1.47",
"eslint-config-neon": "^0.1.54",
"eslint-formatter-pretty": "^5.0.0",
"happy-dom": "^10.10.2",
"lighthouse": "^10.4.0",
"prettier": "^2.8.8",
"happy-dom": "^10.10.4",
"lighthouse": "^11.0.0",
"prettier": "^3.0.2",
"turbo": "^1.10.12",
"typescript": "^5.1.6",
"vercel": "^31.4.0",
"vercel": "^32.0.0",
"vitest": "^0.34.2"
},
"engines": {
Expand Down
Loading

0 comments on commit 14c4835

Please sign in to comment.