
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.
Jira.js is a powerful Node.js and browser-compatible module that provides seamless interaction with:
Designed for usability, consistency, and performance, it covers nearly 100% of Jira APIs and stays updated with new features.
Requires Node.js 20.0.0 or newer.
# Using npm
npm install jira.js
# Using yarn
yarn add jira.js
# Using pnpm
pnpm add jira.js
Create your first Jira issue in under 5 minutes:
import { Version3Client } from 'jira.js';
const client = new Version3Client({
host: 'https://your-domain.atlassian.net',
authentication: {
basic: {
email: 'your@email.com',
apiToken: 'YOUR_API_TOKEN', // Create one: https://id.atlassian.com/manage-profile/security/api-tokens
},
},
});
async function createIssue() {
const project = await client.projects.getProject({ projectIdOrKey: 'Your project id or key' });
const newIssue = await client.issues.createIssue({
fields: {
summary: 'Hello Jira.js!',
issuetype: { name: 'Task' },
project: { key: project.key },
},
});
console.log(`Issue created: ${newIssue.id}`);
}
createIssue();
Full API reference and guides available at: https://mrrefactoring.github.io/jira.js/
const client = new Version3Client({
host: 'https://your-domain.atlassian.net',
authentication: {
basic: { email: 'YOUR@EMAIL.ORG', apiToken: 'YOUR_API_TOKEN' },
},
});
Only authorization code grants are supported. Implement your own token acquisition flow using Atlassian's OAuth 2.0 documentation.
const client = new Version3Client({
host: 'https://your-domain.atlassian.net',
authentication: {
oauth2: { accessToken: 'YOUR_ACCESS_TOKEN' },
},
});
Errors are categorized as:
HttpException
: Server responded with an error (includes parsed error details)AxiosError
: Network/configuration issues (e.g., timeouts)Example handling:
try {
await client.issues.getIssue({ issueIdOrKey: 'INVALID-123' });
} catch (error) {
if (error instanceof HttpException) {
console.error('Server error:', error.message);
console.debug('Response headers:', error.cause.response?.headers);
} else if (error instanceof AxiosError) {
console.error('Network error:', error.code);
} else {
console.error('Unexpected error:', error);
}
}
Access endpoints using the client.<group>.<method>
pattern:
// Get all projects
const projects = await client.projects.searchProjects();
// Create a sprint
const sprint = await client.sprint.createSprint({ name: 'Q4 Sprint' });
Available API groups:
See full group list in original documentation.
Optimize bundle size by importing only needed modules:
// custom-client.ts
import { BaseClient } from 'jira.js';
import { Issues } from 'jira.js/version3';
import { Board } from 'jira.js/agile';
export class CustomClient extends BaseClient {
issues = new Issues(this);
board = new Board(this);
}
// Usage
const client = new CustomClient({ /* config */ });
await client.issues.getIssue({ issueIdOrKey: 'KEY-1' });
Explore our other Atlassian integration libraries:
MIT License © MrRefactoring See LICENSE for details.
5.2.1
~
alias due to compatibility issues with some build systems. Thanks @ThomasTrepanier, for reporting.FAQs
A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.
The npm package jira.js receives a total of 79,978 weekly downloads. As such, jira.js popularity was classified as popular.
We found that jira.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.