deno 2.0 remove the Deno.close() API
Got error when stop the old log
TypeError: close is not a function at Writable.close (https://jsr.io/@deno-lib/logger/1.1.6/writable.ts:48:5) at Writer.write (https://jsr.io/@deno-lib/logger/1.1.6/writer.ts:72:54) at Logger.write (https://jsr.io/@deno-lib/logger/1.1.6/logger.ts:94:25) at Logger.info (https://jsr.io/@deno-lib/logger/1.1.6/logger.ts:49:18)
当前设置的按天新建日志文件,每到0点的时候就开始报错,翻了一下官方文档,应该就是2.0里面Deno.close() API被移除的原因,我看你writable.ts里面已经写好适配2.0的代码,不过注释掉了,现在2.0正式发布了,是不是可以拿出来用了
Can you submit a pull request? I'd be happy to merge it. You can submit any other API upgrades.
Can you submit a pull request? I'd be happy to merge it. You can submit any other API upgrades.
我翻了一下,目前应该就只有这个close()在2.0里面移除了,writeAll()虽然也被移除了,但是你前面已经换成JSR的了
@zxzlf
Landed on v1.1.7
@UrielCh @zxzlf
https://github.com/deno-library/logger/blob/master/changelog.md
v1.1.7 - 2024.11.11
- Update the used deno API
- move from
@deno-lib/loggerto@deno-library/logger
Why move from @deno-lib/logger to @deno-library/logger
Update Notice: Transition from @deno-lib/logger to @deno-library/logger
We are transitioning the package name from @deno-lib/logger to @deno-library/logger to maintain consistency with the deno-library GitHub repository and to better integrate with the Deno ecosystem.
Key Points:
-
Consistent Naming: The new package name
@deno-library/loggeraligns with the GitHub repository, enhancing brand recognition. - Repository URL: The updated package now corresponds directly with its home on GitHub: https://github.com/deno-library/logger.
Action Required:
Please update your imports and dependencies to use @deno-library/logger instead of @deno-lib/logger. For detailed instructions and any additional information, refer to the official documentation.
Example:
import { Logger } from "jsr:@deno-library/logger";
const logger = new Logger();
We appreciate your support and cooperation. If you have any questions or run into issues, feel free to reach out via the GitHub issues page.
Thank you for being a part of the Deno community!
@UrielCh
I have fixed it
- Deno test
- Publish to JSR
But I can't fix it
- Publish to NPM
I need your help
https://github.com/deno-library/logger/actions/workflows/npm-publish.yml
It's maybe Time to give up DNT and Switch to JSR. The migration mostly consists in preparing a clear README and releaseing it by hand.
JSR repo is not compatible with https import like the legacy deno X
@UrielCh I understand, thanks for your help!
It's maybe Time to give up DNT and Switch to JSR. The migration mostly consists in preparing a clear README and releaseing it by hand.