v4.0.4
-
#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
proje…
-
#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'
This milestone is closed.
No open issues remain. View closed issues or see open milestones in this repository.