Skip to content

Commit aa719fc

Browse files
Merge branch 'beta'
2 parents 807a5d7 + 112ea4a commit aa719fc

File tree

53 files changed

+2824
-2824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2824
-2824
lines changed

.all-contributorsrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,23 @@
13141314
"contributions": [
13151315
"infra"
13161316
]
1317+
},
1318+
{
1319+
"login": "pmpak",
1320+
"name": "Panagiotis Bakatselos",
1321+
"avatar_url": "https://avatars.githubusercontent.com/u/21110003?v=4",
1322+
"profile": "https://github.com/pmpak",
1323+
"contributions": [
1324+
"doc"
1325+
],
1326+
{
1327+
"login": "xygon",
1328+
"name": "Will Stewart",
1329+
"avatar_url": "https://avatars.githubusercontent.com/u/3472030?v=4",
1330+
"profile": "https://github.com/xygon",
1331+
"contributions": [
1332+
"code"
1333+
]
13171334
}
13181335
],
13191336
"contributorsPerLine": 7,

CHANGELOG.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,39 @@
1-
## [1.17.1](https://github.com/analogjs/analog/compare/v1.17.0...v1.17.1) (2025-05-29)
1+
# [1.18.0-beta.4](https://github.com/analogjs/analog/compare/v1.18.0-beta.3...v1.18.0-beta.4) (2025-06-20)
22

33
### Bug Fixes
44

5-
- **create-analog:** add angular-v19 template to output files ([#1756](https://github.com/analogjs/analog/issues/1756)) ([6b7380d](https://github.com/analogjs/analog/commit/6b7380dd2e2a955fa45b57fa565081a0a6c08291))
6-
- **vitest-angular:** update `@angular-devkit/architect` dep range to include v20 ([#1754](https://github.com/analogjs/analog/issues/1754)) ([1d0f038](https://github.com/analogjs/analog/commit/1d0f038bea33ebb15881251c1a57bf36b407f4db))
5+
- **nx-plugin:** add fallback for json.files property in preset ([6e2241a](https://github.com/analogjs/analog/commit/6e2241a63ca5e921570341e38c46abb6441467f1))
6+
7+
# [1.18.0-beta.3](https://github.com/analogjs/analog/compare/v1.18.0-beta.2...v1.18.0-beta.3) (2025-06-19)
8+
9+
### Bug Fixes
10+
11+
- **vite-plugin-angular:** trigger compilation from external templates/styles ([#1779](https://github.com/analogjs/analog/issues/1779)) ([e3a1f27](https://github.com/analogjs/analog/commit/e3a1f278b6e39bca4e1b14a4555e977b32ba341c))
12+
13+
# [1.18.0-beta.2](https://github.com/analogjs/analog/compare/v1.18.0-beta.1...v1.18.0-beta.2) (2025-06-17)
14+
15+
### Bug Fixes
16+
17+
- **create-analog:** fix template and styles for SFCs ([#1778](https://github.com/analogjs/analog/issues/1778)) ([902fe23](https://github.com/analogjs/analog/commit/902fe23e56b4ba542bc0da0583921aad5054d0f5))
18+
19+
# [1.18.0-beta.1](https://github.com/analogjs/analog/compare/v1.17.2-beta.1...v1.18.0-beta.1) (2025-06-13)
20+
21+
### Features
22+
23+
- **vite-plugin-nitro:** support static server side data fetching during prerendering ([#1771](https://github.com/analogjs/analog/issues/1771)) ([377cdd2](https://github.com/analogjs/analog/commit/377cdd227e005a0f73c01ad026a584834a49c044))
24+
25+
## [1.17.2-beta.1](https://github.com/analogjs/analog/compare/v1.17.1...v1.17.2-beta.1) (2025-06-09)
26+
27+
### Bug Fixes
28+
29+
- **create-analog:** update template dependencies to Angular v20 ([#1768](https://github.com/analogjs/analog/issues/1768)) ([8e1fae5](https://github.com/analogjs/analog/commit/8e1fae5ed9565286dcc4bb5eff8908e8600e1bea))
30+
- **nx-plugin:** ensure that tags option is used on app generation ([#1764](https://github.com/analogjs/analog/issues/1764)) ([df001b0](https://github.com/analogjs/analog/commit/df001b0bed89fb44baa6dc932b9c7e43c2e83eb8))
31+
32+
## [1.17.1-beta.3](https://github.com/analogjs/analog/compare/v1.17.1-beta.2...v1.17.1-beta.3) (2025-06-03)
33+
34+
### Bug Fixes
35+
36+
- **nx-plugin:** ensure that tags option is used on app generation ([#1764](https://github.com/analogjs/analog/issues/1764)) ([df001b0](https://github.com/analogjs/analog/commit/df001b0bed89fb44baa6dc932b9c7e43c2e83eb8))
737

838
## [1.17.1-beta.2](https://github.com/analogjs/analog/compare/v1.17.1-beta.1...v1.17.1-beta.2) (2025-05-29)
939

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- prettier-ignore-start -->
44
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
5-
[![All Contributors](https://img.shields.io/badge/all_contributors-139-orange.svg?style=flat-square)](#contributors-)
5+
[![All Contributors](https://img.shields.io/badge/all_contributors-140-orange.svg?style=flat-square)](#contributors-)
66
<!-- ALL-CONTRIBUTORS-BADGE:END -->
77
<!-- prettier-ignore-end -->
88

@@ -290,6 +290,8 @@ Thanks goes to these wonderful people for contributing to Analog ([emoji key](ht
290290
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vsternbach"><img src="https://avatars.githubusercontent.com/u/3830668?v=4?s=100" width="100px;" alt="Vlad Sternbach"/><br /><sub><b>Vlad Sternbach</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=vsternbach" title="Code">💻</a></td>
291291
<td align="center" valign="top" width="14.28%"><a href="https://github.com/meeroslav"><img src="https://avatars.githubusercontent.com/u/881612?v=4?s=100" width="100px;" alt="Miroslav Jonaš"/><br /><sub><b>Miroslav Jonaš</b></sub></a><br /><a href="#infra-meeroslav" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
292292
<td align="center" valign="top" width="14.28%"><a href="https://leosvel.dev"><img src="https://avatars.githubusercontent.com/u/12051310?v=4?s=100" width="100px;" alt="Leosvel Pérez Espinosa"/><br /><sub><b>Leosvel Pérez Espinosa</b></sub></a><br /><a href="#infra-leosvelperez" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
293+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pmpak"><img src="https://avatars.githubusercontent.com/u/21110003?v=4?s=100" width="100px;" alt="Panagiotis Bakatselos"/><br /><sub><b>Panagiotis Bakatselos</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=pmpak" title="Documentation">📖</a></td>
294+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xygon"><img src="https://avatars.githubusercontent.com/u/3472030?v=4?s=100" width="100px;" alt="Will Stewart"/><br /><sub><b>Will Stewart</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=xygon" title="Code">💻</a></td>
293295
</tr>
294296
</tbody>
295297
</table>

apps/analog-app/project.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
},
6767
"test": {
6868
"executor": "@nx/vite:test",
69-
"outputs": ["{projectRoot}/coverage"]
69+
"outputs": ["{projectRoot}/coverage"],
70+
"dependsOn": ["^build"]
7071
}
7172
}
7273
}

apps/analog-app/vite.config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@ export default defineConfig(({ mode, isSsrBuild }) => {
3333
additionalPagesDirs: ['/libs/shared/feature'],
3434
additionalAPIDirs: ['/libs/shared/feature/src/api'],
3535
prerender: {
36-
routes: ['/', '/cart', '/shipping', '/client', '/404.html'],
36+
routes: [
37+
'/',
38+
'/cart',
39+
'/shipping',
40+
'/client',
41+
'/404.html',
42+
{
43+
route: '/newsletter',
44+
staticData: true,
45+
},
46+
],
3747
sitemap: {
3848
host: base,
3949
},

apps/docs-app/docs/contributors.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ Andres is a software engineer for HeroDevs, Angular and Firebase GDE.
239239
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vsternbach"><img src="https://avatars.githubusercontent.com/u/3830668?v=4?s=100" width="100px;" alt="Vlad Sternbach"/><br /><sub><b>Vlad Sternbach</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=vsternbach" title="Code">💻</a></td>
240240
<td align="center" valign="top" width="14.28%"><a href="https://github.com/meeroslav"><img src="https://avatars.githubusercontent.com/u/881612?v=4?s=100" width="100px;" alt="Miroslav Jonaš"/><br /><sub><b>Miroslav Jonaš</b></sub></a><br /><a href="#infra-meeroslav" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
241241
<td align="center" valign="top" width="14.28%"><a href="https://leosvel.dev"><img src="https://avatars.githubusercontent.com/u/12051310?v=4?s=100" width="100px;" alt="Leosvel Pérez Espinosa"/><br /><sub><b>Leosvel Pérez Espinosa</b></sub></a><br /><a href="#infra-leosvelperez" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
242+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pmpak"><img src="https://avatars.githubusercontent.com/u/21110003?v=4?s=100" width="100px;" alt="Panagiotis Bakatselos"/><br /><sub><b>Panagiotis Bakatselos</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=pmpak" title="Documentation">📖</a></td>
243+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xygon"><img src="https://avatars.githubusercontent.com/u/3472030?v=4?s=100" width="100px;" alt="Will Stewart"/><br /><sub><b>Will Stewart</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=xygon" title="Code">💻</a></td>
242244
</tr>
243245
</tbody>
244246
</table>

apps/docs-app/docs/features/server/static-site-generation.md

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ export default defineConfig(({ mode }) => ({
3131

3232
### From Content Directory
3333

34-
You might want to prerender all routes that are the result of a rendered content directory.
35-
For example if you have a blog and all your articles are places as Markdown files in the `contents` directory.
34+
You might want to prerender all routes that are the result of a rendered content directory. For example if you have a blog and all your articles are places as Markdown files in the `contents` directory.
35+
3636
For such scenarios, you can add an object to the `routes` config to render everything within a directory.
37-
Keep in mind, that your directory structure may not be reflected 1:1 in your apps path.
38-
Therefore, you have to pass a `transform` function which maps the file paths to the URLs.
39-
The returning string should be the URL path in your app.
40-
Using `transform` allows you also filter out some routes by returning `false`.
41-
This does not include them in the prerender process, such as files marked as `draft` in the frontmatter.
37+
38+
The directory structure may not be reflected 1:1 in your apps path. Therefore, you have to pass a `transform` function which maps the file paths to the URLs. The returning string should be the URL path in your app.
39+
40+
Using `transform` allows you also filter out some routes by returning `false`. This does not include them in the prerender process, such as files marked as `draft` in the frontmatter.
41+
4242
The `contentDir` value of that object can be a glob pattern or just a specific path.
4343

4444
```ts
@@ -72,9 +72,9 @@ export default defineConfig(({ mode }) => ({
7272
}));
7373
```
7474

75-
### Only static pages
75+
## Only Prerendering Static Pages
7676

77-
To only prerender the static pages, use the `static: true` flag.
77+
To only prerender the static pages without building the server, use the `static: true` flag.
7878

7979
> The `ssr` flag must still be set to `true` for prerendering static pages.
8080
@@ -109,7 +109,36 @@ export default defineConfig(({ mode }) => ({
109109

110110
The static pages can be deployed from the `dist/analog/public` directory.
111111

112-
### Sitemap Generation
112+
## Prerendering Server-Side Data
113+
114+
When using [Server-Side Data Fetching](/docs/features/data-fetching/server-side-data-fetching), the data is cached and reused using transfer state _only_ on the first request. To prerender the server-side data fetched along with the route, set the `staticData` flag to `true` in the config object for the prerendered route.
115+
116+
For example, a route defined as `src/app/pages/shipping.page.ts` with an associated `src/app/pages/shipping.server.ts` has the route and server data prerendered to be completely static.
117+
118+
```ts
119+
import { defineConfig } from 'vite';
120+
import analog from '@analogjs/platform';
121+
122+
// https://vitejs.dev/config/
123+
export default defineConfig(({ mode }) => ({
124+
plugins: [
125+
analog({
126+
static: true,
127+
prerender: {
128+
routes: async () => [
129+
'/',
130+
{
131+
route: '/shipping',
132+
staticData: true,
133+
},
134+
],
135+
},
136+
}),
137+
],
138+
}));
139+
```
140+
141+
## Sitemap Generation
113142

114143
Analog also supports automatic sitemap generation. Analog generates a sitemap in the `dist/analog/public` directory when running a build if a sitemap configuration is provided.
115144

@@ -124,7 +153,7 @@ export default defineConfig(({ mode }) => ({
124153
prerender: {
125154
routes: async () => ['/', '/blog'],
126155
sitemap: {
127-
host: 'https://analogjs.org/',
156+
host: 'https://analogjs.org',
128157
},
129158
},
130159
}),
@@ -145,7 +174,7 @@ export default defineConfig(({ mode }) => ({
145174
analog({
146175
prerender: {
147176
sitemap: {
148-
host: 'https://analogjs.org/',
177+
host: 'https://analogjs.org',
149178
},
150179
routes: async () => [
151180
'/',
@@ -198,7 +227,7 @@ mapping of the pages' `<loc>`, `<lastmod>`, `<changefreq>`, and `<priority>` pro
198227
</urlset...>
199228
```
200229

201-
### Post-rendering Hooks
230+
## Post-rendering Hooks
202231

203232
Analog supports the post-rendering hooks during the prerendering process. The use case for post-rendering hooks can be inlining critical CSS, adding/removing scripts in HTML files, etc.
204233

apps/docs-app/docs/features/testing/vitest.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ If you are using `Zone.js` for change detection, import the `setup-zone` script.
110110
import '@analogjs/vitest-angular/setup-zone';
111111

112112
import {
113-
BrowserDynamicTestingModule,
114-
platformBrowserDynamicTesting,
115-
} from '@angular/platform-browser-dynamic/testing';
113+
BrowserTestingModule,
114+
platformBrowserTesting,
115+
} from '@angular/platform-browser/testing';
116116
import { getTestBed } from '@angular/core/testing';
117117

118118
getTestBed().initTestEnvironment(
119-
BrowserDynamicTestingModule,
120-
platformBrowserDynamicTesting(),
119+
BrowserTestingModule,
120+
platformBrowserTesting(),
121121
);
122122
```
123123

@@ -128,24 +128,21 @@ If you are using `Zoneless` change detection, use the following setup:
128128
```ts
129129
import '@analogjs/vitest-angular/setup-snapshots';
130130

131+
import { provideZonelessChangeDetection, NgModule } from '@angular/core';
131132
import {
132-
provideExperimentalZonelessChangeDetection,
133-
NgModule,
134-
} from '@angular/core';
135-
import {
136-
BrowserDynamicTestingModule,
137-
platformBrowserDynamicTesting,
138-
} from '@angular/platform-browser-dynamic/testing';
133+
BrowserTestingModule,
134+
platformBrowserTesting,
135+
} from '@angular/platform-browser/testing';
139136
import { getTestBed } from '@angular/core/testing';
140137

141138
@NgModule({
142-
providers: [provideExperimentalZonelessChangeDetection()],
139+
providers: [provideZonelessChangeDetection()],
143140
})
144141
export class ZonelessTestModule {}
145142

146143
getTestBed().initTestEnvironment(
147-
[BrowserDynamicTestingModule, ZonelessTestModule],
148-
platformBrowserDynamicTesting(),
144+
[BrowserTestingModule, ZonelessTestModule],
145+
platformBrowserTesting(),
149146
);
150147
```
151148

@@ -265,14 +262,14 @@ import '@angular/compiler';
265262
import '@analogjs/vitest-angular/setup-zone';
266263

267264
import {
268-
BrowserDynamicTestingModule,
269-
platformBrowserDynamicTesting,
270-
} from '@angular/platform-browser-dynamic/testing';
265+
BrowserTestingModule,
266+
platformBrowserTesting,
267+
} from '@angular/platform-browser/testing';
271268
import { getTestBed } from '@angular/core/testing';
272269

273270
getTestBed().initTestEnvironment(
274-
BrowserDynamicTestingModule,
275-
platformBrowserDynamicTesting(),
271+
BrowserTestingModule,
272+
platformBrowserTesting(),
276273
);
277274
```
278275

apps/docs-app/i18n/de/docusaurus-plugin-content-docs/current/contributors.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ Andres ist Softwareentwickler für HeroDevs, Angular und Firebase GDE.
237237
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vsternbach"><img src="https://avatars.githubusercontent.com/u/3830668?v=4?s=100" width="100px;" alt="Vlad Sternbach"/><br /><sub><b>Vlad Sternbach</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=vsternbach" title="Code">💻</a></td>
238238
<td align="center" valign="top" width="14.28%"><a href="https://github.com/meeroslav"><img src="https://avatars.githubusercontent.com/u/881612?v=4?s=100" width="100px;" alt="Miroslav Jonaš"/><br /><sub><b>Miroslav Jonaš</b></sub></a><br /><a href="#infra-meeroslav" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
239239
<td align="center" valign="top" width="14.28%"><a href="https://leosvel.dev"><img src="https://avatars.githubusercontent.com/u/12051310?v=4?s=100" width="100px;" alt="Leosvel Pérez Espinosa"/><br /><sub><b>Leosvel Pérez Espinosa</b></sub></a><br /><a href="#infra-leosvelperez" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
240+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pmpak"><img src="https://avatars.githubusercontent.com/u/21110003?v=4?s=100" width="100px;" alt="Panagiotis Bakatselos"/><br /><sub><b>Panagiotis Bakatselos</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=pmpak" title="Documentation">📖</a></td>
241+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xygon"><img src="https://avatars.githubusercontent.com/u/3472030?v=4?s=100" width="100px;" alt="Will Stewart"/><br /><sub><b>Will Stewart</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=xygon" title="Code">💻</a></td>
240242
</tr>
241243
</tbody>
242244
</table>

apps/docs-app/i18n/es/docusaurus-plugin-content-docs/current/contributors.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ Andres es un ingeniero en software para HeroDevs, GDE en Angular y Firebase.
237237
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vsternbach"><img src="https://avatars.githubusercontent.com/u/3830668?v=4?s=100" width="100px;" alt="Vlad Sternbach"/><br /><sub><b>Vlad Sternbach</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=vsternbach" title="Code">💻</a></td>
238238
<td align="center" valign="top" width="14.28%"><a href="https://github.com/meeroslav"><img src="https://avatars.githubusercontent.com/u/881612?v=4?s=100" width="100px;" alt="Miroslav Jonaš"/><br /><sub><b>Miroslav Jonaš</b></sub></a><br /><a href="#infra-meeroslav" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
239239
<td align="center" valign="top" width="14.28%"><a href="https://leosvel.dev"><img src="https://avatars.githubusercontent.com/u/12051310?v=4?s=100" width="100px;" alt="Leosvel Pérez Espinosa"/><br /><sub><b>Leosvel Pérez Espinosa</b></sub></a><br /><a href="#infra-leosvelperez" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
240+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pmpak"><img src="https://avatars.githubusercontent.com/u/21110003?v=4?s=100" width="100px;" alt="Panagiotis Bakatselos"/><br /><sub><b>Panagiotis Bakatselos</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=pmpak" title="Documentation">📖</a></td>
241+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xygon"><img src="https://avatars.githubusercontent.com/u/3472030?v=4?s=100" width="100px;" alt="Will Stewart"/><br /><sub><b>Will Stewart</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=xygon" title="Code">💻</a></td>
240242
</tr>
241243
</tbody>
242244
</table>

0 commit comments

Comments
 (0)