Closed Shyam-Chen closed 5 months ago
Hi, I added a bug to test the workflow but it still reported success.
It seems like executing TypeScript code (test_all.ts
) might not be necessary anymore, as the code doesn't utilize assertions, so type checking should suffice. Moving the execution to JavaScript could be an option.
Please remove the file changes irrelevant to the CI check to make the semantic of the PR clear.
By the way, could you avoid unnecessary force-pushes? It's relatively inconvenient to track the history.
Due to the use of modern ES modules, Node does not yet support import.meta.main
, a feature exclusively available in Deno.
https://docs.deno.com/runtime/manual/runtime/import_meta_api#importmetamain
require.main === module
// ->
import.meta.url === `file://${process.argv[1]}`
// ->
import esMain from 'es-main';
esMain(import.meta)
Node | Deno | |
---|---|---|
import.meta.url |
:white_check_mark: | :white_check_mark: |
import.meta.main |
:x: | :white_check_mark: |
import.meta.filename |
:white_check_mark: | :white_check_mark: |
import.meta.dirname |
:white_check_mark: | :white_check_mark: |
import.meta.resolve |
:white_check_mark: | :white_check_mark: |
Would you like to add the Javascript's workflow file in another PR?
In JavaScript, only the previously written test_all.ts
can be used for modification. Or use allowJs
in tsconfig.json
?
@Shyam-Chen We can do that for JavaScript because it is a relative Ioose programming language. It's acceptable to only find the exception that crashes the program. (Just like Python)
If this pull request (PR) pertains to Chinese-to-English translation, please confirm that you have read the contribution guidelines and complete the checklist below:
If this pull request (PR) is associated with coding or code transpilation, please attach the relevant console outputs to the PR and complete the following checklist: