Skip to content

Commit

Permalink
Merge pull request #1408 from mikepenz/feature/esm
Browse files Browse the repository at this point in the history
Convert project to use ESM instead of CJS
  • Loading branch information
mikepenz authored Dec 14, 2024
2 parents 8f930b1 + fe815a1 commit f1c05ee
Show file tree
Hide file tree
Showing 36 changed files with 46,827 additions and 47,900 deletions.
5 changes: 3 additions & 2 deletions __tests__/configuration.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {clear} from '../src/transform'
import {mergeConfiguration, parseConfiguration, resolveConfiguration} from '../src/utils'

import {mergeConfiguration, parseConfiguration, resolveConfiguration} from '../src/utils.js'
import { clear } from "../src/transform.js";

jest.setTimeout(180000)
clear()
Expand Down
6 changes: 3 additions & 3 deletions __tests__/demo/demo.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {mergeConfiguration, resolveConfiguration} from '../../src/utils'
import {ReleaseNotesBuilder} from '../../src/releaseNotesBuilder'
import {GithubRepository} from '../../src/repositories/GithubRepository'
import {mergeConfiguration, resolveConfiguration} from '../../src/utils.js'
import {ReleaseNotesBuilder} from '../../src/releaseNotesBuilder.js'
import {GithubRepository} from '../../src/repositories/GithubRepository.js'

jest.setTimeout(180000)

Expand Down
8 changes: 4 additions & 4 deletions __tests__/gitea/releaseNotesBuilderGitea.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {mergeConfiguration, resolveConfiguration} from '../../src/utils'
import {ReleaseNotesBuilder} from '../../src/releaseNotesBuilder'
import {GiteaRepository} from '../../src/repositories/GiteaRepository'
import {clear} from '../../src/transform'
import {mergeConfiguration, resolveConfiguration} from '../../src/utils.js'
import {ReleaseNotesBuilder} from '../../src/releaseNotesBuilder.js'
import {GiteaRepository} from '../../src/repositories/GiteaRepository.js'
import {clear} from '../../src/transform.js'

jest.setTimeout(180000)
clear()
Expand Down
12 changes: 6 additions & 6 deletions __tests__/gitea/releaseNotesBuilderPullGitea.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {checkExportedData, mergeConfiguration, resolveConfiguration} from '../../src/utils'
import {buildChangelog} from '../../src/transform'
import {Options, pullData} from '../../src/pr-collector/prCollector'
import {GiteaRepository} from '../../src/repositories/GiteaRepository'
import {clear} from '../../src/transform'
import {ReleaseNotesOptions} from '../../src/releaseNotesBuilder'
import {checkExportedData, mergeConfiguration, resolveConfiguration} from '../../src/utils.js'
import {buildChangelog} from '../../src/transform.js'
import {Options, pullData} from '../../src/pr-collector/prCollector.js'
import {GiteaRepository} from '../../src/repositories/GiteaRepository.js'
import {clear} from '../../src/transform.js'
import {ReleaseNotesOptions} from '../../src/releaseNotesBuilder.js'

jest.setTimeout(180000)
clear()
Expand Down
2 changes: 1 addition & 1 deletion __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path'
import * as process from 'process'
import * as cp from 'child_process'
import * as fs from 'fs'
import {clear} from '../src/transform'
import {clear} from '../src/transform.js'

jest.setTimeout(180000)
clear()
Expand Down
6 changes: 3 additions & 3 deletions __tests__/regexUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {transformStringToValue, validateRegex} from '../src/pr-collector/regexUtils'
import {Regex} from '../src/pr-collector/types'
import {clear} from '../src/transform'
import {transformStringToValue, validateRegex} from '../src/pr-collector/regexUtils.js'
import {Regex} from '../src/pr-collector/types.js'
import {clear} from '../src/transform.js'

jest.setTimeout(180000)
clear()
Expand Down
8 changes: 4 additions & 4 deletions __tests__/releaseNotesBuilder.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {mergeConfiguration, resolveConfiguration} from '../src/utils'
import {ReleaseNotesBuilder} from '../src/releaseNotesBuilder'
import {GithubRepository} from '../src/repositories/GithubRepository'
import {clear} from '../src/transform'
import {mergeConfiguration, resolveConfiguration} from '../src/utils.js'
import {ReleaseNotesBuilder} from '../src/releaseNotesBuilder.js'
import {GithubRepository} from '../src/repositories/GithubRepository.js'
import {clear} from '../src/transform.js'

jest.setTimeout(180000)
clear()
Expand Down
12 changes: 6 additions & 6 deletions __tests__/releaseNotesBuilderPull.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {checkExportedData, mergeConfiguration, resolveConfiguration} from '../src/utils'
import {buildChangelog} from '../src/transform'
import {Options, pullData} from '../src/pr-collector/prCollector'
import {GithubRepository} from '../src/repositories/GithubRepository'
import {clear} from '../src/transform'
import {ReleaseNotesOptions} from '../src/releaseNotesBuilder'
import {checkExportedData, mergeConfiguration, resolveConfiguration} from '../src/utils.js'
import {buildChangelog} from '../src/transform.js'
import {Options, pullData} from '../src/pr-collector/prCollector.js'
import {GithubRepository} from '../src/repositories/GithubRepository.js'
import {clear} from '../src/transform.js'
import {ReleaseNotesOptions} from '../src/releaseNotesBuilder.js'

jest.setTimeout(180000)
clear()
Expand Down
8 changes: 4 additions & 4 deletions __tests__/tags.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {TagResolver} from '../src/configuration'
import {validateRegex} from '../src/pr-collector/regexUtils'
import {filterTags, prepareAndSortTags, TagInfo, transformTags} from '../src/pr-collector/tags'
import {clear} from '../src/transform'
import {TagResolver} from '../src/configuration.js'
import {validateRegex} from '../src/pr-collector/regexUtils.js'
import {filterTags, prepareAndSortTags, TagInfo, transformTags} from '../src/pr-collector/tags.js'
import {clear} from '../src/transform.js'

jest.setTimeout(180000)
clear()
Expand Down
14 changes: 7 additions & 7 deletions __tests__/transform.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {buildChangelog} from '../src/transform'
import {buildChangelog} from '../src/transform.js'
import moment from 'moment'
import {Configuration, DefaultConfiguration} from '../src/configuration'
import {PullRequestInfo} from '../src/pr-collector/pullRequests'
import {DefaultDiffInfo} from '../src/pr-collector/commits'
import {GithubRepository} from '../src/repositories/GithubRepository'
import {clear} from '../src/transform'
import {buildChangelogTest} from './utils'
import {DefaultConfiguration} from '../src/configuration.js'
import {PullRequestInfo} from '../src/pr-collector/pullRequests.js'
import {DefaultDiffInfo} from '../src/pr-collector/commits.js'
import {GithubRepository} from '../src/repositories/GithubRepository.js'
import {clear} from '../src/transform.js'
import { buildChangelogTest } from "./utils.js";

jest.setTimeout(180000)
clear()
Expand Down
10 changes: 5 additions & 5 deletions __tests__/transformNested.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import moment from 'moment'
import {DefaultConfiguration} from '../src/configuration'
import {PullRequestInfo} from '../src/pr-collector/pullRequests'
import {GithubRepository} from '../src/repositories/GithubRepository'
import {clear} from '../src/transform'
import {buildChangelogTest, buildPullRequeset} from './utils'
import {DefaultConfiguration} from '../src/configuration.js'
import {PullRequestInfo} from '../src/pr-collector/pullRequests.js'
import {GithubRepository} from '../src/repositories/GithubRepository.js'
import {clear} from '../src/transform.js'
import {buildChangelogTest, buildPullRequeset} from './utils.js'

jest.setTimeout(180000)
clear()
Expand Down
10 changes: 5 additions & 5 deletions __tests__/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Configuration} from '../src/configuration'
import {DefaultDiffInfo} from '../src/pr-collector/commits'
import {PullRequestInfo} from '../src/pr-collector/pullRequests'
import {buildChangelog} from '../src/transform'
import {BaseRepository} from '../src/repositories/BaseRepository'
import {Configuration} from '../src/configuration.js'
import {DefaultDiffInfo} from '../src/pr-collector/commits.js'
import {PullRequestInfo} from '../src/pr-collector/pullRequests.js'
import {buildChangelog} from '../src/transform.js'
import {BaseRepository} from '../src/repositories/BaseRepository.js'
import moment from 'moment'

export const buildChangelogTest = (config: Configuration, prs: PullRequestInfo[], repositoryUtils: BaseRepository): string => {
Expand Down
Loading

0 comments on commit f1c05ee

Please sign in to comment.