Skip to content

Commit

Permalink
fix: fix backwards compatibility with people using commitlint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wagoid committed Mar 28, 2024
1 parent e15adf3 commit 5a6193d
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM node:20.9.0-alpine3.17

RUN apk --no-cache add git

COPY --from=build dist/run.mjs /run.mjs
COPY --from=build dist/run.js /run.js

COPY package*.json /

Expand Down
4 changes: 1 addition & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ fi
# Info about the vunlerability: https://github.blog/2022-04-12-git-security-vulnerability-announced/
git config --global --add safe.directory "$GITHUB_WORKSPACE"

export NODE_OPTIONS="$NODE_OPTIONS --experimental-vm-modules"

node /run.mjs
node /run.js
77 changes: 77 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@jest/globals": "^29.7.0",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^14.1.0",
"babel-jest": "^29.7.0",
"commit-and-tag-version": "^12.2.0",
Expand Down
6 changes: 4 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import path from 'path'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import { babel } from '@rollup/plugin-babel'
import json from '@rollup/plugin-json'
import pkg from './package.json'

export default {
input: 'run.mjs',
external: (depName) =>
depName.includes('node_modules') && !depName.includes('node_modules/dargs'),
output: [{ file: pkg.module, format: 'es' }],
depName.includes('node_modules') && !depName.includes('node_modules/dargs') && !depName.includes('@commitlint'),
output: [{ file: './dist/run.js', format: 'commonjs' }],
plugins: [
babel({
babelHelpers: 'bundled',
Expand All @@ -19,5 +20,6 @@ export default {
preferBuiltins: true,
}),
commonjs(),
json (),
],
}

0 comments on commit 5a6193d

Please sign in to comment.