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

Update for V5 (bis) #373

Open
wants to merge 10 commits into
base: next
Choose a base branch
from
Open

Update for V5 (bis) #373

wants to merge 10 commits into from

Conversation

jean-michelet
Copy link
Contributor

Read #371 for context.

Some commits have not been merged on next, shouldn't they?

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",
Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Member

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",
Copy link
Contributor Author

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.

const args = [
'tap',
'--disable-coverage',
'test/typescript/*.ts'
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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.

@jean-michelet
Copy link
Contributor Author

I experimented these timeout fails several times...

@gurgunday
Copy link
Member

Interestingly ubuntu is failing and macos is not

@jean-michelet
Copy link
Contributor Author

jean-michelet commented May 10, 2024

I am gonna look for these timeouts, CI fail 50% of the time or something like that.

package.json Outdated Show resolved Hide resolved
@gurgunday
Copy link
Member

@climba03003 can you chime in? do you have an idea why this might be happening?

@climba03003
Copy link
Member

My advice is do a clean rebase first, it includes too many files that do not belong to this PR.
If you need to sync the next branch, you can ask us to sync it.

@jean-michelet
Copy link
Contributor Author

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: []
Copy link
Contributor Author

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?

Copy link
Contributor Author

@jean-michelet jean-michelet left a 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",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

.swcrc Outdated
Copy link
Contributor Author

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.

@jean-michelet
Copy link
Contributor Author

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 😅

@climba03003 climba03003 mentioned this pull request Jun 5, 2024
4 tasks
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

4 participants