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: updates related to TypeScript 4.4 #1171

Merged
merged 21 commits into from
Aug 31, 2021
Merged

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Aug 27, 2021

This PR does the following:

  • Makes updates to std to make it compatible with TypeScript 4.4 as configured in Deno CLI.
  • Changes a few @ts-ignore to @ts-expect-error as that is better, as several errors are now "fixed" under TS 4.4
  • Make changes so the code base and tests are compatible with "useUnknownInCatchVariables" which is shipping as disabled in Deno CLI 1.14 but hopefully will be enabled for 1.15.

There was also a change in how Deno canary checks files for test and caught some errors in modules that weren't covered by tests.

Because of the improvements to TypeScript 4.4 and the ignored errors that are no longer ignored, the next release of std will not be compatible with Deno prior to 1.14.

@kitsonk kitsonk requested a review from kt3k August 27, 2021 03:03
@kt3k
Copy link
Member

kt3k commented Aug 27, 2021

TypeScript changes look good to me.

The CI failure looks very strange to me.

info: syncing channel updates for '1.54.0-x86_64-apple-darwin'
info: latest update on 2021-07-29, rust version 1.54.0 (a178d0322 2021-07-26)
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-std'
info: installing component 'rustc'
error: 'cargo-fmt' is not installed for the toolchain '1.54.0-x86_64-apple-darwin'
To install, run `rustup component add rustfmt --toolchain 1.54.0-x86_64-apple-darwin`
Failed to format the Rust code.

It looks like something triggered rustup command and cargo fmt somehow?

@kt3k
Copy link
Member

kt3k commented Aug 30, 2021

deno test --doc seems executing all .ts files with canary. (Is that expected behavior? cc @caspervonb )

And therefore the test command executes _wasm_crypto/_build.ts, and that command fails because the command is not supposed to be run in that situation...

@bartlomieju
Copy link
Member

deno test --doc seems executing all .ts files with canary. (Is that expected behavior? cc @caspervonb )

And therefore the test command executes _wasm_crypto/_build.ts, and that command fails because the command is not supposed to be run in that situation...

We should probably just exclude that file from testing

@kt3k
Copy link
Member

kt3k commented Aug 30, 2021

Ok. I'll update with appropriate --ignore options. It seems there are some more files which need to be excluded.

@caspervonb
Copy link
Contributor

deno test --doc seems executing all .ts files with canary. (Is that expected behavior? cc @caspervonb )
And therefore the test command executes _wasm_crypto/_build.ts, and that command fails because the command is not supposed to be run in that situation...

We should probably just exclude that file from testing

Should be scanned for documentation tests but the module should not imported.
Looking into it.

Ok. I'll update with appropriate --ignore options. It seems there are some more files which need to be excluded.

Would gate executable scripts with import.meta.main.

@kt3k kt3k mentioned this pull request Aug 30, 2021
@kitsonk
Copy link
Contributor Author

kitsonk commented Aug 30, 2021

@kt3k I rebased and merged your commit... the commit history is a bit odd now in this PR, but hopefully CI passes.

@kitsonk
Copy link
Contributor Author

kitsonk commented Aug 30, 2021

Hmmm... nope... still doing strange things.

@kt3k
Copy link
Member

kt3k commented Aug 31, 2021

@kitsonk Run tests canary step seems duplicated now. I think the first one should be removed.

@kitsonk
Copy link
Contributor Author

kitsonk commented Aug 31, 2021

Ok, I just need someone to approve it! 😉

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kitsonk kitsonk merged commit b7c61a2 into denoland:main Aug 31, 2021
@kitsonk kitsonk deleted the ts_44_safe branch August 31, 2021 04:39
eternalphane added a commit to eternalphane/deno_std that referenced this pull request Apr 29, 2023
eternalphane added a commit to eternalphane/deno_std that referenced this pull request Apr 29, 2023
eternalphane added a commit to eternalphane/deno_std that referenced this pull request Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants