From ea75778e8d32c932d85062902456cd821e471fdd Mon Sep 17 00:00:00 2001 From: Mohammad Alsmadi Date: Fri, 29 Aug 2025 17:51:13 +0400 Subject: [PATCH 1/2] fix: add TypeScript support and configuration for pnpm scopes (#4544) * fix: add TypeScript support and configuration for pnpm scopes * fix: update ESLint configuration to ignore 'dist' directory * refactor: remove dist directory and its associated files * fix: ensure TypeScript build outputs are included --------- Co-authored-by: Mohammad Alsmadi --- .gitignore | 1 + @commitlint/config-pnpm-scopes/package.json | 7 +++++++ @commitlint/config-pnpm-scopes/tsconfig.json | 15 +++++++-------- Dockerfile.ci | 1 + eslint.config.mjs | 10 +++++----- tsconfig.json | 3 ++- 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 3074bd3428..e9a4fbe8ce 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ package.json.lerna_backup /*.iml tsconfig.tsbuildinfo coverage +dist docs/.vitepress/dist docs/.vitepress/cache diff --git a/@commitlint/config-pnpm-scopes/package.json b/@commitlint/config-pnpm-scopes/package.json index d6d48b0ed8..6df5774646 100644 --- a/@commitlint/config-pnpm-scopes/package.json +++ b/@commitlint/config-pnpm-scopes/package.json @@ -45,5 +45,12 @@ "@types/node": "^18.19.17", "typescript": "^5.2.2" }, + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + } + }, "gitHead": "e82f05a737626bb69979d14564f5ff601997f679" } diff --git a/@commitlint/config-pnpm-scopes/tsconfig.json b/@commitlint/config-pnpm-scopes/tsconfig.json index 965e6a1469..dddda3a388 100644 --- a/@commitlint/config-pnpm-scopes/tsconfig.json +++ b/@commitlint/config-pnpm-scopes/tsconfig.json @@ -1,12 +1,11 @@ { + "extends": "../../tsconfig.shared.json", "compilerOptions": { - "target": "ES2020", - "module": "CommonJS", - "declaration": true, - "outDir": "dist", - "rootDir": "/", - "strict": true, - "esModuleInterop": true + "composite": true, + "rootDir": "./", + "outDir": "./dist" }, - "include": ["/"] + "include": ["*.ts"], + "exclude": ["./dist/**/*"], + "references": [{ "path": "../types" }] } diff --git a/Dockerfile.ci b/Dockerfile.ci index 04d59cb622..3b9351355c 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -8,6 +8,7 @@ RUN yarn install --frozen-lockfile --network-timeout 100000 && \ # Commit lint CLI packages npm pack @commitlint/cli && \ npm pack @commitlint/config-validator && \ + npm pack @commitlint/config-pnpm-scopes && \ npm pack @commitlint/config-nx-scopes && \ npm pack @commitlint/ensure && \ npm pack @commitlint/execute-rule && \ diff --git a/eslint.config.mjs b/eslint.config.mjs index 7c94b7b58a..310b02b3fd 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,13 +1,13 @@ import typescriptEslint from '@typescript-eslint/eslint-plugin'; -import {createTypeScriptImportResolver} from 'eslint-import-resolver-typescript'; +import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'; import jest from 'eslint-plugin-jest'; -import {importX} from 'eslint-plugin-import-x'; +import { importX } from 'eslint-plugin-import-x'; import globals from 'globals'; import tsParser from '@typescript-eslint/parser'; import path from 'node:path'; -import {fileURLToPath} from 'node:url'; +import { fileURLToPath } from 'node:url'; import js from '@eslint/js'; -import {FlatCompat} from '@eslint/eslintrc'; +import { FlatCompat } from '@eslint/eslintrc'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -19,7 +19,7 @@ const compat = new FlatCompat({ export default [ { - ignores: ['**/lib/', '**/coverage/', '**/node_modules/', '**/fixtures/'], + ignores: ['**/lib/', '**/coverage/', '**/node_modules/', '**/fixtures/', '**/dist/'], }, importX.flatConfigs.typescript, ...compat.extends('eslint:recommended', 'prettier'), diff --git a/tsconfig.json b/tsconfig.json index 90481ab49f..305b3ae79a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,6 +28,7 @@ { "path": "@commitlint/travis-cli" }, { "path": "@commitlint/prompt" }, { "path": "@commitlint/cz-commitlint" }, - { "path": "@commitlint/config-conventional" } + { "path": "@commitlint/config-conventional" }, + { "path": "@commitlint/config-pnpm-scopes" } ] } From 68b0066d317070fc8c7749a8e7c8f53de60b09e5 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Fri, 29 Aug 2025 15:53:53 +0200 Subject: [PATCH 2/2] v19.9.1 --- @commitlint/config-pnpm-scopes/CHANGELOG.md | 11 +++++++++++ @commitlint/config-pnpm-scopes/package.json | 2 +- CHANGELOG.md | 11 +++++++++++ lerna.json | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/@commitlint/config-pnpm-scopes/CHANGELOG.md b/@commitlint/config-pnpm-scopes/CHANGELOG.md index 9a30c9f466..c885292eb6 100644 --- a/@commitlint/config-pnpm-scopes/CHANGELOG.md +++ b/@commitlint/config-pnpm-scopes/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [19.9.1](https://github.com/conventional-changelog/commitlint/compare/v19.9.0...v19.9.1) (2025-08-29) + + +### Bug Fixes + +* add TypeScript support and configuration for pnpm scopes ([#4544](https://github.com/conventional-changelog/commitlint/issues/4544)) ([ea75778](https://github.com/conventional-changelog/commitlint/commit/ea75778e8d32c932d85062902456cd821e471fdd)) + + + + + # [19.9.0](https://github.com/conventional-changelog/commitlint/compare/v19.8.1...v19.9.0) (2025-08-26) diff --git a/@commitlint/config-pnpm-scopes/package.json b/@commitlint/config-pnpm-scopes/package.json index 6df5774646..fabca7978f 100644 --- a/@commitlint/config-pnpm-scopes/package.json +++ b/@commitlint/config-pnpm-scopes/package.json @@ -1,7 +1,7 @@ { "name": "@commitlint/config-pnpm-scopes", "type": "module", - "version": "19.9.0", + "version": "19.9.1", "description": "Shareable commitlint config enforcing pnpm workspaces names as scopes", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/CHANGELOG.md b/CHANGELOG.md index 648ebcb253..0cc4eb0df6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [19.9.1](https://github.com/conventional-changelog/commitlint/compare/v19.9.0...v19.9.1) (2025-08-29) + + +### Bug Fixes + +* add TypeScript support and configuration for pnpm scopes ([#4544](https://github.com/conventional-changelog/commitlint/issues/4544)) ([ea75778](https://github.com/conventional-changelog/commitlint/commit/ea75778e8d32c932d85062902456cd821e471fdd)) + + + + + # [19.9.0](https://github.com/conventional-changelog/commitlint/compare/v19.8.1...v19.9.0) (2025-08-26) diff --git a/lerna.json b/lerna.json index 49787ef889..fefc8b74a6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { "npmClient": "yarn", - "version": "19.9.0" + "version": "19.9.1" }