Skip to content

Commit e8e8080

Browse files
authored
Merge branch 'analogjs:beta' into beta
2 parents 811e552 + cf0dfc1 commit e8e8080

30 files changed

Lines changed: 5526 additions & 5386 deletions

File tree

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
# [2.4.0](https://github.com/analogjs/analog/compare/v2.3.1...v2.4.0) (2026-03-30)
2+
3+
### Bug Fixes
4+
5+
- **astro-angular:** style tag ordering for multiple islands ([#2210](https://github.com/analogjs/analog/issues/2210)) ([b306097](https://github.com/analogjs/analog/commit/b306097442be5f1f38f7b47762c67c09febec628))
6+
- **astro-angular:** support astro v6 using vite environment api ([#2133](https://github.com/analogjs/analog/issues/2133)) ([e9fd9c6](https://github.com/analogjs/analog/commit/e9fd9c6134fa33aa0283bda7efb3c8f54cef15ab))
7+
- **content:** resolve content files by bare slug lookup ([#2205](https://github.com/analogjs/analog/issues/2205)) ([7e79d24](https://github.com/analogjs/analog/commit/7e79d24a9cd2a8e70dea5b458db59cd4e5ae31ff))
8+
- **create-analog:** bump to Vitest 4.1, update CI workflow versions ([54b5112](https://github.com/analogjs/analog/commit/54b51125130e897faf787db2b918d5ae16e4802f))
9+
- fix build and unit tests ([dc6842c](https://github.com/analogjs/analog/commit/dc6842cd9ef79cc1274d92b908f25ec80bbca9d3))
10+
- fix vitest build and ci workflows ([a4b129a](https://github.com/analogjs/analog/commit/a4b129a589090043d0b06f6e72bbbc259aa23f9e))
11+
- **nx-plugin:** remove full path to main.ts for Nx projects ([#2164](https://github.com/analogjs/analog/issues/2164)) ([39f0d7c](https://github.com/analogjs/analog/commit/39f0d7ce411cf4c59b5b446337affaa818a4e48f))
12+
- **nx-plugin:** restore builders configuration ([1d2e4e8](https://github.com/analogjs/analog/commit/1d2e4e8b115da2fb1b63c67f017f861dac7b2f4c))
13+
- **nx-plugin:** restore schematics configuration ([#2167](https://github.com/analogjs/analog/issues/2167)) ([e74fa68](https://github.com/analogjs/analog/commit/e74fa6829c340976403ba46ca933bd72be2dde2d))
14+
- **platform:** allow using custom vite plugins for Angular compilation ([#2102](https://github.com/analogjs/analog/issues/2102)) ([8bb4fb4](https://github.com/analogjs/analog/commit/8bb4fb44c4ccb1a0d9c51dcd6fe8c9ab840f0e4e))
15+
- **platform:** separate disabling highlighting from content discovery ([#2110](https://github.com/analogjs/analog/issues/2110)) ([618c42c](https://github.com/analogjs/analog/commit/618c42cf7bc859e552cb1a3b02c6092c18e99e21))
16+
- **router:** fix and add unit tests for route module invalidation on file changes ([b9325af](https://github.com/analogjs/analog/commit/b9325af0f0748c7a69610de5782e1fe12461164e))
17+
- **router:** use non-greedy regex for path normalization ([#2093](https://github.com/analogjs/analog/issues/2093)) ([fa5dd9b](https://github.com/analogjs/analog/commit/fa5dd9b7e6f9e245f5c6379f2f35ee35c7be75e3))
18+
- update dependencies and package manager versions across projects ([#2106](https://github.com/analogjs/analog/issues/2106)) ([429536c](https://github.com/analogjs/analog/commit/429536c7e5f479aa06eb61a3df51cf4223e30e14)), closes [#2040](https://github.com/analogjs/analog/issues/2040)
19+
- **vite-plugin-angular:** ensure sequential compilation for client and ssr bundles ([#2109](https://github.com/analogjs/analog/issues/2109)) ([008bd1c](https://github.com/analogjs/analog/commit/008bd1c20daa4c16fe92da036e99219056da4ff3))
20+
- **vite-plugin-angular:** hash styleId to prevent filename exceeding max length ([#2090](https://github.com/analogjs/analog/issues/2090)) ([2aa2114](https://github.com/analogjs/analog/commit/2aa211479e16cc106f957d5e373ea3a1386abfc6))
21+
- **vite-plugin-angular:** normalize paths across plugin & live reload ([#2126](https://github.com/analogjs/analog/issues/2126)) ([cc98bf7](https://github.com/analogjs/analog/commit/cc98bf727b181077c87a536f29d7128414d8904d))
22+
- **vite-plugin-angular:** skip esm transform with Rolldown for Vitest ([#2169](https://github.com/analogjs/analog/issues/2169)) ([20c720b](https://github.com/analogjs/analog/commit/20c720bc8178174041002f400ed4d694dabb30c1))
23+
- **vitest-angular:** fix imports for snapshot serializers ([#2211](https://github.com/analogjs/analog/issues/2211)) ([8e9f73d](https://github.com/analogjs/analog/commit/8e9f73dfde0e03e0943512dd18f432f20307f3f5))
24+
- **vitest-angular:** support environment providers ([#2129](https://github.com/analogjs/analog/issues/2129)) ([a90aa12](https://github.com/analogjs/analog/commit/a90aa1272ed64d626386283ae7b9a09775a07287))
25+
26+
### Features
27+
28+
- **astro-angular:** add option to move component styles to document head ([#2162](https://github.com/analogjs/analog/issues/2162)) ([2361afa](https://github.com/analogjs/analog/commit/2361afaa31247e61483517d321f541c7419bc79b))
29+
- **content:** extract TOC to be property on contentFile ([#2091](https://github.com/analogjs/analog/issues/2091)) ([4e870cc](https://github.com/analogjs/analog/commit/4e870cc99e74c889743503522ae4c6f3be5d9247))
30+
- **create-analog:** add snapshot serializers ([3318263](https://github.com/analogjs/analog/commit/33182636a130e4c7b3f213aece7a020cf0981c3e))
31+
- update vite to stable v8.0.0 ([#2111](https://github.com/analogjs/analog/issues/2111)) ([cf35c65](https://github.com/analogjs/analog/commit/cf35c658a3966a514e95aa2c0e4c9c514999c4bd))
32+
- **vite-plugin-angular:** working fileReplacements and liveReload for Angular Compilation API ([7adf8c1](https://github.com/analogjs/analog/commit/7adf8c18b7786047dc6156eb6c2eaeff0961e5f4))
33+
- **vitest-angular:** add `teardown.destroyAfterEach` option and deprecate `browserMode` option ([#2054](https://github.com/analogjs/analog/issues/2054)) ([2fe2e1c](https://github.com/analogjs/analog/commit/2fe2e1c9304a933b0070fb2e28c8e92def68f077))
34+
- **vitest-angular:** add reusable snapshot serializers ([#2163](https://github.com/analogjs/analog/issues/2163)) ([9089c8d](https://github.com/analogjs/analog/commit/9089c8d8f315aad4792d6b37b18db62d951301b2))
35+
136
# [2.4.0-beta.27](https://github.com/analogjs/analog/compare/v2.4.0-beta.26...v2.4.0-beta.27) (2026-03-30)
237

338
### Bug Fixes

apps/analog-app-e2e/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ export default defineConfig({
2222
url: 'http://localhost:3000',
2323
reuseExistingServer: !process.env['CI'],
2424
cwd: '../..',
25+
timeout: 120000,
2526
},
2627
});

apps/astro-app/.astro/types.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/astro-app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ pnpm-debug.log*
1919

2020
# macOS-specific files
2121
.DS_Store
22+
.astro

apps/astro-app/astro.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ import mdx from '@astrojs/mdx';
66
// https://astro.build/config
77
export default defineConfig({
88
outDir: '../../dist/apps/astro-app',
9+
vite: {
10+
server: {
11+
watch: {
12+
// Polling is more reliable for this mounted workspace than native FS events.
13+
usePolling: true,
14+
interval: 100,
15+
},
16+
},
17+
},
918
integrations: [
1019
angular({ strictStylePlacement: true }),
1120
react(),

apps/blog-app-e2e/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ export default defineConfig({
2222
url: 'http://localhost:3000',
2323
reuseExistingServer: !process.env['CI'],
2424
cwd: '../..',
25+
timeout: 160000,
2526
},
2627
});

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "analogjs-platform",
3-
"version": "2.4.0-beta.27",
3+
"version": "2.4.0",
44
"license": "MIT",
55
"type": "module",
66
"scripts": {
@@ -55,8 +55,8 @@
5555
"@angular/platform-server": "21.1.1",
5656
"@angular/router": "21.1.1",
5757
"@angular/ssr": "21.1.1",
58-
"@astrojs/mdx": "^4.3.13",
59-
"@astrojs/react": "^4.4.2",
58+
"@astrojs/mdx": "^5.0.0",
59+
"@astrojs/react": "^5.0.0",
6060
"@babel/core": "^7.29.0",
6161
"@mdx-js/react": "3.1.1",
6262
"@nx/angular": "22.6.0-beta.11",
@@ -144,7 +144,7 @@
144144
"@vitest/coverage-v8": "4.0.18",
145145
"@vitest/ui": "4.0.18",
146146
"all-contributors-cli": "^6.26.1",
147-
"astro": "4.16.18",
147+
"astro": "6.0.4",
148148
"autoprefixer": "^10.4.27",
149149
"conventional-changelog": "^7.2.0",
150150
"conventional-changelog-cli": "^5.0.0",

packages/astro-angular/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@analogjs/astro-angular",
3-
"version": "2.4.0-beta.27",
3+
"version": "2.4.0",
44
"description": "Use Angular components within Astro",
55
"type": "module",
66
"author": "Brandon Roberts <robertsbt@gmail.com>",
@@ -32,7 +32,7 @@
3232
"url": "https://github.com/sponsors/brandonroberts"
3333
},
3434
"dependencies": {
35-
"@analogjs/vite-plugin-angular": "^2.4.0-beta.27",
35+
"@analogjs/vite-plugin-angular": "^2.4.0",
3636
"rehype": "^13.0.2"
3737
},
3838
"peerDependencies": {

packages/astro-angular/src/index.spec.mts

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import type { Plugin } from 'vite';
2+
import astroPlugin from './index';
3+
4+
function getVitePlugins(): Plugin[] {
5+
const integration = astroPlugin();
6+
let plugins: Plugin[] = [];
7+
8+
const setup = integration.hooks['astro:config:setup'] as (args: {
9+
addRenderer: () => void;
10+
updateConfig: (cfg: { vite: { plugins?: Plugin[] } }) => void;
11+
}) => void;
12+
13+
setup({
14+
addRenderer: () => undefined,
15+
updateConfig: (cfg) => {
16+
plugins = cfg.vite.plugins ?? [];
17+
},
18+
});
19+
20+
return plugins;
21+
}
22+
23+
describe('angularVitePlugin', () => {
24+
it('should return astro configurations', () => {
25+
expect(astroPlugin().name).toEqual('@analogjs/astro-angular');
26+
expect(astroPlugin().hooks).toStrictEqual({
27+
'astro:config:setup': expect.anything(),
28+
'astro:config:done': expect.anything(),
29+
});
30+
});
31+
32+
describe('analogjs-astro-client-ngservermode plugin', () => {
33+
it('should set ngServerMode to false for the client environment', () => {
34+
const plugins = getVitePlugins();
35+
const plugin = plugins.find(
36+
(p) => (p as Plugin).name === 'analogjs-astro-client-ngservermode',
37+
) as Plugin & {
38+
configEnvironment: (
39+
name: string,
40+
) => Record<string, unknown> | undefined;
41+
};
42+
43+
expect(plugin).toBeDefined();
44+
45+
const result = plugin.configEnvironment('client');
46+
47+
expect(result).toEqual({
48+
define: { ngServerMode: 'false' },
49+
});
50+
});
51+
52+
it('should return undefined for non-client environments', () => {
53+
const plugins = getVitePlugins();
54+
const plugin = plugins.find(
55+
(p) => (p as Plugin).name === 'analogjs-astro-client-ngservermode',
56+
) as Plugin & {
57+
configEnvironment: (
58+
name: string,
59+
) => Record<string, unknown> | undefined;
60+
};
61+
62+
expect(plugin.configEnvironment('server')).toBeUndefined();
63+
expect(plugin.configEnvironment('ssr')).toBeUndefined();
64+
});
65+
});
66+
});

0 commit comments

Comments
 (0)