Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-Message#bulkDeletable
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Nov 6, 2022
2 parents aee0dc9 + 68c9cb3 commit d265b1b
Show file tree
Hide file tree
Showing 81 changed files with 2,855 additions and 1,504 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install dependencies
run: yarn --immutable
uses: ./packages/actions/src/yarnCache

- name: Build dependencies
run: yarn build
Expand Down Expand Up @@ -81,10 +80,9 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install dependencies
run: yarn --immutable
uses: ./packages/actions/src/yarnCache

- name: Build actions
run: yarn workspace @discordjs/actions build
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/npm-auto-deprecate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install dependencies
run: yarn --immutable
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'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ jobs:
with:
node-version: 16
registry-url: https://registry.npmjs.org/
cache: 'yarn'

- name: Install dependencies
run: yarn --immutable
uses: ./packages/actions/src/yarnCache

- name: Build dependencies
run: yarn build
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable
uses: ./packages/actions/src/yarnCache

- name: Build dependencies
run: yarn build
Expand Down
32 changes: 16 additions & 16 deletions apps/guide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
},
"homepage": "https://discord.js.org",
"dependencies": {
"@astrojs/image": "^0.9.3",
"@astrojs/image": "^0.10.0",
"@astrojs/mdx": "^0.11.4",
"@astrojs/react": "^1.2.0",
"@astrojs/react": "^1.2.1",
"@code-hike/mdx": "^0.7.4",
"@discordjs/ui": "workspace:^",
"ariakit": "^2.0.0-next.41",
Expand All @@ -45,43 +45,43 @@
"react": "^17.0.2",
"react-custom-scrollbars-2": "^4.5.0",
"react-dom": "^17.0.2",
"react-icons": "^4.4.0",
"react-icons": "^4.6.0",
"react-use": "^17.4.0",
"sharp": "^0.31.1",
"shiki": "^0.11.1"
},
"devDependencies": {
"@astrojs/prefetch": "^0.0.8",
"@astrojs/prefetch": "^0.1.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/node": "16.11.64",
"@types/node": "16.11.68",
"@types/react": "^17.0.50",
"@types/react-dom": "^17.0.17",
"@types/react-syntax-highlighter": "^15.5.5",
"@unocss/cli": "^0.45.29",
"@unocss/reset": "^0.45.29",
"@unocss/cli": "^0.45.30",
"@unocss/reset": "^0.45.30",
"@vitejs/plugin-react": "^2.1.0",
"@vitest/coverage-c8": "^0.24.1",
"astro": "^1.4.7",
"astro-compress": "^1.0.11",
"@vitest/coverage-c8": "^0.24.3",
"astro": "^1.5.2",
"astro-compress": "^1.0.12",
"astro-critters": "^1.0.5",
"cross-env": "^7.0.3",
"eslint": "^8.25.0",
"eslint-config-neon": "^0.1.38",
"eslint-config-neon": "^0.1.39",
"eslint-formatter-pretty": "^4.1.0",
"happy-dom": "^7.5.6",
"happy-dom": "^7.6.0",
"hast-util-to-string": "^2.0.0",
"hastscript": "^7.1.0",
"html-escaper": "^3.0.3",
"prettier": "^2.7.1",
"prettier-plugin-astro": "^0.5.5",
"prettier-plugin-astro": "^0.6.0",
"prettier-plugin-tailwindcss": "^0.1.13",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.0.1",
"typescript": "^4.8.4",
"unocss": "^0.45.29",
"vercel": "^28.4.9",
"vitest": "^0.24.1"
"unocss": "^0.45.30",
"vercel": "^28.4.12",
"vitest": "^0.24.3"
},
"engines": {
"node": ">=16.9.0"
Expand Down
24 changes: 12 additions & 12 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@discordjs/ui": "workspace:^",
"@microsoft/api-extractor-model": "7.24.0",
"@microsoft/tsdoc": "0.14.1",
"@vercel/og": "^0.0.15",
"@vercel/og": "^0.0.19",
"@vscode/codicons": "^0.0.32",
"ariakit": "^2.0.0-next.41",
"cmdk": "^0.1.20",
Expand All @@ -57,11 +57,11 @@
"react": "^18.2.0",
"react-custom-scrollbars-2": "^4.5.0",
"react-dom": "^18.2.0",
"react-icons": "^4.4.0",
"react-icons": "^4.6.0",
"react-syntax-highlighter": "^15.5.0",
"react-use": "^17.4.0",
"rehype-ignore": "^1.0.1",
"rehype-pretty-code": "^0.3.2",
"rehype-pretty-code": "^0.4.0",
"rehype-raw": "^6.1.1",
"rehype-slug": "^5.0.1",
"remark-gfm": "^3.0.1",
Expand All @@ -72,26 +72,26 @@
"devDependencies": {
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/node": "16.11.64",
"@types/node": "16.11.68",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@types/react-syntax-highlighter": "^15.5.5",
"@unocss/cli": "^0.45.29",
"@unocss/reset": "^0.45.29",
"@unocss/cli": "^0.45.30",
"@unocss/reset": "^0.45.30",
"@vitejs/plugin-react": "^2.1.0",
"@vitest/coverage-c8": "^0.24.1",
"@vitest/coverage-c8": "^0.24.3",
"concurrently": "^7.4.0",
"cross-env": "^7.0.3",
"eslint": "^8.25.0",
"eslint-config-neon": "^0.1.38",
"eslint-config-neon": "^0.1.39",
"eslint-formatter-pretty": "^4.1.0",
"happy-dom": "^7.5.6",
"happy-dom": "^7.6.0",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.13",
"typescript": "^4.8.4",
"unocss": "^0.45.29",
"vercel": "^28.4.9",
"vitest": "^0.24.1"
"unocss": "^0.45.30",
"vercel": "^28.4.12",
"vitest": "^0.24.3"
},
"engines": {
"node": ">=16.9.0"
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/components/CodeListing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function CodeListing({
}>) {
return (
<div className="scroll-mt-30 flex flex-col gap-4" id={name}>
<div className="md:-ml-8.5 flex flex-col gap-0.5 md:flex-row md:place-items-center md:gap-2">
<div className="md:-ml-8.5 flex flex-col gap-2 md:flex-row md:place-items-center">
<a
aria-label="Anchor"
className="focus:ring-width-2 focus:ring-blurple hidden rounded outline-0 focus:ring md:inline-block"
Expand Down Expand Up @@ -73,7 +73,7 @@ export function CodeListing({
</div>
</div>
{summary || inheritanceData ? (
<div className="flex flex-col gap-4">
<div className="mb-4 flex flex-col gap-4">
{deprecation ? <TSDoc node={deprecation} /> : null}
{summary ? <TSDoc node={summary} /> : null}
{comment ? <TSDoc node={comment} /> : null}
Expand Down
17 changes: 10 additions & 7 deletions apps/website/src/components/model/Enum.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ApiEnumJSON } from '@discordjs/api-extractor-utils';
import { Section } from '@discordjs/ui';
import { Fragment } from 'react';
import { VscSymbolEnumMember } from 'react-icons/vsc';
import { useMedia } from 'react-use';
import { CodeListing, CodeListingSeparatorType } from '../CodeListing';
Expand All @@ -13,13 +14,15 @@ export function Enum({ data }: { data: ApiEnumJSON }) {
<Section dense={matches} icon={<VscSymbolEnumMember size={20} />} padded title="Members">
<div className="flex flex-col gap-4">
{data.members.map((member) => (
<CodeListing
key={member.name}
name={member.name}
separator={CodeListingSeparatorType.Value}
summary={member.summary}
typeTokens={member.initializerTokens}
/>
<Fragment key={member.name}>
<CodeListing
name={member.name}
separator={CodeListingSeparatorType.Value}
summary={member.summary}
typeTokens={member.initializerTokens}
/>
<div className="border-light-900 dark:border-dark-100 -mx-8 border-t-2" />
</Fragment>
))}
</div>
</Section>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
"husky": "^8.0.1",
"is-ci": "^3.0.1",
"lint-staged": "^13.0.3",
"tsup": "^6.2.3",
"tsup": "^6.3.0",
"turbo": "^1.5.6",
"typescript": "^4.8.4",
"unocss": "^0.45.29",
"vitest": "^0.24.1"
"unocss": "^0.45.30",
"vitest": "^0.24.3"
},
"resolutions": {
"@microsoft/tsdoc-config": "patch:@microsoft/tsdoc-config@npm:0.16.1#.yarn/patches/@microsoft-tsdoc-config-npm-0.16.1-81031b1bbf.patch"
Expand Down
10 changes: 5 additions & 5 deletions packages/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
"tslib": "^2.4.0"
},
"devDependencies": {
"@types/node": "16.11.64",
"@vitest/coverage-c8": "^0.24.1",
"@types/node": "16.11.68",
"@vitest/coverage-c8": "^0.24.3",
"cross-env": "^7.0.3",
"eslint": "^8.25.0",
"eslint-config-neon": "^0.1.38",
"eslint-config-neon": "^0.1.39",
"eslint-formatter-pretty": "^4.1.0",
"prettier": "^2.7.1",
"tsup": "^6.2.3",
"tsup": "^6.3.0",
"typescript": "^4.8.4",
"vitest": "^0.24.1"
"vitest": "^0.24.3"
},
"engines": {
"node": ">=16.9.0"
Expand Down
35 changes: 35 additions & 0 deletions packages/actions/src/yarnCache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'yarn install'
description: 'Run yarn install with node_modules linker and cache enabled'
runs:
using: 'composite'
steps:
- name: Expose yarn config as "$GITHUB_OUTPUT"
id: yarn-config
shell: bash
run: |
echo "CACHE_FOLDER=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Restore yarn cache
uses: actions/cache@v3
id: yarn-download-cache
with:
path: ${{ steps.yarn-config.outputs.CACHE_FOLDER }}
key: yarn-download-cache-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-download-cache-
- name: Restore yarn install state
id: yarn-install-state-cache
uses: actions/cache@v3
with:
path: .yarn/ci-cache/
key: ${{ runner.os }}-yarn-install-state-cache-${{ hashFiles('yarn.lock', '.yarnrc.yml') }}

- name: Install dependencies
shell: bash
run: |
yarn install --immutable --inline-builds
env:
YARN_ENABLE_GLOBAL_CACHE: 'false'
YARN_NM_MODE: 'hardlinks-local'
YARN_INSTALL_STATE_PATH: .yarn/ci-cache/install-state.gz
6 changes: 3 additions & 3 deletions packages/api-extractor-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
"@microsoft/tsdoc": "0.14.1"
},
"devDependencies": {
"@types/node": "16.11.64",
"@types/node": "16.11.68",
"cross-env": "^7.0.3",
"eslint": "^8.25.0",
"eslint-config-neon": "^0.1.38",
"eslint-config-neon": "^0.1.39",
"eslint-formatter-pretty": "^4.1.0",
"prettier": "^2.7.1",
"tsup": "^6.2.3",
"tsup": "^6.3.0",
"typescript": "^4.8.4"
},
"engines": {
Expand Down
6 changes: 6 additions & 0 deletions packages/brokers/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import type Redis from 'ioredis';
import { test, expect, vi } from 'vitest';
import { PubSubRedisBroker } from '../src/index.js';

vi.mock('node:fs', () => {
return {
readFileSync: vi.fn(),
};
});

const mockRedisClient = {
defineCommand: vi.fn(),
xadd: vi.fn(),
Expand Down
15 changes: 8 additions & 7 deletions packages/brokers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"test": "__tests__"
},
"files": [
"dist"
"dist",
"scripts"
],
"contributors": [
"Crawl <[email protected]>",
Expand Down Expand Up @@ -61,17 +62,17 @@
},
"devDependencies": {
"@favware/cliff-jumper": "^1.8.8",
"@microsoft/api-extractor": "^7.32.1",
"@types/node": "^16.11.52",
"@vitest/coverage-c8": "^0.22.1",
"@microsoft/api-extractor": "^7.33.4",
"@types/node": "^16.11.68",
"@vitest/coverage-c8": "^0.24.3",
"cross-env": "^7.0.3",
"eslint": "^8.25.0",
"eslint-config-neon": "^0.1.38",
"eslint-config-neon": "^0.1.39",
"eslint-formatter-pretty": "^4.1.0",
"prettier": "^2.7.1",
"tsup": "^6.2.3",
"tsup": "^6.3.0",
"typescript": "^4.8.4",
"vitest": "^0.22.1"
"vitest": "^0.24.3"
},
"engines": {
"node": ">=16.9.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/brokers/src/brokers/redis/BaseRedis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export abstract class BaseRedisBroker<TEvents extends Record<string, any>>
this.options = { ...DefaultBrokerOptions, ...options };
options.redisClient.defineCommand('xcleangroup', {
numberOfKeys: 1,
lua: readFileSync(resolve(__dirname, '..', '..', '..', 'scripts', 'xcleangroup.lua'), 'utf8'),
lua: readFileSync(resolve(__dirname, '..', 'scripts', 'xcleangroup.lua'), 'utf8'),
});
this.streamReadClient = options.redisClient.duplicate();
}
Expand Down
Loading

0 comments on commit d265b1b

Please sign in to comment.