# koishi 更新日志

本页面包括 koishi 及其依赖的更新日志。

# 1.11.0

# Features

  • core: 新增了 retryTimesretryInterval 配置项,支持 WebSocket 断线重连 (#27) (f95f794, c854300, 5a3cee4)
  • core: SenderError 中加入了 selfId 字段 (77efd54)
  • core: 新增了 defaultAuthority 配置项,用于配置默认权限等级 (8b76734)
  • plugin-common: broadcast 指令默认不对 noEmit 群广播,新增 -f 选项用于对所有群广播 (24ee7f2)

# Bug Fixes

  • plugin-common: 修复了 welcome 插件可能对自己触发的问题 (49aee5f)

# Dependencies

  • core: 新增依赖 ms,cac 版本从 6.5.6 更新到 6.5.7,ws 版本从 7.2.1 更新到 7.2.3 (723e4a2, e2350d0)
  • plugin-nlp: nodejiaba 版本从 2.4.0 更新到 2.4.1 (e2350d0, 052cddb)

# 1.10.1

# Bug Fixes

  • core: 修复了同一个 subdatabase 无法注册到多个 DatabaseManager 的问题 (ccfb687)
  • core: 指令执行前将确保 argv.options 的类型不为 undefined (03dbe46)
  • plugin-common: 修复了 contextify 指令中 meta.$send 输出目标错误的问题 (f1eccdc)

# 1.10.0

# Features

  • core: 新增了 meta.$argv 属性 (bbcdab2)
  • core: 新增了 attach-user 和 attach-group 事件 (8285c64)
  • core: send 元信息将附带 time 字段 (ef8a284)
  • cli: 优化了类型标注 (17a6ee9)
  • plugin-common: 优化了子指令的帮助显示 (09d9c75)
  • plugin-common: broadcast 指令支持 -o 参数 (baf7f1f)

# Bug Fixes

  • utils: 修复了 CQCode.parse 无法处理带回车的文本的问题 (6013f95, 4dffcf5)

# 1.9.0

# Features

  • core: 优化了类型标注 (f135818, 9318bfa, 9821cf7)
  • core: 支持了 CQHTTP 4.14 (169089e)
  • core: 重构了 debug logger (068135e)
  • plugin-common: contextify 指令支持 at 其他成员了 (1576873)
  • plugin-common: 支持了函数类型的 commandConfig.usage (85cb06b)

# Dependencies

  • cli: prompts 版本从 2.3.0 更新到 2.3.1 (03868f1)

# 1.8.1

# Features

  • core: 完善了实验性的 Usage API (797bde2)
  • utils: getDateNumber 支持传入数字了 (57657c0)

# Bug Fixes

  • core: 修复了 usage._date 不会响应式更新的问题 (f32a7e8)

# 1.8.0

# Features

  • core: 指令默认情况下将隐藏 -h, --help 选项 (a84621d)
  • core: 优化了类型标注 (2446723)
  • core: 优化了调用记录检查 (5f8d8e1)
  • core: 默认情况下将使用 debug 处理 logger 输出 (ea8c3d1)
  • cli: 优化了启动时的报错提示 (b510600)
  • plugin-common: 增加了 authorize 插件的 logger 提示 (2f36aca, fb7dbe6)

# Bug Fixes

  • core: 修复了 CommandConfig.disable 选项的无效行为 (1cffdab)
  • core: 修复了 disable 指令仍可以通过错误纠正机制被调用的问题 (95cf878)
  • core: 修复了无法处理 heartbeat 事件的问题 (36a4602)
  • cli: 修复了错误的路径解析 (06d59b8)
  • plugin-common: 选项的显示将不考虑隐藏选项 (6b1530a)
  • plugin-common: 修复了 authorization 的错误行为 (76663bc)

# Dependencies

  • cli: cac 版本从 6.5.5 更新至 6.5.6
  • 所有官方数据库支持都将 koishi-core 改为 peerDependency

# 1.7.0

# Features

  • cli: 输出日志时会显示 scope (a245fa3)
  • core: before-user, before-group, attach 三个事件将在对应的上下文触发 (658944a)
  • plugin-common: registerUserInfo() 支持传入第三个参数 (7119a58)
  • plugin-common: 新增 contextify --member 选项 (7eb6d20)
  • plugin-nlp: 使用 meta.$parsed.message 取代 meta.message (5d4d7fe)
  • plugin-nlp: cmd.intend() 将返回 this 以便链式调用 (8036e02)

# Bug Fixes

  • core: 快捷调用的 message 将自动去除头部空格 (abb7498, f72ba21)

# Dependencies

  • database-mysql: mysql 版本从 2.18.0 更新到 2.18.1 (dd2fbe3)

# 1.6.0

# Features

  • core: 新增 ctx.onceMiddleware() (7a1dd94)
  • core: 新增 getUsage()updateUsage() 方法 (1527159)
  • core: meta.$stripped 更改为 meta.$parsed (c3b0b50)
  • core: 新增 sender.sendMsg()sender.sendMsgAsync() 方法 (1c3cfee)
  • cli: optimize ecosystem module resolution (ed505b1)

# Bug Fixes

  • core: app.users 等特殊上下文现在将按需生成了 (3ae7e70)
  • core: 异步发送消息现在会触发 before-send 事件了 (1c3cfee)

# Dependencies

  • core: axios 版本从 0.19.1 更新到 0.19.2 (6889e5d)
  • database-mysql: mysql 版本从 2.17.1 更新到 2.18.0 (6889e5d)

# 1.5.0

# Features

  • core: 新增 after-middleware 事件 (bb67894)
  • core: 内置运行时警告改为使用 logger().warn() 输出 (d33781c)
  • cli: 优化了输出的提示 (59052bb)
  • cli: 优化了错误处理函数 (34ebc6e)
  • cli: 支持在配置文件中使用对象/函数式的插件 (37e4bdd)

# Dependencies

  • cli: cac 版本从 6.5.4 更新至 6.5.5 (dfd279c)

# Common Plugin 2.0.0

# Breaking Changes

  • 重构了传入的选项列表 (c5c4283)
  • 移除了 repeater 和 request-handler 插件的默认行为 (117b12e)

# Features

# 1.4.0

# Features

  • cli: 支持 ts 作为配置文件后缀名 (f551d44)
  • cli: koishi init 命令将自动创建文件所在的目录 (644c6b3)
  • cli: 内置插件将直接被 koishi 导出 (e9c3b9c)
  • core: 新增 app.status 属性表示应用状态 (75c64b3)
  • core: send 事件的元信息对象将带有 userId 属性 (edee314)
  • 移除已经废弃的 user.name 属性和 rank, callme, likeme 指令 (9674079, 87be3c1, 20ebbae, ce4feb1, 9293540)

# Bug Fixes

  • cli: 修复了 PluginConfig 的类型 (b3501a6)
  • core: getTargetId 函数将检测输入的类型 (00ab2ce)

# 1.3.1

# Features

  • cli: 支持向子进程传入 execArgv (3bb9f5a)
  • plugin-common: 支持 requestHandler 传入字符串 (936c871)
  • plugin-common: 优化了 admin 指令的调用,增加了一些操作方式 (0cc58cf)

# Bug Fixes

  • cli: 修复了错误的输出等级设置 (ab967c4, 38cc1e1)
  • core: 修复了同时使用长参数和 oneArg 选项时的错误行为 (71a0174, 1932845)
  • database-sqlite: 修复了 sqlite 注入类型错误 (f592c6c)
  • plugin-common: 为 help 执行添加了 userFields (c7650cb)

# 1.3.0

# Features

  • core: 支持了 ctx.logger() 方法和 logger 事件 (5e5e93e, 1e0848e, fa5c46e)
  • cli: 支持通过 logLevel, logFilter 等控制输出等级 (befca0f)
  • cli: 处理 unhandledRejection 事件并输出 (8f6d6fa)
  • cli: 支持 yaml/yml 作为配置文件类型 (27645a4)
  • plugin-common: repeater 插件的部分选项支持 message 参数 (e67b817)
  • plugin-schedule: 正式发布 koishi-plugin-schedule 1.0.0 版本,并作为 koishi 的内置插件 (27645a4)

# Bug Fixes

  • plugin-common: 修复了 authorize 插件无法使用的问题 (5a777a9)
  • database-mysql: 修复了 db.getGroup() 报错的问题 (#16) (3ce0c70)

# Dependencies

  • core: cac 版本从 6.5.3 更新至 6.5.4 (ed9d61b)

# 1.2.0

# Features

  • core: 移除了 meta.$path 属性
  • core: 优化了一些类型标注 (c8f01f8, f8e1c1b)
  • plugin-common: respondent 插件支持简繁体模糊匹配 (cb58388)

# Bug Fixes

  • core: server.listen() 失败后将自动调用 server.close() (ea5c2c9)
  • core: 允许 injectMethods()registerDatabase() 之前调用 (9540892)
  • core: 修复了 showSuggestions 在非私聊上下文出错的问题 (8253522)
  • plugin-common: 修复了 requestHandler 插件在无数据库环境下报错的问题 (cb58388)
  • plugin-common: 修复了 welcome 插件在无数据库环境下报错的问题 (ea5c2c9)

# Dependencies

  • core: axios 版本从 0.19.0 更新至 0.19.1 (01bebe0)

# 1.1.1

# Features

# Bug Fixes

  • core:cmd.execute() 中等待错误提示的发送 (3783f42)

# 1.1.0

# Features

  • core: ready 事件总是在 connect 事件之后触发 (21197df)
  • core: cmd.option() 允许略去 description 参数 (1c3b203)
  • core: 新增 app.executeCommandLine() 用于直接运行指令 (#9) (bcd3ed6)

# Bug Fixes

  • core: ctx.command() 未传入 description 参数时,不会覆盖已有的值 (f1c3605)
  • utils: 优化了 CQCode.unescape() 中的替换顺序 (1c8e33c)
  • plugin-common: help 指令将不会将指令名显示为别名 (e22653b)

# Dependencies

  • core: ws 版本从 7.2.0 更新至 7.2.1 (25a6359)
  • database-level: 将 @types/leveldown, @types/levelup 加入依赖 (3e53e9e)

# 1.0.1

# Bug Fixes

  • cli: koishi init 指令被 SIGINT 打断输入时自动取消文件写入 (1c59df5)
  • utils: observe 传入的 update 函数应该覆盖过去的版本 (7f9756c, 126cb03)