Skip to content

chore: update v3 release with main#7507

Merged
janechu merged 14 commits intoreleases/fast-element-v3from
users/janechu/cherry-pick-main-into-v3
May 1, 2026
Merged

chore: update v3 release with main#7507
janechu merged 14 commits intoreleases/fast-element-v3from
users/janechu/cherry-pick-main-into-v3

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented May 1, 2026

Pull Request

📖 Description

Brings releases/fast-element-v3 up to date with main. Cherry-picks every commit landed on main after PR #7477 was merged (the last v3↔main sync) and adds an adaptation commit so the changes work with the v3 architecture (where @microsoft/fast-html was merged into @microsoft/fast-element under src/declarative/).

Cherry-picked (in chronological order):

The "applying package updates" beachball commit (aad6f5481) was intentionally skipped — v3 maintains its own versioning track (fast-element@3.0.0-rc.1, fast-test-harness@0.0.1) and runs its own publish.

Adaptation commit highlights:

  • Adds a new ./declarative-syntax.js subpath export to @microsoft/fast-element so tooling consumers (e.g. fast-test-harness build utilities) can access declarative HTML syntax constants from fast-element directly. Mirrors the existing ./declarative-utilities.js subpath.
  • Re-points fast-test-harness/src/build/generate-templates.ts and generate-webui-templates.ts from @microsoft/fast-html/syntax.js to the new subpath.
  • Replaces the removed RenderableFASTElement(...).defineAsync({ templateOptions }) pattern with v3's Element.define() in test fixtures and the README example.
  • Drops @microsoft/fast-html from the harness Vite optimizer exclude list.
  • Excludes *.spec.ts from the fast-element TS build (the declarative .spec.ts files import @playwright/test, whose .d.ts files are incompatible with tsgo's stricter parser; these specs are still type-checked when run via the declarative Playwright config).
  • Adapted hydration marker handling in crates/microsoft-fast-build/src/node.rs for feat: allow fast-build rendering without state #7502 (kept v3's inject_count_marker / data-fe="N" style while merging in main's Option<&mut HydrationScope> flow).
  • All packages/fast-html/* paths from cherry-picks were dropped (the package no longer exists on v3); related change/@microsoft-fast-html-*.json files were either converted to @microsoft-fast-element-*.json or dropped where they no longer apply.

📑 Test Plan

Run from the monorepo root on this branch:

  • npm run build — all 6 packages build successfully (fast-build, fast-element, fast-router, fast-test-harness, fast-site, fast-todo-app-example).
  • @microsoft/fast-element — 1410 chromium playwright tests + 176 declarative chromium tests pass.
  • @microsoft/fast-test-harness — 96 node unit tests + 43 chromium playwright tests pass.
  • npm run biome:check — clean.
  • npm run checkchange — passes.

✅ Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

⏭ Next Steps

  • Trigger the v3 publish flow (beachball publish) once this lands so the v3 prerelease versions pick up the cherry-picked features.
  • Backport future main commits the same way; the adaptation patterns (fast-html → declarative subpaths, marker style) are documented in the adaptation commit message.

janechu and others added 12 commits April 30, 2026 14:30
…7479)

Changes the default `attribute-name-strategy` from `"none"` to `"camelCase"` across the FAST monorepo. This applies to:

- **`microsoft-fast-build` Rust crate**: The `AttributeNameStrategy` enum's `#[default]` is moved from `None` to `CamelCase`
- **`@microsoft/fast-build` CLI**: Default strategy passed to the WASM renderer and CLI help text updated
- **`@microsoft/fast-html` AttributeMap**: Default fallback changed from `"none"` to `"camelCase"`

With this change, dashed HTML attribute names on custom elements (e.g. `foo-bar`) are now converted to camelCase state keys (e.g. `fooBar`) by default. The `"none"` strategy remains available as an explicit opt-in.

- All existing Rust tests pass (`cargo test`)
- All Playwright tests pass (`npm run test`)
- All fixtures rebuilt successfully (`npm run build:fixtures`)
- Biome check passes (`npm run biome:check`)
- Change files validated (`npm run checkchange`)

- [x] I have included a change request file using `$ npm run change`
- [ ] I have added tests for my changes.
- [x] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.

(cherry picked from commit 77cd24b)
Bumps [liquidjs](https://github.com/harttle/liquidjs) from 10.25.6 to 10.25.7.
- [Release notes](https://github.com/harttle/liquidjs/releases)
- [Changelog](https://github.com/harttle/liquidjs/blob/master/CHANGELOG.md)
- [Commits](harttle/liquidjs@v10.25.6...v10.25.7)

---
updated-dependencies:
- dependency-name: liquidjs
  dependency-version: 10.25.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 46a7dda)
…7501)

This PR migrates typescript compilation to the latest go-driven typescript implementation.

(cherry picked from commit 7dc34b1)
Adds optional-state rendering for `microsoft-fast-build` and `@microsoft/fast-build`:

- Omitted state is treated as an empty object.
- Missing content bindings render empty output.
- Missing bound attributes are omitted.
- Documentation, tests, and a Beachball change file are included.

- `npm run build -w @microsoft/fast-build`
- `cargo test --manifest-path crates/microsoft-fast-build/Cargo.toml`
- `npm run test:node -w @microsoft/fast-build`
- `npm run biome:check`
- `npm run format:check`
- `npm run checkchange`
- `git diff --check`

- [x] I have included a change request file using `$ npm run change`
- [x] I have added tests for my changes.
- [x] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.

(cherry picked from commit d40f0a7)
… into a per-package docs folder (#7503)

This change updates agent skills for Rust and Documentation and moves the architectural docs for `@microsoft/fast-element` into a `docs/` folder.

- [ ] I have included a change request file using `$ npm run change`
- [ ] I have added tests for my changes.
- [ ] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.

(cherry picked from commit aa76170)
- Propagates `shadowroot*` attributes from `f-template` onto rendered declarative shadow DOM `<template>` elements.
- Preserves the existing default `shadowrootmode="open"` and `shadowroot="open"` behavior when no mode is provided.
- Updates FAST build configuration/docs and adds Rust/Node coverage for explicit, boolean, escaped, and extra shadowroot attributes.

Please focus review on the shadowroot attribute normalization/escaping path shared between the Rust renderer and the JS CLI configuration bridge.

Passed:

- `git diff --check`
- `cargo test --manifest-path crates/microsoft-fast-build/Cargo.toml`
- `npm run build -w @microsoft/fast-build`
- `npm run test:node -w @microsoft/fast-build`
- `npm run build`
- `npm run biome:check`
- `npm run checkchange`

- [ ] I have included a change request file using `$ npm run change`
- [x] I have added tests for my changes.
- [x] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.

(cherry picked from commit 4eabc23)
The CD pipeline failing, this resets it back to the original good state.

To correct this `npm run bump` was run after resetting to the commit where publish last failed.

- [ ] I have included a change request file using `$ npm run change`
- [ ] I have added tests for my changes.
- [ ] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.

(cherry picked from commit 7d933fb)
Prepares `@microsoft/fast-test-harness` for publishing by adding comprehensive test coverage, build utilities, and accurate documentation.

- **Build utilities**: Added `dom-shim`, `generate-stylesheets`, `generate-templates`, and `generate-webui-templates` modules for extracting CSS and converting FAST Element `ViewTemplate` modules into `<f-template>` and WebUI-compatible `<template shadowrootmode="open">` HTML files.
- **SSR renderer**: Rewrote `createSSRRenderer` to use the `@microsoft/fast-build` WASM module for full expression evaluation and nested component support. Supports both monolithic (`packageName`) and per-component (`components`) package layouts.
- **CLI subcommands**: `fast-test-harness` now supports `serve` (default), `generate-templates`, `generate-stylesheets`, and `generate-webui-templates` subcommands.
- **Server rewrite**: Replaced Express with a plain `node:http` server, added in-memory fixture caching, concurrent request deduplication, and a Vite plugin for resolving bare CSS specifiers in SSR fixtures.
- **Test coverage**: Added 96 Node.js unit tests and 129 Playwright E2E tests covering all modules — `convertTemplate` tests use real FAST Element `html`/`ref`/`slotted`/`children` directives.
- **Documentation**: Updated README and DESIGN.md to reflect actual config values, CLI subcommands, exports, and added Mermaid diagrams for the CSR/SSR routing flow and SSR fixture generation sequence.

All 96 Node.js unit tests and 129 Playwright tests (across Chromium, Firefox, and WebKit) pass:

```
npm run test         # runs test:node && test:playwright
```

Key test areas:
- `convertTemplate` — exercises real FAST Element `html`, `ref`, `slotted`, `children`, event/property/boolean bindings
- `generateWebuiTemplates` — temp directory file I/O, format functions, `shadowrootdelegatesfocus` propagation
- `createSSRRenderer` — WASM rendering, monolithic vs per-component modes, theme stylesheet injection
- CSR/SSR fixtures — `setTemplate`, `updateTemplate`, `applyTokens`, `addStyleTag` buffering, custom state assertions

- [x] I have included a change request file using `$ npm run change`
- [x] I have added tests for my changes.
- [x] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.

- Beachball configuration
- Package publish

(cherry picked from commit f076f36)
This commit follows the cherry-picks of #7479, #7494, #7501, #7502, #7503,
#7504, #7505, and #7469 from main into the v3 release branch, applying
adaptations needed to integrate them with the fast-element v3 architecture
where `@microsoft/fast-html` was merged into `@microsoft/fast-element`.

Changes:

- packages/fast-element/package.json: Add `./declarative-syntax.js` subpath
  export so tooling consumers can access declarative HTML syntax constants
  (openExpression, closeExpression, attributeDirectivePrefix, etc.) from
  fast-element directly. Mirrors the existing `./declarative-utilities.js`
  subpath naming.

- packages/fast-element/test/tsconfig.json: Add path mapping for the new
  subpath export so tests resolve sources during type-check.

- packages/fast-element/tsconfig.json: Exclude `*.spec.ts` from build (in
  addition to the existing `*.pw.spec.ts` exclusion). The declarative spec
  files import `@playwright/test` which pulls in playwright type
  definitions that are incompatible with `tsgo`'s stricter parser. These
  spec files are still type-checked when run via the declarative
  Playwright config.

- packages/fast-test-harness/src/build/generate-templates.ts,
  generate-webui-templates.ts: Re-point imports from
  `@microsoft/fast-html/syntax.js` to the new
  `@microsoft/fast-element/declarative-syntax.js` subpath.

- packages/fast-test-harness/test/src/entry-client.ts: Replace the removed
  `RenderableFASTElement(...).defineAsync({ templateOptions: ... })`
  pattern with the v3 `define()` API. Hydration is enabled by the imported
  harness `ssr/entry-client.js` side effect.

- packages/fast-test-harness/vite.config.mjs: Drop `@microsoft/fast-html`
  from the optimizer exclude list — the package no longer exists on v3.

- packages/fast-test-harness/README.md: Replace remaining
  `RenderableFASTElement` example with the `.define()` form.

- Regenerated build artifacts: SIZES.md, hydration/styles api-report.api.md,
  and 3.x docs that are produced by the now-passing `npm run build`.

- change/: Add prerelease change file for fast-element (new subpath
  export) and a minor change file for fast-test-harness (build utilities
  migrated to fast-element).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prepares `@microsoft/fast-test-harness` for npm publishing by cleaning
up the package layout and exports.

- Excluded test files (`.test.ts`, `.spec.ts`) from the build output via
  `tsconfig.build.json`
- Simplified the `files` array to use wildcards (`*.mjs`, `*.d.ts`)
  instead of enumerating each root-level file
- Added `./fixtures/*.js` to the package exports map so fixture classes
  can be imported directly
- Exported `setTemplate` and `updateTemplate` option types from
  `CSRFixture` and `SSRFixture`
- Updated `README` exports table to match the current public API surface
- Updated package scripts (`test:node`, `test:playwright`)

(cherry picked from commit 7383168)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@janechu janechu marked this pull request as ready for review May 1, 2026 20:34
@janechu janechu merged commit 555f289 into releases/fast-element-v3 May 1, 2026
11 checks passed
@janechu janechu deleted the users/janechu/cherry-pick-main-into-v3 branch May 1, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants