diff --git a/.commitlintrc.json b/.commitlintrc.json index 4759c167f..b24a8997a 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/commitlintrc.json", "extends": ["@commitlint/config-angular"], "rules": { "type-enum": [ diff --git a/.eslintrc.json b/.eslintrc.json index e29c4c5bd..eb9fdb91c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "root": true, "extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"], "parserOptions": { diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml index ed73cb52d..a684a2954 100644 --- a/.github/workflows/issue-triage.yml +++ b/.github/workflows/issue-triage.yml @@ -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 diff --git a/.github/workflows/lighthouse-main.yml b/.github/workflows/lighthouse-main.yml index 4c1e6c089..1dc173b3f 100644 --- a/.github/workflows/lighthouse-main.yml +++ b/.github/workflows/lighthouse-main.yml @@ -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 diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index 8651f2527..864691f92 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -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 }} diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 4134de919..95a4d00b4 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,4 +1,5 @@ { + "$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/**.ts": "vitest related --run --config ../../vitest.config.ts" diff --git a/.prettierrc.json b/.prettierrc.json index eba3f4077..7920c42b8 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/prettierrc.json", "printWidth": 120, "useTabs": true, "singleQuote": true, diff --git a/apps/guide/.eslintrc.json b/apps/guide/.eslintrc.json index 612db2721..b0c266e6c 100644 --- a/apps/guide/.eslintrc.json +++ b/apps/guide/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": ["../../.eslintrc.json", "neon/react", "neon/next", "neon/edge", "@unocss", "neon/prettier"], "settings": { "react": { diff --git a/apps/guide/package.json b/apps/guide/package.json index da7d2dd9a..420aba21c 100644 --- a/apps/guide/package.json +++ b/apps/guide/package.json @@ -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", diff --git a/apps/website/.eslintrc.json b/apps/website/.eslintrc.json index 612db2721..b0c266e6c 100644 --- a/apps/website/.eslintrc.json +++ b/apps/website/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": ["../../.eslintrc.json", "neon/react", "neon/next", "neon/edge", "@unocss", "neon/prettier"], "settings": { "react": { diff --git a/apps/website/package.json b/apps/website/package.json index d9601b221..6286e4075 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -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", diff --git a/package.json b/package.json index 8ff7054d5..6c1f7bb21 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/discord.js", "version": "0.0.0", "description": "A powerful library for interacting with the Discord API", diff --git a/packages/actions/.eslintrc.json b/packages/actions/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/actions/.eslintrc.json +++ b/packages/actions/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/actions/package.json b/packages/actions/package.json index 30292d98a..8f27fe70f 100644 --- a/packages/actions/package.json +++ b/packages/actions/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/actions", "version": "0.1.0", "description": "A set of actions that we use for our workflows", @@ -11,8 +12,6 @@ "fmt": "yarn format" }, "type": "module", - "main": "./dist/index.mjs", - "types": "./dist/index.d.ts", "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/actions/tsconfig.eslint.json b/packages/actions/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/actions/tsconfig.eslint.json +++ b/packages/actions/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/actions/tsconfig.json b/packages/actions/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/actions/tsconfig.json +++ b/packages/actions/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/api-extractor-utils/.eslintrc.json b/packages/api-extractor-utils/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/api-extractor-utils/.eslintrc.json +++ b/packages/api-extractor-utils/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/api-extractor-utils/package.json b/packages/api-extractor-utils/package.json index d62a9d957..1322b414c 100644 --- a/packages/api-extractor-utils/package.json +++ b/packages/api-extractor-utils/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/api-extractor-utils", "version": "1.0.0", "description": "Utilities for api-extractor", @@ -9,6 +10,18 @@ "format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format" }, + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", diff --git a/packages/api-extractor-utils/tsconfig.eslint.json b/packages/api-extractor-utils/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/api-extractor-utils/tsconfig.eslint.json +++ b/packages/api-extractor-utils/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/api-extractor-utils/tsconfig.json b/packages/api-extractor-utils/tsconfig.json index 80a91e8d4..91959f1f9 100644 --- a/packages/api-extractor-utils/tsconfig.json +++ b/packages/api-extractor-utils/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "compilerOptions": { "skipDefaultLibCheck": true, diff --git a/packages/brokers/.eslintrc.json b/packages/brokers/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/brokers/.eslintrc.json +++ b/packages/brokers/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/brokers/package.json b/packages/brokers/package.json index a673d84e8..d6dbb33ba 100644 --- a/packages/brokers/package.json +++ b/packages/brokers/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/brokers", "version": "0.2.2", "description": "Powerful set of message brokers", @@ -14,14 +15,21 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/brokers/*'", "release": "cliff-jumper" }, + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, "main": "./dist/index.js", "module": "./dist/index.mjs", - "typings": "./dist/index.d.ts", - "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" - }, + "types": "./dist/index.d.ts", "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/brokers/tsconfig.docs.json b/packages/brokers/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/brokers/tsconfig.docs.json +++ b/packages/brokers/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/brokers/tsconfig.eslint.json b/packages/brokers/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/brokers/tsconfig.eslint.json +++ b/packages/brokers/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/brokers/tsconfig.json b/packages/brokers/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/brokers/tsconfig.json +++ b/packages/brokers/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/builders/.eslintrc.json b/packages/builders/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/builders/.eslintrc.json +++ b/packages/builders/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/builders/package.json b/packages/builders/package.json index 8acb77880..19335a303 100644 --- a/packages/builders/package.json +++ b/packages/builders/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/builders", "version": "1.6.5", "description": "A set of builders that you can use when creating your bot", @@ -14,14 +15,21 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/builders/*'", "release": "cliff-jumper" }, + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", - "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" - }, "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/builders/tsconfig.docs.json b/packages/builders/tsconfig.docs.json index 4613ccafd..dd0b72f5e 100644 --- a/packages/builders/tsconfig.docs.json +++ b/packages/builders/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/builders/tsconfig.eslint.json b/packages/builders/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/builders/tsconfig.eslint.json +++ b/packages/builders/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/builders/tsconfig.json b/packages/builders/tsconfig.json index 70f2d60b5..b88f66bdd 100644 --- a/packages/builders/tsconfig.json +++ b/packages/builders/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "compilerOptions": { "emitDecoratorMetadata": true, diff --git a/packages/collection/.eslintrc.json b/packages/collection/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/collection/.eslintrc.json +++ b/packages/collection/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/collection/package.json b/packages/collection/package.json index 21cdb8e02..4d28aef5f 100644 --- a/packages/collection/package.json +++ b/packages/collection/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/collection", "version": "1.5.3", "description": "Utility data structure used in discord.js", @@ -14,14 +15,21 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/collection/*'", "release": "cliff-jumper" }, + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", - "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" - }, "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/collection/tsconfig.docs.json b/packages/collection/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/collection/tsconfig.docs.json +++ b/packages/collection/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/collection/tsconfig.eslint.json b/packages/collection/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/collection/tsconfig.eslint.json +++ b/packages/collection/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/collection/tsconfig.json b/packages/collection/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/collection/tsconfig.json +++ b/packages/collection/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/core/.eslintrc.json b/packages/core/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/core/.eslintrc.json +++ b/packages/core/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/core/package.json b/packages/core/package.json index 054a82ade..d91e4bf84 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/core", "version": "1.0.1", "description": "A thinly abstracted wrapper around the rest API, and gateway.", @@ -13,21 +14,31 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/core/*'", "release": "cliff-jumper" }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "typings": "./dist/index.d.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } }, "./http-only": { - "types": "./dist/http-only.d.ts", - "import": "./dist/http-only.mjs", - "require": "./dist/http-only.js" + "require": { + "types": "./dist/http-only.d.ts", + "default": "./dist/http-only.js" + }, + "import": { + "types": "./dist/http-only.d.mts", + "default": "./dist/http-only.mjs" + } } }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/core/tsconfig.docs.json b/packages/core/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/core/tsconfig.docs.json +++ b/packages/core/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/core/tsconfig.eslint.json b/packages/core/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/core/tsconfig.eslint.json +++ b/packages/core/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/create-discord-bot/.eslintrc.json b/packages/create-discord-bot/.eslintrc.json index 584e2cdb1..2d2a61909 100644 --- a/packages/create-discord-bot/.eslintrc.json +++ b/packages/create-discord-bot/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json", "ignorePatterns": ["**/template/Deno/*"] } diff --git a/packages/create-discord-bot/.lintstagedrc.js b/packages/create-discord-bot/.lintstagedrc.cjs similarity index 100% rename from packages/create-discord-bot/.lintstagedrc.js rename to packages/create-discord-bot/.lintstagedrc.cjs diff --git a/packages/create-discord-bot/.prettierrc.js b/packages/create-discord-bot/.prettierrc.cjs similarity index 100% rename from packages/create-discord-bot/.prettierrc.js rename to packages/create-discord-bot/.prettierrc.cjs diff --git a/packages/create-discord-bot/src/index.ts b/packages/create-discord-bot/bin/index.ts similarity index 93% rename from packages/create-discord-bot/src/index.ts rename to packages/create-discord-bot/bin/index.ts index 699924e6b..bbc71f059 100644 --- a/packages/create-discord-bot/src/index.ts +++ b/packages/create-discord-bot/bin/index.ts @@ -7,9 +7,9 @@ import { red, yellow, green } from 'picocolors'; import prompts from 'prompts'; import validateProjectName from 'validate-npm-package-name'; import packageJSON from '../package.json' assert { type: 'json' }; -import { createDiscordBot } from './create-discord-bot.js'; -import { resolvePackageManager } from './helpers/packageManager.js'; -import { DEFAULT_PROJECT_NAME, PACKAGE_MANAGERS } from './util/constants.js'; +import { createDiscordBot } from '../src/create-discord-bot.js'; +import { resolvePackageManager } from '../src/helpers/packageManager.js'; +import { DEFAULT_PROJECT_NAME, PACKAGE_MANAGERS } from '../src/util/constants.js'; let projectDirectory = ''; diff --git a/packages/create-discord-bot/package.json b/packages/create-discord-bot/package.json index 3fed0efca..16f315d74 100644 --- a/packages/create-discord-bot/package.json +++ b/packages/create-discord-bot/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "create-discord-bot", "version": "0.2.1", "description": "A simple way to create a startup Discord bot.", @@ -10,7 +11,8 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/create-discord-bot/*'", "release": "cliff-jumper" }, - "bin": "./dist/index.mjs", + "type": "module", + "bin": "./dist/index.js", "directories": { "lib": "src" }, diff --git a/packages/create-discord-bot/template/Bun/JavaScript/package.json b/packages/create-discord-bot/template/Bun/JavaScript/package.json index bb39d1d75..b93161356 100644 --- a/packages/create-discord-bot/template/Bun/JavaScript/package.json +++ b/packages/create-discord-bot/template/Bun/JavaScript/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "[REPLACE_ME]", "version": "0.1.0", "private": true, diff --git a/packages/create-discord-bot/template/Bun/TypeScript/package.json b/packages/create-discord-bot/template/Bun/TypeScript/package.json index be95e6353..8cda7ef24 100644 --- a/packages/create-discord-bot/template/Bun/TypeScript/package.json +++ b/packages/create-discord-bot/template/Bun/TypeScript/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "[REPLACE_ME]", "version": "0.1.0", "private": true, diff --git a/packages/create-discord-bot/template/Bun/TypeScript/tsconfig.eslint.json b/packages/create-discord-bot/template/Bun/TypeScript/tsconfig.eslint.json index 11bd8eafe..c9d326b82 100644 --- a/packages/create-discord-bot/template/Bun/TypeScript/tsconfig.eslint.json +++ b/packages/create-discord-bot/template/Bun/TypeScript/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/create-discord-bot/template/Bun/TypeScript/tsconfig.json b/packages/create-discord-bot/template/Bun/TypeScript/tsconfig.json index 224209f4c..72fe8bda9 100644 --- a/packages/create-discord-bot/template/Bun/TypeScript/tsconfig.json +++ b/packages/create-discord-bot/template/Bun/TypeScript/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "@sapphire/ts-config/extra-strict", "compilerOptions": { "declaration": false, diff --git a/packages/create-discord-bot/template/Deno/.prettierrc.json b/packages/create-discord-bot/template/Deno/.prettierrc.json index eba3f4077..7920c42b8 100644 --- a/packages/create-discord-bot/template/Deno/.prettierrc.json +++ b/packages/create-discord-bot/template/Deno/.prettierrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/prettierrc.json", "printWidth": 120, "useTabs": true, "singleQuote": true, diff --git a/packages/create-discord-bot/template/JavaScript/.eslintrc.json b/packages/create-discord-bot/template/JavaScript/.eslintrc.json index ddd781aec..fc6f8d7aa 100644 --- a/packages/create-discord-bot/template/JavaScript/.eslintrc.json +++ b/packages/create-discord-bot/template/JavaScript/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "root": true, "extends": ["neon/common", "neon/node", "neon/prettier"], "rules": { diff --git a/packages/create-discord-bot/template/JavaScript/.prettierrc.json b/packages/create-discord-bot/template/JavaScript/.prettierrc.json index eba3f4077..7920c42b8 100644 --- a/packages/create-discord-bot/template/JavaScript/.prettierrc.json +++ b/packages/create-discord-bot/template/JavaScript/.prettierrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/prettierrc.json", "printWidth": 120, "useTabs": true, "singleQuote": true, diff --git a/packages/create-discord-bot/template/JavaScript/package.json b/packages/create-discord-bot/template/JavaScript/package.json index b923137a8..aa865ac61 100644 --- a/packages/create-discord-bot/template/JavaScript/package.json +++ b/packages/create-discord-bot/template/JavaScript/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "[REPLACE_ME]", "version": "0.1.0", "private": true, diff --git a/packages/create-discord-bot/template/TypeScript/.eslintrc.json b/packages/create-discord-bot/template/TypeScript/.eslintrc.json index f6842f3ba..998d252a6 100644 --- a/packages/create-discord-bot/template/TypeScript/.eslintrc.json +++ b/packages/create-discord-bot/template/TypeScript/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "root": true, "extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"], "parserOptions": { diff --git a/packages/create-discord-bot/template/TypeScript/.prettierrc.json b/packages/create-discord-bot/template/TypeScript/.prettierrc.json index eba3f4077..7920c42b8 100644 --- a/packages/create-discord-bot/template/TypeScript/.prettierrc.json +++ b/packages/create-discord-bot/template/TypeScript/.prettierrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/prettierrc.json", "printWidth": 120, "useTabs": true, "singleQuote": true, diff --git a/packages/create-discord-bot/template/TypeScript/package.json b/packages/create-discord-bot/template/TypeScript/package.json index 34fdd956a..072b6efbe 100644 --- a/packages/create-discord-bot/template/TypeScript/package.json +++ b/packages/create-discord-bot/template/TypeScript/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "[REPLACE_ME]", "version": "0.1.0", "private": true, diff --git a/packages/create-discord-bot/template/TypeScript/tsconfig.eslint.json b/packages/create-discord-bot/template/TypeScript/tsconfig.eslint.json index 11bd8eafe..c9d326b82 100644 --- a/packages/create-discord-bot/template/TypeScript/tsconfig.eslint.json +++ b/packages/create-discord-bot/template/TypeScript/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/create-discord-bot/template/TypeScript/tsconfig.json b/packages/create-discord-bot/template/TypeScript/tsconfig.json index bd2ed1264..c37876f97 100644 --- a/packages/create-discord-bot/template/TypeScript/tsconfig.json +++ b/packages/create-discord-bot/template/TypeScript/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "@sapphire/ts-config/extra-strict", "compilerOptions": { "declaration": false, diff --git a/packages/create-discord-bot/tsconfig.docs.json b/packages/create-discord-bot/tsconfig.docs.json deleted file mode 100644 index 80a7fe18b..000000000 --- a/packages/create-discord-bot/tsconfig.docs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.docs.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "outDir": "dist-docs" - } -} diff --git a/packages/create-discord-bot/tsconfig.eslint.json b/packages/create-discord-bot/tsconfig.eslint.json index e7900de0a..c0fd9773c 100644 --- a/packages/create-discord-bot/tsconfig.eslint.json +++ b/packages/create-discord-bot/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/create-discord-bot/tsconfig.json b/packages/create-discord-bot/tsconfig.json index fd8b5e417..17576cc18 100644 --- a/packages/create-discord-bot/tsconfig.json +++ b/packages/create-discord-bot/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", - "include": ["src/**/*.ts"] + "include": ["src/**/*.ts", "bin/index.ts"] } diff --git a/packages/create-discord-bot/tsup.config.ts b/packages/create-discord-bot/tsup.config.ts index bf294d573..5d4c34cd8 100644 --- a/packages/create-discord-bot/tsup.config.ts +++ b/packages/create-discord-bot/tsup.config.ts @@ -1,7 +1,7 @@ import { createTsupConfig } from '../../tsup.config.js'; export default createTsupConfig({ - entry: ['src/index.ts'], + entry: ['bin/index.ts'], dts: false, format: 'esm', minify: 'terser', diff --git a/packages/discord.js/.eslintrc.json b/packages/discord.js/.eslintrc.json index fc997967d..ed7515f06 100644 --- a/packages/discord.js/.eslintrc.json +++ b/packages/discord.js/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "root": true, "extends": ["eslint:recommended"], "plugins": ["import"], diff --git a/packages/discord.js/.lintstagedrc.json b/packages/discord.js/.lintstagedrc.json index d0971e624..b9e7399c6 100644 --- a/packages/discord.js/.lintstagedrc.json +++ b/packages/discord.js/.lintstagedrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/lintstagedrc.schema.json", "*": "prettier --ignore-unknown --write", "{src/**,test/**,typings/**,scripts/**}.{mjs,js,ts}": "eslint --ext mjs,js,ts --fix" } diff --git a/packages/discord.js/.prettierrc.json b/packages/discord.js/.prettierrc.json index 4773fdf6f..f8d62260b 100644 --- a/packages/discord.js/.prettierrc.json +++ b/packages/discord.js/.prettierrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/prettierrc.json", "singleQuote": true, "printWidth": 120, "trailingComma": "all", diff --git a/packages/discord.js/package.json b/packages/discord.js/package.json index 30c618429..a7921577d 100644 --- a/packages/discord.js/package.json +++ b/packages/discord.js/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "discord.js", "version": "14.13.0", "description": "A powerful library for interacting with the Discord API", diff --git a/packages/discord.js/scripts/.eslintrc.json b/packages/discord.js/scripts/.eslintrc.json index 38d01a2ad..d522ba5dd 100644 --- a/packages/discord.js/scripts/.eslintrc.json +++ b/packages/discord.js/scripts/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../.eslintrc.json", "parserOptions": { "sourceType": "module" diff --git a/packages/discord.js/tsconfig.json b/packages/discord.js/tsconfig.json index 67ae9bece..2c136b840 100644 --- a/packages/discord.js/tsconfig.json +++ b/packages/discord.js/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "compilerOptions": { // Output Formatting diff --git a/packages/discord.js/tslint.json b/packages/discord.js/tslint.json index d66f7bdf3..c24dcd132 100644 --- a/packages/discord.js/tslint.json +++ b/packages/discord.js/tslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tslint.json", "extends": ["dtslint/dtslint.json"], "rules": { "prefer-readonly": false, diff --git a/packages/docgen/.eslintrc.json b/packages/docgen/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/docgen/.eslintrc.json +++ b/packages/docgen/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/docgen/src/cli.ts b/packages/docgen/bin/index.ts similarity index 95% rename from packages/docgen/src/cli.ts rename to packages/docgen/bin/index.ts index 9ecfeed3b..97f636b4e 100644 --- a/packages/docgen/src/cli.ts +++ b/packages/docgen/bin/index.ts @@ -3,7 +3,7 @@ import process from 'node:process'; import { createCommand } from 'commander'; import packageFile from '../package.json'; -import { build } from './index.js'; +import { build } from '../src/index.js'; export interface CLIOptions { custom: string; diff --git a/packages/docgen/package.json b/packages/docgen/package.json index b66865d5f..6e7232ae5 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/docgen", "version": "0.12.1", "description": "The docs.json generator for discord.js and its related projects", @@ -9,7 +10,22 @@ "fmt": "yarn format", "prepack": "yarn format && yarn build" }, - "bin": "./dist/cli.js", + "bin": "./dist/bin/index.js", + "exports": { + ".": { + "require": { + "types": "./dist/src/index.d.ts", + "default": "./dist/src/index.js" + }, + "import": { + "types": "./dist/src/index.d.mts", + "default": "./dist/src/index.mjs" + } + } + }, + "main": "./dist/src/index.js", + "module": "./dist/src/index.mjs", + "types": "./dist/src/index.d.ts", "directories": { "lib": "src" }, diff --git a/packages/docgen/src/index.ts b/packages/docgen/src/index.ts index a301a9961..f8c0cd14a 100644 --- a/packages/docgen/src/index.ts +++ b/packages/docgen/src/index.ts @@ -2,7 +2,7 @@ import { readFileSync, writeFileSync } from 'node:fs'; import { dirname, join, extname, basename, relative } from 'node:path'; import jsdoc2md from 'jsdoc-to-markdown'; import { type DeclarationReflection, Application, TSConfigReader } from 'typedoc'; -import type { CLIOptions } from './cli.js'; +import type { CLIOptions } from '../bin/index.js'; import { Documentation } from './documentation.js'; import type { RootTypes, ChildTypes, CustomDocs } from './interfaces/index.js'; diff --git a/packages/docgen/tsconfig.eslint.json b/packages/docgen/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/docgen/tsconfig.eslint.json +++ b/packages/docgen/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/docgen/tsconfig.json b/packages/docgen/tsconfig.json index fd8b5e417..17576cc18 100644 --- a/packages/docgen/tsconfig.json +++ b/packages/docgen/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", - "include": ["src/**/*.ts"] + "include": ["src/**/*.ts", "bin/index.ts"] } diff --git a/packages/docgen/tsup.config.ts b/packages/docgen/tsup.config.ts index 36a32907e..b33378fd7 100644 --- a/packages/docgen/tsup.config.ts +++ b/packages/docgen/tsup.config.ts @@ -1,9 +1,7 @@ import { createTsupConfig } from '../../tsup.config.js'; export default createTsupConfig({ - entry: ['src/index.ts', 'src/cli.ts'], - dts: false, - format: 'esm', + entry: ['src/index.ts', 'bin/index.ts'], minify: 'terser', keepNames: false, sourcemap: false, diff --git a/packages/formatters/.eslintrc.json b/packages/formatters/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/formatters/.eslintrc.json +++ b/packages/formatters/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/formatters/package.json b/packages/formatters/package.json index 7a036a99b..fb9bc0461 100644 --- a/packages/formatters/package.json +++ b/packages/formatters/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/formatters", "version": "0.3.2", "description": "A set of functions to format strings for Discord.", @@ -13,14 +14,21 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/formatters/*'", "release": "cliff-jumper" }, + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, "main": "./dist/index.js", "module": "./dist/index.mjs", - "typings": "./dist/index.d.ts", - "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" - }, + "types": "./dist/index.d.ts", "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/formatters/tsconfig.docs.json b/packages/formatters/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/formatters/tsconfig.docs.json +++ b/packages/formatters/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/formatters/tsconfig.eslint.json b/packages/formatters/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/formatters/tsconfig.eslint.json +++ b/packages/formatters/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/formatters/tsconfig.json b/packages/formatters/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/formatters/tsconfig.json +++ b/packages/formatters/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/next/.eslintrc.json b/packages/next/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/next/.eslintrc.json +++ b/packages/next/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/next/package.json b/packages/next/package.json index b6e8398dd..1982a692a 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/next", "version": "0.1.0", "description": "A powerful TypeScript library for interacting with the Discord API", @@ -13,21 +14,31 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/next/*'", "release": "cliff-jumper" }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "typings": "./dist/index.d.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } }, "./*": { - "types": "./dist/exports/*.d.ts", - "import": "./dist/exports/*.mjs", - "require": "./dist/exports/*.js" + "require": { + "types": "./dist/exports/*.d.ts", + "default": "./dist/exports/*.js" + }, + "import": { + "types": "./dist/exports/*.d.mts", + "default": "./dist/exports/*.mjs" + } } }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/next/tsconfig.docs.json b/packages/next/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/next/tsconfig.docs.json +++ b/packages/next/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/next/tsconfig.eslint.json b/packages/next/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/next/tsconfig.eslint.json +++ b/packages/next/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/next/tsconfig.json +++ b/packages/next/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/proxy-container/.eslintrc.json b/packages/proxy-container/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/proxy-container/.eslintrc.json +++ b/packages/proxy-container/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/proxy-container/package.json b/packages/proxy-container/package.json index 3616a0814..d09ee61ec 100644 --- a/packages/proxy-container/package.json +++ b/packages/proxy-container/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/proxy-container", "version": "1.0.0", "description": "Lightweight HTTP proxy for Discord's API, brought to you as a container 📦", @@ -10,7 +11,6 @@ "prepack": "yarn lint && yarn build" }, "type": "module", - "main": "./dist/index.js", "directories": { "lib": "src" }, diff --git a/packages/proxy-container/tsconfig.eslint.json b/packages/proxy-container/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/proxy-container/tsconfig.eslint.json +++ b/packages/proxy-container/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/proxy-container/tsconfig.json b/packages/proxy-container/tsconfig.json index cad37088e..845127357 100644 --- a/packages/proxy-container/tsconfig.json +++ b/packages/proxy-container/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "compilerOptions": { "skipLibCheck": true diff --git a/packages/proxy/.eslintrc.json b/packages/proxy/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/proxy/.eslintrc.json +++ b/packages/proxy/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/proxy/package.json b/packages/proxy/package.json index aa852d641..fe05e94e8 100644 --- a/packages/proxy/package.json +++ b/packages/proxy/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/proxy", "version": "2.0.1", "description": "Tools for running an HTTP proxy for Discord's API", @@ -14,14 +15,21 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/proxy/*'", "release": "cliff-jumper" }, + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, "main": "./dist/index.js", "module": "./dist/index.mjs", - "typings": "./dist/index.d.ts", - "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" - }, + "types": "./dist/index.d.ts", "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/proxy/tsconfig.docs.json b/packages/proxy/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/proxy/tsconfig.docs.json +++ b/packages/proxy/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/proxy/tsconfig.eslint.json b/packages/proxy/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/proxy/tsconfig.eslint.json +++ b/packages/proxy/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/proxy/tsconfig.json b/packages/proxy/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/proxy/tsconfig.json +++ b/packages/proxy/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/rest/.eslintrc.json b/packages/rest/.eslintrc.json index bf98d1b08..a861c2060 100644 --- a/packages/rest/.eslintrc.json +++ b/packages/rest/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json", "rules": { "n/prefer-global/url": 0, diff --git a/packages/rest/package.json b/packages/rest/package.json index e89517b59..004d42664 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/rest", "version": "2.0.1", "description": "The REST API for discord.js", @@ -14,26 +15,41 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/rest/*'", "release": "cliff-jumper" }, - "types": "./dist/index.d.ts", "exports": { ".": { "node": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } }, "default": { - "types": "./dist/web.d.ts", - "import": "./dist/web.mjs", - "require": "./dist/web.js" + "require": { + "types": "./dist/web.d.ts", + "default": "./dist/web.js" + }, + "import": { + "types": "./dist/web.d.mts", + "default": "./dist/web.mjs" + } } }, "./*": { - "types": "./dist/strategies/*.d.ts", - "import": "./dist/strategies/*.mjs", - "require": "./dist/strategies/*.js" + "require": { + "types": "./dist/strategies/*.d.ts", + "default": "./dist/strategies/*.js" + }, + "import": { + "types": "./dist/strategies/*.d.mts", + "default": "./dist/strategies/*.mjs" + } } }, + "types": "./dist/index.d.ts", "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/rest/tsconfig.docs.json b/packages/rest/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/rest/tsconfig.docs.json +++ b/packages/rest/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/rest/tsconfig.eslint.json b/packages/rest/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/rest/tsconfig.eslint.json +++ b/packages/rest/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/rest/tsconfig.json b/packages/rest/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/rest/tsconfig.json +++ b/packages/rest/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/scripts/.eslintrc.json b/packages/scripts/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/scripts/.eslintrc.json +++ b/packages/scripts/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 74b51e888..f1c2bce2a 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/scripts", "version": "0.1.0", "description": "A set of scripts that we use for our workflows", @@ -9,14 +10,21 @@ "format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format" }, + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", - "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" - }, "directories": { "lib": "src" }, diff --git a/packages/scripts/src/template/default/tsconfig.docs.json b/packages/scripts/src/template/default/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/scripts/src/template/default/tsconfig.docs.json +++ b/packages/scripts/src/template/default/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/scripts/src/template/default/tsconfig.eslint.json b/packages/scripts/src/template/default/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/scripts/src/template/default/tsconfig.eslint.json +++ b/packages/scripts/src/template/default/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/scripts/src/template/default/tsconfig.json b/packages/scripts/src/template/default/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/scripts/src/template/default/tsconfig.json +++ b/packages/scripts/src/template/default/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/scripts/src/template/template.package.json b/packages/scripts/src/template/template.package.json index 7aee13406..abd3eba48 100644 --- a/packages/scripts/src/template/template.package.json +++ b/packages/scripts/src/template/template.package.json @@ -15,7 +15,7 @@ }, "main": "./dist/index.js", "module": "./dist/index.mjs", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", "exports": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", diff --git a/packages/scripts/tsconfig.eslint.json b/packages/scripts/tsconfig.eslint.json index 686a4aaae..e72ce8f04 100644 --- a/packages/scripts/tsconfig.eslint.json +++ b/packages/scripts/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/scripts/tsconfig.json b/packages/scripts/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/scripts/tsconfig.json +++ b/packages/scripts/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/ui/.eslintrc.json b/packages/ui/.eslintrc.json index d014984ea..08f3d1192 100644 --- a/packages/ui/.eslintrc.json +++ b/packages/ui/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": ["../../.eslintrc.json", "neon/react", "plugin:storybook/recommended", "@unocss", "neon/prettier"], "settings": { "react": { diff --git a/packages/ui/package.json b/packages/ui/package.json index 61f25baeb..6ec522214 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/ui", "version": "0.1.0", "description": "", @@ -15,12 +16,16 @@ "chromatic": "chromatic" }, "type": "module", - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js" + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } }, + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "sideEffects": false, "directories": { "lib": "src" diff --git a/packages/ui/tsconfig.eslint.json b/packages/ui/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/ui/tsconfig.eslint.json +++ b/packages/ui/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index a4b00f19b..0eefcd986 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "compilerOptions": { "lib": ["ESNext", "DOM", "DOM.Iterable"], diff --git a/packages/util/.eslintrc.json b/packages/util/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/util/.eslintrc.json +++ b/packages/util/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/util/package.json b/packages/util/package.json index 0c164dc40..b54e36988 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/util", "version": "1.0.1", "description": "Utilities shared across Discord.js packages", @@ -14,14 +15,21 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/util/*'", "release": "cliff-jumper" }, + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", - "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" - }, "directories": { "lib": "src" }, diff --git a/packages/util/tsconfig.docs.json b/packages/util/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/util/tsconfig.docs.json +++ b/packages/util/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/util/tsconfig.eslint.json b/packages/util/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/util/tsconfig.eslint.json +++ b/packages/util/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/util/tsconfig.json b/packages/util/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/util/tsconfig.json +++ b/packages/util/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/voice/.eslintrc.json b/packages/voice/.eslintrc.json index 757cfc84a..e783f579f 100644 --- a/packages/voice/.eslintrc.json +++ b/packages/voice/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json", "rules": { "import/extensions": 0, diff --git a/packages/voice/package.json b/packages/voice/package.json index fcb3175f1..a09ce7d12 100644 --- a/packages/voice/package.json +++ b/packages/voice/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/voice", "version": "0.16.0", "description": "Implementation of the Discord Voice API for Node.js", @@ -14,14 +15,21 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/voice/*'", "release": "cliff-jumper" }, + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, "main": "./dist/index.js", "module": "./dist/index.mjs", - "typings": "./dist/index.d.ts", - "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" - }, + "types": "./dist/index.d.ts", "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/voice/tsconfig.docs.json b/packages/voice/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/voice/tsconfig.docs.json +++ b/packages/voice/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/voice/tsconfig.eslint.json b/packages/voice/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/voice/tsconfig.eslint.json +++ b/packages/voice/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/voice/tsconfig.json b/packages/voice/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/voice/tsconfig.json +++ b/packages/voice/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/packages/ws/.eslintrc.json b/packages/ws/.eslintrc.json index 99ef7cec8..3921ba399 100644 --- a/packages/ws/.eslintrc.json +++ b/packages/ws/.eslintrc.json @@ -1,3 +1,4 @@ { + "$schema": "https://json.schemastore.org/eslintrc.json", "extends": "../../.eslintrc.json" } diff --git a/packages/ws/package.json b/packages/ws/package.json index 7da7a2b76..4e47f5322 100644 --- a/packages/ws/package.json +++ b/packages/ws/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@discordjs/ws", "version": "1.0.1", "description": "Wrapper around Discord's gateway", @@ -13,21 +14,31 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/ws/*'", "release": "cliff-jumper" }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "typings": "./dist/index.d.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } }, "./defaultWorker": { - "types": null, - "import": "./dist/defaultWorker.mjs", - "require": "./dist/defaultWorker.js" + "require": { + "types": null, + "default": "./dist/defaultWorker.js" + }, + "import": { + "types": null, + "default": "./dist/defaultWorker.mjs" + } } }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "directories": { "lib": "src", "test": "__tests__" diff --git a/packages/ws/tsconfig.docs.json b/packages/ws/tsconfig.docs.json index 80a7fe18b..519b9be9a 100644 --- a/packages/ws/tsconfig.docs.json +++ b/packages/ws/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.docs.json", "include": ["src/**/*.ts"], "compilerOptions": { diff --git a/packages/ws/tsconfig.eslint.json b/packages/ws/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/packages/ws/tsconfig.eslint.json +++ b/packages/ws/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/packages/ws/tsconfig.json b/packages/ws/tsconfig.json index fd8b5e417..95dc9a4a4 100644 --- a/packages/ws/tsconfig.json +++ b/packages/ws/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "../../tsconfig.json", "include": ["src/**/*.ts"] } diff --git a/tsconfig.docs.json b/tsconfig.docs.json index 9b4ca23c5..55195b794 100644 --- a/tsconfig.docs.json +++ b/tsconfig.docs.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "emitDeclarationOnly": true, diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index d04d4be3a..8b808ce73 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", "extends": "./tsconfig.json", "compilerOptions": { "allowJs": true diff --git a/tsconfig.json b/tsconfig.json index 2eef22df7..910a69182 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig.json", // Mapped from https://www.typescriptlang.org/tsconfig "compilerOptions": { // Type Checking diff --git a/yarn.lock b/yarn.lock index 609f319a2..a11692dca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2212,7 +2212,7 @@ __metadata: typedoc: ^0.24.8 typescript: ^5.1.6 bin: - docgen: ./dist/cli.js + docgen: ./dist/bin/index.js languageName: unknown linkType: soft @@ -10620,7 +10620,7 @@ __metadata: validate-npm-package-name: ^5.0.0 vitest: ^0.34.2 bin: - create-discord-bot: ./dist/index.mjs + create-discord-bot: ./dist/index.js languageName: unknown linkType: soft