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

Support cjs/mjs/cts/mts glue extensions #85

Merged
merged 5 commits into from
Aug 11, 2023
Merged

Support cjs/mjs/cts/mts glue extensions #85

merged 5 commits into from
Aug 11, 2023

Conversation

surc54
Copy link
Member

@surc54 surc54 commented Jul 22, 2023

🤔 What's changed?

This PR adds support for glue files with the following file extensions:

  • Javascript: *.cjs, *.mjs
  • Typescript: *.cts, *.mts

⚡️ What's your motivation?

I wanted to use *.mjs glue files to keep consistency with the rest of my repository.

Fixes #78

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

I decided not to edit the default settings since I'm not aware of what it might affect.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation. N/A
    • I have updated the documentation accordingly. N/A
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

@surc54 surc54 marked this pull request as ready for review July 22, 2023 20:19
@mpkorstanje
Copy link
Contributor

LGTM. Though I'm not an expert.

@xeger can you release this along with VS code?

@mpkorstanje
Copy link
Contributor

@surc54 looks like CI disagrees.

@surc54
Copy link
Member Author

surc54 commented Aug 11, 2023

@mpkorstanje Hmmm, those crashes are quite interesting...

I believe I tracked it down to this line in vscode-languageserver: https://github.com/microsoft/vscode-languageserver-node/blob/07b9d293ea775dfd263562da3e8321d40397a3d0/server/src/node/main.ts#L89

That piece of code seems to be responsible for watching the parent process, and in the event that the parent process seems to have been killed, it will kill the current process as well.

If this is the culprit, that means this PR just exposed the problem by pushing the test running time past the 3s barrier.

I've tried to mitigate this by changing the processId parameter to a string (58d0705) -- but please note that I'm not aware of the consequences of this change (this is my first dabble into vscode extensions)

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Aug 11, 2023

Thanks for the explanation! I don't know much about VSCode either. This project is pretty much all made up by contributions from drive-by-volunteers. Looking at the code though it seems this is the intended solution.

@mpkorstanje mpkorstanje merged commit ac9cec7 into cucumber:main Aug 11, 2023
5 checks passed
@aslakhellesoy
Copy link
Contributor

Hi @surc54,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

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.

Handling *.mts files
3 participants