diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index a6853d0..beb2a8f 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -5,12 +5,16 @@ on: branches: - main paths: + - index.d.ts + - index.js - index.ts - package.json push: branches: - main paths: + - index.d.ts + - index.js - index.ts - package.json diff --git a/define-config.ts b/define-config.ts new file mode 100644 index 0000000..d879147 --- /dev/null +++ b/define-config.ts @@ -0,0 +1,14 @@ +import { UserConfig } from '@commitlint/types'; + +/** + * Define an Commitlint config. + * + * @param {object} config Commitlint config. + * + * @returns Commitlint config. + */ +const defineConfig = (config: UserConfig): UserConfig => { + return config; +}; + +export { defineConfig }; diff --git a/index.ts b/index.ts index 26fcabd..3787ee3 100644 --- a/index.ts +++ b/index.ts @@ -1,14 +1 @@ -import type { UserConfig } from '@commitlint/types'; - -/** - * Define an Commitlint config. - * - * @param {object} config Commitlint config. - * - * @returns Commitlint config. - */ -const defineConfig = (config: UserConfig): UserConfig => { - return config; -}; - -export { defineConfig }; +const n=e=>e;export{n as defineConfig}; diff --git a/lint-staged.config.js b/lint-staged.config.js index 942fc1d..932a2dc 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,4 +1,4 @@ export default { '**/*': 'prettier --write', - 'index.ts': 'eslint --fix', + 'define-config.ts': 'eslint --fix', }; diff --git a/package.json b/package.json index 8024c99..04fda2b 100644 --- a/package.json +++ b/package.json @@ -39,11 +39,13 @@ "type": "module", "types": "index.d.ts", "exports": { - ".": "./index.js" + ".": "./index.js", + "./index.ts": "./index.ts" }, "files": [ "index.d.ts", - "index.js" + "index.js", + "index.ts" ], "scripts": { "init": "pnpm i && husky && git submodule update", @@ -54,7 +56,7 @@ "lint:editorconfig": "editorconfig-checker", "lint:formatting": "prettier . --check", "lint:md": "remark . --quiet", - "lint:ts": "eslint index.ts --fix", + "lint:ts": "eslint define-config.ts --fix", "prettify": "prettier . --write", "commit": "cz" }, @@ -62,14 +64,14 @@ "@commitlint/types": "^19.0.3" }, "devDependencies": { - "@archoleat/semantic-release-define-config": "^1.1.0", + "@archoleat/semantic-release-define-config": "^1.1.1", "@commitlint/cli": "^19.2.1", "@commitlint/config-conventional": "^19.1.0", "@rollup/plugin-typescript": "^11.1.6", "@semantic-release/changelog": "^6.0.3", "@semantic-release/git": "^10.0.1", - "@typescript-eslint/eslint-plugin": "^7.3.1", - "@typescript-eslint/parser": "^7.3.1", + "@typescript-eslint/eslint-plugin": "^7.4.0", + "@typescript-eslint/parser": "^7.4.0", "@vitest/coverage-v8": "^1.4.0", "conventional-changelog-conventionalcommits": "^7.0.2", "cz-conventional-changelog": "^3.3.0", @@ -80,7 +82,7 @@ "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", "eslint-plugin-unicorn": "^51.0.1", - "globals": "^14.0.0", + "globals": "^15.0.0", "husky": "^9.0.11", "lint-staged": "^15.2.2", "prettier": "^3.2.5", @@ -89,7 +91,7 @@ "remark-preset-lint-consistent": "^5.1.2", "remark-preset-lint-markdown-style-guide": "^5.1.3", "remark-preset-lint-recommended": "^6.1.3", - "rollup": "^4.13.0", + "rollup": "^4.13.1", "rollup-plugin-dts": "^6.1.0", "rollup-plugin-esbuild": "^6.1.1", "semantic-release": "^23.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1d6f6ad..feab380 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,8 @@ dependencies: devDependencies: '@archoleat/semantic-release-define-config': - specifier: ^1.1.0 - version: 1.1.0 + specifier: ^1.1.1 + version: 1.1.1 '@commitlint/cli': specifier: ^19.2.1 version: 19.2.1(@types/node@20.11.30)(typescript@5.4.3) @@ -21,7 +21,7 @@ devDependencies: version: 19.1.0 '@rollup/plugin-typescript': specifier: ^11.1.6 - version: 11.1.6(rollup@4.13.0)(typescript@5.4.3) + version: 11.1.6(rollup@4.13.1)(typescript@5.4.3) '@semantic-release/changelog': specifier: ^6.0.3 version: 6.0.3(semantic-release@23.0.6) @@ -29,11 +29,11 @@ devDependencies: specifier: ^10.0.1 version: 10.0.1(semantic-release@23.0.6) '@typescript-eslint/eslint-plugin': - specifier: ^7.3.1 - version: 7.3.1(@typescript-eslint/parser@7.3.1)(eslint@8.57.0)(typescript@5.4.3) + specifier: ^7.4.0 + version: 7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3) '@typescript-eslint/parser': - specifier: ^7.3.1 - version: 7.3.1(eslint@8.57.0)(typescript@5.4.3) + specifier: ^7.4.0 + version: 7.4.0(eslint@8.57.0)(typescript@5.4.3) '@vitest/coverage-v8': specifier: ^1.4.0 version: 1.4.0(vitest@1.4.0) @@ -51,22 +51,22 @@ devDependencies: version: 8.57.0 eslint-config-airbnb-typescript: specifier: ^18.0.0 - version: 18.0.0(@typescript-eslint/eslint-plugin@7.3.1)(@typescript-eslint/parser@7.3.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + version: 18.0.0(@typescript-eslint/eslint-plugin@7.4.0)(@typescript-eslint/parser@7.4.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-define-config: specifier: ^2.1.0 version: 2.1.0 eslint-import-resolver-typescript: specifier: ^3.6.1 - version: 3.6.1(@typescript-eslint/parser@7.3.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + version: 3.6.1(@typescript-eslint/parser@7.4.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.3.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.4.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-unicorn: specifier: ^51.0.1 version: 51.0.1(eslint@8.57.0) globals: - specifier: ^14.0.0 - version: 14.0.0 + specifier: ^15.0.0 + version: 15.0.0 husky: specifier: ^9.0.11 version: 9.0.11 @@ -92,14 +92,14 @@ devDependencies: specifier: ^6.1.3 version: 6.1.3 rollup: - specifier: ^4.13.0 - version: 4.13.0 + specifier: ^4.13.1 + version: 4.13.1 rollup-plugin-dts: specifier: ^6.1.0 - version: 6.1.0(rollup@4.13.0)(typescript@5.4.3) + version: 6.1.0(rollup@4.13.1)(typescript@5.4.3) rollup-plugin-esbuild: specifier: ^6.1.1 - version: 6.1.1(esbuild@0.20.2)(rollup@4.13.0) + version: 6.1.1(esbuild@0.20.2)(rollup@4.13.1) semantic-release: specifier: ^23.0.6 version: 23.0.6(typescript@5.4.3) @@ -125,8 +125,8 @@ packages: '@jridgewell/trace-mapping': 0.3.25 dev: true - /@archoleat/semantic-release-define-config@1.1.0: - resolution: {integrity: sha512-AUEfpcgHylMBalcZYBwe7ihmrbvb4h3MtoqvaEKGks0PnEDQrldp1C1b8u+4QPnBfT+KpZXiuY/jhVEg384u1g==} + /@archoleat/semantic-release-define-config@1.1.1: + resolution: {integrity: sha512-GQ7KW0wTROg5Zcz9QxWm0fTKv9P704mr8cUBwVai/H1lOIfWqhrwjXbTkr/Ya19Jm2o1vgalvTBQmKkJjaC7dA==} engines: {node: '>=20.0.0', npm: '>=10.0.0', pnpm: '>=8.0.0'} dev: true @@ -844,7 +844,7 @@ packages: config-chain: 1.1.13 dev: true - /@rollup/plugin-typescript@11.1.6(rollup@4.13.0)(typescript@5.4.3): + /@rollup/plugin-typescript@11.1.6(rollup@4.13.1)(typescript@5.4.3): resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -857,13 +857,13 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.13.0) + '@rollup/pluginutils': 5.1.0(rollup@4.13.1) resolve: 1.22.8 - rollup: 4.13.0 + rollup: 4.13.1 typescript: 5.4.3 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.13.0): + /@rollup/pluginutils@5.1.0(rollup@4.13.1): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -875,107 +875,115 @@ packages: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.13.0 + rollup: 4.13.1 dev: true - /@rollup/rollup-android-arm-eabi@4.13.0: - resolution: {integrity: sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==} + /@rollup/rollup-android-arm-eabi@4.13.1: + resolution: {integrity: sha512-4C4UERETjXpC4WpBXDbkgNVgHyWfG3B/NKY46e7w5H134UDOFqUJKpsLm0UYmuupW+aJmRgeScrDNfvZ5WV80A==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.13.0: - resolution: {integrity: sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==} + /@rollup/rollup-android-arm64@4.13.1: + resolution: {integrity: sha512-TrTaFJ9pXgfXEiJKQ3yQRelpQFqgRzVR9it8DbeRzG0RX7mKUy0bqhCFsgevwXLJepQKTnLl95TnPGf9T9AMOA==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.13.0: - resolution: {integrity: sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==} + /@rollup/rollup-darwin-arm64@4.13.1: + resolution: {integrity: sha512-fz7jN6ahTI3cKzDO2otQuybts5cyu0feymg0bjvYCBrZQ8tSgE8pc0sSNEuGvifrQJWiwx9F05BowihmLxeQKw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.13.0: - resolution: {integrity: sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==} + /@rollup/rollup-darwin-x64@4.13.1: + resolution: {integrity: sha512-WTvdz7SLMlJpektdrnWRUN9C0N2qNHwNbWpNo0a3Tod3gb9leX+yrYdCeB7VV36OtoyiPAivl7/xZ3G1z5h20g==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.13.0: - resolution: {integrity: sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==} + /@rollup/rollup-linux-arm-gnueabihf@4.13.1: + resolution: {integrity: sha512-dBHQl+7wZzBYcIF6o4k2XkAfwP2ks1mYW2q/Gzv9n39uDcDiAGDqEyml08OdY0BIct0yLSPkDTqn4i6czpBLLw==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.13.0: - resolution: {integrity: sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==} + /@rollup/rollup-linux-arm64-gnu@4.13.1: + resolution: {integrity: sha512-bur4JOxvYxfrAmocRJIW0SADs3QdEYK6TQ7dTNz6Z4/lySeu3Z1H/+tl0a4qDYv0bCdBpUYM0sYa/X+9ZqgfSQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.13.0: - resolution: {integrity: sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==} + /@rollup/rollup-linux-arm64-musl@4.13.1: + resolution: {integrity: sha512-ssp77SjcDIUSoUyj7DU7/5iwM4ZEluY+N8umtCT9nBRs3u045t0KkW02LTyHouHDomnMXaXSZcCSr2bdMK63kA==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.13.0: - resolution: {integrity: sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==} + /@rollup/rollup-linux-riscv64-gnu@4.13.1: + resolution: {integrity: sha512-Jv1DkIvwEPAb+v25/Unrnnq9BO3F5cbFPT821n3S5litkz+O5NuXuNhqtPx5KtcwOTtaqkTsO+IVzJOsxd11aQ==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.13.0: - resolution: {integrity: sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==} + /@rollup/rollup-linux-s390x-gnu@4.13.1: + resolution: {integrity: sha512-U564BrhEfaNChdATQaEODtquCC7Ez+8Hxz1h5MAdMYj0AqD0GA9rHCpElajb/sQcaFL6NXmHc5O+7FXpWMa73Q==} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.13.1: + resolution: {integrity: sha512-zGRDulLTeDemR8DFYyFIQ8kMP02xpUsX4IBikc7lwL9PrwR3gWmX2NopqiGlI2ZVWMl15qZeUjumTwpv18N7sQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.13.0: - resolution: {integrity: sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==} + /@rollup/rollup-linux-x64-musl@4.13.1: + resolution: {integrity: sha512-VTk/MveyPdMFkYJJPCkYBw07KcTkGU2hLEyqYMsU4NjiOfzoaDTW9PWGRsNwiOA3qI0k/JQPjkl/4FCK1smskQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.13.0: - resolution: {integrity: sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==} + /@rollup/rollup-win32-arm64-msvc@4.13.1: + resolution: {integrity: sha512-L+hX8Dtibb02r/OYCsp4sQQIi3ldZkFI0EUkMTDwRfFykXBPptoz/tuuGqEd3bThBSLRWPR6wsixDSgOx/U3Zw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.13.0: - resolution: {integrity: sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==} + /@rollup/rollup-win32-ia32-msvc@4.13.1: + resolution: {integrity: sha512-+dI2jVPfM5A8zme8riEoNC7UKk0Lzc7jCj/U89cQIrOjrZTCWZl/+IXUeRT2rEZ5j25lnSA9G9H1Ob9azaF/KQ==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.13.0: - resolution: {integrity: sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==} + /@rollup/rollup-win32-x64-msvc@4.13.1: + resolution: {integrity: sha512-YY1Exxo2viZ/O2dMHuwQvimJ0SqvL+OAWQLLY6rvXavgQKjhQUzn7nc1Dd29gjB5Fqi00nrBWctJBOyfVMIVxw==} cpu: [x64] os: [win32] requiresBuild: true @@ -1221,8 +1229,8 @@ packages: resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} dev: true - /@typescript-eslint/eslint-plugin@7.3.1(@typescript-eslint/parser@7.3.1)(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-STEDMVQGww5lhCuNXVSQfbfuNII5E08QWkvAw5Qwf+bj2WT+JkG1uc+5/vXA3AOYMDHVOSpL+9rcbEUiHIm2dw==} + /@typescript-eslint/eslint-plugin@7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3): + resolution: {integrity: sha512-yHMQ/oFaM7HZdVrVm/M2WHaNPgyuJH4WelkSVEWSSsir34kxW2kDJCxlXRhhGWEsMN0WAW/vLpKfKVcm8k+MPw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1233,11 +1241,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.3.1(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/scope-manager': 7.3.1 - '@typescript-eslint/type-utils': 7.3.1(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/utils': 7.3.1(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 7.3.1 + '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/scope-manager': 7.4.0 + '@typescript-eslint/type-utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/visitor-keys': 7.4.0 debug: 4.3.4 eslint: 8.57.0 graphemer: 1.4.0 @@ -1250,8 +1258,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@7.3.1(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-Rq49+pq7viTRCH48XAbTA+wdLRrB/3sRq4Lpk0oGDm0VmnjBrAOVXH/Laalmwsv2VpekiEfVFwJYVk6/e8uvQw==} + /@typescript-eslint/parser@7.4.0(eslint@8.57.0)(typescript@5.4.3): + resolution: {integrity: sha512-ZvKHxHLusweEUVwrGRXXUVzFgnWhigo4JurEj0dGF1tbcGh6buL+ejDdjxOQxv6ytcY1uhun1p2sm8iWStlgLQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1260,10 +1268,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.3.1 - '@typescript-eslint/types': 7.3.1 - '@typescript-eslint/typescript-estree': 7.3.1(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 7.3.1 + '@typescript-eslint/scope-manager': 7.4.0 + '@typescript-eslint/types': 7.4.0 + '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) + '@typescript-eslint/visitor-keys': 7.4.0 debug: 4.3.4 eslint: 8.57.0 typescript: 5.4.3 @@ -1271,16 +1279,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@7.3.1: - resolution: {integrity: sha512-fVS6fPxldsKY2nFvyT7IP78UO1/I2huG+AYu5AMjCT9wtl6JFiDnsv4uad4jQ0GTFzcUV5HShVeN96/17bTBag==} + /@typescript-eslint/scope-manager@7.4.0: + resolution: {integrity: sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.3.1 - '@typescript-eslint/visitor-keys': 7.3.1 + '@typescript-eslint/types': 7.4.0 + '@typescript-eslint/visitor-keys': 7.4.0 dev: true - /@typescript-eslint/type-utils@7.3.1(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-iFhaysxFsMDQlzJn+vr3OrxN8NmdQkHks4WaqD4QBnt5hsq234wcYdyQ9uquzJJIDAj5W4wQne3yEsYA6OmXGw==} + /@typescript-eslint/type-utils@7.4.0(eslint@8.57.0)(typescript@5.4.3): + resolution: {integrity: sha512-247ETeHgr9WTRMqHbbQdzwzhuyaJ8dPTuyuUEMANqzMRB1rj/9qFIuIXK7l0FX9i9FXbHeBQl/4uz6mYuCE7Aw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1289,8 +1297,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.3.1(typescript@5.4.3) - '@typescript-eslint/utils': 7.3.1(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) + '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) debug: 4.3.4 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.3) @@ -1299,13 +1307,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types@7.3.1: - resolution: {integrity: sha512-2tUf3uWggBDl4S4183nivWQ2HqceOZh1U4hhu4p1tPiIJoRRXrab7Y+Y0p+dozYwZVvLPRI6r5wKe9kToF9FIw==} + /@typescript-eslint/types@7.4.0: + resolution: {integrity: sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==} engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/typescript-estree@7.3.1(typescript@5.4.3): - resolution: {integrity: sha512-tLpuqM46LVkduWP7JO7yVoWshpJuJzxDOPYIVWUUZbW+4dBpgGeUdl/fQkhuV0A8eGnphYw3pp8d2EnvPOfxmQ==} + /@typescript-eslint/typescript-estree@7.4.0(typescript@5.4.3): + resolution: {integrity: sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1313,8 +1321,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.3.1 - '@typescript-eslint/visitor-keys': 7.3.1 + '@typescript-eslint/types': 7.4.0 + '@typescript-eslint/visitor-keys': 7.4.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -1326,8 +1334,8 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@7.3.1(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-jIERm/6bYQ9HkynYlNZvXpzmXWZGhMbrOvq3jJzOSOlKXsVjrrolzWBjDW6/TvT5Q3WqaN4EkmcfdQwi9tDjBQ==} + /@typescript-eslint/utils@7.4.0(eslint@8.57.0)(typescript@5.4.3): + resolution: {integrity: sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1335,9 +1343,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.3.1 - '@typescript-eslint/types': 7.3.1 - '@typescript-eslint/typescript-estree': 7.3.1(typescript@5.4.3) + '@typescript-eslint/scope-manager': 7.4.0 + '@typescript-eslint/types': 7.4.0 + '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: @@ -1345,11 +1353,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@7.3.1: - resolution: {integrity: sha512-9RMXwQF8knsZvfv9tdi+4D/j7dMG28X/wMJ8Jj6eOHyHWwDW4ngQJcqEczSsqIKKjFiLFr40Mnr7a5ulDD3vmw==} + /@typescript-eslint/visitor-keys@7.4.0: + resolution: {integrity: sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.3.1 + '@typescript-eslint/types': 7.4.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1712,7 +1720,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001600 - electron-to-chromium: 1.4.715 + electron-to-chromium: 1.4.719 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true @@ -2325,8 +2333,8 @@ packages: hasBin: true dev: true - /electron-to-chromium@1.4.715: - resolution: {integrity: sha512-XzWNH4ZSa9BwVUQSDorPWAUQ5WGuYz7zJUNpNif40zFCiCl20t8zgylmreNmn26h5kiyw2lg7RfTmeMBsDklqg==} + /electron-to-chromium@1.4.719: + resolution: {integrity: sha512-FbWy2Q2YgdFzkFUW/W5jBjE9dj+804+98E4Pup78JBPnbdb3pv6IneY2JCPKdeKLh3AOKHQeYf+KwLr7mxGh6Q==} dev: true /emoji-regex@10.3.0: @@ -2436,8 +2444,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /es-module-lexer@1.4.2: - resolution: {integrity: sha512-7nOqkomXZEaxUDJw21XZNtRk739QvrPSoZoRtbsEfcii00vdzZUh6zh1CQwHhrib8MdEtJfv5rJiGeb4KuV/vw==} + /es-module-lexer@1.5.0: + resolution: {integrity: sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==} dev: true /es-object-atoms@1.0.0: @@ -2531,21 +2539,21 @@ packages: dependencies: confusing-browser-globals: 1.0.11 eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.3.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.4.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) object.assign: 4.1.5 object.entries: 1.1.8 semver: 6.3.1 dev: true - /eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.3.1)(@typescript-eslint/parser@7.3.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0): + /eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.4.0)(@typescript-eslint/parser@7.4.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0): resolution: {integrity: sha512-oc+Lxzgzsu8FQyFVa4QFaVKiitTYiiW3frB9KYW5OWdPrqFc7FzxgB20hP4cHMlr+MBzGcLl3jnCOVOydL9mIg==} peerDependencies: '@typescript-eslint/eslint-plugin': ^7.0.0 '@typescript-eslint/parser': ^7.0.0 eslint: ^8.56.0 dependencies: - '@typescript-eslint/eslint-plugin': 7.3.1(@typescript-eslint/parser@7.3.1)(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/parser': 7.3.1(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/eslint-plugin': 7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) eslint: 8.57.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: @@ -2567,7 +2575,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.3.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0): + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.4.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0): resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2577,8 +2585,8 @@ packages: debug: 4.3.4 enhanced-resolve: 5.16.0 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.3.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.3.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.4.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.4.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.3 is-core-module: 2.13.1 @@ -2590,7 +2598,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.3.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.4.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} engines: {node: '>=4'} peerDependencies: @@ -2611,16 +2619,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 7.3.1(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.3.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.4.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.3.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.4.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -2630,7 +2638,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 7.3.1(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -2639,7 +2647,7 @@ packages: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.3.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.4.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -3150,7 +3158,7 @@ packages: jackspeak: 2.3.6 minimatch: 9.0.3 minipass: 7.0.4 - path-scurry: 1.10.1 + path-scurry: 1.10.2 dev: true /glob@7.2.3: @@ -3199,8 +3207,8 @@ packages: type-fest: 0.20.2 dev: true - /globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + /globals@15.0.0: + resolution: {integrity: sha512-m/C/yR4mjO6pXDTm9/R/SpYTAIyaUB4EOzcaaMEl7mds7Mshct9GfejiJNQGjHHbdMPey13Kpu4TMbYi9ex1pw==} engines: {node: '>=18'} dev: true @@ -5220,8 +5228,8 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true - /path-scurry@1.10.1: - resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + /path-scurry@1.10.2: + resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==} engines: {node: '>=16 || 14 >=14.17'} dependencies: lru-cache: 10.2.0 @@ -6226,7 +6234,7 @@ packages: glob: 7.2.3 dev: true - /rollup-plugin-dts@6.1.0(rollup@4.13.0)(typescript@5.4.3): + /rollup-plugin-dts@6.1.0(rollup@4.13.1)(typescript@5.4.3): resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} engines: {node: '>=16'} peerDependencies: @@ -6234,49 +6242,50 @@ packages: typescript: ^4.5 || ^5.0 dependencies: magic-string: 0.30.8 - rollup: 4.13.0 + rollup: 4.13.1 typescript: 5.4.3 optionalDependencies: '@babel/code-frame': 7.24.2 dev: true - /rollup-plugin-esbuild@6.1.1(esbuild@0.20.2)(rollup@4.13.0): + /rollup-plugin-esbuild@6.1.1(esbuild@0.20.2)(rollup@4.13.1): resolution: {integrity: sha512-CehMY9FAqJD5OUaE/Mi1r5z0kNeYxItmRO2zG4Qnv2qWKF09J2lTy5GUzjJR354ZPrLkCj4fiBN41lo8PzBUhw==} engines: {node: '>=14.18.0'} peerDependencies: esbuild: '>=0.18.0' rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.13.0) + '@rollup/pluginutils': 5.1.0(rollup@4.13.1) debug: 4.3.4 - es-module-lexer: 1.4.2 + es-module-lexer: 1.5.0 esbuild: 0.20.2 get-tsconfig: 4.7.3 - rollup: 4.13.0 + rollup: 4.13.1 transitivePeerDependencies: - supports-color dev: true - /rollup@4.13.0: - resolution: {integrity: sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==} + /rollup@4.13.1: + resolution: {integrity: sha512-hFi+fU132IvJ2ZuihN56dwgpltpmLZHZWsx27rMCTZ2sYwrqlgL5sECGy1eeV2lAihD8EzChBVVhsXci0wD4Tg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.13.0 - '@rollup/rollup-android-arm64': 4.13.0 - '@rollup/rollup-darwin-arm64': 4.13.0 - '@rollup/rollup-darwin-x64': 4.13.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.13.0 - '@rollup/rollup-linux-arm64-gnu': 4.13.0 - '@rollup/rollup-linux-arm64-musl': 4.13.0 - '@rollup/rollup-linux-riscv64-gnu': 4.13.0 - '@rollup/rollup-linux-x64-gnu': 4.13.0 - '@rollup/rollup-linux-x64-musl': 4.13.0 - '@rollup/rollup-win32-arm64-msvc': 4.13.0 - '@rollup/rollup-win32-ia32-msvc': 4.13.0 - '@rollup/rollup-win32-x64-msvc': 4.13.0 + '@rollup/rollup-android-arm-eabi': 4.13.1 + '@rollup/rollup-android-arm64': 4.13.1 + '@rollup/rollup-darwin-arm64': 4.13.1 + '@rollup/rollup-darwin-x64': 4.13.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.13.1 + '@rollup/rollup-linux-arm64-gnu': 4.13.1 + '@rollup/rollup-linux-arm64-musl': 4.13.1 + '@rollup/rollup-linux-riscv64-gnu': 4.13.1 + '@rollup/rollup-linux-s390x-gnu': 4.13.1 + '@rollup/rollup-linux-x64-gnu': 4.13.1 + '@rollup/rollup-linux-x64-musl': 4.13.1 + '@rollup/rollup-win32-arm64-msvc': 4.13.1 + '@rollup/rollup-win32-ia32-msvc': 4.13.1 + '@rollup/rollup-win32-x64-msvc': 4.13.1 fsevents: 2.3.3 dev: true @@ -6800,8 +6809,8 @@ packages: resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==} dev: true - /tinypool@0.8.2: - resolution: {integrity: sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==} + /tinypool@0.8.3: + resolution: {integrity: sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw==} engines: {node: '>=14.0.0'} dev: true @@ -7359,7 +7368,7 @@ packages: '@types/node': 20.11.30 esbuild: 0.20.2 postcss: 8.4.38 - rollup: 4.13.0 + rollup: 4.13.1 optionalDependencies: fsevents: 2.3.3 dev: true @@ -7406,7 +7415,7 @@ packages: std-env: 3.7.0 strip-literal: 2.0.0 tinybench: 2.6.0 - tinypool: 0.8.2 + tinypool: 0.8.3 vite: 5.2.6(@types/node@20.11.30) vite-node: 1.4.0(@types/node@20.11.30) why-is-node-running: 2.2.2 diff --git a/rollup.config.js b/rollup.config.js index d9a4a6d..3efc4d4 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -5,7 +5,7 @@ import { minify } from 'rollup-plugin-esbuild'; import typescript from '@rollup/plugin-typescript'; -const indexFile = 'index.ts'; +const indexFile = 'define-config.ts'; export default defineConfig([ { @@ -16,6 +16,14 @@ export default defineConfig([ format: 'es', }, }, + { + plugins: [typescript({ outputToFilesystem: true }), minify()], + input: indexFile, + output: { + file: 'index.ts', + format: 'es', + }, + }, { plugins: [dts()], input: indexFile, diff --git a/specs/index.spec-d.ts b/specs/index.spec-d.ts index 7b43128..2894642 100644 --- a/specs/index.spec-d.ts +++ b/specs/index.spec-d.ts @@ -1,8 +1,8 @@ import { describe, expectTypeOf, test } from 'vitest'; -import type { UserConfig } from '@commitlint/types'; +import { UserConfig } from '@commitlint/types'; -import { defineConfig } from '../index.ts'; +import { defineConfig } from '../define-config.ts'; describe('Define Config', () => { test('define empty config', () => { diff --git a/tsconfig.json b/tsconfig.json index e2ff455..cd56234 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,5 +23,5 @@ "target": "ESNext", "types": ["vitest"] }, - "include": ["index.ts"] + "include": ["define-config.ts", "index.ts"] }