diff --git a/.commitlintrc.js b/.commitlintrc.js new file mode 100644 index 0000000..6dda18f --- /dev/null +++ b/.commitlintrc.js @@ -0,0 +1,26 @@ +export default { + extends: ['@commitlint/config-conventional'], // Nom du module sous forme de chaîne + rules: { + // Types autorisés + 'type-enum': [ + 2, // Niveau d'erreur (2 = erreur bloquante) + 'always', + ['feat', 'fix', 'chore', 'docs', 'style', 'refactor', 'test', 'build', 'ci', 'revert'], + ], + + // Le type ne doit jamais être vide + 'type-empty': [2, 'never'], + + // Le sujet (message après le type) ne doit jamais être vide + 'subject-empty': [2, 'never'], + + // Longueur maximale du message + 'header-max-length': [2, 'always', 72], + + // Enforce lowercase in subject + 'subject-case': [2, 'always', 'lower-case'], + + // Pas de point final dans le sujet + 'subject-full-stop': [2, 'never', '.'], + }, +}; diff --git a/.editorconfig b/.editorconfig index 0b3779e..1795a37 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,22 @@ +# EditorConfig helps maintain consistent coding styles across editors and IDEs. root = true [*] +charset = utf-8 end_of_line = lf insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false + +[*.{ts,tsx,js,jsx,json}] +indent_style = space +indent_size = 2 + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0eefb8c..2febda9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: CI/CD on: push: @@ -31,17 +31,20 @@ jobs: node-version: '22' cache: 'pnpm' - - name: Clear pnpm cache - run: pnpm store prune + - name: Clear pnpm cache if needed + run: | + if pnpm store status; then + pnpm store prune + fi - name: Install dependencies run: pnpm install --frozen-lockfile - name: Format code - run: pnpm prettier --write . + run: pnpm format - name: Lint code - run: pnpm lint --fix + run: pnpm lint - name: Run tests run: pnpm test @@ -61,19 +64,22 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + packages: write issues: write pull-requests: write - packages: write steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: pnpm/action-setup@v2 + - name: Install pnpm + uses: pnpm/action-setup@v2 with: version: 9.15.2 - - uses: actions/setup-node@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 with: node-version: '22' registry-url: 'https://registry.npmjs.org' @@ -85,5 +91,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: pnpm semantic-release diff --git a/.gitignore b/.gitignore index 3f57b15..f261f76 100644 --- a/.gitignore +++ b/.gitignore @@ -3,20 +3,22 @@ node_modules/ # Build output dist/ +*.tsbuildinfo # Logs logs/ *.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* # Coverage reports coverage/ -# TypeScript -*.tsbuildinfo - # IDE files .vscode/ .idea/ +*.iml # System files .DS_Store @@ -26,4 +28,30 @@ Thumbs.db .env .env.local .env.*.local -structure*.txt \ No newline at end of file + +# Temporary files +*.tmp +*.temp + +# pnpm cache +.pnpm-store/ + +# Specific project files +structure*.txt + +# Test files and reports +.jest-cache/ +.jest-test-results.json +vitest-cache/ + +# Dependency directories +.pnpm/ + +# Lock files +pnpm-lock.yaml + +# Miscellaneous +*.bak +*.swp +*.swo +*.orig diff --git a/.husky/applypatch-msg b/.husky/applypatch-msg new file mode 100644 index 0000000..16aae78 --- /dev/null +++ b/.husky/applypatch-msg @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "$(dirname "$0")/h" \ No newline at end of file diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 0000000..d3c473f --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,43 @@ +#!/bin/sh + +# Stop on error +set -e + +# Debugging line to confirm hook execution +echo "📝 commit-msg hook executed for $1" >&2 + +# Validate commit message +echo "📝 Validating commit message..." + +# Check if pnpm is installed +if ! command -v pnpm > /dev/null; then + echo "❌ pnpm is not installed. Please install it from https://pnpm.io/installation." + exit 1 +fi + +# Check if Commitlint is installed +if ! pnpm ls @commitlint/cli > /dev/null 2>&1; then + echo "❌ Commitlint is not installed. Please install it with 'pnpm add -D @commitlint/cli'." + exit 1 +fi + +# Check if the commit message file exists +if [ ! -f "$1" ]; then + echo "❌ Commit message file not found: $1" + exit 1 +fi + +# Run Commitlint +if ! pnpm commitlint --edit "$1"; then + echo "❌ Commit message validation failed. Please follow the commit conventions." + echo "🔗 See: https://www.conventionalcommits.org/" + echo "Examples of valid messages:" + echo " feat(core): add a new feature" + echo " fix(ui): resolve alignment issue" + echo " chore(deps): update dependencies" + exit 1 +fi + +# Show validated message +echo "📄 Commit message: $(cat "$1")" +echo "✅ Commit message validation passed." diff --git a/.husky/h b/.husky/h new file mode 100644 index 0000000..bf7c896 --- /dev/null +++ b/.husky/h @@ -0,0 +1,22 @@ +#!/usr/bin/env sh +[ "$HUSKY" = "2" ] && set -x +n=$(basename "$0") +s=$(dirname "$(dirname "$0")")/$n + +[ ! -f "$s" ] && exit 0 + +if [ -f "$HOME/.huskyrc" ]; then + echo "husky - '~/.huskyrc' is DEPRECATED, please move your code to ~/.config/husky/init.sh" +fi +i="${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" +[ -f "$i" ] && . "$i" + +[ "${HUSKY-}" = "0" ] && exit 0 + +export PATH="node_modules/.bin:$PATH" +sh -e "$s" "$@" +c=$? + +[ $c != 0 ] && echo "husky - $n script failed (code $c)" +[ $c = 127 ] && echo "husky - command not found in PATH=$PATH" +exit $c diff --git a/.husky/husky.sh b/.husky/husky.sh deleted file mode 100644 index 5238efb..0000000 --- a/.husky/husky.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/husky.sh" diff --git a/.husky/post-applypatch b/.husky/post-applypatch new file mode 100644 index 0000000..16aae78 --- /dev/null +++ b/.husky/post-applypatch @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "$(dirname "$0")/h" \ No newline at end of file diff --git a/.husky/post-checkout b/.husky/post-checkout new file mode 100644 index 0000000..e279711 --- /dev/null +++ b/.husky/post-checkout @@ -0,0 +1,24 @@ +#!/bin/sh + +# Post-checkout tasks +echo "🔄 Running post-checkout tasks..." + +# Install dependencies if needed +if [ -f pnpm-lock.yaml ]; then + echo "📦 Installing dependencies..." + pnpm install --frozen-lockfile +fi + +# Clear build or cache directories if applicable +echo "🧹 Clearing cache (if any)..." +pnpm store prune || echo "⚠️ PNPM cache could not be pruned." + +# Additional tasks, like setting up the environment +echo "🌍 Setting up environment variables..." +if [ -f .env ]; then + echo "✅ .env file found. Ready for development." +else + echo "⚠️ No .env file found. Please ensure your environment variables are configured." +fi + +echo "✅ Post-checkout tasks completed successfully." diff --git a/.husky/post-commit b/.husky/post-commit new file mode 100644 index 0000000..273aed3 --- /dev/null +++ b/.husky/post-commit @@ -0,0 +1,25 @@ +#!/bin/sh + +# Post-commit tasks +echo "🔄 Starting post-commit tasks..." + +# Check for outdated dependencies +echo "📦 Checking for outdated dependencies..." +outdated=$(pnpm outdated --json || true) +if [ "$outdated" != "null" ] && [ -n "$outdated" ]; then + echo "⚠️ Some dependencies are outdated:" + pnpm outdated +else + echo "✅ All dependencies are up to date." +fi + +# Validate commit message format +echo "📝 Validating commit message format..." +if ! pnpm commitlint --edit "$1"; then + echo "❌ Commit message validation failed. Please follow the commit convention." + echo "Example: feat(scope): add a new feature" + exit 1 +fi + +# Confirm successful post-commit +echo "✅ Post-commit tasks completed successfully." diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100644 index 0000000..2529e2a --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,11 @@ +#!/bin/sh + +echo "🔄 Running post-merge tasks..." + +# Install dependencies if lockfile exists +if [ -f pnpm-lock.yaml ]; then + echo "📦 Installing dependencies..." + pnpm install --frozen-lockfile +fi + +echo "✅ Post-merge tasks completed." diff --git a/.husky/post-rewrite b/.husky/post-rewrite new file mode 100644 index 0000000..6d0009e --- /dev/null +++ b/.husky/post-rewrite @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "🔄 Post-rewrite detected. You might want to verify your branch state." diff --git a/.husky/pre-applypatch b/.husky/pre-applypatch new file mode 100644 index 0000000..16aae78 --- /dev/null +++ b/.husky/pre-applypatch @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "$(dirname "$0")/h" \ No newline at end of file diff --git a/.husky/pre-auto-gc b/.husky/pre-auto-gc new file mode 100644 index 0000000..16aae78 --- /dev/null +++ b/.husky/pre-auto-gc @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "$(dirname "$0")/h" \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit index 51f134e..47de649 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,18 +1,7 @@ #!/bin/sh -. "$(dirname "$0")/_/husky.sh" -# Arrêt en cas d'erreur +# Stop script on error set -e -# Format et lint -echo "🎨 Formatting..." -pnpm format || exit 1 - -echo "🔍 Linting..." -pnpm lint || exit 1 - -echo "🧪 Testing..." -pnpm test || exit 1 - -# Stage les fichiers modifiés -git add -A +# Run tests +npm test diff --git a/.husky/pre-merge-commit b/.husky/pre-merge-commit new file mode 100644 index 0000000..16aae78 --- /dev/null +++ b/.husky/pre-merge-commit @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "$(dirname "$0")/h" \ No newline at end of file diff --git a/.husky/pre-push b/.husky/pre-push index 9665446..dc0990c 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,23 +1,34 @@ #!/bin/sh -. "$(dirname "$0")/_/husky.sh" -# Arrêt en cas d'erreur +# Stop script on error set -e -# Vérification de pnpm-lock.yaml +# Check pnpm-lock.yaml echo "🔒 Checking pnpm-lock.yaml..." if ! pnpm install --frozen-lockfile --prefer-offline > /dev/null 2>&1; then - echo "❌ Lockfile check failed. Please update pnpm-lock.yaml." + echo "❌ Lockfile check failed. Please ensure pnpm-lock.yaml is up to date." exit 1 fi -# Lint complet -echo "🔍 Full linting..." -pnpm lint || exit 1 +# Full linting +echo "🔍 Performing full linting..." +if ! pnpm lint; then + echo "❌ Linting failed. Please fix the issues before pushing." + exit 1 +fi -# Tests avec couverture +# Run tests with coverage echo "🧪 Running tests with coverage..." -pnpm test:coverage || exit 1 +if ! pnpm test:coverage; then + echo "❌ Tests failed or coverage did not meet the required threshold." + exit 1 +fi + +# Ensure no uncommitted changes +echo "📂 Checking for uncommitted changes..." +if ! git diff --exit-code > /dev/null 2>&1; then + echo "❌ Uncommitted changes detected. Please commit your changes before pushing." + exit 1 +fi -# Assurer que tout est stageé avant de pousser -git diff --exit-code || exit 1 +echo "✅ All checks passed. Ready to push!" diff --git a/.husky/pre-rebase b/.husky/pre-rebase new file mode 100644 index 0000000..5af17a8 --- /dev/null +++ b/.husky/pre-rebase @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +echo "⚠️ Preparing for rebase. Make sure you are ready for history rewrite!" diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg new file mode 100644 index 0000000..a66d7f4 --- /dev/null +++ b/.husky/prepare-commit-msg @@ -0,0 +1,42 @@ +#!/usr/bin/env sh + +# Path to the commit message file +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +# Function to validate commit message format +validate_commit_message() { + local msg="$1" + local valid_regex="^(feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)(\([a-z0-9\-_]+\))?: .+" + + if ! echo "$msg" | grep -Eq "$valid_regex"; then + echo "❌ Invalid commit message format!" + echo "🔗 Please follow Conventional Commits:" + echo " feat(scope): add a new feature" + echo " fix(scope): fix a bug" + echo " chore(scope): update build process" + exit 1 + fi + + # Ensure no duplicate type prefixes (e.g., feat feat) + if echo "$msg" | grep -Eq "^(feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert) (feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)"; then + echo "❌ Duplicate commit type detected!" + echo "🔗 Ensure your message does not repeat the type prefix (e.g., 'feat feat')." + exit 1 + fi +} + +# Pre-fill commit message template only if empty +if [ -z "$(cat "$COMMIT_MSG_FILE")" ]; then + echo "📝 Pre-filling commit message template..." + echo "feat(scope): Short description of your change" > "$COMMIT_MSG_FILE" + echo "" >> "$COMMIT_MSG_FILE" + echo "Provide a detailed explanation of the change here." >> "$COMMIT_MSG_FILE" +else + # Validate existing commit message + commit_msg=$(cat "$COMMIT_MSG_FILE") + validate_commit_message "$commit_msg" +fi + +echo "✅ Commit message is valid." diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 2858c17..e841592 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,4 +1,7 @@ { "*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix"], - "*.{json,yml,yaml,md}": ["prettier --write"] + "*.{json,yml,yaml,md}": ["prettier --write"], + "*.css": ["stylelint --fix"], + "*.html": ["prettier --write"], + "*.ts": ["tsc --noEmit"] } diff --git a/.prettierignore b/.prettierignore index 99051d7..45ccc72 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,30 @@ +# Ignore dependencies node_modules/ + +# Build output directories dist/ +build/ + +# Log files *.log + +# IDE configurations .vscode/ +.idea/ +*.iml + +# System files .DS_Store +Thumbs.db + +# Test coverage and results +coverage/ +test-results/ + +# Temporary and cache files +*.cache +*.tmp + +# Project-specific configuration files +*.config.js +*.config.mjs diff --git a/.prettierrc b/.prettierrc index 0ce2128..384ef48 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,5 +3,9 @@ "semi": true, "trailingComma": "all", "printWidth": 100, - "tabWidth": 2 + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "arrowParens": "always", + "endOfLine": "lf" } diff --git a/eslint.config.js b/eslint.config.js index 74c44a1..f7412fe 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,15 +5,18 @@ import prettierPlugin from 'eslint-plugin-prettier'; export default defineConfig([ { - ignores: ['node_modules/**', 'dist/**', 'coverage/**'], // Ignorer certains dossiers + ignores: ['node_modules/**', 'dist/**', 'coverage/**', 'build/**', 'tests/mocks/**'], // Respect ignored folders }, { - files: ['**/*.ts', '**/*.tsx', '**/*.test.ts', '**/*.test.tsx'], // Cibler les fichiers TypeScript et de test + files: ['**/*.ts', '**/*.tsx'], // Target all TypeScript files languageOptions: { parser: typescriptParser, parserOptions: { - ecmaVersion: 2022, + ecmaVersion: 'latest', // Align with ESNext sourceType: 'module', + ecmaFeatures: { + jsx: true, // Enable JSX parsing + }, }, }, plugins: { @@ -21,19 +24,29 @@ export default defineConfig([ prettier: prettierPlugin, }, rules: { - 'prettier/prettier': 'warn', // Appliquer Prettier en mode avertissement - '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], - '@typescript-eslint/no-explicit-any': 'error', // Éviter l'utilisation de `any` - '@typescript-eslint/explicit-function-return-type': 'warn', - '@typescript-eslint/no-empty-function': 'warn', - 'no-console': ['warn', { allow: ['warn', 'error'] }], // Autoriser `console.warn` et `console.error` + 'prettier/prettier': 'warn', // Apply Prettier as a warning + '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], // Ignore unused vars starting with _ + '@typescript-eslint/no-explicit-any': 'error', // Avoid `any` usage + '@typescript-eslint/explicit-function-return-type': ['warn', { allowExpressions: true }], // Enforce return types + '@typescript-eslint/no-empty-function': 'warn', // Warn against empty functions + 'no-console': ['warn', { allow: ['warn', 'error'] }], // Allow specific console methods + 'no-debugger': 'warn', // Warn against using debugger + 'eqeqeq': ['error', 'always'], // Enforce strict equality }, }, { - // Override spécifique pour les fichiers de test pour permettre `console.log` - files: ['**/*.test.ts', '**/*.test.tsx'], + // Overrides specific to test files at the root + files: ['tests/**/*.test.ts', 'tests/**/*.test.tsx'], // Test files at the root + languageOptions: { + parser: typescriptParser, + parserOptions: { + ecmaVersion: 'latest', // Align with ESNext for tests + sourceType: 'module', + }, + }, rules: { - 'no-console': 'off', // Désactiver la règle `no-console` pour les fichiers de test + 'no-console': 'off', // Allow `console.log` in test files + '@typescript-eslint/no-empty-function': 'off', // Allow empty functions in test files }, }, ]); diff --git a/generateIndex.ts b/generateIndex.ts index 412292d..09015ef 100644 --- a/generateIndex.ts +++ b/generateIndex.ts @@ -45,14 +45,14 @@ function getExportsFromFolder( if (matches) { matches.forEach((match) => { const [, , memberName] = match.split(/\s+/); - if (exportedMembers.has(memberName)) { + if (memberName && exportedMembers.has(memberName)) { const aliasName = `${memberName}From${path.basename(entry.name, '.ts')}` .replace(/([a-z])([A-Z])/g, '$1$2') .replace(/[^a-zA-Z0-9]/g, ''); if (!exports.find((exp) => exp.includes(`as ${aliasName}`))) { exports.push(`export { ${memberName} as ${aliasName} } from '${exportPath}';`); } - } else { + } else if (memberName) { exportedMembers.set(memberName, exportPath); } }); @@ -79,7 +79,6 @@ function generateIndex(): void { content += "export { DeepPartial as TypesDeepPartial } from './types';\n\n"; fs.writeFileSync(INDEX_FILE, content, 'utf8'); - console.log('index.ts generated successfully!'); } generateIndex(); diff --git a/package.json b/package.json index d6c10ef..9026776 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ ], "scripts": { "clean": "rimraf dist", - "build": "pnpm tsc && pnpm run generate-index", + "build": "pnpm clean && pnpm tsc && pnpm run generate-index", "generate-index": "node -e \"import('fs').then(fs => { if (!fs.existsSync('./dist/generateIndex.js')) { console.error('File dist/generateIndex.js not found. Please run tsc first.'); process.exit(1); } else import('./dist/generateIndex.js'); });\"", "pretest": "pnpm clean", "test": "vitest run --no-watch", @@ -28,22 +28,23 @@ "lint": "eslint \"**/*.ts\" --fix", "type-check": "tsc --noEmit", "watch": "tsc --watch", - "prepare": "pnpm run build", + "prepare": "pnpm run build && husky install", "pack:check": "npm pack && tar -tf *.tgz", "check:outdated": "pnpm outdated", "format": "prettier --write .", "lint:staged": "lint-staged", - "precommit": "lint-staged" + "precommit": "lint-staged", + "release": "semantic-release" }, "dependencies": { - "dayjs": "latest", - "dotenv": "latest", - "lodash": "latest", - "react": "latest", - "react-dom": "latest", - "tslib": "latest", - "winston": "latest", - "zod": "latest" + "dayjs": "^1.11.0", + "dotenv": "^16.0.0", + "lodash": "^4.17.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "tslib": "^2.5.0", + "winston": "^3.10.0", + "zod": "^3.22.0" }, "peerDependencies": { "react": "^19.0.0", @@ -51,32 +52,34 @@ "typescript": "^5.7.2" }, "devDependencies": { + "@commitlint/cli": "^19.6.1", + "@commitlint/config-conventional": "^19.6.0", "@semantic-release/changelog": "latest", "@semantic-release/git": "latest", "@semantic-release/npm": "latest", "@testing-library/dom": "latest", "@testing-library/jest-dom": "latest", "@testing-library/react": "latest", - "@types/lodash": "latest", - "@types/node": "latest", + "@types/lodash": "^4.17.14", + "@types/node": "^22.10.5", "@types/react": "latest", "@types/react-dom": "latest", "@typescript-eslint/eslint-plugin": "latest", "@typescript-eslint/parser": "latest", "@vitest/coverage-v8": "latest", - "@vitest/expect": "^2.1.8", + "@vitest/expect": "latest", "cross-env": "latest", "eslint": "latest", "eslint-config-prettier": "latest", "eslint-define-config": "latest", "eslint-plugin-prettier": "latest", - "husky": "latest", + "husky": "^9.1.7", "jsdom": "latest", "lint-staged": "latest", "msw": "latest", "prettier": "latest", "rimraf": "latest", - "semantic-release": "latest", + "semantic-release": "^24.2.1", "ts-node": "latest", "tsx": "latest", "typescript": "latest", @@ -88,7 +91,8 @@ "url": "https://github.com/organization-ai-projects/shared-base.git" }, "engines": { - "node": ">=22.0.0" + "node": ">=22.0.0", + "pnpm": ">=9.0.0" }, "publishConfig": { "access": "public", @@ -109,7 +113,7 @@ "url": "https://github.com/organization-ai-projects/shared-base/issues" }, "homepage": "https://github.com/organization-ai-projects/shared-base#readme", - "packageManager": "pnpm@9.15.2+sha512.93e57b0126f0df74ce6bff29680394c0ba54ec47246b9cf321f0121d8d9bb03f750a705f24edc3c1180853afd7c2c3b94196d0a3d53d3e069d9e2793ef11f321", + "packageManager": "pnpm@9.15.2", "lint-staged": { "*.{js,jsx,ts,tsx}": [ "prettier --write", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87fb37f..2704128 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,39 +9,45 @@ importers: .: dependencies: dayjs: - specifier: latest + specifier: ^1.11.0 version: 1.11.13 dotenv: - specifier: latest + specifier: ^16.0.0 version: 16.4.7 lodash: - specifier: latest + specifier: ^4.17.0 version: 4.17.21 react: - specifier: latest + specifier: ^19.0.0 version: 19.0.0 react-dom: - specifier: latest + specifier: ^19.0.0 version: 19.0.0(react@19.0.0) tslib: - specifier: latest + specifier: ^2.5.0 version: 2.8.1 winston: - specifier: latest + specifier: ^3.10.0 version: 3.17.0 zod: - specifier: latest + specifier: ^3.22.0 version: 3.24.1 devDependencies: + '@commitlint/cli': + specifier: ^19.6.1 + version: 19.6.1(@types/node@22.10.5)(typescript@5.7.2) + '@commitlint/config-conventional': + specifier: ^19.6.0 + version: 19.6.0 '@semantic-release/changelog': specifier: latest - version: 6.0.3(semantic-release@24.2.0(typescript@5.7.2)) + version: 6.0.3(semantic-release@24.2.1(typescript@5.7.2)) '@semantic-release/git': specifier: latest - version: 10.0.1(semantic-release@24.2.0(typescript@5.7.2)) + version: 10.0.1(semantic-release@24.2.1(typescript@5.7.2)) '@semantic-release/npm': specifier: latest - version: 12.0.1(semantic-release@24.2.0(typescript@5.7.2)) + version: 12.0.1(semantic-release@24.2.1(typescript@5.7.2)) '@testing-library/dom': specifier: latest version: 10.4.0 @@ -52,11 +58,11 @@ importers: specifier: latest version: 16.1.0(@testing-library/dom@10.4.0)(@types/react-dom@19.0.2(@types/react@19.0.2))(@types/react@19.0.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@types/lodash': - specifier: latest - version: 4.17.13 + specifier: ^4.17.14 + version: 4.17.14 '@types/node': - specifier: latest - version: 22.10.3 + specifier: ^22.10.5 + version: 22.10.5 '@types/react': specifier: latest version: 19.0.2 @@ -65,33 +71,33 @@ importers: version: 19.0.2(@types/react@19.0.2) '@typescript-eslint/eslint-plugin': specifier: latest - version: 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) + version: 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) '@typescript-eslint/parser': specifier: latest - version: 8.19.0(eslint@9.17.0)(typescript@5.7.2) + version: 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) '@vitest/coverage-v8': specifier: latest - version: 2.1.8(vitest@2.1.8(@types/node@22.10.3)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.3)(typescript@5.7.2))) + version: 2.1.8(vitest@2.1.8(@types/node@22.10.5)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.5)(typescript@5.7.2))) '@vitest/expect': - specifier: ^2.1.8 + specifier: latest version: 2.1.8 cross-env: specifier: latest version: 7.0.3 eslint: specifier: latest - version: 9.17.0 + version: 9.17.0(jiti@2.4.2) eslint-config-prettier: specifier: latest - version: 9.1.0(eslint@9.17.0) + version: 9.1.0(eslint@9.17.0(jiti@2.4.2)) eslint-define-config: specifier: latest version: 2.1.0 eslint-plugin-prettier: specifier: latest - version: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0))(eslint@9.17.0)(prettier@3.4.2) + version: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.2)))(eslint@9.17.0(jiti@2.4.2))(prettier@3.4.2) husky: - specifier: latest + specifier: ^9.1.7 version: 9.1.7 jsdom: specifier: latest @@ -101,7 +107,7 @@ importers: version: 15.3.0 msw: specifier: latest - version: 2.7.0(@types/node@22.10.3)(typescript@5.7.2) + version: 2.7.0(@types/node@22.10.5)(typescript@5.7.2) prettier: specifier: latest version: 3.4.2 @@ -109,11 +115,11 @@ importers: specifier: latest version: 6.0.1 semantic-release: - specifier: latest - version: 24.2.0(typescript@5.7.2) + specifier: ^24.2.1 + version: 24.2.1(typescript@5.7.2) ts-node: specifier: latest - version: 10.9.2(@types/node@22.10.3)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.5)(typescript@5.7.2) tsx: specifier: latest version: 4.19.2 @@ -122,7 +128,7 @@ importers: version: 5.7.2 vitest: specifier: latest - version: 2.1.8(@types/node@22.10.3)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.3)(typescript@5.7.2)) + version: 2.1.8(@types/node@22.10.5)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.5)(typescript@5.7.2)) packages: @@ -178,6 +184,75 @@ packages: resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} + '@commitlint/cli@19.6.1': + resolution: {integrity: sha512-8hcyA6ZoHwWXC76BoC8qVOSr8xHy00LZhZpauiD0iO0VYbVhMnED0da85lTfIULxl7Lj4c6vZgF0Wu/ed1+jlQ==} + engines: {node: '>=v18'} + hasBin: true + + '@commitlint/config-conventional@19.6.0': + resolution: {integrity: sha512-DJT40iMnTYtBtUfw9ApbsLZFke1zKh6llITVJ+x9mtpHD08gsNXaIRqHTmwTZL3dNX5+WoyK7pCN/5zswvkBCQ==} + engines: {node: '>=v18'} + + '@commitlint/config-validator@19.5.0': + resolution: {integrity: sha512-CHtj92H5rdhKt17RmgALhfQt95VayrUo2tSqY9g2w+laAXyk7K/Ef6uPm9tn5qSIwSmrLjKaXK9eiNuxmQrDBw==} + engines: {node: '>=v18'} + + '@commitlint/ensure@19.5.0': + resolution: {integrity: sha512-Kv0pYZeMrdg48bHFEU5KKcccRfKmISSm9MvgIgkpI6m+ohFTB55qZlBW6eYqh/XDfRuIO0x4zSmvBjmOwWTwkg==} + engines: {node: '>=v18'} + + '@commitlint/execute-rule@19.5.0': + resolution: {integrity: sha512-aqyGgytXhl2ejlk+/rfgtwpPexYyri4t8/n4ku6rRJoRhGZpLFMqrZ+YaubeGysCP6oz4mMA34YSTaSOKEeNrg==} + engines: {node: '>=v18'} + + '@commitlint/format@19.5.0': + resolution: {integrity: sha512-yNy088miE52stCI3dhG/vvxFo9e4jFkU1Mj3xECfzp/bIS/JUay4491huAlVcffOoMK1cd296q0W92NlER6r3A==} + engines: {node: '>=v18'} + + '@commitlint/is-ignored@19.6.0': + resolution: {integrity: sha512-Ov6iBgxJQFR9koOupDPHvcHU9keFupDgtB3lObdEZDroiG4jj1rzky60fbQozFKVYRTUdrBGICHG0YVmRuAJmw==} + engines: {node: '>=v18'} + + '@commitlint/lint@19.6.0': + resolution: {integrity: sha512-LRo7zDkXtcIrpco9RnfhOKeg8PAnE3oDDoalnrVU/EVaKHYBWYL1DlRR7+3AWn0JiBqD8yKOfetVxJGdEtZ0tg==} + engines: {node: '>=v18'} + + '@commitlint/load@19.6.1': + resolution: {integrity: sha512-kE4mRKWWNju2QpsCWt428XBvUH55OET2N4QKQ0bF85qS/XbsRGG1MiTByDNlEVpEPceMkDr46LNH95DtRwcsfA==} + engines: {node: '>=v18'} + + '@commitlint/message@19.5.0': + resolution: {integrity: sha512-R7AM4YnbxN1Joj1tMfCyBryOC5aNJBdxadTZkuqtWi3Xj0kMdutq16XQwuoGbIzL2Pk62TALV1fZDCv36+JhTQ==} + engines: {node: '>=v18'} + + '@commitlint/parse@19.5.0': + resolution: {integrity: sha512-cZ/IxfAlfWYhAQV0TwcbdR1Oc0/r0Ik1GEessDJ3Lbuma/MRO8FRQX76eurcXtmhJC//rj52ZSZuXUg0oIX0Fw==} + engines: {node: '>=v18'} + + '@commitlint/read@19.5.0': + resolution: {integrity: sha512-TjS3HLPsLsxFPQj6jou8/CZFAmOP2y+6V4PGYt3ihbQKTY1Jnv0QG28WRKl/d1ha6zLODPZqsxLEov52dhR9BQ==} + engines: {node: '>=v18'} + + '@commitlint/resolve-extends@19.5.0': + resolution: {integrity: sha512-CU/GscZhCUsJwcKTJS9Ndh3AKGZTNFIOoQB2n8CmFnizE0VnEuJoum+COW+C1lNABEeqk6ssfc1Kkalm4bDklA==} + engines: {node: '>=v18'} + + '@commitlint/rules@19.6.0': + resolution: {integrity: sha512-1f2reW7lbrI0X0ozZMesS/WZxgPa4/wi56vFuJENBmed6mWq5KsheN/nxqnl/C23ioxpPO/PL6tXpiiFy5Bhjw==} + engines: {node: '>=v18'} + + '@commitlint/to-lines@19.5.0': + resolution: {integrity: sha512-R772oj3NHPkodOSRZ9bBVNq224DOxQtNef5Pl8l2M8ZnkkzQfeSTr4uxawV2Sd3ui05dUVzvLNnzenDBO1KBeQ==} + engines: {node: '>=v18'} + + '@commitlint/top-level@19.5.0': + resolution: {integrity: sha512-IP1YLmGAk0yWrImPRRc578I3dDUI5A2UBJx9FbSOjxe9sTlzFiwVJ+zeMLgAtHMtGZsC8LUnzmW1qRemkFU4ng==} + engines: {node: '>=v18'} + + '@commitlint/types@19.5.0': + resolution: {integrity: sha512-DSHae2obMSMkAtTBSOulg5X7/z+rGLxcXQIkg3OmWvY6wifojge5uVMydfhUvs7yQj+V7jNmRZ2Xzl8GJyqRgg==} + engines: {node: '>=v18'} + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -855,6 +930,9 @@ packages: '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} + '@types/conventional-commits-parser@5.0.1': + resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} + '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} @@ -864,11 +942,11 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/lodash@4.17.13': - resolution: {integrity: sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==} + '@types/lodash@4.17.14': + resolution: {integrity: sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==} - '@types/node@22.10.3': - resolution: {integrity: sha512-DifAyw4BkrufCILvD3ucnuN8eydUfc/C1GlyrnI+LK6543w5/L3VeVgf05o3B4fqSXP1dKYLOZsKfutpxPzZrw==} + '@types/node@22.10.5': + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -978,6 +1056,10 @@ packages: '@vitest/utils@2.1.8': resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} + JSONStream@1.3.5: + resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} + hasBin: true + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1007,6 +1089,9 @@ packages: ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -1204,10 +1289,18 @@ packages: config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + conventional-changelog-angular@7.0.0: + resolution: {integrity: sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==} + engines: {node: '>=16'} + conventional-changelog-angular@8.0.0: resolution: {integrity: sha512-CLf+zr6St0wIxos4bmaKHRXWAcsCXrJU6F4VdNDrGRK3B8LDLKoX3zuMV5GhtbGkVR/LohZ6MT6im43vZLSjmA==} engines: {node: '>=18'} + conventional-changelog-conventionalcommits@7.0.2: + resolution: {integrity: sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==} + engines: {node: '>=16'} + conventional-changelog-writer@8.0.0: resolution: {integrity: sha512-TQcoYGRatlAnT2qEWDON/XSfnVG38JzA7E0wcGScu7RElQBkg9WWgZd1peCWFcWDh1xfb2CfsrcvOn1bbSzztA==} engines: {node: '>=18'} @@ -1217,6 +1310,11 @@ packages: resolution: {integrity: sha512-tQMagCOC59EVgNZcC5zl7XqO30Wki9i9J3acbUvkaosCT6JX3EeFwJD7Qqp4MCikRnzS18WXV3BLIQ66ytu6+Q==} engines: {node: '>=18'} + conventional-commits-parser@5.0.0: + resolution: {integrity: sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==} + engines: {node: '>=16'} + hasBin: true + conventional-commits-parser@6.0.0: resolution: {integrity: sha512-TbsINLp48XeMXR8EvGjTnKGsZqBemisPoyWESlpRyR8lif0lcwzqz+NMtYSj1ooF/WYjSuu7wX0CtdeeMEQAmA==} engines: {node: '>=18'} @@ -1233,6 +1331,14 @@ packages: core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + cosmiconfig-typescript-loader@6.1.0: + resolution: {integrity: sha512-tJ1w35ZRUiM5FeTzT7DtYWAFFv37ZLqSRkGi2oeCK1gPhvaWjkAtfXvLmvE1pRfxxp9aQo6ba/Pvg1dKj05D4g==} + engines: {node: '>=v18'} + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=9' + typescript: '>=5' + cosmiconfig@9.0.0: resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} engines: {node: '>=14'} @@ -1268,6 +1374,10 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + dargs@8.1.0: + resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==} + engines: {node: '>=12'} + data-urls@5.0.0: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} @@ -1504,6 +1614,9 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-uri@3.0.3: + resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} + fastq@1.18.0: resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} @@ -1538,6 +1651,10 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} + find-up@7.0.0: + resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} + engines: {node: '>=18'} + find-versions@6.0.0: resolution: {integrity: sha512-2kCCtc+JvcZ86IGAz3Z2Y0A1baIz9fL31pH/0S1IqZr9Iwnjq8izfPtrCyQKO6TLMPELLsQMre7VDqeIKCsHkA==} engines: {node: '>=18'} @@ -1606,6 +1723,11 @@ packages: git-log-parser@1.2.1: resolution: {integrity: sha512-PI+sPDvHXNPl5WNOErAK05s3j0lgwUzMN6o8cyQrDaKfT3qd7TmNJKeXX+SknI5I0QhG5fVPAEwSY4tRGDtYoQ==} + git-raw-commits@4.0.0: + resolution: {integrity: sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==} + engines: {node: '>=16'} + hasBin: true + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -1623,6 +1745,10 @@ packages: engines: {node: 20 || >=22} hasBin: true + global-directory@4.0.1: + resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} + engines: {node: '>=18'} + globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} @@ -1723,6 +1849,10 @@ packages: resolution: {integrity: sha512-7EyUlPFC0HOlBDpUFGfYstsU7XHxZJKAAMzCT8wZ0hMW7b+hG51LIKTDcsgtz8Pu6YC0HqRVbX+rVUtsGMUKvg==} engines: {node: '>=16.20'} + import-from-esm@2.0.0: + resolution: {integrity: sha512-YVt14UZCgsX1vZQ3gKjkWVdBdHQ6eu3MPU1TBgL1H5orXe2+jWD006WCPPtOuwlQm10NuzOW5WawiF1Q9veW8g==} + engines: {node: '>=18.20'} + import-meta-resolve@4.1.0: resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} @@ -1748,6 +1878,10 @@ packages: ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + ini@4.1.1: + resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + into-stream@7.0.0: resolution: {integrity: sha512-2dYz766i9HprMBasCMvHMuazJ7u4WzhJwo5kb3iPSiW/iRYV6uPari3zHoqZlnuaR7V1bEiNMxikhp37rdBXbw==} engines: {node: '>=12'} @@ -1808,6 +1942,10 @@ packages: resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} engines: {node: '>=18'} + is-text-path@2.0.0: + resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} + engines: {node: '>=8'} + is-unicode-supported@2.1.0: resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} engines: {node: '>=18'} @@ -1849,6 +1987,10 @@ packages: resolution: {integrity: sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==} engines: {node: '>= 0.6.0'} + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1877,12 +2019,19 @@ packages: json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + jsonparse@1.3.1: + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} + engines: {'0': node >= 0.2.0} + keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} @@ -1921,9 +2070,16 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + lodash.capitalize@4.2.1: resolution: {integrity: sha512-kZzYOKspf8XVX5AvmQF94gQW0lejFVgb80G85bU4ZWzoJ6C03PQg3coYAUpSTpQWelrZELd3XWgHzw4Ck5kaIw==} @@ -1936,12 +2092,30 @@ packages: lodash.isstring@4.0.1: resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} + lodash.kebabcase@4.1.1: + resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} + lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.mergewith@4.6.2: + resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} + + lodash.snakecase@4.1.1: + resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} + + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + + lodash.uniq@4.5.0: + resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} + lodash.uniqby@4.7.0: resolution: {integrity: sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==} + lodash.upperfirst@4.3.1: + resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -1991,6 +2165,10 @@ packages: engines: {node: '>= 18'} hasBin: true + meow@12.1.1: + resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} + engines: {node: '>=16.10'} + meow@13.2.0: resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==} engines: {node: '>=18'} @@ -2234,6 +2412,10 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} @@ -2242,6 +2424,10 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-map@7.0.3: resolution: {integrity: sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==} engines: {node: '>=18'} @@ -2301,6 +2487,10 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + path-exists@5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -2445,6 +2635,10 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -2506,8 +2700,8 @@ packages: scheduler@0.25.0: resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} - semantic-release@24.2.0: - resolution: {integrity: sha512-fQfn6e/aYToRtVJYKqneFM1Rg3KP2gh3wSWtpYsLlz6uaPKlISrTzvYAFn+mYWo07F0X1Cz5ucU89AVE8X1mbg==} + semantic-release@24.2.1: + resolution: {integrity: sha512-z0/3cutKNkLQ4Oy0HTi3lubnjTsdjjgOqmxdPjeYWe6lhFqUPfwslZxRHv3HDZlN4MhnZitb9SLihDkZNxOXfQ==} engines: {node: '>=20.8.1'} hasBin: true @@ -2591,6 +2785,10 @@ packages: split2@1.0.0: resolution: {integrity: sha512-NKywug4u4pX/AZBB1FCPzZ6/7O+Xhz1qMVbzTvvKvikjO99oPN87SkK08mEY9P63/5lWjK+wgOOgApnTg5r6qg==} + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + stack-trace@0.0.10: resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} @@ -2703,6 +2901,10 @@ packages: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} + text-extensions@2.4.0: + resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==} + engines: {node: '>=8'} + text-hex@1.0.0: resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} @@ -2716,6 +2918,9 @@ packages: through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + time-span@5.1.0: resolution: {integrity: sha512-75voc/9G4rDIJleOo4jPvN4/YC4GRZrY8yy1uU4lwrB3XEQbWve8zXoO5No4eFrGcTAMYyoY67p8jRQdtA1HbA==} engines: {node: '>=12'} @@ -3054,6 +3259,10 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + yocto-queue@1.1.1: + resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} + engines: {node: '>=12.20'} + yoctocolors-cjs@2.1.2: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} @@ -3117,6 +3326,116 @@ snapshots: '@colors/colors@1.6.0': {} + '@commitlint/cli@19.6.1(@types/node@22.10.5)(typescript@5.7.2)': + dependencies: + '@commitlint/format': 19.5.0 + '@commitlint/lint': 19.6.0 + '@commitlint/load': 19.6.1(@types/node@22.10.5)(typescript@5.7.2) + '@commitlint/read': 19.5.0 + '@commitlint/types': 19.5.0 + tinyexec: 0.3.2 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/config-conventional@19.6.0': + dependencies: + '@commitlint/types': 19.5.0 + conventional-changelog-conventionalcommits: 7.0.2 + + '@commitlint/config-validator@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + ajv: 8.17.1 + + '@commitlint/ensure@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + lodash.camelcase: 4.3.0 + lodash.kebabcase: 4.1.1 + lodash.snakecase: 4.1.1 + lodash.startcase: 4.4.0 + lodash.upperfirst: 4.3.1 + + '@commitlint/execute-rule@19.5.0': {} + + '@commitlint/format@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + chalk: 5.4.1 + + '@commitlint/is-ignored@19.6.0': + dependencies: + '@commitlint/types': 19.5.0 + semver: 7.6.3 + + '@commitlint/lint@19.6.0': + dependencies: + '@commitlint/is-ignored': 19.6.0 + '@commitlint/parse': 19.5.0 + '@commitlint/rules': 19.6.0 + '@commitlint/types': 19.5.0 + + '@commitlint/load@19.6.1(@types/node@22.10.5)(typescript@5.7.2)': + dependencies: + '@commitlint/config-validator': 19.5.0 + '@commitlint/execute-rule': 19.5.0 + '@commitlint/resolve-extends': 19.5.0 + '@commitlint/types': 19.5.0 + chalk: 5.4.1 + cosmiconfig: 9.0.0(typescript@5.7.2) + cosmiconfig-typescript-loader: 6.1.0(@types/node@22.10.5)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/message@19.5.0': {} + + '@commitlint/parse@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + conventional-changelog-angular: 7.0.0 + conventional-commits-parser: 5.0.0 + + '@commitlint/read@19.5.0': + dependencies: + '@commitlint/top-level': 19.5.0 + '@commitlint/types': 19.5.0 + git-raw-commits: 4.0.0 + minimist: 1.2.8 + tinyexec: 0.3.2 + + '@commitlint/resolve-extends@19.5.0': + dependencies: + '@commitlint/config-validator': 19.5.0 + '@commitlint/types': 19.5.0 + global-directory: 4.0.1 + import-meta-resolve: 4.1.0 + lodash.mergewith: 4.6.2 + resolve-from: 5.0.0 + + '@commitlint/rules@19.6.0': + dependencies: + '@commitlint/ensure': 19.5.0 + '@commitlint/message': 19.5.0 + '@commitlint/to-lines': 19.5.0 + '@commitlint/types': 19.5.0 + + '@commitlint/to-lines@19.5.0': {} + + '@commitlint/top-level@19.5.0': + dependencies: + find-up: 7.0.0 + + '@commitlint/types@19.5.0': + dependencies: + '@types/conventional-commits-parser': 5.0.1 + chalk: 5.4.1 + '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 @@ -3268,9 +3587,9 @@ snapshots: '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.1(eslint@9.17.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.17.0(jiti@2.4.2))': dependencies: - eslint: 9.17.0 + eslint: 9.17.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -3322,16 +3641,16 @@ snapshots: '@humanwhocodes/retry@0.4.1': {} - '@inquirer/confirm@5.1.1(@types/node@22.10.3)': + '@inquirer/confirm@5.1.1(@types/node@22.10.5)': dependencies: - '@inquirer/core': 10.1.2(@types/node@22.10.3) - '@inquirer/type': 3.0.2(@types/node@22.10.3) - '@types/node': 22.10.3 + '@inquirer/core': 10.1.2(@types/node@22.10.5) + '@inquirer/type': 3.0.2(@types/node@22.10.5) + '@types/node': 22.10.5 - '@inquirer/core@10.1.2(@types/node@22.10.3)': + '@inquirer/core@10.1.2(@types/node@22.10.5)': dependencies: '@inquirer/figures': 1.0.9 - '@inquirer/type': 3.0.2(@types/node@22.10.3) + '@inquirer/type': 3.0.2(@types/node@22.10.5) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -3344,9 +3663,9 @@ snapshots: '@inquirer/figures@1.0.9': {} - '@inquirer/type@3.0.2(@types/node@22.10.3)': + '@inquirer/type@3.0.2(@types/node@22.10.5)': dependencies: - '@types/node': 22.10.3 + '@types/node': 22.10.5 '@isaacs/cliui@8.0.2': dependencies: @@ -3546,15 +3865,15 @@ snapshots: '@sec-ant/readable-stream@0.4.1': {} - '@semantic-release/changelog@6.0.3(semantic-release@24.2.0(typescript@5.7.2))': + '@semantic-release/changelog@6.0.3(semantic-release@24.2.1(typescript@5.7.2))': dependencies: '@semantic-release/error': 3.0.0 aggregate-error: 3.1.0 fs-extra: 11.2.0 lodash: 4.17.21 - semantic-release: 24.2.0(typescript@5.7.2) + semantic-release: 24.2.1(typescript@5.7.2) - '@semantic-release/commit-analyzer@13.0.0(semantic-release@24.2.0(typescript@5.7.2))': + '@semantic-release/commit-analyzer@13.0.0(semantic-release@24.2.1(typescript@5.7.2))': dependencies: conventional-changelog-angular: 8.0.0 conventional-changelog-writer: 8.0.0 @@ -3564,7 +3883,7 @@ snapshots: import-from-esm: 1.3.4 lodash-es: 4.17.21 micromatch: 4.0.8 - semantic-release: 24.2.0(typescript@5.7.2) + semantic-release: 24.2.1(typescript@5.7.2) transitivePeerDependencies: - supports-color @@ -3572,7 +3891,7 @@ snapshots: '@semantic-release/error@4.0.0': {} - '@semantic-release/git@10.0.1(semantic-release@24.2.0(typescript@5.7.2))': + '@semantic-release/git@10.0.1(semantic-release@24.2.1(typescript@5.7.2))': dependencies: '@semantic-release/error': 3.0.0 aggregate-error: 3.1.0 @@ -3582,11 +3901,11 @@ snapshots: lodash: 4.17.21 micromatch: 4.0.8 p-reduce: 2.1.0 - semantic-release: 24.2.0(typescript@5.7.2) + semantic-release: 24.2.1(typescript@5.7.2) transitivePeerDependencies: - supports-color - '@semantic-release/github@11.0.1(semantic-release@24.2.0(typescript@5.7.2))': + '@semantic-release/github@11.0.1(semantic-release@24.2.1(typescript@5.7.2))': dependencies: '@octokit/core': 6.1.2 '@octokit/plugin-paginate-rest': 11.3.6(@octokit/core@6.1.2) @@ -3603,12 +3922,12 @@ snapshots: lodash-es: 4.17.21 mime: 4.0.6 p-filter: 4.1.0 - semantic-release: 24.2.0(typescript@5.7.2) + semantic-release: 24.2.1(typescript@5.7.2) url-join: 5.0.0 transitivePeerDependencies: - supports-color - '@semantic-release/npm@12.0.1(semantic-release@24.2.0(typescript@5.7.2))': + '@semantic-release/npm@12.0.1(semantic-release@24.2.1(typescript@5.7.2))': dependencies: '@semantic-release/error': 4.0.0 aggregate-error: 5.0.0 @@ -3621,11 +3940,11 @@ snapshots: rc: 1.2.8 read-pkg: 9.0.1 registry-auth-token: 5.0.3 - semantic-release: 24.2.0(typescript@5.7.2) + semantic-release: 24.2.1(typescript@5.7.2) semver: 7.6.3 tempy: 3.1.0 - '@semantic-release/release-notes-generator@14.0.2(semantic-release@24.2.0(typescript@5.7.2))': + '@semantic-release/release-notes-generator@14.0.2(semantic-release@24.2.1(typescript@5.7.2))': dependencies: conventional-changelog-angular: 8.0.0 conventional-changelog-writer: 8.0.0 @@ -3637,7 +3956,7 @@ snapshots: into-stream: 7.0.0 lodash-es: 4.17.21 read-package-up: 11.0.0 - semantic-release: 24.2.0(typescript@5.7.2) + semantic-release: 24.2.1(typescript@5.7.2) transitivePeerDependencies: - supports-color @@ -3688,15 +4007,19 @@ snapshots: '@types/aria-query@5.0.4': {} + '@types/conventional-commits-parser@5.0.1': + dependencies: + '@types/node': 22.10.5 + '@types/cookie@0.6.0': {} '@types/estree@1.0.6': {} '@types/json-schema@7.0.15': {} - '@types/lodash@4.17.13': {} + '@types/lodash@4.17.14': {} - '@types/node@22.10.3': + '@types/node@22.10.5': dependencies: undici-types: 6.20.0 @@ -3718,15 +4041,15 @@ snapshots: '@types/triple-beam@1.3.5': {} - '@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.19.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.19.0 - '@typescript-eslint/type-utils': 8.19.0(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.19.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/type-utils': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.19.0 - eslint: 9.17.0 + eslint: 9.17.0(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -3735,14 +4058,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 8.19.0 '@typescript-eslint/types': 8.19.0 '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.19.0 debug: 4.4.0 - eslint: 9.17.0 + eslint: 9.17.0(jiti@2.4.2) typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -3752,12 +4075,12 @@ snapshots: '@typescript-eslint/types': 8.19.0 '@typescript-eslint/visitor-keys': 8.19.0 - '@typescript-eslint/type-utils@8.19.0(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.19.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) debug: 4.4.0 - eslint: 9.17.0 + eslint: 9.17.0(jiti@2.4.2) ts-api-utils: 1.4.3(typescript@5.7.2) typescript: 5.7.2 transitivePeerDependencies: @@ -3779,13 +4102,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.19.0(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/utils@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.19.0 '@typescript-eslint/types': 8.19.0 '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) - eslint: 9.17.0 + eslint: 9.17.0(jiti@2.4.2) typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -3795,7 +4118,7 @@ snapshots: '@typescript-eslint/types': 8.19.0 eslint-visitor-keys: 4.2.0 - '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@22.10.3)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.3)(typescript@5.7.2)))': + '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@22.10.5)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.5)(typescript@5.7.2)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -3809,7 +4132,7 @@ snapshots: std-env: 3.8.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.8(@types/node@22.10.3)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.3)(typescript@5.7.2)) + vitest: 2.1.8(@types/node@22.10.5)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.5)(typescript@5.7.2)) transitivePeerDependencies: - supports-color @@ -3820,14 +4143,14 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.8(msw@2.7.0(@types/node@22.10.3)(typescript@5.7.2))(vite@5.4.11(@types/node@22.10.3))': + '@vitest/mocker@2.1.8(msw@2.7.0(@types/node@22.10.5)(typescript@5.7.2))(vite@5.4.11(@types/node@22.10.5))': dependencies: '@vitest/spy': 2.1.8 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - msw: 2.7.0(@types/node@22.10.3)(typescript@5.7.2) - vite: 5.4.11(@types/node@22.10.3) + msw: 2.7.0(@types/node@22.10.5)(typescript@5.7.2) + vite: 5.4.11(@types/node@22.10.5) '@vitest/pretty-format@2.1.8': dependencies: @@ -3854,6 +4177,11 @@ snapshots: loupe: 3.1.2 tinyrainbow: 1.2.0 + JSONStream@1.3.5: + dependencies: + jsonparse: 1.3.1 + through: 2.3.8 + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: acorn: 8.14.0 @@ -3883,6 +4211,13 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ajv@8.17.1: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.0.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -4073,10 +4408,18 @@ snapshots: ini: 1.3.8 proto-list: 1.2.4 + conventional-changelog-angular@7.0.0: + dependencies: + compare-func: 2.0.0 + conventional-changelog-angular@8.0.0: dependencies: compare-func: 2.0.0 + conventional-changelog-conventionalcommits@7.0.2: + dependencies: + compare-func: 2.0.0 + conventional-changelog-writer@8.0.0: dependencies: '@types/semver': 7.5.8 @@ -4087,6 +4430,13 @@ snapshots: conventional-commits-filter@5.0.0: {} + conventional-commits-parser@5.0.0: + dependencies: + JSONStream: 1.3.5 + is-text-path: 2.0.0 + meow: 12.1.1 + split2: 4.2.0 + conventional-commits-parser@6.0.0: dependencies: meow: 13.2.0 @@ -4097,6 +4447,13 @@ snapshots: core-util-is@1.0.3: {} + cosmiconfig-typescript-loader@6.1.0(@types/node@22.10.5)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2): + dependencies: + '@types/node': 22.10.5 + cosmiconfig: 9.0.0(typescript@5.7.2) + jiti: 2.4.2 + typescript: 5.7.2 + cosmiconfig@9.0.0(typescript@5.7.2): dependencies: env-paths: 2.2.1 @@ -4130,6 +4487,8 @@ snapshots: csstype@3.1.3: {} + dargs@8.1.0: {} + data-urls@5.0.0: dependencies: whatwg-mimetype: 4.0.0 @@ -4263,20 +4622,20 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-prettier@9.1.0(eslint@9.17.0): + eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.2)): dependencies: - eslint: 9.17.0 + eslint: 9.17.0(jiti@2.4.2) eslint-define-config@2.1.0: {} - eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0))(eslint@9.17.0)(prettier@3.4.2): + eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.2)))(eslint@9.17.0(jiti@2.4.2))(prettier@3.4.2): dependencies: - eslint: 9.17.0 + eslint: 9.17.0(jiti@2.4.2) prettier: 3.4.2 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: - eslint-config-prettier: 9.1.0(eslint@9.17.0) + eslint-config-prettier: 9.1.0(eslint@9.17.0(jiti@2.4.2)) eslint-scope@8.2.0: dependencies: @@ -4287,9 +4646,9 @@ snapshots: eslint-visitor-keys@4.2.0: {} - eslint@9.17.0: + eslint@9.17.0(jiti@2.4.2): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.19.1 '@eslint/core': 0.9.1 @@ -4323,6 +4682,8 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 + optionalDependencies: + jiti: 2.4.2 transitivePeerDependencies: - supports-color @@ -4409,6 +4770,8 @@ snapshots: fast-levenshtein@2.0.6: {} + fast-uri@3.0.3: {} + fastq@1.18.0: dependencies: reusify: 1.0.4 @@ -4442,6 +4805,12 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 + find-up@7.0.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + unicorn-magic: 0.1.0 + find-versions@6.0.0: dependencies: semver-regex: 4.0.5 @@ -4511,6 +4880,12 @@ snapshots: through2: 2.0.5 traverse: 0.6.8 + git-raw-commits@4.0.0: + dependencies: + dargs: 8.1.0 + meow: 12.1.1 + split2: 4.2.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -4537,6 +4912,10 @@ snapshots: package-json-from-dist: 1.0.1 path-scurry: 2.0.0 + global-directory@4.0.1: + dependencies: + ini: 4.1.1 + globals@14.0.0: {} globby@14.0.2: @@ -4629,6 +5008,13 @@ snapshots: transitivePeerDependencies: - supports-color + import-from-esm@2.0.0: + dependencies: + debug: 4.4.0 + import-meta-resolve: 4.1.0 + transitivePeerDependencies: + - supports-color + import-meta-resolve@4.1.0: {} imurmurhash@0.1.4: {} @@ -4643,6 +5029,8 @@ snapshots: ini@1.3.8: {} + ini@4.1.1: {} + into-stream@7.0.0: dependencies: from2: 2.3.0 @@ -4682,6 +5070,10 @@ snapshots: is-stream@4.0.1: {} + is-text-path@2.0.0: + dependencies: + text-extensions: 2.4.0 + is-unicode-supported@2.1.0: {} isarray@1.0.0: {} @@ -4729,6 +5121,8 @@ snapshots: java-properties@1.0.2: {} + jiti@2.4.2: {} + js-tokens@4.0.0: {} js-yaml@4.1.0: @@ -4771,6 +5165,8 @@ snapshots: json-schema-traverse@0.4.1: {} + json-schema-traverse@1.0.0: {} + json-stable-stringify-without-jsonify@1.0.1: {} jsonfile@6.1.0: @@ -4779,6 +5175,8 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + jsonparse@1.3.1: {} + keyv@4.5.4: dependencies: json-buffer: 3.0.1 @@ -4834,8 +5232,14 @@ snapshots: dependencies: p-locate: 5.0.0 + locate-path@7.2.0: + dependencies: + p-locate: 6.0.0 + lodash-es@4.17.21: {} + lodash.camelcase@4.3.0: {} + lodash.capitalize@4.2.1: {} lodash.escaperegexp@4.1.2: {} @@ -4844,10 +5248,22 @@ snapshots: lodash.isstring@4.0.1: {} + lodash.kebabcase@4.1.1: {} + lodash.merge@4.6.2: {} + lodash.mergewith@4.6.2: {} + + lodash.snakecase@4.1.1: {} + + lodash.startcase@4.4.0: {} + + lodash.uniq@4.5.0: {} + lodash.uniqby@4.7.0: {} + lodash.upperfirst@4.3.1: {} + lodash@4.17.21: {} log-update@6.1.0: @@ -4904,6 +5320,8 @@ snapshots: marked@12.0.2: {} + meow@12.1.1: {} + meow@13.2.0: {} merge-stream@2.0.0: {} @@ -4949,12 +5367,12 @@ snapshots: ms@2.1.3: {} - msw@2.7.0(@types/node@22.10.3)(typescript@5.7.2): + msw@2.7.0(@types/node@22.10.5)(typescript@5.7.2): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.1(@types/node@22.10.3) + '@inquirer/confirm': 5.1.1(@types/node@22.10.5) '@mswjs/interceptors': 0.37.3 '@open-draft/deferred-promise': 2.2.0 '@open-draft/until': 2.1.0 @@ -5067,6 +5485,10 @@ snapshots: dependencies: yocto-queue: 0.1.0 + p-limit@4.0.0: + dependencies: + yocto-queue: 1.1.1 + p-locate@2.0.0: dependencies: p-limit: 1.3.0 @@ -5075,6 +5497,10 @@ snapshots: dependencies: p-limit: 3.1.0 + p-locate@6.0.0: + dependencies: + p-limit: 4.0.0 + p-map@7.0.3: {} p-reduce@2.1.0: {} @@ -5125,6 +5551,8 @@ snapshots: path-exists@4.0.0: {} + path-exists@5.0.0: {} + path-key@3.1.1: {} path-key@4.0.0: {} @@ -5259,6 +5687,8 @@ snapshots: require-directory@2.1.1: {} + require-from-string@2.0.2: {} + requires-port@1.0.0: {} resolve-from@4.0.0: {} @@ -5326,13 +5756,13 @@ snapshots: scheduler@0.25.0: {} - semantic-release@24.2.0(typescript@5.7.2): + semantic-release@24.2.1(typescript@5.7.2): dependencies: - '@semantic-release/commit-analyzer': 13.0.0(semantic-release@24.2.0(typescript@5.7.2)) + '@semantic-release/commit-analyzer': 13.0.0(semantic-release@24.2.1(typescript@5.7.2)) '@semantic-release/error': 4.0.0 - '@semantic-release/github': 11.0.1(semantic-release@24.2.0(typescript@5.7.2)) - '@semantic-release/npm': 12.0.1(semantic-release@24.2.0(typescript@5.7.2)) - '@semantic-release/release-notes-generator': 14.0.2(semantic-release@24.2.0(typescript@5.7.2)) + '@semantic-release/github': 11.0.1(semantic-release@24.2.1(typescript@5.7.2)) + '@semantic-release/npm': 12.0.1(semantic-release@24.2.1(typescript@5.7.2)) + '@semantic-release/release-notes-generator': 14.0.2(semantic-release@24.2.1(typescript@5.7.2)) aggregate-error: 5.0.0 cosmiconfig: 9.0.0(typescript@5.7.2) debug: 4.4.0 @@ -5344,7 +5774,7 @@ snapshots: git-log-parser: 1.2.1 hook-std: 3.0.0 hosted-git-info: 8.0.2 - import-from-esm: 1.3.4 + import-from-esm: 2.0.0 lodash-es: 4.17.21 marked: 12.0.2 marked-terminal: 7.2.1(marked@12.0.2) @@ -5431,6 +5861,8 @@ snapshots: dependencies: through2: 2.0.5 + split2@4.2.0: {} + stack-trace@0.0.10: {} stackback@0.0.2: {} @@ -5538,6 +5970,8 @@ snapshots: glob: 10.4.5 minimatch: 9.0.5 + text-extensions@2.4.0: {} + text-hex@1.0.0: {} thenify-all@1.6.0: @@ -5553,6 +5987,8 @@ snapshots: readable-stream: 2.3.8 xtend: 4.0.2 + through@2.3.8: {} + time-span@5.1.0: dependencies: convert-hrtime: 5.0.0 @@ -5600,14 +6036,14 @@ snapshots: dependencies: typescript: 5.7.2 - ts-node@10.9.2(@types/node@22.10.3)(typescript@5.7.2): + ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.10.3 + '@types/node': 22.10.5 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -5682,13 +6118,13 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - vite-node@2.1.8(@types/node@22.10.3): + vite-node@2.1.8(@types/node@22.10.5): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.11(@types/node@22.10.3) + vite: 5.4.11(@types/node@22.10.5) transitivePeerDependencies: - '@types/node' - less @@ -5700,19 +6136,19 @@ snapshots: - supports-color - terser - vite@5.4.11(@types/node@22.10.3): + vite@5.4.11(@types/node@22.10.5): dependencies: esbuild: 0.21.5 postcss: 8.4.49 rollup: 4.29.1 optionalDependencies: - '@types/node': 22.10.3 + '@types/node': 22.10.5 fsevents: 2.3.3 - vitest@2.1.8(@types/node@22.10.3)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.3)(typescript@5.7.2)): + vitest@2.1.8(@types/node@22.10.5)(jsdom@25.0.1)(msw@2.7.0(@types/node@22.10.5)(typescript@5.7.2)): dependencies: '@vitest/expect': 2.1.8 - '@vitest/mocker': 2.1.8(msw@2.7.0(@types/node@22.10.3)(typescript@5.7.2))(vite@5.4.11(@types/node@22.10.3)) + '@vitest/mocker': 2.1.8(msw@2.7.0(@types/node@22.10.5)(typescript@5.7.2))(vite@5.4.11(@types/node@22.10.5)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.8 '@vitest/snapshot': 2.1.8 @@ -5728,11 +6164,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@22.10.3) - vite-node: 2.1.8(@types/node@22.10.3) + vite: 5.4.11(@types/node@22.10.5) + vite-node: 2.1.8(@types/node@22.10.5) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.3 + '@types/node': 22.10.5 jsdom: 25.0.1 transitivePeerDependencies: - less @@ -5859,6 +6295,8 @@ snapshots: yocto-queue@0.1.0: {} + yocto-queue@1.1.1: {} + yoctocolors-cjs@2.1.2: {} yoctocolors@2.1.1: {} diff --git a/release.config.mjs b/release.config.mjs index 305bbf5..4bf9f66 100644 --- a/release.config.mjs +++ b/release.config.mjs @@ -1,35 +1,28 @@ export default { branches: [ - { name: 'main' }, - - { name: 'develop', prerelease: 'beta' }, - + { name: 'main' }, // Stable release branch + { name: 'develop', prerelease: 'beta' }, // Beta releases from the develop branch { name: 'feature/*', - prerelease: '${name.replace(/^feature\\//g, "").replace(/[^a-zA-Z0-9-]/g, "-")}', + prerelease: '${name.replace(/^feature\\//g, "").replace(/[^a-zA-Z0-9-]/g, "-")}', // Pre-releases from feature branches }, - { name: 'fix/*', - prerelease: '${name.replace(/^fix\\//g, "").replace(/[^a-zA-Z0-9-]/g, "-")}', + prerelease: '${name.replace(/^fix\\//g, "").replace(/[^a-zA-Z0-9-]/g, "-")}', // Pre-releases from fix branches }, + { name: 'hotfix/*', prerelease: 'hotfix-${name.replace(/^hotfix\\//g, "").replace(/[^a-zA-Z0-9-]/g, "-")}' }, // Support for hotfix branches ], plugins: [ - '@semantic-release/commit-analyzer', - - '@semantic-release/release-notes-generator', - - '@semantic-release/changelog', - - '@semantic-release/npm', - - '@semantic-release/github', - + '@semantic-release/commit-analyzer', // Analyze commit messages for release type + '@semantic-release/release-notes-generator', // Generate release notes + '@semantic-release/changelog', // Update CHANGELOG.md + '@semantic-release/npm', // Publish to npm registry + '@semantic-release/github', // Create GitHub releases [ '@semantic-release/git', { - assets: ['CHANGELOG.md', 'package.json', 'pnpm-lock.yaml'], - message: 'chore(release): ${nextRelease.version} [skip ci]', + assets: ['CHANGELOG.md', 'package.json', 'pnpm-lock.yaml'], // Files to commit after release + message: 'chore(release): ${nextRelease.version} [skip ci]', // Commit message }, ], ], diff --git a/src/index.ts b/src/index.ts index bb6d583..157bdf6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,17 @@ export * from './utils/arrayUtils'; export * from './utils/dates/advancedDateUtils'; export * from './utils/dates/dateUtils'; +export { dateDifference as dateDifferenceFromdifferenceUtils } from './utils/dates/differenceUtils'; +export { formatDate as formatDateFromformatUtils } from './utils/dates/formatUtils'; +export { + addDays as addDaysFrommanipulationUtils, + subtractDays as subtractDaysFrommanipulationUtils, +} from './utils/dates/manipulationUtils'; export * from './utils/dates/rangeUtils'; +export { + isValidDate as isValidDateFromvalidationUtils, + isWeekend as isWeekendFromvalidationUtils, +} from './utils/dates/validationUtils'; export * from './utils/envUtils'; export * from './utils/error'; export * from './utils/fileUtils'; @@ -14,13 +24,7 @@ export * from './utils/randomUtils'; export * from './utils/stringUtils'; export * from './utils/validation/emailUtils'; export * from './utils/validation/uuidUtils'; -export { addDays as addDaysFrommanipulationUtils } from './utils/dates/manipulationUtils'; -export { dateDifference as dateDifferenceFromdifferenceUtils } from './utils/dates/differenceUtils'; -export { formatDate as formatDateFromformatUtils } from './utils/dates/formatUtils'; -export { isValidDate as isValidDateFromvalidationUtils } from './utils/dates/validationUtils'; -export { isWeekend as isWeekendFromvalidationUtils } from './utils/dates/validationUtils'; -export { subtractDays as subtractDaysFrommanipulationUtils } from './utils/dates/manipulationUtils'; export * from './constants'; -export { DeepPartial as TypesDeepPartial } from './types'; +export type { DeepPartial as TypesDeepPartial } from './types'; diff --git a/src/tests/index.test.ts b/src/tests/index.test.ts deleted file mode 100644 index 3f91fc5..0000000 --- a/src/tests/index.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import * as Utils from '../index'; - -describe('Index exports', () => { - it('devrait contenir les exports obligatoires', () => { - const requiredExports = ['formatDate', 'TypesDeepPartial']; - - const exportedKeys = Object.keys(Utils); - - requiredExports.forEach((requiredExport) => { - expect(exportedKeys).toContain(requiredExport); - }); - }); - - it('devrait avoir des exports définis et valides', () => { - const validKeys = Object.keys(Utils).filter( - (key: string) => typeof Utils[key as keyof typeof Utils] !== 'undefined', - ); - - validKeys.forEach((key) => { - expect(Utils[key as keyof typeof Utils]).toBeDefined(); - expect(typeof Utils[key as keyof typeof Utils]).not.toBe('undefined'); - }); - }); - - it('devrait avoir une structure cohérente', () => { - const exportStructure = Object.entries(Utils) - .filter(([_, value]) => value !== undefined) - .map(([key]) => key) - .sort(); - - expect(exportStructure.length).toBeGreaterThan(0); - expect(exportStructure).toEqual([...new Set(exportStructure)]); - }); -}); diff --git a/src/utils/arrayUtils.ts b/src/utils/arrayUtils.ts index 4318c07..840cc0b 100644 --- a/src/utils/arrayUtils.ts +++ b/src/utils/arrayUtils.ts @@ -25,7 +25,7 @@ export function shuffle(array: T[]): T[] { const shuffledArray = [...array]; for (let i = shuffledArray.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); - [shuffledArray[i], shuffledArray[j]] = [shuffledArray[j], shuffledArray[i]]; + [shuffledArray[i]!, shuffledArray[j]!] = [shuffledArray[j]!, shuffledArray[i]!]; } return shuffledArray; } diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 190c962..c78dc30 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -1,9 +1,9 @@ import fs from 'fs'; import winston from 'winston'; -import { ILogger } from './interfaces/ILogger'; +import type { ILogger } from './interfaces/ILogger'; -const LOG_DIRECTORY = process.env.LOG_DIRECTORY || 'logs'; -const LOG_LEVEL = process.env.LOG_LEVEL || 'info'; +const LOG_DIRECTORY = process.env['LOG_DIRECTORY'] || 'logs'; +const LOG_LEVEL = process.env['LOG_LEVEL'] || 'info'; const COMBINED_LOG = `${LOG_DIRECTORY}/combined.log`; export class WinstonLogger implements ILogger { @@ -16,7 +16,7 @@ export class WinstonLogger implements ILogger { level: LOG_LEVEL, format: winston.format.combine( winston.format.timestamp(), - winston.format.printf((info) => `[${info.timestamp}] ${info.level}: ${info.message}`), + winston.format.printf((info) => `[${info['timestamp']}] ${info.level}: ${info.message}`), ), transports: [ new winston.transports.Console({ diff --git a/src/utils/stringUtils.ts b/src/utils/stringUtils.ts index 644489e..ec86a7b 100644 --- a/src/utils/stringUtils.ts +++ b/src/utils/stringUtils.ts @@ -12,7 +12,7 @@ export function capitalize(str: string): string { if (!match) return str; const [, spaces, firstChar, rest] = match; - return spaces + firstChar.toUpperCase() + rest; + return spaces + (firstChar ? firstChar.toUpperCase() : '') + rest; } /** @@ -47,5 +47,7 @@ export function slugify(text: string): string { * snakeToCamel('multiple__underscores___in____string') // 'multipleUnderscoresInString' */ export function snakeToCamel(str: string): string { - return str.replace(/_+/g, '_').replace(/(_\w)/g, (matches) => matches[1].toUpperCase()); + return str + .replace(/_+/g, '_') + .replace(/(_\w)/g, (matches) => (matches[1] ? matches[1].toUpperCase() : '')); } diff --git a/src/tests/arrayUtils.test.ts b/tests/arrayUtils.test.ts similarity index 96% rename from src/tests/arrayUtils.test.ts rename to tests/arrayUtils.test.ts index bea08ba..47e6b6a 100644 --- a/src/tests/arrayUtils.test.ts +++ b/tests/arrayUtils.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { removeDuplicates, shuffle, unique } from '../utils/arrayUtils'; +import { removeDuplicates, shuffle, unique } from '../src/utils/arrayUtils'; describe('ArrayUtils', () => { describe('unique', () => { diff --git a/src/tests/dates/advancedDateUtils.test.ts b/tests/dates/advancedDateUtils.test.ts similarity index 96% rename from src/tests/dates/advancedDateUtils.test.ts rename to tests/dates/advancedDateUtils.test.ts index 5128d8e..34c6533 100644 --- a/src/tests/dates/advancedDateUtils.test.ts +++ b/tests/dates/advancedDateUtils.test.ts @@ -6,7 +6,7 @@ import { isValidDate, isWeekend, subtractDays, -} from '../../utils/dates/advancedDateUtils'; +} from '../../src/utils/dates/advancedDateUtils'; describe('Advanced Date Utilities', () => { it('should check if a date is a weekend', () => { diff --git a/src/tests/dates/dateUtils.test.ts b/tests/dates/dateUtils.test.ts similarity index 90% rename from src/tests/dates/dateUtils.test.ts rename to tests/dates/dateUtils.test.ts index 87982f4..dd47f2a 100644 --- a/src/tests/dates/dateUtils.test.ts +++ b/tests/dates/dateUtils.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect } from 'vitest'; -import { formatDate } from '../../utils/dates/dateUtils'; +import { describe, expect, it } from 'vitest'; +import { formatDate } from '../../src/utils/dates/dateUtils'; describe('formatDate', () => { it("should format date in French when locale is 'fr-FR'", () => { diff --git a/src/tests/dates/differenceUtils.test.ts b/tests/dates/differenceUtils.test.ts similarity index 90% rename from src/tests/dates/differenceUtils.test.ts rename to tests/dates/differenceUtils.test.ts index d315c29..4596453 100644 --- a/src/tests/dates/differenceUtils.test.ts +++ b/tests/dates/differenceUtils.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect } from 'vitest'; -import { dateDifference } from '../../utils/dates/differenceUtils'; +import { describe, expect, it } from 'vitest'; +import { dateDifference } from '../../src/utils/dates/differenceUtils'; describe('DifferenceUtils', () => { it('devrait calculer la différence en jours', () => { diff --git a/src/tests/dates/formatUtils.test.ts b/tests/dates/formatUtils.test.ts similarity index 94% rename from src/tests/dates/formatUtils.test.ts rename to tests/dates/formatUtils.test.ts index 23b0538..e13205f 100644 --- a/src/tests/dates/formatUtils.test.ts +++ b/tests/dates/formatUtils.test.ts @@ -1,5 +1,9 @@ -import { describe, it, expect } from 'vitest'; -import { formatDate, formatLocalized, formatDateDifference } from '../../utils/dates/formatUtils'; +import { describe, expect, it } from 'vitest'; +import { + formatDate, + formatDateDifference, + formatLocalized, +} from '../../src/utils/dates/formatUtils'; describe('FormatUtils', () => { describe('formatDate', () => { diff --git a/src/tests/dates/manipulationUtils.test.ts b/tests/dates/manipulationUtils.test.ts similarity index 92% rename from src/tests/dates/manipulationUtils.test.ts rename to tests/dates/manipulationUtils.test.ts index fde920b..3217f07 100644 --- a/src/tests/dates/manipulationUtils.test.ts +++ b/tests/dates/manipulationUtils.test.ts @@ -1,10 +1,10 @@ -import { describe, it, expect } from 'vitest'; +import { describe, expect, it } from 'vitest'; import { addDays, - subtractDays, addMonths, + subtractDays, subtractMonths, -} from '../../utils/dates/manipulationUtils'; +} from '../../src/utils/dates/manipulationUtils'; describe('ManipulationUtils', () => { describe('addDays', () => { diff --git a/src/tests/dates/rangeUtils.test.ts b/tests/dates/rangeUtils.test.ts similarity index 77% rename from src/tests/dates/rangeUtils.test.ts rename to tests/dates/rangeUtils.test.ts index 3c54844..9bec08a 100644 --- a/src/tests/dates/rangeUtils.test.ts +++ b/tests/dates/rangeUtils.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect } from 'vitest'; -import { isDateInRange, generateDateRange } from '../../utils/dates/rangeUtils'; +import { describe, expect, it } from 'vitest'; +import { generateDateRange, isDateInRange } from '../../src/utils/dates/rangeUtils'; describe('Range Utilities', () => { it('should check if a date is in range', () => { diff --git a/src/tests/dates/validationUtils.test.ts b/tests/dates/validationUtils.test.ts similarity index 93% rename from src/tests/dates/validationUtils.test.ts rename to tests/dates/validationUtils.test.ts index bd0cfd5..9c5a011 100644 --- a/src/tests/dates/validationUtils.test.ts +++ b/tests/dates/validationUtils.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect } from 'vitest'; -import { isValidDate, isWeekend, isPublicHoliday } from '../../utils/dates/validationUtils'; +import { describe, expect, it } from 'vitest'; +import { isPublicHoliday, isValidDate, isWeekend } from '../../src/utils/dates/validationUtils'; describe('Validation Utilities', () => { describe('isValidDate', () => { diff --git a/src/tests/envUtils.test.ts b/tests/envUtils.test.ts similarity index 83% rename from src/tests/envUtils.test.ts rename to tests/envUtils.test.ts index fa639e1..7418d2c 100644 --- a/src/tests/envUtils.test.ts +++ b/tests/envUtils.test.ts @@ -1,6 +1,6 @@ // Tests for envUtils -import { describe, it, expect, beforeEach, afterEach } from 'vitest'; -import { getEnv, requireEnv } from '../utils/envUtils'; +import { afterEach, beforeEach, describe, expect, it } from 'vitest'; +import { getEnv, requireEnv } from '../src/utils/envUtils'; describe('EnvUtils', () => { const originalEnv = process.env; @@ -15,7 +15,7 @@ describe('EnvUtils', () => { describe('getEnv', () => { it("devrait retourner la valeur de la variable d'environnement", () => { - process.env.TEST_VAR = 'test-value'; + process.env['TEST_VAR'] = 'test-value'; expect(getEnv('TEST_VAR')).toBe('test-value'); }); @@ -30,7 +30,7 @@ describe('EnvUtils', () => { describe('requireEnv', () => { it('devrait retourner la valeur si la variable existe', () => { - process.env.REQUIRED_VAR = 'required-value'; + process.env['REQUIRED_VAR'] = 'required-value'; expect(requireEnv('REQUIRED_VAR')).toBe('required-value'); }); @@ -41,7 +41,7 @@ describe('EnvUtils', () => { }); it('devrait lancer une erreur si la variable est vide', () => { - process.env.EMPTY_VAR = ''; + process.env['EMPTY_VAR'] = ''; expect(() => requireEnv('EMPTY_VAR')).toThrow( 'Environment variable "EMPTY_VAR" is required but not defined.', ); diff --git a/src/tests/error.test.ts b/tests/error.test.ts similarity index 90% rename from src/tests/error.test.ts rename to tests/error.test.ts index 431accd..6031f5d 100644 --- a/src/tests/error.test.ts +++ b/tests/error.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect, vi, afterEach } from 'vitest'; -import { CustomError, handleError } from '../utils/error'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { CustomError, handleError } from '../src/utils/error'; describe('CustomError', () => { it('devrait créer une erreur avec un code et un message', () => { diff --git a/src/tests/fileUtils.test.ts b/tests/fileUtils.test.ts similarity index 71% rename from src/tests/fileUtils.test.ts rename to tests/fileUtils.test.ts index 6f1709e..cd647a1 100644 --- a/src/tests/fileUtils.test.ts +++ b/tests/fileUtils.test.ts @@ -1,6 +1,6 @@ -import { test, expect } from 'vitest'; -import { readFile, writeFile, deleteFile } from '../utils/fileUtils'; import fs from 'fs'; +import { expect, test } from 'vitest'; +import { deleteFile, readFile, writeFile } from '../src/utils/fileUtils'; test('should write, read, and delete a file', () => { const path = './test.txt'; diff --git a/src/tests/hooks/useDebounce.test.ts b/tests/hooks/useDebounce.test.ts similarity index 93% rename from src/tests/hooks/useDebounce.test.ts rename to tests/hooks/useDebounce.test.ts index 8284d18..1cdc1ed 100644 --- a/src/tests/hooks/useDebounce.test.ts +++ b/tests/hooks/useDebounce.test.ts @@ -1,6 +1,6 @@ import { act, renderHook } from '@testing-library/react'; import { describe, expect, test, vi } from 'vitest'; -import { useDebounce } from '../../hooks/useDebounce'; +import { useDebounce } from '../../src/hooks/useDebounce'; // Activer les timers simulés dans Vitest vi.useFakeTimers(); diff --git a/src/tests/hooks/useFetch.test.tsx b/tests/hooks/useFetch.test.tsx similarity index 95% rename from src/tests/hooks/useFetch.test.tsx rename to tests/hooks/useFetch.test.tsx index 74ebb6b..b0d7b9d 100644 --- a/src/tests/hooks/useFetch.test.tsx +++ b/tests/hooks/useFetch.test.tsx @@ -1,8 +1,8 @@ import { render, screen } from '@testing-library/react'; import { http, HttpResponse } from 'msw'; import { setupServer } from 'msw/node'; -import { describe, expect, it, beforeAll, afterEach, afterAll } from 'vitest'; -import { useFetch } from '../../hooks/useFetch'; +import { afterAll, afterEach, beforeAll, describe, expect, it } from 'vitest'; +import { useFetch } from '../../src/hooks/useFetch'; // Typage des réponses interface SuccessResponse { diff --git a/tests/index.test.ts b/tests/index.test.ts new file mode 100644 index 0000000..fe5b572 --- /dev/null +++ b/tests/index.test.ts @@ -0,0 +1,46 @@ +import { describe, expect, it } from 'vitest'; +import * as indexExports from '../src/index'; + +describe('Index exports', () => { + it('devrait contenir les exports obligatoires', () => { + const exportedKeys = Object.keys(indexExports); + console.log('Exports disponibles:', exportedKeys); + + const requiredExports = [ + // Utils dates + 'dateDifferenceFromdifferenceUtils', + 'formatDateFromformatUtils', + 'addDaysFrommanipulationUtils', + 'subtractDaysFrommanipulationUtils', + 'isValidDateFromvalidationUtils', + 'isWeekendFromvalidationUtils', + // Utils from direct exports + 'getEnv', + 'requireEnv', + 'CustomError', + 'readFile', + 'writeFile', + 'deleteFile', + 'WinstonLogger', + 'deepClone', + 'generateRandomNumber', + 'capitalize', + 'validateEmail', + 'validateUUID', + ]; + + requiredExports.forEach((requiredExport) => { + expect(exportedKeys).toContain(requiredExport); + }); + }); + + it('devrait avoir une structure cohérente', () => { + const exportStructure = Object.entries(indexExports) + .filter(([_, value]) => value !== undefined) + .map(([key]) => key) + .sort(); + + expect(exportStructure.length).toBeGreaterThan(0); + expect(exportStructure).toEqual([...new Set(exportStructure)]); + }); +}); diff --git a/src/tests/logger.test.ts b/tests/logger.test.ts similarity index 87% rename from src/tests/logger.test.ts rename to tests/logger.test.ts index b13da2d..8994d7c 100644 --- a/src/tests/logger.test.ts +++ b/tests/logger.test.ts @@ -1,7 +1,7 @@ import fs from 'fs'; -import { beforeEach, describe, expect, it, MockInstance, vi } from 'vitest'; -import winston, { Logger, LoggerOptions } from 'winston'; -import { WinstonLogger } from '../utils/logger'; +import { beforeEach, describe, expect, it, type MockInstance, vi } from 'vitest'; +import winston, { Logger, type LoggerOptions } from 'winston'; +import { WinstonLogger } from '../src/utils/logger'; vi.mock('fs', async () => { const actual = await vi.importActual('fs'); @@ -60,21 +60,8 @@ describe('WinstonLogger', () => { }); describe('Initialization', () => { - // it('should configure the logger with the correct settings', () => { - // process.env.LOG_LEVEL = 'debug'; - - // new WinstonLogger(); - - // expect(mockCreateLogger).toHaveBeenCalledWith( - // expect.objectContaining({ - // level: 'debug', - // transports: expect.any(Array), - // }), - // ); - // }); - it('should handle default log level', () => { - delete process.env.LOG_LEVEL; + delete process.env['LOG_LEVEL']; new WinstonLogger(); @@ -152,7 +139,7 @@ describe('WinstonLogger', () => { it('should handle circular references in objects', () => { const circular: Record = {}; - circular.self = circular; + circular['self'] = circular; logger.info(circular); expect(mockLoggerInstance.info).toHaveBeenCalledWith('[Circular Object]'); @@ -178,7 +165,7 @@ describe('WinstonLogger', () => { it('should handle errors without stack trace', () => { const error = new Error('Test error'); - error.stack = undefined; + (error.stack as string | undefined) = undefined; logger.error(error); expect(mockLoggerInstance.error).toHaveBeenCalledWith('Test error'); }); diff --git a/src/tests/mockLogger.test.ts b/tests/mockLogger.test.ts similarity index 81% rename from src/tests/mockLogger.test.ts rename to tests/mockLogger.test.ts index 4573795..b0616ef 100644 --- a/src/tests/mockLogger.test.ts +++ b/tests/mockLogger.test.ts @@ -1,16 +1,14 @@ -import { describe, it, expect } from 'vitest'; +import { describe, expect, it } from 'vitest'; import { MockLogger } from './mocks/MockLogger'; describe('MockLogger', () => { it('should log messages in the correct categories', () => { const mockLogger = new MockLogger(); - // Ajouter des messages mockLogger.info('Info message'); mockLogger.error('Error message'); mockLogger.warn('Warning message'); - // Vérifier les logs expect(mockLogger.logs.info).toContain('Info message'); expect(mockLogger.logs.error).toContain('Error message'); expect(mockLogger.logs.warn).toContain('Warning message'); @@ -19,15 +17,12 @@ describe('MockLogger', () => { it('should clear logs when clearLogs is called', () => { const mockLogger = new MockLogger(); - // Ajouter des messages mockLogger.info('Info message'); mockLogger.error('Error message'); mockLogger.warn('Warning message'); - // Réinitialiser les logs mockLogger.clearLogs(); - // Vérifier que les logs sont vides expect(mockLogger.logs.info).toEqual([]); expect(mockLogger.logs.error).toEqual([]); expect(mockLogger.logs.warn).toEqual([]); diff --git a/src/tests/mocks/MockLogger.ts b/tests/mocks/MockLogger.ts similarity index 95% rename from src/tests/mocks/MockLogger.ts rename to tests/mocks/MockLogger.ts index fcf6f8b..780546c 100644 --- a/src/tests/mocks/MockLogger.ts +++ b/tests/mocks/MockLogger.ts @@ -1,4 +1,4 @@ -import { ILogger } from '../../utils/interfaces/ILogger'; +import type { ILogger } from '../../src/utils/interfaces/ILogger'; export class MockLogger implements ILogger { logs: Record<'info' | 'error' | 'warn', string[]> = { diff --git a/src/tests/mocks/winston.mock.ts b/tests/mocks/winston.mock.ts similarity index 100% rename from src/tests/mocks/winston.mock.ts rename to tests/mocks/winston.mock.ts diff --git a/src/tests/objectUtils.test.ts b/tests/objectUtils.test.ts similarity index 92% rename from src/tests/objectUtils.test.ts rename to tests/objectUtils.test.ts index 7cf736d..675f67d 100644 --- a/src/tests/objectUtils.test.ts +++ b/tests/objectUtils.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect } from 'vitest'; -import { deepClone, deepMerge, DeepPartial, mergeObjects } from '../utils/objectUtils'; +import { describe, expect, it } from 'vitest'; +import { deepClone, deepMerge, type DeepPartial, mergeObjects } from '../src/utils/objectUtils'; describe('ObjectUtils', () => { describe('deepMerge', () => { diff --git a/src/tests/randomUtils.test.ts b/tests/randomUtils.test.ts similarity index 84% rename from src/tests/randomUtils.test.ts rename to tests/randomUtils.test.ts index 63c3a9a..9043186 100644 --- a/src/tests/randomUtils.test.ts +++ b/tests/randomUtils.test.ts @@ -1,6 +1,6 @@ // Tests for randomUtils -import { describe, it, expect } from 'vitest'; -import { randomString, generateRandomNumber, generateUUID } from '../utils/randomUtils'; +import { describe, expect, it } from 'vitest'; +import { generateRandomNumber, generateUUID, randomString } from '../src/utils/randomUtils'; describe('randomUtils', () => { it('should generate a random string of specified length', () => { diff --git a/src/tests/stringUtils.test.ts b/tests/stringUtils.test.ts similarity index 95% rename from src/tests/stringUtils.test.ts rename to tests/stringUtils.test.ts index 7892490..ad493f9 100644 --- a/src/tests/stringUtils.test.ts +++ b/tests/stringUtils.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect } from 'vitest'; -import { capitalize, slugify, snakeToCamel } from '../utils/stringUtils'; +import { describe, expect, it } from 'vitest'; +import { capitalize, slugify, snakeToCamel } from '../src/utils/stringUtils'; describe('StringUtils', () => { describe('capitalize', () => { diff --git a/src/tests/validation/emailUtils.test.ts b/tests/validation/emailUtils.test.ts similarity index 84% rename from src/tests/validation/emailUtils.test.ts rename to tests/validation/emailUtils.test.ts index 4d69b56..9b45a25 100644 --- a/src/tests/validation/emailUtils.test.ts +++ b/tests/validation/emailUtils.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect } from 'vitest'; -import { validateEmail } from '../../utils/validation/emailUtils'; +import { describe, expect, it } from 'vitest'; +import { validateEmail } from '../../src/utils/validation/emailUtils'; describe('EmailUtils', () => { it('devrait valider les adresses email correctes', () => { diff --git a/src/tests/validation/uuidUtils.test.ts b/tests/validation/uuidUtils.test.ts similarity index 85% rename from src/tests/validation/uuidUtils.test.ts rename to tests/validation/uuidUtils.test.ts index 4191e37..d172a34 100644 --- a/src/tests/validation/uuidUtils.test.ts +++ b/tests/validation/uuidUtils.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect } from 'vitest'; -import { validateUUID } from '../../utils/validation/uuidUtils'; +import { describe, expect, it } from 'vitest'; +import { validateUUID } from '../../src/utils/validation/uuidUtils'; describe('UUIDUtils', () => { it('devrait valider les UUIDs corrects', () => { diff --git a/tsconfig.json b/tsconfig.json index 79b72bd..a5f268b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,19 +14,29 @@ "types": ["vitest/globals", "node"], "lib": ["ESNext", "dom"], "resolveJsonModule": true, - "allowJs": true, + "allowJs": false, + "checkJs": false, "experimentalDecorators": true, "useDefineForClassFields": true, - "jsx": "react-jsx" + "jsx": "react-jsx", + "incremental": true, + "noUncheckedIndexedAccess": true, + "composite": false, + "noEmit": false, + "removeComments": true, + "isolatedModules": true, + "allowSyntheticDefaultImports": true, + "baseUrl": "./", + "paths": { + "@utils/*": ["src/utils/*"], + "@hooks/*": ["src/hooks/*"], + "@components/*": ["src/components/*"], + "@tests/*": ["tests/*"] + }, + "noPropertyAccessFromIndexSignature": true, + "exactOptionalPropertyTypes": true, + "verbatimModuleSyntax": true }, - "include": [ - "src/**/*", - "tests/**/*", - "./generateIndex.ts", - "**/*.test.ts", - "**/*.test.tsx", - "**/*.spec.ts", - "**/*.spec.tsx" - ], - "exclude": ["node_modules", "dist"] + "include": ["src/**/*", "tests/**/*", "generateIndex.ts"], + "exclude": ["node_modules", "dist", "coverage"] } diff --git a/vitest.config.ts b/vitest.config.ts index 4a657e1..5bb0b79 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -5,16 +5,16 @@ export default defineConfig({ environment: 'jsdom', globals: true, setupFiles: './vitest.setup.ts', - include: ['src/**/*.test.{ts,tsx}', 'src/**/*.spec.{ts,tsx}'], + include: ['tests/**/*.test.{ts,tsx}', 'tests/**/*.spec.{ts,tsx}'], exclude: [ '**/node_modules/**', '**/dist/**', '**/*.d.ts', '**/types/**', '**/interfaces/**', + '**/tests/mocks/**', '**/generateIndex.ts', '**/release.config.mjs', - '**/tests/mocks/**', ], coverage: { provider: 'v8', @@ -25,14 +25,13 @@ export default defineConfig({ '**/node_modules/**', '**/dist/**', '**/*.d.ts', - '**/*.{test,spec}.{ts,tsx}', // Évite les doublons avec la configuration des tests '**/types/**', '**/interfaces/**', + '**/tests/mocks/**', '**/generateIndex.ts', '**/release.config.mjs', - '**/tests/mocks/**', ], - reporter: ['text', 'html', 'json', 'lcov'], + reporter: ['text', 'html', 'json', 'lcov', 'cobertura'], thresholds: { statements: 80, branches: 80, @@ -41,7 +40,8 @@ export default defineConfig({ }, }, reporters: ['default'], - watch: false, - isolate: true, + watch: true, + clearMocks: true, + silent: true, }, }); diff --git a/vitest.setup.ts b/vitest.setup.ts index 9a2e9e4..ad3db14 100644 --- a/vitest.setup.ts +++ b/vitest.setup.ts @@ -1,44 +1,48 @@ import { afterAll, beforeAll, vi } from 'vitest'; beforeAll(() => { - console.log('Avant tous les tests : Configuration initiale'); - - // Mock de `fetch` + // Stub global `fetch` with a mocked response vi.stubGlobal( 'fetch', async () => ({ json: async () => ({ message: 'Mocked response' }), + text: async () => 'Mocked text response', + status: 200, + ok: true, }) as Response, ); - // Mock de `localStorage` et `sessionStorage` + // Mock `localStorage` and `sessionStorage` with basic operations const storageMock = { getItem: vi.fn().mockReturnValue('mockedValue'), setItem: vi.fn(), removeItem: vi.fn(), + clear: vi.fn(), }; vi.stubGlobal('localStorage', storageMock); vi.stubGlobal('sessionStorage', storageMock); - // Variables d'environnement + // Set mock environment variables process.env.MY_ENV_VAR = 'mockedValue'; - // DOM initialization + // Initialize DOM with a default structure document.body.innerHTML = '
App Initialized
'; - // Mock de `fs` + // Mock `fs` module for file system operations vi.mock('fs', async () => { const actual = await vi.importActual('fs'); return { ...actual, existsSync: vi.fn().mockReturnValue(true), mkdirSync: vi.fn(), + writeFileSync: vi.fn(), + readFileSync: vi.fn().mockReturnValue('mocked file content'), }; }); }); afterAll(() => { + // Restore all mocks to their original state vi.restoreAllMocks(); - console.log('Après tous les tests : Nettoyage terminé'); });