Skip to content

Commit

Permalink
feat(#2291)!: upgrade angular & react components
Browse files Browse the repository at this point in the history
BREAKING CHANGE: test with dry-run
  • Loading branch information
vanessatran-ddi committed Jan 6, 2025
1 parent db76130 commit 1733ede
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 4 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/alpha-dry-run-release-ci.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"name": "alpha",
"prerelease": true
},
{
"name": "alpha-dry-run-release",
"prerelease": true
},
{
"name": "lts",
"channel": "lts"
Expand Down
2 changes: 1 addition & 1 deletion libs/angular-components/src/lib/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function dispatchError(el: HTMLElement, name: string, msg: string) {
}

export class FormValidator {
private validators: Record<string, FieldValidator[]>;
private readonly validators: Record<string, FieldValidator[]>;
constructor(validators?: Record<string, FieldValidator[]>) {
this.validators = validators || {};
}
Expand Down
4 changes: 1 addition & 3 deletions libs/react-components/src/lib/filter-chip/filter-chip.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLElement>;
icontheme: GoabFilterChipTheme;
Expand All @@ -21,7 +19,7 @@ declare global {

export interface GoAFilterChipProps extends Margins {
onClick?: () => void;
iconTheme?: GoAFilterChipTheme;
iconTheme?: GoabFilterChipTheme;
error?: boolean;
content: string;
testId?: string;
Expand Down

0 comments on commit 1733ede

Please sign in to comment.