-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Update for V5 (bis) #373
Update for V5 (bis) #373
Conversation
refactor: push 'unit' script at the end fix: update ci explicitkly add and remove typescript lugin test: dont explicitly add ts plugin test: dont explicitly add ts plugin
package.json
Outdated
"test": "npm run unit && npm run typescript && npm run typescript:jest && npm run typescript:esm && npm run typescript:swc && npm run typescript:swc-node-register && npm run typescript:tsm && npm run typescript:tsx && npm run typescript:vitest && npm run typescript:esbuild", | ||
"typescript": "tsd", | ||
"test": "npm run typescript && npm run typescript:jest && npm run typescript:default && npm run typescript:swc && npm run typescript:swc-node-register && npm run typescript:tsm && npm run typescript:tsx && npm run typescript:vitest && npm run typescript:esbuild && npm run unit", | ||
"typescript": "tap plugin add @tapjs/typescript && tsd", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really dissatisfied with launching this type of command, but I don't know how to do better with Tap 18.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm considering exploring alternative approaches, I really don't like the "fix" I am doing. I am gonna delve deeper into their documentation and source code and eventually open an issue on their repository. I could be missing something as I don't really know tap.
@mcollina @climba03003, do you have any suggestions for me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should rely on @tapjs/typescript
It means when we are running under tap
, it is trans-pile by tap
instead of the loader.
package.json
Outdated
@@ -19,8 +20,8 @@ | |||
"typescript:esbuild": "node scripts/unit-typescript-esbuild.js", | |||
"typescript:vitest": "vitest run", | |||
"typescript:vitest:dev": "vitest", | |||
"unit": "node scripts/unit.js", | |||
"unit:with-modules": "tap test/issues/*/test.js test/commonjs/*.js test/module/*.js test/typescript/*.ts" | |||
"unit": "tap plugin rm @tapjs/typescript && node scripts/unit.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typescripts files and other scripts are launched first and tests finish with node scripts/unit.js
.
scripts/unit-typescript.js
Outdated
const args = [ | ||
'tap', | ||
'--disable-coverage', | ||
'test/typescript/*.ts' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can move this test here, the coverage check is not affected.
@@ -1,7 +1,6 @@ | |||
module.exports = async function (app, opts, next) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were tons of warning indicating deprecation for async/callback mix but CI currently don't fail.
I experimented these timeout fails several times... |
Interestingly ubuntu is failing and macos is not |
I am gonna look for these timeouts, CI fail 50% of the time or something like that. |
@climba03003 can you chime in? do you have an idea why this might be happening? |
My advice is do a clean rebase first, it includes too many files that do not belong to this PR. |
Thanks for the sync.
|
Hmmm, no there's a failure on windows too, I hadn't noticed that. |
.taprc
Outdated
@@ -0,0 +1,3 @@ | |||
# vim: set filetype=yaml : | |||
timeout: 60 | |||
plugin: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.taprc
is updated each time tests are run.
It adds the vim modeline and the set plugin to []
.
When validating git commit -a -m
, considering the githook precommit that runs the tests, this is the final result.
I guess it's more convenient to to keep it that way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the use of tap in unit-typescript-*
and run them directly with node.
I think it's ok, do I miss something?
EDIT: Oops, I spoke too fast
"@swc/core": "^1.4.13", | ||
"@swc/register": "^0.1.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.swcrc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this config?
Btw, we must pass env variable SWCRC=true
to load it.
I've done what I can to help @gurgunday , but I'm getting a bit tired with this PR. I don't have enough experience or time currently, I think. If someone more competent than me wants to finish it 😅 |
Read #371 for context.
Some commits have not been merged on
next
, shouldn't they?