Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework project side configuration #64

Merged
merged 26 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5ce8e41
chore: migrate from npm to pnpm
MGREMY Oct 24, 2024
a13a3d4
chore: update from coderabbit
MGREMY Oct 24, 2024
104e68c
ci: update install command
MGREMY Oct 24, 2024
89ee983
ci: update ci-check workflow
MGREMY Oct 24, 2024
ee86e50
ci: setup pnpm cache action & update ci setup
MGREMY Oct 25, 2024
5ce29b9
ci: add parameters to test command
MGREMY Oct 25, 2024
1f9e5ec
ci: fix type in action filename
MGREMY Oct 25, 2024
76ae602
ci: forgot setup folder
MGREMY Oct 25, 2024
a1ad311
ci: fix start error
MGREMY Oct 25, 2024
9f2848d
ci: update action version used in setup
MGREMY Oct 25, 2024
519295a
ci: update pnpm version
MGREMY Oct 25, 2024
a50ae28
ci: fix type & test cache
MGREMY Oct 25, 2024
ddb2932
ci: add cache cleanup action
MGREMY Oct 25, 2024
68b20a8
chore: add semantic release
MGREMY Oct 25, 2024
850a783
chore: semantic-release script ready for dryRun
MGREMY Oct 25, 2024
6b98c90
ci: add release workflow with dryRun
MGREMY Oct 25, 2024
c13692a
ci: add release trigger and update name
MGREMY Oct 25, 2024
b5ac9ad
ci: make project command
MGREMY Oct 25, 2024
bc4473c
ci: add flag config
MGREMY Oct 25, 2024
f968998
chore: remove nx cloud token
MGREMY Oct 25, 2024
2d535c9
ci: simplify semantic-release configuration
MGREMY Oct 25, 2024
43b0aa8
ci: update release configuration and permissions
MGREMY Oct 26, 2024
1b9986a
ci: add test branch and update permissions
MGREMY Oct 26, 2024
4bcd6a7
ci: update workflow trigger
MGREMY Oct 26, 2024
8a45e02
ci: remove dryRun in release commands
MGREMY Oct 26, 2024
3e1affc
ci: setup semantic release pipeline (#66)
MGREMY Oct 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
########################################################################################
# "pnpm install" composite action for pnpm 7/8+ #
#--------------------------------------------------------------------------------------#
# Requirement: @setup/node should be run before #
# #
# Usage in workflows steps: #
# #
# - name: 📥 Monorepo install #
# uses: ./.github/actions/pnpm-install #
# with: #
# enable-corepack: false # (default) #
# cwd: ${{ github.workspace }}/apps/my-app # (default = '.') #
# #
# Reference: #
# - latest: https://gist.github.com/belgattitude/838b2eba30c324f1f0033a797bab2e31 #
# #
# Versions: #
# - 1.1.0 - 15-07-2023 - Add project custom directory support. #
########################################################################################

name: 'PNPM install'
description: 'Run pnpm install with cache enabled'

inputs:
enable-corepack:
description: 'Enable corepack'
required: false
default: 'false'
cwd:
description: "Changes node's process.cwd() if the project is not located on the root. Default to process.cwd()"
required: false
default: '.'
Comment on lines +24 to +32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance input parameters documentation and validation

Consider the following improvements:

  1. Clarify whether cwd accepts absolute paths or must be relative to the workspace
  2. Add input validation for the enable-corepack boolean value

Apply this diff to enhance the input parameters:

 inputs:
   enable-corepack:
     description: 'Enable corepack'
     required: false
     default: 'false'
+    type: boolean
   cwd:
-    description: "Changes node's process.cwd() if the project is not located on the root. Default to process.cwd()"
+    description: "Project directory relative to workspace root. Default: '.'"
     required: false
     default: '.'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
inputs:
enable-corepack:
description: 'Enable corepack'
required: false
default: 'false'
cwd:
description: "Changes node's process.cwd() if the project is not located on the root. Default to process.cwd()"
required: false
default: '.'
inputs:
enable-corepack:
description: 'Enable corepack'
required: false
default: 'false'
type: boolean
cwd:
description: "Project directory relative to workspace root. Default: '.'"
required: false
default: '.'


runs:
using: 'composite'

steps:
- name: ⚙️ Enable Corepack
if: ${{ inputs.enable-corepack == 'true' }}
shell: bash
working-directory: ${{ inputs.cwd }}
run: |
corepack enable
echo "corepack enabled"

- uses: pnpm/action-setup@v4
if: ${{ inputs.enable-corepack == 'false' }}
with:
run_install: false
# If you're not setting the packageManager field in package.json, add the version here
version: latest-9

- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
id: pnpm-config
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache rotation keys
id: cache-rotation
shell: bash
run: |
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-

Comment on lines +65 to +72
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Improve cache key strategy

The current cache key strategy might lead to cache misses when dependencies haven't changed. Consider including the Node.js version in the cache key to prevent issues with different Node.js versions.

Apply this diff to enhance cache keys:

 - uses: actions/cache@v4
   name: Setup pnpm cache
   with:
     path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
-    key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
+    key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-node-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
     restore-keys: |
-      ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-
+      ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-node-${{ matrix.node-version }}-

Committable suggestion was skipped due to low confidence.

# Prevent store to grow over time (not needed with yarn)
# Note: not perfect as it prune too much in monorepos so the idea
# is to use cache-rotation as above. In the future this might work better.
#- name: Prune pnpm store
# shell: bash
# run: pnpm prune store

- name: Install dependencies
shell: bash
working-directory: ${{ inputs.cwd }}
run: pnpm install --frozen-lockfile --prefer-offline
env:
# Other environment variables
HUSKY: '0' # By default do not run HUSKY install

Comment on lines +80 to +87
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance error handling and environment variables documentation

The installation step could benefit from:

  1. Better error handling with continue-on-error or explicit error messages
  2. Clear documentation for all environment variables (currently only HUSKY is documented)

Apply this diff to improve the installation step:

 - name: Install dependencies
   shell: bash
   working-directory: ${{ inputs.cwd }}
-  run: pnpm install --frozen-lockfile --prefer-offline
+  run: |
+    echo "Installing dependencies in ${{ inputs.cwd }}..."
+    if ! pnpm install --frozen-lockfile --prefer-offline; then
+      echo "::error::Failed to install dependencies. Check the lockfile and try again."
+      exit 1
+    fi
   env:
-    # Other environment variables
+    # Prevent Husky installation during CI
     HUSKY: '0' # By default do not run HUSKY install
+    # Add other environment variables here with clear documentation
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install dependencies
shell: bash
working-directory: ${{ inputs.cwd }}
run: pnpm install --frozen-lockfile --prefer-offline
env:
# Other environment variables
HUSKY: '0' # By default do not run HUSKY install
- name: Install dependencies
shell: bash
working-directory: ${{ inputs.cwd }}
run: |
echo "Installing dependencies in ${{ inputs.cwd }}..."
if ! pnpm install --frozen-lockfile --prefer-offline; then
echo "::error::Failed to install dependencies. Check the lockfile and try again."
exit 1
fi
env:
# Prevent Husky installation during CI
HUSKY: '0' # By default do not run HUSKY install
# Add other environment variables here with clear documentation

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
36 changes: 36 additions & 0 deletions .github/workflows/cache_cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
name: Cleanup caches for closed branches

on:
pull_request:
types:
- closed
workflow_dispatch:

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Cleanup
run: |
gh extension install actions/gh-actions-cache

REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"

echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 | grep pnpm)

## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +17 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Several improvements needed in the cleanup script.

While the basic functionality is correct, there are some improvements that could make the script more robust:

  1. Quote variables to prevent word splitting
  2. Add error handling for grep
  3. Improve logging of deleted cache keys
  4. Remove trailing whitespace
  5. Add existence check for caches

Here's the improved version:

      - name: Cleanup
        run: |
          gh extension install actions/gh-actions-cache

-         REPO=${{ github.repository }}
-         BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
+         REPO="${{ github.repository }}"
+         BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"

          echo "Fetching list of cache key"
-         cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 | grep pnpm)
+         cacheKeysForPR=$(gh actions-cache list -R "$REPO" -B "$BRANCH" | cut -f 1 | grep -F "pnpm" || true)

+         if [ -z "$cacheKeysForPR" ]; then
+           echo "No caches found for this PR"
+           exit 0
+         fi

-         ## Setting this to not fail the workflow while deleting cache keys. 
+         # Setting this to not fail the workflow while deleting cache keys
          set +e
          echo "Deleting caches..."
-         for cacheKey in $cacheKeysForPR
+         for cacheKey in $cacheKeysForPR
          do
-             gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
+             echo "Deleting cache key: $cacheKey"
+             gh actions-cache delete "$cacheKey" -R "$REPO" -B "$BRANCH" --confirm
          done
          echo "Done"

The improvements:

  • Added quotes around variables to prevent word splitting
  • Added -F to grep for literal string matching
  • Added || true to prevent grep from failing when no matches found
  • Added check for empty cache list
  • Improved logging to show which cache keys are being deleted
  • Fixed trailing whitespace in comment
  • Made comment style consistent

Consider adding a timeout to the job to prevent long-running cleanups:

jobs:
  cleanup:
    runs-on: ubuntu-latest
    timeout-minutes: 10
🧰 Tools
🪛 actionlint

18-18: shellcheck reported issue in this script: SC2086:info:14:29: Double quote to prevent globbing and word splitting

(shellcheck)

🪛 yamllint

[error] 27-27: trailing spaces

(trailing-spaces)

49 changes: 0 additions & 49 deletions .github/workflows/ci-checks.yaml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI Checks

on:
workflow_dispatch:
pull_request:

concurrency: ${{ github.ref }}
Comment on lines +3 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance workflow trigger configuration and permissions

Consider the following improvements for better workflow control:

  1. Add branch filters to the pull_request trigger to limit unnecessary workflow runs
  2. Add cancel-in-progress: true to the concurrency setting
  3. Explicitly declare required permissions

Apply these changes to improve the workflow configuration:

 on:
   workflow_dispatch:
   pull_request:
+    branches:
+      - main
+      - develop
+
+permissions:
+  contents: read
+  pull-requests: read

-concurrency: ${{ github.ref }}
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
workflow_dispatch:
pull_request:
concurrency: ${{ github.ref }}
on:
workflow_dispatch:
pull_request:
branches:
- main
- develop
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
lint:
name: Lint the code 🕵
runs-on: ubuntu-latest
steps:
- name: Check out the code 🗄
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup NodeJS 💿
uses: actions/setup-node@v4
with:
node-version: 20

- name: Monorepo install
uses: ./.github/actions/setup

- name: Lint the code 🕵
run: pnpm all:lint

test:
name: Run unit tests 🔬
runs-on: ubuntu-latest
steps:
- name: Check out the code 🗄
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup NodeJS 💿
uses: actions/setup-node@v4
with:
node-version: 20

- name: Monorepo install
uses: ./.github/actions/setup

- name: Run unit tests 🔬
run: pnpm all:test -- --ci --verbose

Comment on lines +30 to +49
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance test job with artifacts and coverage reporting

Consider improving the test job configuration:

  1. Add test results and coverage artifacts
  2. Remove unnecessary git history fetch
  3. Add caching for dependencies

Apply these changes to enhance the test job:

   test:
     name: Run unit tests 🔬
     runs-on: ubuntu-latest
     steps:
       - name: Check out the code 🗄
         uses: actions/checkout@v4
-        with:
-          fetch-depth: 0

       - name: Setup NodeJS 💿
         uses: actions/setup-node@v4
         with:
           node-version: 20
+          cache: 'pnpm'

       - name: Monorepo install
         uses: ./.github/actions/setup

       - name: Run unit tests 🔬
-        run: pnpm all:test -- --ci --verbose
+        run: pnpm all:test -- --ci --verbose --coverage

+      - name: Upload test results
+        if: always()
+        uses: actions/upload-artifact@v3
+        with:
+          name: test-results
+          path: |
+            coverage/
+            test-results/

Committable suggestion was skipped due to low confidence.

build:
name: Build code 🛠
runs-on: ubuntu-latest
steps:
- name: Check out the code 🗄
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup NodeJS 💿
uses: actions/setup-node@v4
with:
node-version: 20

- name: Monorepo install
uses: ./.github/actions/setup

- name: Build code 🛠
run: pnpm all:build
Comment on lines +50 to +68
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Optimize build job configuration and add dependencies

The build job should:

  1. Depend on successful lint and test jobs
  2. Upload build artifacts
  3. Use dependency caching

Apply these changes to improve the build job:

   build:
     name: Build code 🛠
+    needs: [lint, test]
     runs-on: ubuntu-latest
     steps:
       - name: Check out the code 🗄
         uses: actions/checkout@v4
-        with:
-          fetch-depth: 0

       - name: Setup NodeJS 💿
         uses: actions/setup-node@v4
         with:
           node-version: 20
+          cache: 'pnpm'

       - name: Monorepo install
         uses: ./.github/actions/setup

       - name: Build code 🛠
         run: pnpm all:build
+
+      - name: Upload build artifacts
+        uses: actions/upload-artifact@v3
+        with:
+          name: build-artifacts
+          path: dist/

Committable suggestion was skipped due to low confidence.

39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
workflow_dispatch:
push:
branches:
- main
- next
- next-major
- alpha
- beta

Comment on lines +1 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Enable branch protection rules for release branches

The verification confirms that none of the branches, including the release-targeted branches (main, next, next-major, etc.), have protection rules enabled. This poses a security risk for the release workflow as:

  • The default branch (main) is unprotected
  • All branches can be directly pushed to without reviews
  • Squash and merge commits are allowed, but without required reviews

To prevent unauthorized releases, you should:

  • Enable branch protection rules for all release branches
  • Require pull request reviews before merging
  • Enable status checks to pass before merging
  • Consider restricting who can push to release branches
🔗 Analysis chain

Consider adding branch protection rules.

The workflow triggers on pushes to sensitive branches (main, next, next-major, etc.). To prevent unauthorized releases, ensure these branches have appropriate protection rules.


Let me gather more information about the repository's branch protection settings.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if branch protection rules exist for release branches
gh api repos/:owner/:repo/branches/main/protection 2>/dev/null || echo "Warning: main branch is not protected"
gh api repos/:owner/:repo/branches/next/protection 2>/dev/null || echo "Warning: next branch is not protected"

Length of output: 4076


Script:

#!/bin/bash
# Check repository settings and branch protection patterns
gh api repos/:owner/:repo | jq -r '.default_branch, .allow_squash_merge, .allow_merge_commit, .allow_rebase_merge'

# List all branch protection rules
gh api repos/:owner/:repo/branches | jq -r '.[].protected'

# Check workflow permissions
gh api repos/:owner/:repo/actions/permissions | jq -r '.default_workflow_permissions'

Length of output: 367

jobs:
release:
name: Release new version 🛠
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Check out the code 🗄
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup NodeJS 💿
uses: actions/setup-node@v4
with:
node-version: 20

- name: Monorepo install
uses: ./.github/actions/setup

- name: Release new version 🛠
run: pnpm lib:release -- --ci --verbose --skip-nx-cache
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run all:lint
pnpm all:lint
6 changes: 6 additions & 0 deletions .nxreleaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"repositoryUrl": "https://github.com/themesberg/flowbite-angular/",
"tagFormat": "${PROJECT_NAME}@v${version}",
"branches": ["main"]
}

4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
.angular

/.nx/cache
/.nx/workspace-data
/.nx/workspace-data

pnpm-lock.yaml
1 change: 0 additions & 1 deletion apps/docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,3 @@
}
}
}

4 changes: 2 additions & 2 deletions docs/files/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ To contribute, you will need (of course) to be able to build and start the docum

1. Make sure you have `Node.js > v20` installed
2. Run `git clone https://github.com/themesberg/flowbite-angular.git`
3. Run `npm i`
3. Run `pnpm i`
> [!WARNING]
> If some errors happen, check the logs ; it could be some dependencies outside Node.js (example with [parcel library](https://github.com/parcel-bundler/watcher) ; this library needs a C++ compiler installed on the computer)
4. Run `npm run docs:serve`
4. Run `pnpm docs:serve`
> [!TIP]
> This will start local dev server on `localhost:4200`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| NAME | VALUE |
| :------------ | :------------------: |
| BUILD_COMMAND | `npm run docs:build` |
| UT_COMMAND | `npm run docs:test` |
| E2E_COMMAND | `npm run ...` |
| NAME | VALUE |
| :------------ | :---------------: |
| BUILD_COMMAND | `pnpm docs:build` |
| UT_COMMAND | `pnpm docs:test` |
| E2E_COMMAND | `pnpm ...` |

![build & test.png](build%20&%20test.png)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| NAME | VALUE |
| :------------ | :-----------------: |
| BUILD_COMMAND | `npm run all:build` |
| UT_COMMAND | `npm run lib:test` |
| NAME | VALUE |
| :------------ | :--------------: |
| BUILD_COMMAND | `pnpm all:build` |
| UT_COMMAND | `pnpm lib:test` |

![build & test.png](build%20&%20test.png)
27 changes: 27 additions & 0 deletions libs/flowbite-angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,33 @@
},
"lint": {
"executor": "@nx/eslint:lint"
},
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"github": true,
"npm": true,
"changelog": true,
Comment on lines +39 to +41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider adding additional semantic-release plugins.

While the basic configuration with GitHub, npm, and changelog is good, consider adding these commonly used plugins for a more robust release process:

  • @semantic-release/commit-analyzer: For conventional commits parsing
  • @semantic-release/release-notes-generator: For structured release notes
  • @semantic-release/git: For version bumping in package.json
    "options": {
      "github": true,
      "npm": true,
      "changelog": true,
+     "plugins": [
+       "@semantic-release/commit-analyzer",
+       "@semantic-release/release-notes-generator",
+       "@semantic-release/npm",
+       "@semantic-release/github",
+       "@semantic-release/git"
+     ],

Committable suggestion was skipped due to low confidence.

"branches": [
"main",
"next",
"next-major",
"+([0-9])?(.{+([0-9]),x}).x",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"buildTarget": "flowbite-angular:build",
"outputPath": "{workspaceRoot}/dist/libs/flowbite-angular",
"tagFormat": "flowbite-angular@v${version}",
"commitMessage": "chore(flowbite-angular): ${nextRelease.version} [skip cli]\n\n${nextRelease.notes}"
}
}
}
}

Loading
Loading