-
#320: Resolved a tree-shaking issue where importing a single client would still include all clients in the output bundle when using bundlers. Now, only the required client code is included. Thanks to Nao Yonashiro for reporting the issue and proposing a fix.
-
#327: Replaced the
form-data
library withformdata-node
to enable compatibility withESM
projects when adding attachments via theissueAttachment.addAttachment
method. Thanks to Paweł Król for reporting the issue and Matyáš Kroupa for implementing the fix. -
Improvement: The type of the
projectIdOrKey
property was updated fromstring
tonumber | string
for project update operations. This enhancement improves type safety and flexibility when handling project identifiers. -
Enhancement: Added a
mimeType
property to theversion2.issueAttachments.addAttachment
,version3.issueAttachments.addAttachment
, andserviceDesk.serviceDesk.attachTemporaryFile
methods. This allows specifying the file type. IfmimeType
is not provided, a default type is inferred from the filename.Examples:
👎 Before:
const client = new Version2Client() || new Version3Client() || new ServiceDeskClient(); const attachment = await client.issueAttachments.addAttachment({ issueIdOrKey: issue.key, attachment: { filename: 'issueAttachments.test.ts', file: fs.readFileSync('./tests/integration/version2/issueAttachments.test.ts'), }, }); console.log(attachment[0].mimeType); // Will be 'video/mp2t'
👍 Now:
const client = new Version2Client() || new Version3Client() || new ServiceDeskClient(); const attachment = await client.issueAttachments.addAttachment({ issueIdOrKey: issue.key, attachment: { filename: 'issueAttachments.test.ts', file: fs.readFileSync('./tests/integration/version2/issueAttachments.test.ts'), mimeType: 'application/typescript', }, }); console.log(attachment[0].mimeType); // Will be 'application/typescript'
List view
0 issues of 0 selected
There are no open issues in this milestone
Add issues to milestones to help organize your work for a particular release or project. Find and add issues with no milestones in this repo.