jest-community / vscode-jest

The optimal flow for Jest based testing in VS Code
MIT License
2.84k stars 294 forks source link

Extension as dependency #1082

Closed MKdir98 closed 1 year ago

MKdir98 commented 1 year ago

Hello, and thanks for your support in this extension.

I want to use this extension in another project as a dependency. After some research, I found this. I want to know if you have any plans for this.

If everything is OK, we can run an action for this.

connectdotz commented 1 year ago

hi @MKdir98, indeed, we have not been publishing to NPM for a while. I wasn't aware of the original intention for the npm package (@orta, any insight?).

Publish to npm is easy, but I think getting a deeper understanding of the use case can go a long way for us to decide how to support the community going forward. Do you mind sharing with us your intended use case? Is your project also in the vscode ecosystem? Which functionality in this package interests you, and how do plan to invoke them?

MKdir98 commented 1 year ago

Great. Yeah of course

Blueprint is the development tool kit for developing ton applications. It uses jest for its tests.

Now I want to write an extension for integration with Blueprint. I don't want to write the code of the test part from scratch and I want to use your extension.js activate function in our extension.

MKdir98 commented 1 year ago

And one problem I had with that was I wanted to use your container view in my container. I couldn't figure out how can I do that. when I did that it created two extensions. (blueprint extension and jest extension)

orta commented 1 year ago

I'm willing to bet the npm releases were more an accident of doing npm publish instead of vsce publish - I doubt it would be consumable as a useful module, probably not something you want to try support

MKdir98 commented 1 year ago

Thanks Orta for your answer. Do you think I should fork repo and release it for myself is the best way that I have or what?

connectdotz commented 1 year ago

I'm not sure calling the extension's activate function will work correctly, as vscode did some setup (menu, command, activation check etc) for each extension via the manifest in package.json. As @orta said, this package is a vscode extension, it's not suitable for regular npm package consumption.

I won't recommend forking either, you will be missing the updates from the community. You could perhaps help your users install this extension - I am wondering if maybe you could do that in your installation script even.

Closing the issue as this extension is really not fit for npm, therefore, will not be published there. Feel free to open discussions if you have other questions.