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

denomailer broken since 1.42.2 deno release #86

Open
MarcLoupias opened this issue May 15, 2024 · 1 comment
Open

denomailer broken since 1.42.2 deno release #86

MarcLoupias opened this issue May 15, 2024 · 1 comment
Assignees
Labels
bug Something isn't working triage

Comments

@MarcLoupias
Copy link

Describe the bug

denomailer is broken since 1.42.2 deno release.

The denomailer e2e tests exec output this :

marco@marco-ubuntu:~/dev/open-source/denomailer$ deno test --unstable -A ./test/e2e/
⚠️  The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-*` flags instead.
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags
Check file:///home/marco/dev/open-source/denomailer/test/e2e/attachment.test.ts
Check file:///home/marco/dev/open-source/denomailer/test/e2e/basic.test.ts
error: TS2345 [ERROR]: Argument of type 'Conn<Addr>' is not assignable to parameter of type 'TcpConn'.
  Type 'Conn<Addr>' is missing the following properties from type 'TcpConn': setNoDelay, setKeepAlive
      const conn = await Deno.startTls(this.#connection.conn, {
                                       ~~~~~~~~~~~~~~~~~~~~~
    at file:///home/marco/dev/open-source/denomailer/client/basic/client.ts:339:40

To Reproduce

Set your deno version to 1.42.2 :

marco@marco-ubuntu:~/dev/open-source/denomailer$ deno upgrade --version 1.42.2
Downloading https://github.com/denoland/deno/releases/download/v1.42.2/deno-x86_64-unknown-linux-gnu.zip
Deno is upgrading to version 1.42.2
Archive:  /tmp/.tmp9PZqIv/deno.zip
  inflating: deno                    
Upgraded successfully
Release notes: https://github.com/denoland/deno/releases/tag/v1.42.2
Blog post: https://deno.com/blog/v1.42

Run the fake smtp server :

marco@marco-ubuntu:~/dev/open-source/denomailer$ docker run -d -p 1080:1080 -p 1025:1025 reachfive/fake-smtp-server
Unable to find image 'reachfive/fake-smtp-server:latest' locally
latest: Pulling from reachfive/fake-smtp-server
169185f82c45: Pull complete 
53e52a67e355: Pull complete 
fc2cb9a5e98e: Pull complete 
67e7f49d4884: Pull complete 
702661cf2202: Pull complete 
Digest: sha256:4b6d2f1e24481527de1429f88db18a377252a5e9e95bc083fa3d77e402cdadc8
Status: Downloaded newer image for reachfive/fake-smtp-server:latest
f43b730f5e89b24c1bae2e9f41ca6d569ed2200a04b5fa113335f717a0840120

Run the e2e tests :

marco@marco-ubuntu:~/dev/open-source/denomailer$ deno test --unstable -A ./test/e2e/
⚠️  The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-*` flags instead.
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags
Check file:///home/marco/dev/open-source/denomailer/test/e2e/attachment.test.ts
Check file:///home/marco/dev/open-source/denomailer/test/e2e/basic.test.ts
error: TS2345 [ERROR]: Argument of type 'Conn<Addr>' is not assignable to parameter of type 'TcpConn'.
  Type 'Conn<Addr>' is missing the following properties from type 'TcpConn': setNoDelay, setKeepAlive
      const conn = await Deno.startTls(this.#connection.conn, {
                                       ~~~~~~~~~~~~~~~~~~~~~
    at file:///home/marco/dev/open-source/denomailer/client/basic/client.ts:339:40

Expected behavior

Works as expected with deno 1.42.1.

Set deno to 1.42.1 :

marco@marco-ubuntu:~/dev/open-source/denomailer$ deno upgrade --version 1.42.1
Downloading https://github.com/denoland/deno/releases/download/v1.42.1/deno-x86_64-unknown-linux-gnu.zip
Deno is upgrading to version 1.42.1
Archive:  /tmp/.tmp1kqjid/deno.zip
  inflating: deno                    
Upgraded successfully
Release notes: https://github.com/denoland/deno/releases/tag/v1.42.1
Blog post: https://deno.com/blog/v1.42

Then run the tests assuming fake-smtp-server docker image is running on background :

marco@marco-ubuntu:~/dev/open-source/denomailer$ deno test --unstable -A ./test/e2e/
⚠️  The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-*` flags instead.
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags
Check file:///home/marco/dev/open-source/denomailer/test/e2e/attachment.test.ts
Check file:///home/marco/dev/open-source/denomailer/test/e2e/basic.test.ts
running 3 tests from ./test/e2e/attachment.test.ts
test text attachment ... ok (383ms)
test binary attachment ... ok (2s)
test more text attachment ... ok (611ms)
running 4 tests from ./test/e2e/basic.test.ts
test simplest mail ... ok (323ms)
test simplest mail with pool ...⚠️  The `Worker.deno.permissions` API was used with `--unstable` flag. The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-worker-options` instead.
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags

------- post-test output -------
started idle
----- post-test output end -----
test simplest mail with pool ... ok (2s)
test subject ... ok (2s)
test html ... ok (480ms)

ok | 7 passed | 0 failed (8s)

If this package is not maintained anymore it should be archived ;)

@MarcLoupias MarcLoupias added bug Something isn't working triage labels May 15, 2024
@MarcLoupias
Copy link
Author

Added a PR, it is just a type check failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants