Skip to content

Commit 12db6ce

Browse files
committed
🏷️ Convert examples and tests to ESM
1 parent 44e4c94 commit 12db6ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+120
-120
lines changed

examples/src/addFixVersion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Version3Client } from 'jira.js';
2-
import { createIssue } from './utils';
3-
import { apiToken, email, host } from './credentials';
2+
import { createIssue } from './utils/index.js';
3+
import { apiToken, email, host } from './credentials.js';
44

55
async function addFixVersion() {
66
const client = new Version3Client({

examples/src/addWorklog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Version3Client } from 'jira.js';
2-
import { createIssue } from './utils';
3-
import { apiToken, email, host } from './credentials';
2+
import { createIssue } from './utils/index.js';
3+
import { apiToken, email, host } from './credentials.js';
44

55
async function addWorklog() {
66
const client = new Version3Client({

examples/src/basic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Version3Client } from 'jira.js';
2-
import { apiToken, email, host } from './credentials';
2+
import { apiToken, email, host } from './credentials.js';
33

44
const client = new Version3Client({
55
host,

examples/src/getAllWorklogs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Version3Client } from 'jira.js';
22
import type { Worklog } from 'jira.js/out/version3/models';
3-
import { apiToken, email, host } from './credentials';
4-
import { addWorklog, createIssue } from './utils';
3+
import { apiToken, email, host } from './credentials.js';
4+
import { addWorklog, createIssue } from './utils/index.js';
55

66
async function getAllWorklogs() {
77
const client = new Version3Client({

examples/src/utils/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from './addWorklog';
2-
export * from './createIssue';
1+
export * from './addWorklog.js';
2+
export * from './createIssue.js';

tests/integration/agile/sprint.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import test from 'ava';
2-
import { AgileModels } from '../../../src';
3-
import { Constants } from '../constants';
2+
import { AgileModels } from '../../../src/index.js';
3+
import { Constants } from '../constants.js';
44
import {
55
createAgileProject, deleteAgileProject, getAgileClient, getVersion3Client,
6-
} from '../utils';
6+
} from '../utils/index.js';
77

88
const client = getAgileClient();
99

tests/integration/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from './constants';
2-
export * as Utils from './utils';
1+
export * from './constants.js';
2+
export * as Utils from './utils/index.js';

tests/integration/utils/cleanupEnvironment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { deleteSoftwareProject } from './deleteSoftwareProject';
1+
import { deleteSoftwareProject } from './deleteSoftwareProject.js';
22

33
export const cleanupEnvironment = async () => {
44
await deleteSoftwareProject();

tests/integration/utils/createAgileProject.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Constants } from '../constants';
2-
import { getVersion3Client } from './getClient';
1+
import { Constants } from '../constants.js';
2+
import { getVersion3Client } from './getClient.js';
33

44
export const createAgileProject = async () => {
55
const client = getVersion3Client();

tests/integration/utils/createIssue.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Constants } from '../constants';
2-
import { getVersion2Client } from './getClient';
1+
import { Constants } from '../constants.js';
2+
import { getVersion2Client } from './getClient.js';
33

44
export const createIssue = async () => {
55
const client = getVersion2Client();

0 commit comments

Comments
 (0)