From 222c793057a685e6599ee50557f2dac54a269505 Mon Sep 17 00:00:00 2001 From: Google Maps SDK Team Date: Tue, 7 Jul 2026 21:12:31 +0000 Subject: [PATCH] chore: release process fixes --- .github/workflows/release-please.yml | 2 -- .github/workflows/release.yml | 9 +++------ client/web/package.json | 3 ++- client/web/src/lit/a2ui_client.ts | 2 +- client/web/src/lit/custom-components/google_map.ts | 14 +++++++++++--- client/web/src/lit/custom-components/place_card.ts | 14 +++++++++++--- 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index f523920..2e522d5 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -56,8 +56,6 @@ jobs: with: node-version: 22 - cache: npm - cache-dependency-path: client/web/package-lock.json - if: ${{ steps.release.outputs.release_created }} name: Install Dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c682f76..127f11b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,8 +17,7 @@ ## NPM package, and update the CHANGELOG.md. on: - push: - branches: [main] + workflow_dispatch: permissions: contents: write @@ -43,8 +42,6 @@ jobs: with: node-version: 22 - cache: npm - cache-dependency-path: client/web/package-lock.json - name: Install dependencies working-directory: client/web @@ -58,8 +55,8 @@ jobs: registry-url: "https://wombat-dressing-room.appspot.com/" - name: Run Semantic Release + working-directory: client/web env: GITHUB_TOKEN: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }} NPM_TOKEN: ${{ secrets.NPM_WOMBAT_TOKEN }} - NODE_PATH: ${{ github.workspace }}/client/web/node_modules - run: npx semantic-release + run: npm run release diff --git a/client/web/package.json b/client/web/package.json index 08cc89a..83eda75 100644 --- a/client/web/package.json +++ b/client/web/package.json @@ -21,7 +21,8 @@ "build:tsc": "wireit", "dev": "npm run serve --watch", "serve": "wireit", - "build-and-link": "npm install && npm run build && npm link" + "build-and-link": "npm install && npm run build && npm link", + "release": "semantic-release" }, "wireit": { "serve": { diff --git a/client/web/src/lit/a2ui_client.ts b/client/web/src/lit/a2ui_client.ts index 5ab591e..64d4eda 100644 --- a/client/web/src/lit/a2ui_client.ts +++ b/client/web/src/lit/a2ui_client.ts @@ -41,7 +41,7 @@ export class A2UIClient { this.client = await A2AClient.fromCardUrl( `${baseUrl}/.well-known/agent-card.json`, { - fetchImpl: async (url, init) => { + fetchImpl: async (url: RequestInfo | URL, init?: RequestInit) => { const headers = new Headers(init?.headers); headers.set( "X-A2A-Extensions", diff --git a/client/web/src/lit/custom-components/google_map.ts b/client/web/src/lit/custom-components/google_map.ts index e2d452d..cb011c0 100644 --- a/client/web/src/lit/custom-components/google_map.ts +++ b/client/web/src/lit/custom-components/google_map.ts @@ -17,11 +17,14 @@ import {A2uiController, A2uiLitElement} from '@a2ui/lit/v0_9'; import {structuralStyles} from '@a2ui/web_core'; import {ComponentApi, DynamicNumberSchema, DynamicStringSchema} from '@a2ui/web_core/v0_9'; -import {css, html, nothing, PropertyValues, unsafeCSS} from 'lit'; +import {css, html, LitElement, nothing, PropertyValues} from 'lit'; import {customElement} from 'lit/decorators.js'; import {styleMap} from 'lit/directives/style-map.js'; import {z} from 'zod'; +const sheet = new CSSStyleSheet(); +sheet.replaceSync(structuralStyles); + const LatLngSchema = z.object({ lat: DynamicNumberSchema, lng: DynamicNumberSchema, @@ -102,6 +105,11 @@ interface ResolvedMarker { /** A2UI Custom Component for GoogleMap */ @customElement("a2ui-googlemap") export class GoogleMap extends A2uiLitElement { + static override shadowRootOptions: ShadowRootInit = { + ...LitElement.shadowRootOptions, + mode: 'closed', + }; + get map3dElement(): HTMLElement&Map3DElement { return this.renderRoot.querySelector('gmp-map-3d') as HTMLElement & Map3DElement; @@ -116,8 +124,8 @@ export class GoogleMap extends A2uiLitElement { private prevMarkers: unknown = null; private prevRoutes: unknown = null; - static styles = [ - unsafeCSS(structuralStyles), + static override styles = [ + sheet, css` :host { display: block; diff --git a/client/web/src/lit/custom-components/place_card.ts b/client/web/src/lit/custom-components/place_card.ts index 695ea61..55df3df 100644 --- a/client/web/src/lit/custom-components/place_card.ts +++ b/client/web/src/lit/custom-components/place_card.ts @@ -17,11 +17,14 @@ import {A2uiController, A2uiLitElement} from '@a2ui/lit/v0_9'; import {structuralStyles} from '@a2ui/web_core'; import {ComponentApi, DynamicStringSchema} from '@a2ui/web_core/v0_9'; -import {css, html, nothing, unsafeCSS} from 'lit'; +import {css, html, LitElement, nothing} from 'lit'; import {customElement} from 'lit/decorators.js'; import {styleMap} from 'lit/directives/style-map.js'; import {z} from 'zod' +const sheet = new CSSStyleSheet(); +sheet.replaceSync(structuralStyles); + export const PlaceCardApi = { name: 'PlaceCard', @@ -43,12 +46,17 @@ declare global { /** A2UI Custom Component for PlaceCard */ @customElement('a2ui-placecard') export class PlaceCard extends A2uiLitElement { + static override shadowRootOptions: ShadowRootInit = { + ...LitElement.shadowRootOptions, + mode: 'closed', + }; + protected override createController() { return new A2uiController(this, PlaceCardApi); } - static styles = [ - unsafeCSS(structuralStyles), + static override styles = [ + sheet, css` :host { display: block;