feat!: module & commonjs in commitlint

BREAKING CHANGE: support module, and commonjs types
This commit is contained in:
Ismo Vuorinen
2024-08-21 17:37:06 +03:00
parent ca479deb20
commit 2de156e2c0
4 changed files with 14 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
{
"name": "@ivuorinen/commitlint-config",
"version": "0.2.24",
"type": "module",
"description": "ivuorinen's shareable configuration for commitlint.",
"author": {
"name": "Ismo Vuorinen",
@@ -12,8 +13,15 @@
"engines": {
"node": ">= 18"
},
"main": "index.cjs",
"module": "wrapper.mjs",
"exports": {
"import": "./wrapper.mjs",
"require": "./index.js"
},
"files": [
"index.js",
"index.cjs",
"wrapper.mjs",
"scripts/*"
],
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/commitlint-config#readme",
@@ -23,7 +31,6 @@
"config"
],
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
},
@@ -32,14 +39,12 @@
"url": "https://github.com/ivuorinen/base-configs.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.js"
"postinstall": "node scripts/postinstall.cjs"
},
"dependencies": {
"@commitlint/cli": "19.4.0",
"@commitlint/config-conventional": "19.2.2",
"@ivuorinen/config-checker": "^1.1.4",
"@types/node": "*",
"typescript": ">=4"
"@ivuorinen/config-checker": "^1.1.4"
},
"gitHead": "23d15f15743fb59c1dbe658615ef2ed51c54d230"
}

View File

@@ -2,6 +2,7 @@
const fs = require('fs')
const path = require('path')
// noinspection NpmUsedModulesInstalled
const process = require('process')
const checkConfig = require('@ivuorinen/config-checker')
const foundConfig = checkConfig('commitlint')

View File

@@ -0,0 +1,2 @@
import config from './index.cjs'
export default config