From cd6e903c049fd3b7a165b03b0a334ef86f95a63b Mon Sep 17 00:00:00 2001 From: Robin Goetz <35136007+goetzrobin@users.noreply.github.com> Date: Wed, 8 Jan 2025 23:53:00 +0100 Subject: [PATCH] build: setup nightly release (#524) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: lint and cleanup of touched files * build: add executor to replace version for ui libs this executor finds all package.json in the libs/ui directory and replaces the current version of @spartan-ng with the one defined in UI_VERSION * build: update cli files to reflect new versions and add scripts to make publishing easier * chore: fix linting errors * build: update semantic release config * build: use same VERSION env var for ui and cli * fix: remove confusing comment * fix: add regex only updating spartan specific versions and a unit test to make sure we don't accidentally mess with other packages * fix: remove .DS_Store files and filter helm packages to not add them to package.json * chore: remove unused script * chore: add generator that auto-increments current version of released assets * chore: add scripts for nightly release * chore: add nightly release workflow * fix: add missing dash * chore: try on push for testing * build: auto fix version number in tools * ci: set up automatic release and committing of changed files * ci: give release step write permissions * ci: check out branch correctly so we can commit it back * ci: try to push to right place * chore: reorder package.json * fix: use newVersion to allow for auto increment script to work * chore: update branch name * fix: rename release scripts and interface and add missing generators * chore: release cli & ui 0.0.1-alpha.379 * chore: fix name for trigger * chore: try to push to origin nightly-release * chore: nightly release 2024-12-10 ⚡ * chore: update tools version number * chore: nightly release 2024-12-10 ⚡ * chore: update github flow to work on main and a schedule * fix: add back lost test and start commands to package.json * fix: fix tests and commit message to follow guidelines * feat: adjust version replacement for new single brain package * fix: use correct alpha version 381 * fix: add back storybook command to package.json * fix: typo in @spartan-ng/brain version for pagination helm * fix: remove tests that don't do anything and add formatting of files --------- Co-authored-by: Leonidas --- .github/workflows/nightly-release.yml | 128 ++++++++++++++++++ .github/workflows/release.yml | 24 ---- libs/brain/package.json | 2 +- libs/cli/package.json | 2 +- libs/cli/src/generators/base/versions.ts | 2 +- libs/cli/src/generators/ui/generator.ts | 13 +- .../generators/ui/supported-ui-libraries.json | 116 ++++++++-------- libs/tools/executors.json | 5 - libs/tools/generators.json | 15 ++ libs/tools/package.json | 3 +- .../build-update-publish/executor.spec.ts | 7 +- .../release/build-update-publish/executor.ts | 4 +- .../release/helpers/projects.helpers.ts | 6 - .../executors/release/npm-publish/executor.ts | 11 +- .../release/update-version/executor.spec.ts | 31 ----- .../release/update-version/executor.ts | 15 -- .../release/update-version/schema.d.ts | 2 - .../auto-increment-version/generator.spec.ts | 18 +++ .../auto-increment-version/generator.ts | 21 +++ .../auto-increment-version/schema.json | 7 + .../replace-cli-version/generator.ts | 21 +++ .../replace-cli-version/schema.json | 7 + .../replace-ui-version/generator.spec.ts | 38 ++++++ .../replace-ui-version/generator.ts | 71 ++++++++++ .../replace-ui-version}/schema.json | 0 libs/ui/accordion/helm/package.json | 6 +- libs/ui/alert-dialog/helm/package.json | 6 +- libs/ui/alert/helm/package.json | 6 +- libs/ui/aspect-ratio/helm/package.json | 4 +- libs/ui/avatar/helm/package.json | 4 +- libs/ui/badge/helm/package.json | 4 +- libs/ui/breadcrumb/helm/package.json | 6 +- libs/ui/button/helm/package.json | 4 +- libs/ui/calendar/helm/package.json | 8 +- libs/ui/card/helm/package.json | 4 +- libs/ui/carousel/helm/package.json | 8 +- libs/ui/checkbox/helm/package.json | 6 +- libs/ui/command/helm/package.json | 8 +- .../.gitkeep => libs/ui/core/package.json | 0 libs/ui/dialog/helm/package.json | 6 +- libs/ui/form-field/helm/package.json | 4 +- libs/ui/hover-card/helm/package.json | 4 +- libs/ui/icon/helm/package.json | 2 +- libs/ui/input/helm/package.json | 4 +- libs/ui/label/helm/package.json | 4 +- libs/ui/menu/helm/package.json | 6 +- libs/ui/pagination/helm/package.json | 10 +- libs/ui/popover/helm/package.json | 4 +- libs/ui/progress/helm/package.json | 4 +- libs/ui/radio-group/helm/package.json | 4 +- libs/ui/scroll-area/helm/package.json | 4 +- libs/ui/select/helm/package.json | 6 +- libs/ui/separator/helm/package.json | 4 +- libs/ui/sheet/helm/package.json | 6 +- libs/ui/skeleton/helm/package.json | 4 +- libs/ui/slider/helm/package.json | 4 +- libs/ui/sonner/helm/package.json | 4 +- libs/ui/spinner/helm/package.json | 4 +- libs/ui/switch/helm/package.json | 4 +- libs/ui/table/helm/package.json | 4 +- libs/ui/tabs/helm/package.json | 8 +- libs/ui/toggle/helm/package.json | 4 +- libs/ui/tooltip/helm/package.json | 4 +- libs/ui/typography/helm/package.json | 4 +- package.json | 11 +- pnpm-lock.yaml | 22 --- release.config.mjs | 17 ++- tools/scripts/publish.mjs | 59 -------- 68 files changed, 524 insertions(+), 344 deletions(-) create mode 100644 .github/workflows/nightly-release.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 libs/tools/src/executors/release/update-version/executor.spec.ts delete mode 100644 libs/tools/src/executors/release/update-version/executor.ts delete mode 100644 libs/tools/src/executors/release/update-version/schema.d.ts create mode 100644 libs/tools/src/generators/auto-increment-version/generator.spec.ts create mode 100644 libs/tools/src/generators/auto-increment-version/generator.ts create mode 100644 libs/tools/src/generators/auto-increment-version/schema.json create mode 100644 libs/tools/src/generators/replace-cli-version/generator.ts create mode 100644 libs/tools/src/generators/replace-cli-version/schema.json create mode 100644 libs/tools/src/generators/replace-ui-version/generator.spec.ts create mode 100644 libs/tools/src/generators/replace-ui-version/generator.ts rename libs/tools/src/{executors/release/update-version => generators/replace-ui-version}/schema.json (100%) rename tools/generators/.gitkeep => libs/ui/core/package.json (100%) delete mode 100644 tools/scripts/publish.mjs diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml new file mode 100644 index 000000000..ba102fcd1 --- /dev/null +++ b/.github/workflows/nightly-release.yml @@ -0,0 +1,128 @@ +name: nightly-release + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + check_date: + runs-on: ubuntu-latest + name: Check latest commit + outputs: + should_run: ${{ steps.should_run.outputs.should_run }} + steps: + - uses: actions/checkout@v2 + - name: print latest_commit + run: echo ${{ github.sha }} + + - id: should_run + continue-on-error: true + name: check latest commit is less than a day + if: ${{ github.event_name == 'schedule' }} + run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" + + commitlint: + needs: check_date + if: ${{ needs.check_date.outputs.should_run != 'false' }} + + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + # Required by wagoid/commitlint-github-action + pull-requests: read + steps: + - uses: actions/checkout@v4 + with: + # Required by wagoid/commitlint-github-action + fetch-depth: 0 + - name: Install Node v22 + uses: actions/setup-node@v4 + with: + node-version-file: .node-version + - name: Install pnpm globally + run: npm install -g pnpm + - name: Lint commit messages + uses: wagoid/commitlint-github-action@v5 + with: + failOnWarnings: true + helpURL: https://github.com/goetzrobin/spartan/blob/main/CONTRIBUTING.md#-commit-message-guidelines + + format-and-lint: + needs: check_date + if: ${{ needs.check_date.outputs.should_run != 'false' }} + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # Required by wagoid/commitlint-github-action + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: .node-version + - name: Install PNPM globally + run: npm install -g pnpm + - name: Install Dependencies + run: pnpm install --frozen-lockfile + - name: lint + run: pnpm run lint + - name: format + run: pnpm nx format:check --base=origin/main + + build: + needs: check_date + if: ${{ needs.check_date.outputs.should_run != 'false' }} + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # Required by wagoid/commitlint-github-action + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: .node-version + - name: Install PNPM globally + run: npm install -g pnpm + - name: Install Dependencies + run: pnpm install --frozen-lockfile + - name: Build + run: pnpm run build + + release: + needs: + - check_date + - build + - format-and-lint + if: ${{ needs.check_date.outputs.should_run != 'false' }} + + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + # Required by wagoid/commitlint-github-action + fetch-depth: 0 + ref: ${{ github.head_ref }} + - uses: actions/setup-node@v4 + with: + node-version-file: .node-version + - name: Install PNPM globally + run: npm install -g pnpm + - name: Install Dependencies + run: pnpm install --frozen-lockfile + - name: Pre Release + run: pnpm run pre-nightly-release + - name: Get the current date time + id: datetime + run: echo "release_date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + author_name: Leonidas + author_email: leonidas@spartan.ng + message: 'chore: nightly release ${{steps.datetime.outputs.release_date}} ⚡' + - name: Release + run: pnpm run release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 784e6345a..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: release - -on: - workflow_dispatch: - -env: - NODE_OPTIONS: --max-old-space-size=6144 - -jobs: - main: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: .node-version - - name: Install PNPM globally - run: npm install -g pnpm - - name: Install Dependencies - run: pnpm install --frozen-lockfile - - name: Release - run: pnpx semantic-release - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/libs/brain/package.json b/libs/brain/package.json index 7590024f6..67a119c1d 100644 --- a/libs/brain/package.json +++ b/libs/brain/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/brain", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "exports": { "./hlm-tailwind-preset": { diff --git a/libs/cli/package.json b/libs/cli/package.json index 750d9c15d..ad116710e 100644 --- a/libs/cli/package.json +++ b/libs/cli/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/cli", - "version": "0.0.1-alpha.367", + "version": "0.0.1-alpha.381", "type": "commonjs", "dependencies": { "@nx/angular": ">=20.0.0", diff --git a/libs/cli/src/generators/base/versions.ts b/libs/cli/src/generators/base/versions.ts index 4f648e934..b3d3a5d07 100644 --- a/libs/cli/src/generators/base/versions.ts +++ b/libs/cli/src/generators/base/versions.ts @@ -3,7 +3,7 @@ export const FALLBACK_ANGULAR_VERSION = '^18.0.0'; // ng-icon dependency export const NG_ICONS_VERSION = '^29.10.0'; // spartan dependencies -export const SPARTAN_BRAIN_VERSION = '0.0.1-alpha.357'; +export const SPARTAN_BRAIN_VERSION = '0.0.1-alpha.381'; // dev dependencies export const TAILWIND_MERGE_VERSION = '^2.2.0'; export const TAILWINDCSS_VERSION = '^3.0.2'; diff --git a/libs/cli/src/generators/ui/generator.ts b/libs/cli/src/generators/ui/generator.ts index 9fcb47205..7d187f466 100644 --- a/libs/cli/src/generators/ui/generator.ts +++ b/libs/cli/src/generators/ui/generator.ts @@ -9,7 +9,9 @@ export default async function hlmUIGenerator(tree: Tree, options: HlmUIGenerator const config = await getOrCreateConfig(tree, { componentsPath: options.directory, }); - const availablePrimitives: ComponentDefintions = await import('./supported-ui-libraries.json').then((m) => m.default); + const availablePrimitives: PrimitiveDefinitions = await import('./supported-ui-libraries.json').then( + (m) => m.default, + ); const availablePrimitiveNames = [...Object.keys(availablePrimitives), 'collapsible', 'menubar', 'contextmenu']; let response: { primitives: string[] } = { primitives: [] }; if (options.name && availablePrimitiveNames.includes(options.name)) { @@ -35,7 +37,7 @@ async function createPrimitiveLibraries( primitives: string[]; }, availablePrimitiveNames: string[], - availablePrimitives: ComponentDefintions, + availablePrimitives: PrimitiveDefinitions, tree: Tree, options: HlmUIGeneratorSchema & { angularCli?: boolean }, config: Config, @@ -59,7 +61,7 @@ async function createPrimitiveLibraries( if (primitiveName === 'collapsible') return; const internalName = availablePrimitives[primitiveName].internalName; - const peerDependencies = availablePrimitives[primitiveName].peerDependencies; + const peerDependencies = removeHelmKeys(availablePrimitives[primitiveName].peerDependencies); const { generator } = await import( // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore @@ -108,7 +110,10 @@ const replaceContextAndMenuBar = async (primtivesToCreate: string[], silent = fa } }; -interface ComponentDefintions { +const removeHelmKeys = (obj: Record) => + Object.fromEntries(Object.entries(obj).filter(([key]) => !key.toLowerCase().includes('helm'))); + +interface PrimitiveDefinitions { [componentName: string]: { internalName: string; peerDependencies: Record; diff --git a/libs/cli/src/generators/ui/supported-ui-libraries.json b/libs/cli/src/generators/ui/supported-ui-libraries.json index f1556ca8d..2e2c064bf 100644 --- a/libs/cli/src/generators/ui/supported-ui-libraries.json +++ b/libs/cli/src/generators/ui/supported-ui-libraries.json @@ -4,8 +4,8 @@ "peerDependencies": { "@angular/core": ">=18.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -13,8 +13,8 @@ "internalName": "ui-alert-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -23,8 +23,8 @@ "internalName": "ui-alert-dialog-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -33,7 +33,7 @@ "peerDependencies": { "@angular/cdk": ">=18.0.0", "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -41,7 +41,7 @@ "internalName": "ui-avatar-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -51,7 +51,7 @@ "peerDependencies": { "@angular/cdk": ">=18.0.0", "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -62,8 +62,8 @@ "@angular/core": "18.2.5", "@angular/router": "18.2.5", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -71,7 +71,7 @@ "internalName": "ui-button-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -82,16 +82,16 @@ "@angular/cdk": ">=18.0.0", "@angular/core": ">=18.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357" + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381" } }, "card": { "internalName": "ui-card-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -100,9 +100,9 @@ "internalName": "ui-command-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -113,8 +113,8 @@ "@angular/common": ">=18.0.0", "@angular/core": ">=18.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -124,7 +124,7 @@ "@angular/common": ">=18.0.0", "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -134,7 +134,7 @@ "peerDependencies": { "@angular/core": ">=18.0.0", "@angular/forms": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -143,7 +143,7 @@ "internalName": "ui-label-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -153,8 +153,8 @@ "peerDependencies": { "@angular/core": ">=18.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -163,7 +163,7 @@ "internalName": "ui-popover-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -171,7 +171,7 @@ "internalName": "ui-progress-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -179,7 +179,7 @@ "internalName": "ui-radio-group-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -187,7 +187,7 @@ "internalName": "ui-scroll-area-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1", "ngx-scrollbar": ">=16.0.0" } @@ -196,7 +196,7 @@ "internalName": "ui-separator-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -205,8 +205,8 @@ "peerDependencies": { "@angular/core": ">=18.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -215,7 +215,7 @@ "internalName": "ui-skeleton-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -223,7 +223,7 @@ "internalName": "ui-spinner-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -234,7 +234,7 @@ "@angular/cdk": ">=18.0.0", "@angular/core": ">=18.0.0", "@angular/forms": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -244,9 +244,9 @@ "@angular/cdk": ">=18.0.0", "@angular/core": ">=18.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -255,7 +255,7 @@ "internalName": "ui-toggle-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -264,7 +264,7 @@ "internalName": "ui-typography-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -273,7 +273,7 @@ "peerDependencies": { "@angular/common": ">=18.0.0", "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -281,7 +281,7 @@ "internalName": "ui-hover-card-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -291,8 +291,8 @@ "@angular/core": ">=18.0.0", "@angular/forms": ">=18.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" } }, @@ -300,7 +300,7 @@ "internalName": "ui-tooltip-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357" + "@spartan-ng/brain": "0.0.1-alpha.381" } }, "pagination": { @@ -311,10 +311,10 @@ "@angular/forms": ">=18.0.0", "@angular/router": ">=18.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-select-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-select-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -324,9 +324,9 @@ "peerDependencies": { "@angular/core": ">=18.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1", "embla-carousel-angular": "18.0.0" } @@ -337,8 +337,8 @@ "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } @@ -349,7 +349,7 @@ "@angular/common": "^18.1.0", "@angular/core": "^18.1.0", "@ng-icons/lucide": "^26.3.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1", "ngx-sonner": "^2.0.0" } @@ -358,14 +358,14 @@ "internalName": "ui-form-field-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357" + "@spartan-ng/brain": "0.0.1-alpha.381" } }, "slider": { "internalName": "ui-slider-helm", "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } } diff --git a/libs/tools/executors.json b/libs/tools/executors.json index 3ae7b83ac..32f032207 100644 --- a/libs/tools/executors.json +++ b/libs/tools/executors.json @@ -5,11 +5,6 @@ "schema": "./src/executors/release/npm-publish/schema.json", "description": "npm-publish executor" }, - "update-version": { - "implementation": "./src/executors/release/update-version/executor", - "schema": "./src/executors/release/update-version/schema.json", - "description": "update-version executor" - }, "build-update-publish": { "implementation": "./src/executors/release/build-update-publish/executor", "schema": "./src/executors/release/build-update-publish/schema.json", diff --git a/libs/tools/generators.json b/libs/tools/generators.json index 38de92702..02d3a4f8e 100644 --- a/libs/tools/generators.json +++ b/libs/tools/generators.json @@ -1,5 +1,20 @@ { "generators": { + "replace-cli-version": { + "factory": "./src/generators/replace-cli-version/generator", + "schema": "./src/generators/replace-cli-version/schema.json", + "description": "Updates the CLI's version" + }, + "replace-ui-version": { + "factory": "./src/generators/replace-ui-version/generator", + "schema": "./src/generators/replace-ui-version/schema.json", + "description": "Replaces version for all UI libs and their references in the CLI" + }, + "auto-increment-version": { + "factory": "./src/generators/auto-increment-version/generator", + "schema": "./src/generators/auto-increment-version/schema.json", + "description": "During alpha we are using this to automatically increment the version number for nightly releases" + }, "hlm-to-cli-generator": { "factory": "./src/generators/hlm-to-cli-generator/generator", "schema": "./src/generators/hlm-to-cli-generator/schema.json", diff --git a/libs/tools/package.json b/libs/tools/package.json index 3cd97e022..84f4a76a4 100644 --- a/libs/tools/package.json +++ b/libs/tools/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/tools", - "version": "0.0.1", + "version": "0.0.1-alpha.380", "type": "commonjs", "dependencies": { "@nx/angular": "20.1.1", @@ -9,7 +9,6 @@ "jsonc-eslint-parser": "^2.1.0", "nx": "20.1.1", "process": "0.11.10", - "replace-json-property": "^1.9.0", "tslib": "~2.7.0" }, "executors": "./executors.json", diff --git a/libs/tools/src/executors/release/build-update-publish/executor.spec.ts b/libs/tools/src/executors/release/build-update-publish/executor.spec.ts index dea7b8902..acb32f450 100644 --- a/libs/tools/src/executors/release/build-update-publish/executor.spec.ts +++ b/libs/tools/src/executors/release/build-update-publish/executor.spec.ts @@ -1,7 +1,6 @@ import * as childProcess from 'node:child_process'; import * as projectHelper from '../helpers/projects.helpers'; import * as npmPublish from '../npm-publish/executor'; -import * as updateVersion from '../update-version/executor'; import executor from './executor'; // Mock the entire child_process module @@ -15,11 +14,10 @@ describe('BuildUpdatePublish Executor', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const mockContext = { bar: 'bar' } as any; - // Mock the project helper, updateVersion, npmPublish, and execSync + // Mock the project helper, npmPublish, and execSync jest.spyOn(projectHelper, 'getProjectName').mockReturnValue(libName); - // Mock updateVersion and npmPublish to return { success: true } - jest.spyOn(updateVersion, 'default').mockImplementation(async () => Promise.resolve({ success: true })); + // Mock npmPublish to return { success: true } jest.spyOn(npmPublish, 'default').mockImplementation(async () => Promise.resolve({ success: true })); // execSync is already mocked globally by jest.mock @@ -29,7 +27,6 @@ describe('BuildUpdatePublish Executor', () => { const output = await executor({}, mockContext); // Verify that all functions are called as expected - expect(updateVersion.default).toHaveBeenCalledWith({}, mockContext); expect(npmPublish.default).toHaveBeenCalledWith({}, mockContext); expect(execSyncMock).toHaveBeenCalledWith(expectedCommand); expect(output.success).toBe(true); diff --git a/libs/tools/src/executors/release/build-update-publish/executor.ts b/libs/tools/src/executors/release/build-update-publish/executor.ts index 946000c03..deba144dd 100644 --- a/libs/tools/src/executors/release/build-update-publish/executor.ts +++ b/libs/tools/src/executors/release/build-update-publish/executor.ts @@ -3,14 +3,14 @@ import { execSync } from 'node:child_process'; import { getProjectName } from '../helpers/projects.helpers'; import npmPublish from '../npm-publish/executor'; -import updateVersion from '../update-version/executor'; import type { BuildUpdatePublishExecutorSchema } from './schema'; export default async function runExecutor(_options: BuildUpdatePublishExecutorSchema, context: ExecutorContext) { - await updateVersion({}, context); execSync(`nx build --project ${getProjectName(context)}`); + await npmPublish({}, context); + return { success: true, }; diff --git a/libs/tools/src/executors/release/helpers/projects.helpers.ts b/libs/tools/src/executors/release/helpers/projects.helpers.ts index 59edea6fe..4ce3dd375 100644 --- a/libs/tools/src/executors/release/helpers/projects.helpers.ts +++ b/libs/tools/src/executors/release/helpers/projects.helpers.ts @@ -9,9 +9,3 @@ export function getRoot(context: ExecutorContext): string { const projectName = getProjectName(context); return projectsConfiguration[projectName].root; } - -export function sleep(ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); -} diff --git a/libs/tools/src/executors/release/npm-publish/executor.ts b/libs/tools/src/executors/release/npm-publish/executor.ts index ff334ca1a..e9b4228a9 100644 --- a/libs/tools/src/executors/release/npm-publish/executor.ts +++ b/libs/tools/src/executors/release/npm-publish/executor.ts @@ -3,11 +3,20 @@ import { execSync } from 'node:child_process'; import { getRoot } from '../helpers/projects.helpers'; +import * as process from 'node:process'; import type { NpmPublishExecutorSchema } from './schema'; export default async function runExecutor(_options: NpmPublishExecutorSchema, context: ExecutorContext) { + const tag = process.env.TAG; + + if (!tag) { + return { + success: false, + }; + } + const sourceRoot = `./dist/${getRoot(context)}`; - execSync(`cd ${sourceRoot} && npm publish${process.env['TAG'] ? ` --tag ${process.env['TAG']}` : ''}`); + execSync(`cd ${sourceRoot} && npm publish${tag ? ` --tag ${tag}` : ''}`); return { success: true, }; diff --git a/libs/tools/src/executors/release/update-version/executor.spec.ts b/libs/tools/src/executors/release/update-version/executor.spec.ts deleted file mode 100644 index 044bca6e0..000000000 --- a/libs/tools/src/executors/release/update-version/executor.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ExecutorContext } from '@nx/devkit'; -import * as process from 'node:process'; -import * as replaceJsonProp from 'replace-json-property'; -import * as projectHelpers from '../helpers/projects.helpers'; -import executor from './executor'; - -// Mock the entire replace-json-property module -jest.mock('replace-json-property', () => ({ - replace: jest.fn(), // Mock the replace function -})); - -describe('ReplaceVersion Executor', () => { - it('should replace the version within the default path if no path was provided', async () => { - const version = '2.0.0'; - const libName = 'foo'; - const mockContext = {} as unknown as ExecutorContext; - - process.env.VERSION = version; - - const root = `libs/${libName}`; - - // Mock the getRoot helper - jest.spyOn(projectHelpers, 'getRoot').mockReturnValue(root); - - const output = await executor({}, mockContext); - - // Check that the replace function was called correctly - expect(replaceJsonProp.replace).toHaveBeenCalledWith(`${root}/package.json`, 'version', version); - expect(output.success).toBe(true); - }); -}); diff --git a/libs/tools/src/executors/release/update-version/executor.ts b/libs/tools/src/executors/release/update-version/executor.ts deleted file mode 100644 index 9a3a287b5..000000000 --- a/libs/tools/src/executors/release/update-version/executor.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ExecutorContext } from '@nx/devkit'; -import * as process from 'node:process'; -import { replace } from 'replace-json-property'; - -import { getRoot } from '../helpers/projects.helpers'; - -import type { ReplaceVersionExecutorSchema } from './schema'; - -export default async function runExecutor(_options: ReplaceVersionExecutorSchema, context: ExecutorContext) { - const sourceRoot = getRoot(context); - replace(`${sourceRoot}/package.json`, 'version', process.env['VERSION']); - return { - success: true, - }; -} diff --git a/libs/tools/src/executors/release/update-version/schema.d.ts b/libs/tools/src/executors/release/update-version/schema.d.ts deleted file mode 100644 index df7201fc4..000000000 --- a/libs/tools/src/executors/release/update-version/schema.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-empty-object-type -export type ReplaceVersionExecutorSchema = {}; diff --git a/libs/tools/src/generators/auto-increment-version/generator.spec.ts b/libs/tools/src/generators/auto-increment-version/generator.spec.ts new file mode 100644 index 000000000..b8a6fb854 --- /dev/null +++ b/libs/tools/src/generators/auto-increment-version/generator.spec.ts @@ -0,0 +1,18 @@ +import { type Tree, readProjectConfiguration } from '@nx/devkit'; +import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; + +import autoIncrementVersion from './generator'; + +describe('replace-cli-version generator', () => { + let tree: Tree; + + beforeEach(() => { + tree = createTreeWithEmptyWorkspace(); + }); + + it.skip('should run successfully', async () => { + await autoIncrementVersion(tree); + const config = readProjectConfiguration(tree, 'test'); + expect(config).toBeDefined(); + }); +}); diff --git a/libs/tools/src/generators/auto-increment-version/generator.ts b/libs/tools/src/generators/auto-increment-version/generator.ts new file mode 100644 index 000000000..590f05674 --- /dev/null +++ b/libs/tools/src/generators/auto-increment-version/generator.ts @@ -0,0 +1,21 @@ +import { type Tree, formatFiles, readJsonFile } from '@nx/devkit'; +import replaceCliVersionGenerator from '../replace-cli-version/generator'; +import replaceUiVersionGenerator from '../replace-ui-version/generator'; + +export default async function autoIncrementVersion(tree: Tree): Promise { + const oldVersion = readJsonFile('libs/brain/package.json').version as string; + const [prefix, branchAndNumber] = oldVersion.split('-'); + const [branch, versionNumber] = branchAndNumber.split('.'); + const newVersionNumber = +versionNumber + 1; + + const newVersion = `${prefix}-${branch}.${newVersionNumber}`; + + console.log( + `preparing release with auto-incremented version ${newVersion} which should be 1 more than ${oldVersion}`, + ); + + await replaceUiVersionGenerator(tree, { newVersion }); + await replaceCliVersionGenerator(tree, { newVersion }); + + await formatFiles(tree); +} diff --git a/libs/tools/src/generators/auto-increment-version/schema.json b/libs/tools/src/generators/auto-increment-version/schema.json new file mode 100644 index 000000000..c763d9499 --- /dev/null +++ b/libs/tools/src/generators/auto-increment-version/schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/schema", + "$id": "AutoIncrementVersionGenerator", + "title": "", + "type": "object", + "properties": {} +} diff --git a/libs/tools/src/generators/replace-cli-version/generator.ts b/libs/tools/src/generators/replace-cli-version/generator.ts new file mode 100644 index 000000000..c0f866dc3 --- /dev/null +++ b/libs/tools/src/generators/replace-cli-version/generator.ts @@ -0,0 +1,21 @@ +import { formatFiles, type Tree, updateJson } from '@nx/devkit'; +import process from 'node:process'; + +export default async function replaceCliVersionGenerator(tree: Tree, options?: { newVersion: string }): Promise { + const packageJsonPath = 'libs/cli/package.json'; + const newVersion = options?.newVersion ?? process.env.VERSION; + + if (!newVersion) { + console.error('Must define a VERSION environment variable to use with this script.'); + return; + } + + updateJson(tree, packageJsonPath, (pkgJson) => { + pkgJson.version = newVersion; + return pkgJson; + }); + + await formatFiles(tree); + + console.log(`updated CLI version to ${newVersion}`); +} diff --git a/libs/tools/src/generators/replace-cli-version/schema.json b/libs/tools/src/generators/replace-cli-version/schema.json new file mode 100644 index 000000000..b8288bd2e --- /dev/null +++ b/libs/tools/src/generators/replace-cli-version/schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/schema", + "$id": "ReplaceCliVersionGenerator", + "title": "", + "type": "object", + "properties": {} +} diff --git a/libs/tools/src/generators/replace-ui-version/generator.spec.ts b/libs/tools/src/generators/replace-ui-version/generator.spec.ts new file mode 100644 index 000000000..5bd9b6d21 --- /dev/null +++ b/libs/tools/src/generators/replace-ui-version/generator.spec.ts @@ -0,0 +1,38 @@ +import { replaceSpartanVersion } from './generator'; + +describe('replaceSpartanVersions', () => { + it('should replace only SPARTAN-prefixed versions that match oldVersion', () => { + const input = ` + export const FALLBACK_ANGULAR_VERSION = '^18.0.0'; + export const SPARTAN_VERSION = '3.0.2'; + export const SPARTAN_ALERT_DIALOG_BRAIN_VERSION = '3.0.2'; + export const TAILWINDCSS_VERSION = '3.0.2'; + `; + + const oldVersion = '3.0.2'; + const newVersion = '3.0.3'; + + const expectedOutput = ` + export const FALLBACK_ANGULAR_VERSION = '^18.0.0'; + export const SPARTAN_VERSION = '3.0.3'; + export const SPARTAN_ALERT_DIALOG_BRAIN_VERSION = '3.0.2'; + export const TAILWINDCSS_VERSION = '3.0.2'; + `; + + const result = replaceSpartanVersion(input, oldVersion, newVersion); + expect(result).toBe(expectedOutput); + }); + + it('should not replace versions without the SPARTAN_ prefix', () => { + const input = ` + export const FALLBACK_ANGULAR_VERSION = '3.0.2'; + export const TAILWINDCSS_VERSION = '3.0.2'; + `; + + const oldVersion = '3.0.2'; + const newVersion = '3.0.3'; + + const result = replaceSpartanVersion(input, oldVersion, newVersion); + expect(result).toBe(input); // No changes expected + }); +}); diff --git a/libs/tools/src/generators/replace-ui-version/generator.ts b/libs/tools/src/generators/replace-ui-version/generator.ts new file mode 100644 index 000000000..e34037596 --- /dev/null +++ b/libs/tools/src/generators/replace-ui-version/generator.ts @@ -0,0 +1,71 @@ +import { type Tree, formatFiles, readJsonFile, updateJson } from '@nx/devkit'; +import process from 'node:process'; + +const getSpartanDependencyKeys = (dependencies?: Record): string[] => + Object.keys(dependencies ?? {}).filter((key) => key.startsWith('@spartan-ng')); + +export const replaceSpartanVersion = (content: string, oldVersion: string, newVersion: string): string => { + /** + * Regular expression to match SPARTAN_VERSION constant: + * - `(SPARTAN_VERSION\\s*=\\s*['"])`: + * 1. `SPARTAN_VERSION`: Ensures the constant is named `SPARTAN_VERSION`. + * 4. `\\s*`: Matches zero or more spaces around the `=` sign. + * 5. `['"]`: Captures the opening quote (single or double). + * 6. Encloses the entire match before the version in group 1 (`$1`). + * - `${oldVersion}`: Matches the exact old version string. + * - `(['"])`: Captures the closing quote in group 2 (`$2`). + * - `g` flag: Ensures the regex replaces all matches globally, not just the first occurrence. + */ + const spartanVersionRegex = new RegExp(`(SPARTAN_VERSION\\s*=\\s*['"])${oldVersion}(['"])`, 'g'); + return content.replace(spartanVersionRegex, `$1${newVersion}$2`); +}; + +const replaceUiVersionInCliVersionsFile = (tree: Tree, oldVersion: string, newVersion: string) => { + const filePath = `libs/cli/src/generators/base/versions.ts`; + let contents = tree.read(filePath).toString(); + contents = replaceSpartanVersion(contents, oldVersion, newVersion); + tree.write(filePath, contents); +}; + +const replaceUiVersionGenerator = async (tree: Tree, options?: { newVersion: string }): Promise => { + const brainPackageJsonPath = 'libs/brain/package.json'; + const oldVersion = readJsonFile(brainPackageJsonPath).version; + const newVersion = options?.newVersion ?? process.env.VERSION; + + if (!oldVersion) { + console.error( + "Unable to find old version in our accordion's package.json, which we use as source of truth because its good enough.", + ); + return; + } + + if (!newVersion) { + console.error('Must define a VERSION environment variable to use with this script.'); + return; + } + + if (oldVersion === newVersion) { + console.error('Old version cannot be the same as new version'); + return; + } + + console.log(`Updating UI libs version from ${oldVersion} to ${newVersion}`); + + updateJson(tree, brainPackageJsonPath, (pkgJson) => { + const peerDependencyKeysToUpdate = getSpartanDependencyKeys(pkgJson.peerDependencies); + pkgJson.version = newVersion; + + for (const key of peerDependencyKeysToUpdate) { + pkgJson.peerDependencies[key] = newVersion; + } + + return pkgJson; + }); + + console.log(`Reflecting those changes in versions.ts file of the CLI`); + replaceUiVersionInCliVersionsFile(tree, oldVersion, newVersion); + + await formatFiles(tree); +}; + +export default replaceUiVersionGenerator; diff --git a/libs/tools/src/executors/release/update-version/schema.json b/libs/tools/src/generators/replace-ui-version/schema.json similarity index 100% rename from libs/tools/src/executors/release/update-version/schema.json rename to libs/tools/src/generators/replace-ui-version/schema.json diff --git a/libs/ui/accordion/helm/package.json b/libs/ui/accordion/helm/package.json index e8fc2647e..a7a82633b 100644 --- a/libs/ui/accordion/helm/package.json +++ b/libs/ui/accordion/helm/package.json @@ -1,14 +1,14 @@ { "name": "@spartan-ng/ui-accordion-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/alert-dialog/helm/package.json b/libs/ui/alert-dialog/helm/package.json index 1b33cce74..0c30e7fe4 100644 --- a/libs/ui/alert-dialog/helm/package.json +++ b/libs/ui/alert-dialog/helm/package.json @@ -1,12 +1,12 @@ { "name": "@spartan-ng/ui-alertdialog-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/alert/helm/package.json b/libs/ui/alert/helm/package.json index b3ea564af..bae28a42f 100644 --- a/libs/ui/alert/helm/package.json +++ b/libs/ui/alert/helm/package.json @@ -1,12 +1,12 @@ { "name": "@spartan-ng/ui-alert-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/aspect-ratio/helm/package.json b/libs/ui/aspect-ratio/helm/package.json index f5086ab5c..48b24fcd0 100644 --- a/libs/ui/aspect-ratio/helm/package.json +++ b/libs/ui/aspect-ratio/helm/package.json @@ -1,12 +1,12 @@ { "name": "@spartan-ng/ui-aspectratio-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/cdk": ">=18.0.0", "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/avatar/helm/package.json b/libs/ui/avatar/helm/package.json index 50aff2970..b8dc0eb3d 100644 --- a/libs/ui/avatar/helm/package.json +++ b/libs/ui/avatar/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-avatar-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/badge/helm/package.json b/libs/ui/badge/helm/package.json index d9b324e91..e896f8eb3 100644 --- a/libs/ui/badge/helm/package.json +++ b/libs/ui/badge/helm/package.json @@ -1,12 +1,12 @@ { "name": "@spartan-ng/ui-badge-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/cdk": ">=18.0.0", "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/breadcrumb/helm/package.json b/libs/ui/breadcrumb/helm/package.json index d0886096e..3f9994354 100644 --- a/libs/ui/breadcrumb/helm/package.json +++ b/libs/ui/breadcrumb/helm/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/ui-breadcrumb-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { @@ -8,8 +8,8 @@ "@angular/router": "18.2.5", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/button/helm/package.json b/libs/ui/button/helm/package.json index 012297e28..0a01a6510 100644 --- a/libs/ui/button/helm/package.json +++ b/libs/ui/button/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-button-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/calendar/helm/package.json b/libs/ui/calendar/helm/package.json index defc064fc..503e87142 100644 --- a/libs/ui/calendar/helm/package.json +++ b/libs/ui/calendar/helm/package.json @@ -1,14 +1,14 @@ { "name": "@spartan-ng/ui-calendar-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "peerDependencies": { "@angular/cdk": ">=18.0.0", "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357" + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381" } } diff --git a/libs/ui/card/helm/package.json b/libs/ui/card/helm/package.json index a1303ee26..54b398e60 100644 --- a/libs/ui/card/helm/package.json +++ b/libs/ui/card/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-card-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/carousel/helm/package.json b/libs/ui/carousel/helm/package.json index af71f2b1b..8552a8f5f 100644 --- a/libs/ui/carousel/helm/package.json +++ b/libs/ui/carousel/helm/package.json @@ -1,15 +1,15 @@ { "name": "@spartan-ng/ui-carousel-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1", "embla-carousel-angular": "18.0.0" }, diff --git a/libs/ui/checkbox/helm/package.json b/libs/ui/checkbox/helm/package.json index f1037f1cc..fedf46067 100644 --- a/libs/ui/checkbox/helm/package.json +++ b/libs/ui/checkbox/helm/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/ui-checkbox-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { @@ -8,8 +8,8 @@ "@angular/forms": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/command/helm/package.json b/libs/ui/command/helm/package.json index ede1e2625..0412cbb1f 100644 --- a/libs/ui/command/helm/package.json +++ b/libs/ui/command/helm/package.json @@ -1,13 +1,13 @@ { "name": "@spartan-ng/ui-command-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/tools/generators/.gitkeep b/libs/ui/core/package.json similarity index 100% rename from tools/generators/.gitkeep rename to libs/ui/core/package.json diff --git a/libs/ui/dialog/helm/package.json b/libs/ui/dialog/helm/package.json index ecb1a6123..b32d8afcf 100644 --- a/libs/ui/dialog/helm/package.json +++ b/libs/ui/dialog/helm/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/ui-dialog-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { @@ -9,8 +9,8 @@ "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/form-field/helm/package.json b/libs/ui/form-field/helm/package.json index 879437e3f..69723064c 100644 --- a/libs/ui/form-field/helm/package.json +++ b/libs/ui/form-field/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-formfield-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357" + "@spartan-ng/brain": "0.0.1-alpha.381" }, "publishConfig": { "access": "public" diff --git a/libs/ui/hover-card/helm/package.json b/libs/ui/hover-card/helm/package.json index f5dbb9c89..ee36bb008 100644 --- a/libs/ui/hover-card/helm/package.json +++ b/libs/ui/hover-card/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-hovercard-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/icon/helm/package.json b/libs/ui/icon/helm/package.json index 8cea57dfb..31c963ffa 100644 --- a/libs/ui/icon/helm/package.json +++ b/libs/ui/icon/helm/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/ui-icon-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { diff --git a/libs/ui/input/helm/package.json b/libs/ui/input/helm/package.json index 2c5cbfe95..2fc894e9f 100644 --- a/libs/ui/input/helm/package.json +++ b/libs/ui/input/helm/package.json @@ -1,12 +1,12 @@ { "name": "@spartan-ng/ui-input-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", "@angular/forms": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/label/helm/package.json b/libs/ui/label/helm/package.json index 907def587..e3d1f9f3a 100644 --- a/libs/ui/label/helm/package.json +++ b/libs/ui/label/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-label-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/menu/helm/package.json b/libs/ui/menu/helm/package.json index b2eb718c4..e820266ed 100644 --- a/libs/ui/menu/helm/package.json +++ b/libs/ui/menu/helm/package.json @@ -1,14 +1,14 @@ { "name": "@spartan-ng/ui-menu-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/pagination/helm/package.json b/libs/ui/pagination/helm/package.json index 8aeb44b32..b844fe767 100644 --- a/libs/ui/pagination/helm/package.json +++ b/libs/ui/pagination/helm/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/ui-pagination-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "peerDependencies": { "@angular/cdk": ">=18.0.0", @@ -9,10 +9,10 @@ "@angular/router": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-select-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-select-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/popover/helm/package.json b/libs/ui/popover/helm/package.json index d2120d275..85b77d535 100644 --- a/libs/ui/popover/helm/package.json +++ b/libs/ui/popover/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-popover-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/progress/helm/package.json b/libs/ui/progress/helm/package.json index f56530c38..0b227a1a5 100644 --- a/libs/ui/progress/helm/package.json +++ b/libs/ui/progress/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-progress-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/radio-group/helm/package.json b/libs/ui/radio-group/helm/package.json index 9974eb734..6c2fa515b 100644 --- a/libs/ui/radio-group/helm/package.json +++ b/libs/ui/radio-group/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-radiogroup-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/scroll-area/helm/package.json b/libs/ui/scroll-area/helm/package.json index cdb970f1a..b042e0367 100644 --- a/libs/ui/scroll-area/helm/package.json +++ b/libs/ui/scroll-area/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-scrollarea-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1", "ngx-scrollbar": ">=16.0.0" }, diff --git a/libs/ui/select/helm/package.json b/libs/ui/select/helm/package.json index afeba597e..d65f50edd 100644 --- a/libs/ui/select/helm/package.json +++ b/libs/ui/select/helm/package.json @@ -1,14 +1,14 @@ { "name": "@spartan-ng/ui-select-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } diff --git a/libs/ui/separator/helm/package.json b/libs/ui/separator/helm/package.json index eb74adcd3..be153b979 100644 --- a/libs/ui/separator/helm/package.json +++ b/libs/ui/separator/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-separator-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/sheet/helm/package.json b/libs/ui/sheet/helm/package.json index 0dc14c656..81a55a387 100644 --- a/libs/ui/sheet/helm/package.json +++ b/libs/ui/sheet/helm/package.json @@ -1,14 +1,14 @@ { "name": "@spartan-ng/ui-sheet-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/skeleton/helm/package.json b/libs/ui/skeleton/helm/package.json index 394bd6673..d767d5cbf 100644 --- a/libs/ui/skeleton/helm/package.json +++ b/libs/ui/skeleton/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-skeleton-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/slider/helm/package.json b/libs/ui/slider/helm/package.json index 30542ec61..5e8a8b082 100644 --- a/libs/ui/slider/helm/package.json +++ b/libs/ui/slider/helm/package.json @@ -1,10 +1,10 @@ { "name": "@spartan-ng/ui-slider-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } } diff --git a/libs/ui/sonner/helm/package.json b/libs/ui/sonner/helm/package.json index ffaebc54d..803a5be8e 100644 --- a/libs/ui/sonner/helm/package.json +++ b/libs/ui/sonner/helm/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/ui-sonner-helm", - "version": "0.0.1", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": { "tslib": "^2.3.0" @@ -9,7 +9,7 @@ "@angular/common": "^18.1.0", "@angular/core": "^18.1.0", "@ng-icons/lucide": "^26.3.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1", "ngx-sonner": "^2.0.0" } diff --git a/libs/ui/spinner/helm/package.json b/libs/ui/spinner/helm/package.json index 034656e14..4decba4cc 100644 --- a/libs/ui/spinner/helm/package.json +++ b/libs/ui/spinner/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-spinner-helm", - "version": "0.0.1", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" } diff --git a/libs/ui/switch/helm/package.json b/libs/ui/switch/helm/package.json index c71e57a96..1543771a9 100644 --- a/libs/ui/switch/helm/package.json +++ b/libs/ui/switch/helm/package.json @@ -1,13 +1,13 @@ { "name": "@spartan-ng/ui-switch-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/cdk": ">=18.0.0", "@angular/core": ">=18.0.0", "@angular/forms": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/libs/ui/table/helm/package.json b/libs/ui/table/helm/package.json index 21ff90c57..fcb28639b 100644 --- a/libs/ui/table/helm/package.json +++ b/libs/ui/table/helm/package.json @@ -1,12 +1,12 @@ { "name": "@spartan-ng/ui-table-helm", - "version": "0.0.1", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/common": ">=18.0.0", "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" } } diff --git a/libs/ui/tabs/helm/package.json b/libs/ui/tabs/helm/package.json index 59b72fadc..2c512e948 100644 --- a/libs/ui/tabs/helm/package.json +++ b/libs/ui/tabs/helm/package.json @@ -1,6 +1,6 @@ { "name": "@spartan-ng/ui-tabs-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { @@ -8,9 +8,9 @@ "@angular/core": ">=18.0.0", "@ng-icons/core": ">=29.0.0", "@ng-icons/lucide": ">=29.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", - "@spartan-ng/ui-button-helm": "0.0.1-alpha.357", - "@spartan-ng/ui-icon-helm": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", + "@spartan-ng/ui-button-helm": "0.0.1-alpha.381", + "@spartan-ng/ui-icon-helm": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/toggle/helm/package.json b/libs/ui/toggle/helm/package.json index dbfafd5fd..9648a13bc 100644 --- a/libs/ui/toggle/helm/package.json +++ b/libs/ui/toggle/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-toggle-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1" }, diff --git a/libs/ui/tooltip/helm/package.json b/libs/ui/tooltip/helm/package.json index 16ae8f6dd..e68344c2d 100644 --- a/libs/ui/tooltip/helm/package.json +++ b/libs/ui/tooltip/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-tooltip-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357" + "@spartan-ng/brain": "0.0.1-alpha.381" }, "publishConfig": { "access": "public" diff --git a/libs/ui/typography/helm/package.json b/libs/ui/typography/helm/package.json index bedefb649..b5e3e8c4f 100644 --- a/libs/ui/typography/helm/package.json +++ b/libs/ui/typography/helm/package.json @@ -1,11 +1,11 @@ { "name": "@spartan-ng/ui-typography-helm", - "version": "0.0.1-alpha.357", + "version": "0.0.1-alpha.381", "sideEffects": false, "dependencies": {}, "peerDependencies": { "@angular/core": ">=18.0.0", - "@spartan-ng/brain": "0.0.1-alpha.357", + "@spartan-ng/brain": "0.0.1-alpha.381", "clsx": "^2.1.1" }, "publishConfig": { diff --git a/package.json b/package.json index b7c557d14..5a0c6182f 100644 --- a/package.json +++ b/package.json @@ -14,9 +14,13 @@ "e2e": "nx run-many --target e2e --projects=tag:scope:e2e --all --parallel=1", "format": "nx format --write", "lint": "nx run-many --target=lint --parallel", - "pre-publish": "pnpm run prepare-cli && pnpm run format", - "prepare": "git config core.hookspath .githooks", - "prepare-cli": "nx g @spartan-ng/tools:hlm-to-cli-generator", + "pre-manual-release": "pnpm run prepare-manual-release && pnpm run format && nx run tools:lint --fix", + "pre-nightly-release": "pnpm run prepare-nightly-release && pnpm run format && nx run tools:lint --fix", + "prepare-manual-release": "nx g @spartan-ng/tools:replace-ui-version && nx g @spartan-ng/tools:hlm-to-cli-generator && nx g @spartan-ng/tools:replace-cli-version", + "prepare-nightly-release": "nx g @spartan-ng/tools:auto-increment-version && nx g @spartan-ng/tools:hlm-to-cli-generator", + "release": "pnpm run release-ui && pnpm run release-cli", + "release-cli": "nx run-many --target=release --projects=tag:scope:cli --parallel=1", + "release-ui": "nx run-many --target=release --projects=tag:scope:core,tag:scope:brain --parallel=1", "start": "nx serve app", "storybook": "nx storybook ui-storybook", "test": "nx run-many --target test --all" @@ -166,7 +170,6 @@ "prettier-plugin-organize-imports": "^4.1.0", "prettier-plugin-packagejson": "^2.5.6", "prettier-plugin-tailwindcss": "^0.6.8", - "replace-json-property": "^1.9.0", "rollup": "^4.22.5", "rollup-plugin-typescript-paths": "^1.5.0", "rollup-plugin-visualizer": "^5.12.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1fa66188c..74655127d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -435,9 +435,6 @@ importers: prettier-plugin-tailwindcss: specifier: ^0.6.8 version: 0.6.9(prettier-plugin-organize-imports@4.1.0(prettier@3.3.3)(typescript@5.5.4))(prettier@3.3.3) - replace-json-property: - specifier: ^1.9.0 - version: 1.9.0 rollup: specifier: ^4.22.5 version: 4.27.3 @@ -8697,9 +8694,6 @@ packages: jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - jsonfile@5.0.0: - resolution: {integrity: sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==} - jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -10922,10 +10916,6 @@ packages: renderkid@3.0.0: resolution: {integrity: sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==} - replace-json-property@1.9.0: - resolution: {integrity: sha512-+X6pZXsXSUKT9OzpJQjeDgLp9d0Ck7fsLZcNLhVL29XkwmB5oBz5T3fovs23/P0rLpzbCXrzG9/mbnyDrau+pw==} - hasBin: true - request-progress@3.0.0: resolution: {integrity: sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==} @@ -22980,12 +22970,6 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 - jsonfile@5.0.0: - dependencies: - universalify: 0.1.2 - optionalDependencies: - graceful-fs: 4.2.11 - jsonfile@6.1.0: dependencies: universalify: 2.0.1 @@ -25351,12 +25335,6 @@ snapshots: lodash: 4.17.21 strip-ansi: 6.0.1 - replace-json-property@1.9.0: - dependencies: - chalk: 4.1.2 - commander: 2.20.3 - jsonfile: 5.0.0 - request-progress@3.0.0: dependencies: throttleit: 1.0.1 diff --git a/release.config.mjs b/release.config.mjs index a38165f5f..acba2e52d 100644 --- a/release.config.mjs +++ b/release.config.mjs @@ -1,5 +1,5 @@ export default { - branches: ['main'], + branches: ['main', { name: 'alpha', prerelease: true }], preset: 'conventionalcommits', presetConfig: { types: [ @@ -16,7 +16,6 @@ export default { releaseRules: [{ type: 'refactor', release: 'patch' }], plugins: [ '@semantic-release/commit-analyzer', - '@semantic-release/release-notes-generator', [ '@semantic-release/changelog', { @@ -26,15 +25,21 @@ export default { [ '@semantic-release/exec', { - prepareCmd: - 'VERSION=${nextRelease.version} npx nx run-many -t release --parallel=1 && VERSION=${nextRelease.version} npx -p replace-json-property rjp ./package.json version ${nextRelease.version}', + prepareCmd: 'TAG=latest,VERSION=${nextRelease.version} pnpm run pre-release', + releaseCmd: 'TAG=latest,VERSION=${nextRelease.version} pnpm run release', }, ], [ '@semantic-release/git', { - assets: ['libs/**/package.json', 'package.json', 'CHANGELOG.md'], - message: 'chore(release): -v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}', + assets: [ + 'libs/cli/package.json', + 'libs/cli/src/generators/base/versions.ts', + 'libs/cli/src/generators/ui/supported-ui-libraries.json', + 'libs/ui/**/package.json', + 'CHANGELOG.md', + ], + message: 'chore: release ${nextRelease.version} [skip ci]', }, ], ], diff --git a/tools/scripts/publish.mjs b/tools/scripts/publish.mjs deleted file mode 100644 index 77b5dc91e..000000000 --- a/tools/scripts/publish.mjs +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This is a minimal script to publish your package to "npm". - * This is meant to be used as-is or customize as you see fit. - * - * This script is executed on "dist/path/to/library" as "cwd" by default. - * - * You might need to authenticate with NPM before running this script. - */ - -import devkit from '@nx/devkit'; -import chalk from 'chalk'; -import { execSync } from 'node:child_process'; -import { readFileSync, writeFileSync } from 'node:fs'; - -const { readCachedProjectGraph } = devkit; - -function invariant(condition, message) { - if (!condition) { - console.error(chalk.bold.red(message)); - process.exit(1); - } -} - -// Executing publish script: node path/to/publish.mjs {name} --version {version} --tag {tag} -// Default "tag" to "next" so we won't publish the "latest" tag by accident. -const [, , name, version, tag = 'next'] = process.argv; - -// A simple SemVer validation to validate the version -const validVersion = /^\d+\.\d+\.\d+(-\w+\.\d+)?/; -invariant( - version && validVersion.test(version), - `No version provided or version did not match Semantic Versioning, expected: #.#.#-tag.# or #.#.#, got ${version}.`, -); - -const graph = readCachedProjectGraph(); -const project = graph.nodes[name]; - -invariant(project, `Could not find project "${name}" in the workspace. Is the project.json configured correctly?`); - -const outputPath = project.data?.targets?.build?.options?.outputPath; -invariant( - outputPath, - `Could not find "build.options.outputPath" of project "${name}". Is project.json configured correctly?`, -); - -process.chdir(outputPath); - -// Updating the version in "package.json" before publishing -try { - const json = JSON.parse(readFileSync('package.json').toString()); - json.version = version; - writeFileSync('package.json', JSON.stringify(json, null, 2)); -} catch (e) { - console.error(chalk.bold.red('Error reading package.json file from library build output.')); - console.error(e); -} - -// Execute "npm publish" to publish -execSync(`npm publish --access public --tag ${tag}`);