Skip to content

Ensure first-class support for transpiled & ts code in transports #1381

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

Merged
merged 13 commits into from
Apr 18, 2022

Conversation

castarco
Copy link
Contributor

@castarco castarco commented Mar 22, 2022

This PR upgrades the thread-stream dependency, applies a couple of changes on how transports are created, and adds new tests related to typescript & transpiled code.

  • Changes to improve support for typescript in transports (both transpiled and untranspiled)
  • Tests checking support for untranspiled code
  • Tests checking support for transpiled code

Fixes #1243 .

Sorry, something went wrong.

@castarco castarco marked this pull request as ready for review March 22, 2022 16:47
@castarco castarco changed the title Verify first-class support for transpiled & ts code in transports Ensure first-class support for transpiled & ts code in transports Mar 22, 2022
@mcollina
Copy link
Member

Could you add some docs?

@castarco
Copy link
Contributor Author

castarco commented Mar 23, 2022

Could you add some docs?

Sure. I'll check the broken builds as well.

@castarco
Copy link
Contributor Author

castarco commented Mar 24, 2022

@mcollina I was checking the problems on the big.test.js file, and saw that you added an await sleep(1000) to account for file system synchronisation delays (which seem to be worse on Mac than on Linux).

I'm working on Linux, so I cannot directly check if that will work or not on Mac, but I wonder if relying on the sync command would work, without having to impose arbitrary delays.

Writing this instead:

await execa(`sync`)

or

await execa(`sync`, ['-d', destination])

@mcollina
Copy link
Member

That'd be awesome, feel free to add it. We can still rely on the timer if that's not available.

@jsumners jsumners dismissed their stale review March 26, 2022 13:24

Requested changes have been addressed.

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

I have two concerns with this PR:

  1. I don't know who is going to maintain this new code as neither @mcollina or myself are TypeScript developers.
  2. There are many TODOs littered throughout this new code. I think they should be resolved before this is actually ready to be merged. But I have removed my "request for changes", regardless.

@castarco
Copy link
Contributor Author

castarco commented Mar 27, 2022

@jsumners I sympathise with your two points, they're valid concerns.

  1. Regarding the first point, I see myself maintaining it, I'm a "TypeScript developer" and also a user of Pinojs for my own personal projects. Also, although not formally under Matteo's command, I work at NearForm too. NearForm usually allocates some resources to maintain certain packages of interest.
  2. Regarding the second one, while I agree, I didn't want to fall into scope-creeping; and it's already useful for some TS developers as it is now. The PR is also quite big, and some of the highlighted problems in the TODO comments deserve experiments and research of their own. Maybe I should remove the comments and write proper issues instead.

What really bothers me about this PR... is how I still didn't manage to fix the flaky behaviour of the big.test.js test file 😞 .

@mcollina
Copy link
Member

@kibertoad could you review this? This might a bit fall on you to help with!

@simoneb
Copy link
Contributor

simoneb commented Apr 13, 2022

I know that @castarco cannot work on this any longer, is anybody else looking into this? Any input needed?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@kibertoad
Copy link
Contributor

will take a look shortly, can resolve conflicts as well

@mcollina
Copy link
Member

Thanks!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Most tests for ts integration pass, except for one I intend to fix in
following up commits.
@castarco
Copy link
Contributor Author

@kibertoad I rebased to resolve the conflicts.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V7 transports and Typescript
6 participants