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

Enable Importing Specific Clients Without Pulling in Dependencies for All Clients #320

Open
orisano opened this issue Jul 10, 2024 · 2 comments

Comments

@orisano
Copy link

orisano commented Jul 10, 2024

Dear jira.js maintainers,

First of all, thank you for your hard work on this project. I am currently using the jira.js library in my server-side application. There are four types of clients available: AgileClient, Version2Client, Version3Client, and ServiceDeskClient.

However, I would like to import only the specific client I need. For instance, when I try to import the Version3Client using import { Version3Client } from "jira.js/out/version3/client";, it results in dependencies on all clients from "jira.js/out/clients/index.ts". While tree-shaking could resolve this, I am not using a bundler in my simple server-side program.

Could you please provide a way to import only the specific client needed without pulling in dependencies for all clients? Any guidance or suggestions would be greatly appreciated.

Thank you again for your assistance and for maintaining this useful library.

@andwilr
Copy link

andwilr commented Aug 13, 2024

I second the great appreciation along with the request!

@orisano
Copy link
Author

orisano commented Aug 13, 2024

The change itself is simple; you just need to modify import { BaseClient } from '../../clients'; to import { BaseClient } from '../../clients/baseClient';.
You can see it here:

import { BaseClient } from '../../clients';

What do you think, @MrRefactoring?

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

No branches or pull requests

2 participants