Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Jul 12, 2023
1 parent 8fe5afe commit 68debdd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/conventional-changelog-config/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "conventional-changelog-techor",
"scripts": {
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --loader:.hbs=copy --asset-names=[dir]/[name] --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --external:upath",
"build:esm": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --loader:.hbs=copy --asset-names=[dir]/[name] --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --external:upath",
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --loader:.hbs=text --asset-names=[dir]/[name] --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --external:upath",
"build:esm": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --loader:.hbs=text --asset-names=[dir]/[name] --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --external:upath",
"build:type": "tsc --emitDeclarationOnly --preserveWatchOutput",
"build": "npm run build:cjs && npm run build:esm && npm run build:type",
"dev": "conc 'npm:build:* -- --watch'",
Expand Down
9 changes: 3 additions & 6 deletions packages/conventional-changelog-config/src/writer-opts.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import compareFunc from 'compare-func'
import { commits } from 'techor-conventional-commits'
import { readFileSync } from 'fs'
import path from 'path'

const mainTemplate = readFileSync(path.resolve(__dirname, './templates/template.hbs')).toString()
const footerPartial = readFileSync(path.resolve(__dirname, './templates/footer.hbs')).toString()
const commitPartial = readFileSync(path.resolve(__dirname, './templates/commit.hbs')).toString()
import mainTemplate from './templates/template.hbs'
import footerPartial from './templates/footer.hbs'
import commitPartial from './templates/commit.hbs'

export default {
transform: (commit, context) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/conventional-changelog-config/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import commit from '../../../utils/commit'
import initFakeGit from '../../../utils/init-fake-git'
import { writeFileSync } from '../../fs/src'

const config = require('../src')
const config = require('../dist')
const conventionalChangelogCore = require('conventional-changelog-core')

if (process.platform === 'win32') {
Expand Down

0 comments on commit 68debdd

Please sign in to comment.