Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump telegraf from 4.11.2 to 4.12.2 #927

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 10, 2023

Bumps telegraf from 4.11.2 to 4.12.2.

Release notes

Sourced from telegraf's releases.

v4.12.2

  • Fix: session reference counter had defaulted to 0, therefore permanently being cached and never being cleaned up — this has been fixed.

v4.12.1

  • Fix: bot.command did not match bot usernames if the registered username was not lowercased (#1809)

v4.12.0

Normally the most exciting features of a new release would be support for the latest Bot API. But in this update, it's session! This has been in the works for many months, and we're happy to bring it to you this release!

Some of you may know that builtin session has been deprecated for quite a while. This was motivated by the fact that session is prone to race-conditions (#1372). This left the community in a grey area where they continued to use session despite the deprecation, since no clear alternative was provided. Added to this was the fact that there were no official database-backed sessions, and all unofficial async session middleware were affected by #1372.

This release finally addresses both of these long-running issues.

🏃🏼 No more race conditions

#1713 provides a reference-counted implementation resistant to race conditions. Session is now no longer deprecated, and can be used safely!

Note: You should read more about how to safely use session in the docs repo.

™️ Official database adapters are here!

We're also happy to announce a revamped @telegraf/session—this provides official store implementations for database-backed sessions via Redis, MongoDB, MySQL, MariaDB, PostgreSQL, and SQLite. Just install the drivers necessary for your database, and off you go! Since this package now only provides a store implementation, it's usable with builtin session, and effectively makes all implementations have the same safety as the core package. Check it out!

🆗 Default session

Additionally, session now accepts a defaultSession parameter. You no longer need a hacky middleware to do ctx.session ??= { count }.

// 🤢 Old way
bot.use(session());
bot.use((ctx, next) => {
  ctx.session ??= { count: 0 };
  return next();
});
// 😁 New way ✅
bot.use(session({ defaultSession: () => ({ count: 0 }) }));

  • Updated Typegram, added the following Markup.button helpers to request a user or chat:
  • Markup.button.userRequest
  • Markup.button.botRequest

... (truncated)

Commits
  • 6b1e3ce ver: 4.12.2
  • ed4d7f2 fix(session): fatal memory leak
  • 7a44903 fix(command): test ctx.me case-sensitively as well
  • 361b666 fix: make if check slightly clearer
  • 45a0cd7 feat: support RegExp in bot.command
  • 096df1c merge: #1713 from feat-better-session
  • 73c7f5b chore: more session release notes
  • e4dfb70 chore: add release-notes and improve session TSDoc
  • 14d5c3f feat: Context::persistentChatAction (#1804)
  • 8325a7d feat(session): defaultSession takes ctx
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from alimd as a code owner March 10, 2023 12:01
@dependabot dependabot bot added ci Work that improves the continuous integration. dependencies Change in project dependencies. maintenance Generic maintenance tasks. priority-low Nice addition, maybe... someday... labels Mar 10, 2023
@dependabot dependabot bot requested a review from njfamirm March 10, 2023 12:01
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/telegraf-4.12.2 branch 5 times, most recently from ef502c0 to ed9d138 Compare March 17, 2023 12:31
Bumps [telegraf](https://github.com/telegraf/telegraf) from 4.11.2 to 4.12.2.
- [Release notes](https://github.com/telegraf/telegraf/releases)
- [Commits](telegraf/telegraf@v4.11.2...v4.12.2)

---
updated-dependencies:
- dependency-name: telegraf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/telegraf-4.12.2 branch from ed9d138 to e261336 Compare March 17, 2023 12:32
@alimd alimd merged commit 1b8c61a into next Mar 17, 2023
@alimd alimd deleted the dependabot/npm_and_yarn/telegraf-4.12.2 branch March 17, 2023 12:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ci Work that improves the continuous integration. dependencies Change in project dependencies. maintenance Generic maintenance tasks. priority-low Nice addition, maybe... someday...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant