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

🚧 Pipeline for feature/esm #1

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 6 additions & 5 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parser: "@typescript-eslint/parser"
parser: '@typescript-eslint/parser'
extends:
- airbnb-base
- prettier
parserOptions:
ecmaVersion: 2018
project: ./tsconfig.lint.json
Expand All @@ -10,7 +11,7 @@ env:
node: true
browser: true
rules:
"@typescript-eslint/lines-between-class-members": off
'@typescript-eslint/lines-between-class-members': off
arrow-parens:
- error
- as-needed
Expand All @@ -37,7 +38,7 @@ rules:
padding-line-between-statements:
- error
- blankLine: always
prev: "*"
prev: '*'
next:
- block
- block-like
Expand All @@ -59,7 +60,7 @@ rules:
- import
- let
- var
next: "*"
next: '*'
- blankLine: any
prev:
- const
Expand All @@ -86,5 +87,5 @@ rules:
- export
settings:
import/parsers:
"@typescript-eslint/parser":
'@typescript-eslint/parser':
- .ts
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ out/
docs/
coverage/

pnpm-lock.yaml
yarn.lock
yarn-error.log
.DS_Store
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Jira.js changelog

### 4.0.3

- **Bug Fix:** Fixed an issue with the `Users.createUser` method by adding the required `products` property. Thanks to [Appelberg-s](https://github.com/Appelberg-s) for the [fix](https://github.com/MrRefactoring/jira.js/commit/362918093c20036049db334743e2a0f5f41cbcd4#diff-6960050bc2a3d9ffad9eb5e307145969dc4a38eb5434eebf39da545fd18e01b7R12).
- **Documentation Update:** Corrected an error in `README.md`. Thanks to [Maurice de Bruyn](https://github.com/ueberBrot) for the [contribution](https://github.com/MrRefactoring/jira.js/commit/fb6151e1a0c7953b9447aaaf99caea5c2f93bb96).
- **Dependencies:** Updated all dependencies to their latest versions.

### 4.0.2

- `getAllProjects` in README and examples replaced to `searchProjects`. Thanks to [Alexander Pivovarov](https://github.com/bladerunner2020) for reporting [the issue](https://github.com/MrRefactoring/jira.js/issues/323).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ If the original error is required, you can get it from the `cause` property of t
try {
const users = await this.client.userSearch.findUsers({ query: email });
// ...
} catch (error: uknown) {
} catch (error: unknown) {
if (error instanceof HttpException) {
console.log(error.message);
console.log(error.cause); // original error (AxiosError | Error)
Expand Down
15 changes: 15 additions & 0 deletions assets/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
},
"dependencies": {
"jira.js": "latest"
}
},
"type": "module"
}
4 changes: 2 additions & 2 deletions examples/src/addFixVersion.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Version3Client } from 'jira.js';
import { createIssue } from './utils';
import { apiToken, email, host } from './credentials';
import { createIssue } from './utils/index.js';
import { apiToken, email, host } from './credentials.js';

async function addFixVersion() {
const client = new Version3Client({
Expand Down
4 changes: 2 additions & 2 deletions examples/src/addWorklog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Version3Client } from 'jira.js';
import { createIssue } from './utils';
import { apiToken, email, host } from './credentials';
import { createIssue } from './utils/index.js';
import { apiToken, email, host } from './credentials.js';

async function addWorklog() {
const client = new Version3Client({
Expand Down
11 changes: 5 additions & 6 deletions examples/src/basic.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Version3Client } from 'jira.js';
import { apiToken, email, host } from './credentials';
import { apiToken, email, host } from './credentials.js';

const client = new Version3Client({
host,
Expand Down Expand Up @@ -45,9 +45,8 @@ async function main() {
}
}

main()
.catch(e => {
console.error(e);
main().catch(e => {
console.error(e);

throw new Error(JSON.stringify(e));
});
throw new Error(JSON.stringify(e));
});
7 changes: 4 additions & 3 deletions examples/src/getAllWorklogs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Version3Client } from 'jira.js';
import { addWorklog, createIssue } from './utils';
import { apiToken, email, host } from './credentials';
import type { Worklog } from 'jira.js/out/version3/models';
import { apiToken, email, host } from './credentials.js';
import { addWorklog, createIssue } from './utils/index.js';

async function getAllWorklogs() {
const client = new Version3Client({
Expand All @@ -19,7 +20,7 @@ async function getAllWorklogs() {
await addWorklog(client, issue);

// The main part responsible for getting the worklogs
const worklogs = [];
const worklogs: Worklog[] = [];

let offset = 0;
let total = 0;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './addWorklog';
export * from './createIssue';
export * from './addWorklog.js';
export * from './createIssue.js';
Loading
Loading