From 2d64b29b4c4701a274470c8b817eece17350ccc9 Mon Sep 17 00:00:00 2001 From: Vanessa Tran Date: Tue, 7 Jan 2025 10:11:04 -0700 Subject: [PATCH] feat(#2291)!: upgrade version test --- .../workflows/alpha-dry-run-release-ci.yml | 56 +++++++++++++++++++ .releaserc.json | 4 ++ libs/angular-components/src/lib/validation.ts | 2 +- .../src/lib/filter-chip/filter-chip.tsx | 4 +- 4 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/alpha-dry-run-release-ci.yml diff --git a/.github/workflows/alpha-dry-run-release-ci.yml b/.github/workflows/alpha-dry-run-release-ci.yml new file mode 100644 index 000000000..fe476e0ed --- /dev/null +++ b/.github/workflows/alpha-dry-run-release-ci.yml @@ -0,0 +1,56 @@ +name: Alpha Release CI + +on: + push: + branches: + - alpha-dry-run-release + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v2 + with: + node-version: "20" + + - uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + + - run: npm ci + + - name: Get last successful commit + uses: nrwl/nx-set-shas@v3 + id: last_successful_commit + with: + main-branch-name: alpha + + - name: Lint + run: npm run lint + + - name: Test + run: npm run test + + - name: Build + run: npx nx run-many --target=build --all --prod --exclude=angular,react,angular-tests,angular-tests-e2e + + - name: Update Web components documentation + run: cp libs/web-components/README.md dist/libs/web-components + + - name: Remove types file for now + run: rm dist/libs/web-components/index.d.ts + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx nx affected --target release --base=${{ steps.last_successful_commit.outputs.base }} -- --dry-run --no-ci diff --git a/.releaserc.json b/.releaserc.json index bc130f60d..5ad85400a 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -11,6 +11,10 @@ "name": "alpha", "prerelease": true }, + { + "name": "alpha-dry-run-release", + "prerelease": true + }, { "name": "lts", "channel": "lts" diff --git a/libs/angular-components/src/lib/validation.ts b/libs/angular-components/src/lib/validation.ts index f6ea48cc8..6e031443b 100644 --- a/libs/angular-components/src/lib/validation.ts +++ b/libs/angular-components/src/lib/validation.ts @@ -39,7 +39,7 @@ function dispatchError(el: HTMLElement, name: string, msg: string) { } export class FormValidator { - private validators: Record; + private readonly validators: Record; constructor(validators?: Record) { this.validators = validators || {}; } diff --git a/libs/react-components/src/lib/filter-chip/filter-chip.tsx b/libs/react-components/src/lib/filter-chip/filter-chip.tsx index 4e6920cfb..9455050d9 100644 --- a/libs/react-components/src/lib/filter-chip/filter-chip.tsx +++ b/libs/react-components/src/lib/filter-chip/filter-chip.tsx @@ -1,8 +1,6 @@ import { useEffect, useRef } from "react"; import { Margins, GoabFilterChipTheme } from "@abgov/ui-components-common"; -export type GoAFilterChipTheme = "outline" | "filled"; - interface WCProps extends Margins { ref: React.RefObject; icontheme: GoabFilterChipTheme; @@ -21,7 +19,7 @@ declare global { export interface GoAFilterChipProps extends Margins { onClick?: () => void; - iconTheme?: GoAFilterChipTheme; + iconTheme?: GoabFilterChipTheme; error?: boolean; content: string; testId?: string;