From 54c10bb1afa70d092952b3865f6703ec89e41218 Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Tue, 12 Nov 2024 10:04:14 +0100 Subject: [PATCH 01/11] chore: prepares the repo for a stable release - Delete .tool-versions - Adds year and plugin author to license - Adds various missing fields to package.json - No longer depends on @grammyjs/types directly - Fixes the Deno-specific README - Make code blocks in the main repo consistent --- .tool-versions | 1 - LICENSE | 2 +- README.md | 10 ++++----- package.json | 11 ++++++++-- src/README.md | 57 ++++++++++++------------------------------------ src/deps.deno.ts | 4 ++-- 6 files changed, 31 insertions(+), 54 deletions(-) delete mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index 8901dc7..0000000 --- a/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -deno 1.42.4 diff --git a/LICENSE b/LICENSE index 63b4b68..1a6a52c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) [year] [fullname] +Copyright (c) 2024 Rogerio Munhoz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index c952d8c..905e1b6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -## grammY Commands Plugin +# grammY commands -This plugin provides a convenient way to define and manage commands for your grammY bot. It simplifies the process of -setting up commands with scopes and localization. +This plugin provides a convenient way to define and manage commands for your grammY bot. +It simplifies the process of setting up commands with scopes and localization. ## Installation @@ -14,7 +14,7 @@ npm i @grammyjs/commands The main functionality of this plugin is to define your commands, localize them, and give them handlers for each [scope](https://core.telegram.org/bots/api#botcommandscope), like so: -```typescript +```ts import { Bot } from "grammy"; import { CommandGroup } from "@grammyjs/commands"; @@ -50,7 +50,7 @@ will not be registered, and your bot will not respond to those commands. This plugin provides a shortcut for setting the commands for the current chat. To use it, you need to install the commands flavor and the plugin itself, like so: -```typescript +```ts import { Bot, Context } from "grammy"; import { CommandGroup, commands, CommandsFlavor } from "@grammyjs/commands"; diff --git a/package.json b/package.json index 1a17b90..0424837 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,15 @@ ], "author": "Roz ", "license": "MIT", + "homepage": "https://grammy.dev/plugins/commands.html", + "repository": { + "type": "git", + "url": "git+https://github.com/grammyjs/commands.git" + }, + "bugs": { + "url": "https://github.com/grammyjs/commands/issues" + }, "dependencies": { - "@grammyjs/types": "^3.8.1", "grammy": "^1.17.1", "ts-pattern": "^5.0.1" }, @@ -27,4 +34,4 @@ "files": [ "out" ] -} +} \ No newline at end of file diff --git a/src/README.md b/src/README.md index 5719a10..6e30bb3 100644 --- a/src/README.md +++ b/src/README.md @@ -1,22 +1,22 @@ -## grammY Commands Plugin +# grammY commands -This plugin provides a convenient way to define and manage commands for your grammY bot. It simplifies the process of -setting up commands with scopes and localization. +This commands plugin for [grammY](https://grammy.dev) provides a convenient way to define and manage commands for your grammY bot. +It simplifies the process of setting up commands with scopes and localization. +Please confer the [official documentation](https://grammy.dev/plugins/commands) for this plugin to learn more about this plugin. -## Installation +Here is a quickstart to get you up and running, though. -```sh -npm i @grammyjs/commands -``` +## Quickstart -## Usage +You can define bot commands using the `CommandGroup` class. +Remember to register it on your bot via `bot.use`. -The main functionality of this plugin is to define your commands, localize them, and give them handlers for each -[scope](https://core.telegram.org/bots/api#botcommandscope), like so: +Finally, this plugin can call `setMyCommands` for you with the commands you defined. +That way, your users see the correct command suggestions in chats with your bot. -```typescript -import { Bot } from "grammy"; -import { CommandGroup } from "@grammyjs/commands"; +```ts +import { Bot } from "https://deno.land/x/grammy/mod.ts"; +import { CommandGroup } from "https://deno.land/x/grammy_commands/mod.ts"; const bot = new Bot(""); @@ -42,33 +42,4 @@ bot.use(myCommands); bot.start(); ``` -It is very important that you call `bot.use` with your instance of the `CommandGroup` class. Otherwise, the command handlers -will not be registered, and your bot will not respond to those commands. - -### Context shortcuts - -This plugin provides a shortcut for setting the commands for the current chat. To use it, you need to install the -commands flavor and the plugin itself, like so: - -```typescript -import { Bot, Context } from "grammy"; -import { CommandGroup, commands, CommandsFlavor } from "@grammyjs/commands"; - -type BotContext = CommandsFlavor; - -const bot = new Bot(""); -bot.use(commands()); - -bot.on("message", async (ctx) => { - const cmds = new CommandGroup(); - - cmds.command("start", "Initializes bot configuration") - .localize("pt", "start", "Inicializa as configurações do bot"); - - await ctx.setMyCommands(cmds); - - return ctx.reply("Commands set!"); -}); - -bot.start(); -``` +Be sure to check out [the documentation](https://grammy.dev/plugins/commands). diff --git a/src/deps.deno.ts b/src/deps.deno.ts index aff3659..5aae290 100644 --- a/src/deps.deno.ts +++ b/src/deps.deno.ts @@ -21,7 +21,7 @@ export type { Chat, LanguageCode, MessageEntity, -} from "https://lib.deno.dev/x/grammy_types@^v3.8.1/mod.ts"; +} from "https://lib.deno.dev/x/grammy@1/types.ts"; export { LanguageCodes, -} from "https://lib.deno.dev/x/grammy_types@^v3.8.1/mod.ts"; +} from "https://lib.deno.dev/x/grammy@1/types.ts"; From 4c6ec2d8a27b5c7c42ae5f91f7af82db5458b0d2 Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Tue, 12 Nov 2024 10:07:36 +0100 Subject: [PATCH 02/11] chore: strip HTML extension from homepage link --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0424837..c68e207 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ ], "author": "Roz ", "license": "MIT", - "homepage": "https://grammy.dev/plugins/commands.html", + "homepage": "https://grammy.dev/plugins/commands", "repository": { "type": "git", "url": "git+https://github.com/grammyjs/commands.git" From 21fa6ac0a294b5fca72f063496607e55542c961d Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Tue, 12 Nov 2024 10:08:32 +0100 Subject: [PATCH 03/11] fix: fmt --- .github/workflows/deno.yml | 98 +++++++++++++++++------------------ .github/workflows/release.yml | 46 ++++++++-------- package.json | 2 +- src/deps.deno.ts | 4 +- 4 files changed, 74 insertions(+), 76 deletions(-) diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml index 64e8d37..631c93e 100644 --- a/.github/workflows/deno.yml +++ b/.github/workflows/deno.yml @@ -1,71 +1,71 @@ name: ci on: - push: - branches: - - main - - next - pull_request: - branches: - - main - - next + push: + branches: + - main + - next + pull_request: + branches: + - main + - next jobs: - backport: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 + backport: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v1 - - run: npm install --ignore-scripts + - run: npm install --ignore-scripts - - run: npm run backport + - run: npm run backport - fmt-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 + fmt-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v1 - - run: deno fmt --check + - run: deno fmt --check - - run: deno lint + - run: deno lint - test: - runs-on: ${{ matrix.os }} # runs a test on Ubuntu, Windows and macOS + test: + runs-on: ${{ matrix.os }} # runs a test on Ubuntu, Windows and macOS - strategy: - matrix: - os: [macOS-latest, windows-latest, ubuntu-latest] + strategy: + matrix: + os: [macOS-latest, windows-latest, ubuntu-latest] - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v1 - - run: deno cache src/mod.ts + - run: deno cache src/mod.ts - - run: deno task test + - run: deno task test - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v1 - - run: deno task coverage + - run: deno task coverage - - uses: codecov/codecov-action@v1.0.10 # upload the report on Codecov - with: - file: ./coverage.lcov + - uses: codecov/codecov-action@v1.0.10 # upload the report on Codecov + with: + file: ./coverage.lcov diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ded6ac2..6e0fa28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,31 +1,31 @@ name: Release on: - push: - tags: - - "**" + push: + tags: + - "**" jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 - - uses: denoland/setup-deno@v1 - - run: npm install + - uses: denoland/setup-deno@v1 + - run: npm install - - name: Publish to npm - run: | - npm config set //registry.npmjs.org/:_authToken '${NPM_TOKEN}' - npm publish --ignore-scripts - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish to npm + run: | + npm config set //registry.npmjs.org/:_authToken '${NPM_TOKEN}' + npm publish --ignore-scripts + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Create Release - uses: softprops/action-gh-release@v1 - env: - HOOK: 0 - with: - generate_release_notes: true + - name: Create Release + uses: softprops/action-gh-release@v1 + env: + HOOK: 0 + with: + generate_release_notes: true diff --git a/package.json b/package.json index c68e207..81c028f 100644 --- a/package.json +++ b/package.json @@ -34,4 +34,4 @@ "files": [ "out" ] -} \ No newline at end of file +} diff --git a/src/deps.deno.ts b/src/deps.deno.ts index 5aae290..ffb126e 100644 --- a/src/deps.deno.ts +++ b/src/deps.deno.ts @@ -22,6 +22,4 @@ export type { LanguageCode, MessageEntity, } from "https://lib.deno.dev/x/grammy@1/types.ts"; -export { - LanguageCodes, -} from "https://lib.deno.dev/x/grammy@1/types.ts"; +export { LanguageCodes } from "https://lib.deno.dev/x/grammy@1/types.ts"; From 0c0bc79bdc4b2733963158e3db2e08614c6f93d3 Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Tue, 12 Nov 2024 10:10:36 +0100 Subject: [PATCH 04/11] chore: upgrade CI deps --- .github/workflows/deno.yml | 16 ++++++++++++---- .github/workflows/release.yml | 7 +++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml index 631c93e..2871d25 100644 --- a/.github/workflows/deno.yml +++ b/.github/workflows/deno.yml @@ -18,7 +18,9 @@ jobs: with: fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 + with: + deno-version: 2.x - run: npm install --ignore-scripts @@ -31,7 +33,9 @@ jobs: with: fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 + with: + deno-version: 2.x - run: deno fmt --check @@ -49,7 +53,9 @@ jobs: with: fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 + with: + deno-version: 2.x - run: deno cache src/mod.ts @@ -62,7 +68,9 @@ jobs: with: fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 + with: + deno-version: 2.x - run: deno task coverage diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e0fa28..274b978 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,11 +9,14 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 + with: + deno-version: 2.x + - run: npm install - name: Publish to npm From 189f7579799801afc9fe880709d464c0b85c5505 Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Tue, 12 Nov 2024 10:11:55 +0100 Subject: [PATCH 05/11] build: fix types deps for Node.js --- src/deps.node.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/deps.node.ts b/src/deps.node.ts index 0003dc0..b543ef0 100644 --- a/src/deps.node.ts +++ b/src/deps.node.ts @@ -21,6 +21,5 @@ export type { Chat, LanguageCode, MessageEntity -} from "@grammyjs/types"; - -export { LanguageCodes } from "@grammyjs/types"; +} from "grammy/types"; +export { LanguageCodes } from "grammy/types"; From ceec2cc8f824d98bce19f1fb8633c0167f3f3494 Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Tue, 12 Nov 2024 10:14:18 +0100 Subject: [PATCH 06/11] chore: fix deno 2 permissions --- deno.jsonc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deno.jsonc b/deno.jsonc index 3fa5fa3..e51da3e 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -21,7 +21,7 @@ "backport": "rm -rf out && deno run --no-prompt --allow-read=. --allow-write=. https://deno.land/x/deno2node@v1.9.0/src/cli.ts", "check": "deno lint && deno fmt --check && deno check src/mod.ts", "fix": "deno lint --fix && deno fmt", - "test": "deno test --seed=123456 --parallel ./test/", + "test": "deno test --allow-import --seed=123456 --parallel ./test/", "coverage": "rm -rf ./test/cov_profile && deno task test --coverage=./test/cov_profile && deno coverage --lcov --output=./coverage.lcov ./test/cov_profile", "hook": "deno run --allow-read --allow-run --allow-write https://deno.land/x/deno_hooks@0.1.1/mod.ts" }, From 28827a6e783c97ab3aa4021b8d373b6b80e08551 Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Tue, 12 Nov 2024 10:14:28 +0100 Subject: [PATCH 07/11] chore: drop package-lock.json --- package-lock.json | 165 ---------------------------------------------- 1 file changed, 165 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index aa47a17..0000000 --- a/package-lock.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "name": "@grammyjs/commands", - "version": "0.11.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@grammyjs/commands", - "version": "0.11.0", - "license": "MIT", - "dependencies": { - "@grammyjs/types": "^3.8.1", - "grammy": "^1.17.1", - "ts-pattern": "^5.0.1" - }, - "devDependencies": { - "deno-bin": "^1.45.2", - "typescript": "^5.1.6" - } - }, - "node_modules/@grammyjs/types": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/@grammyjs/types/-/types-3.8.1.tgz", - "integrity": "sha512-2atGlWCgvSrJr+xDJBzVvCS4DT7LE/Yxim1lmGdSaYjyh968U1tKpDv8NK8qs+V9xnMtwxmId2W1h2Oc8J6ShA==" - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/adm-zip": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.14.tgz", - "integrity": "sha512-DnyqqifT4Jrcvb8USYjp6FHtBpEIz1mnXu6pTRHZ0RL69LbQYiO+0lDFg5+OKA7U29oWSs3a/i8fhn8ZcceIWg==", - "dev": true, - "engines": { - "node": ">=12.0" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deno-bin": { - "version": "1.45.2", - "resolved": "https://registry.npmjs.org/deno-bin/-/deno-bin-1.45.2.tgz", - "integrity": "sha512-Ni6kx785E+Hg4/yUyrXK9Y8RRkUXlI3FDpYU+91hKXbLz26P9/Olb8qoQ21PYtOUuEd1/fQed4mndNL5vDVenw==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "adm-zip": "^0.5.4" - }, - "bin": { - "deno": "bin/deno.js", - "deno-bin": "bin/deno.js" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/grammy": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/grammy/-/grammy-1.17.1.tgz", - "integrity": "sha512-ba1xsEVMoEjvTZNhOvSYt/dgoIFbMKYnFKHw3iioKYbQMCBsoX+FbO5hRse+sxhNwQzkDmiUtzAcK5elpEJg2w==", - "dependencies": { - "@grammyjs/types": "3.1.2", - "abort-controller": "^3.0.0", - "debug": "^4.3.4", - "node-fetch": "^2.6.11" - }, - "engines": { - "node": "^12.20.0 || >=14.13.1" - } - }, - "node_modules/grammy/node_modules/@grammyjs/types": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@grammyjs/types/-/types-3.1.2.tgz", - "integrity": "sha512-AsSkTUfZCfSEIacUBOQ94qLbZZy3UofkschWv4uBJKEHjuEfGnjeZZgiwhDfTDjmpmW+MbcasvS+FEfD2jiSLw==" - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/ts-pattern": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-5.0.1.tgz", - "integrity": "sha512-ZyNm28Lsg34Co5DS3e9DVyjlX2Y+2exkI4jqTKyU+9/OL6Y2fKOOuL8i+7no71o74C6mVS+UFoP3ekM3iCT1HQ==" - }, - "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } - } -} From c44fbc8c6bb677f58eded56dd213d9cb6798e8ec Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Tue, 12 Nov 2024 10:16:00 +0100 Subject: [PATCH 08/11] chore: add missing deno 2 permission in CI --- .github/workflows/deno.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml index 2871d25..9864006 100644 --- a/.github/workflows/deno.yml +++ b/.github/workflows/deno.yml @@ -57,7 +57,7 @@ jobs: with: deno-version: 2.x - - run: deno cache src/mod.ts + - run: deno cache -I src/mod.ts - run: deno task test From c42308123f8022f2672f3dfa40eba42478b0ac50 Mon Sep 17 00:00:00 2001 From: Roz <3948961+roziscoding@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:23:11 +0100 Subject: [PATCH 09/11] Update src/README.md --- src/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/README.md b/src/README.md index 6e30bb3..527100d 100644 --- a/src/README.md +++ b/src/README.md @@ -2,7 +2,7 @@ This commands plugin for [grammY](https://grammy.dev) provides a convenient way to define and manage commands for your grammY bot. It simplifies the process of setting up commands with scopes and localization. -Please confer the [official documentation](https://grammy.dev/plugins/commands) for this plugin to learn more about this plugin. +Please confer the [official documentation](https://grammy.dev/plugins/commands) for this plugin to learn more about it. Here is a quickstart to get you up and running, though. From 891a78c15cc10dc3a1c62d3013fc5d652be8feb6 Mon Sep 17 00:00:00 2001 From: Roz Date: Tue, 12 Nov 2024 10:27:47 +0100 Subject: [PATCH 10/11] chore: remove ununsed ts-pattern dependency --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 81c028f..a76731e 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,7 @@ "url": "https://github.com/grammyjs/commands/issues" }, "dependencies": { - "grammy": "^1.17.1", - "ts-pattern": "^5.0.1" + "grammy": "^1.17.1" }, "devDependencies": { "deno-bin": "^1.45.2", From e409c17e76742c15d34951ad03a76168ab570f95 Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Tue, 12 Nov 2024 10:30:10 +0100 Subject: [PATCH 11/11] build: make grammY core a peer dep --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a76731e..aae2c7b 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "bugs": { "url": "https://github.com/grammyjs/commands/issues" }, - "dependencies": { + "peerDependencies": { "grammy": "^1.17.1" }, "devDependencies": {