Skip to content

Commit 3994d99

Browse files
Merge pull request #1713 from analogjs/beta
chore: release 1.16.0
2 parents daa551d + c0e8189 commit 3994d99

File tree

83 files changed

+2057
-399
lines changed

Some content is hidden

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

83 files changed

+2057
-399
lines changed

.all-contributorsrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,24 @@
12871287
"contributions": [
12881288
"code"
12891289
]
1290+
},
1291+
{
1292+
"login": "vsternbach",
1293+
"name": "Vlad Sternbach",
1294+
"avatar_url": "https://avatars.githubusercontent.com/u/3830668?v=4",
1295+
"profile": "https://github.com/vsternbach",
1296+
"contributions": [
1297+
"code"
1298+
]
1299+
},
1300+
{
1301+
"login": "meeroslav",
1302+
"name": "Miroslav Jonaš",
1303+
"avatar_url": "https://avatars.githubusercontent.com/u/881612?v=4",
1304+
"profile": "https://github.com/meeroslav",
1305+
"contributions": [
1306+
"infra"
1307+
]
12901308
}
12911309
],
12921310
"contributorsPerLine": 7,

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ tmpanalogapp*
6868
.nx/workspace-data
6969
vite.config.*.timestamp*
7070
.vite-inspect
71-
vitest.config.*.timestamp*
71+
vitest.config.*.timestamp*

CHANGELOG.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,93 @@
1+
# [1.16.0-beta.15](https://github.com/analogjs/analog/compare/v1.16.0-beta.14...v1.16.0-beta.15) (2025-04-28)
2+
3+
### Bug Fixes
4+
5+
- **vite-plugin-angular:** allow the plugin to be imported with commonjs/require ([#1710](https://github.com/analogjs/analog/issues/1710)) ([84cb758](https://github.com/analogjs/analog/commit/84cb758f6bb256fa5c9875a6bdf5564bcbc80ca5))
6+
7+
# [1.16.0-beta.14](https://github.com/analogjs/analog/compare/v1.16.0-beta.13...v1.16.0-beta.14) (2025-04-24)
8+
9+
### Bug Fixes
10+
11+
- **platform:** allow marked extensions to add new renderers ([#1708](https://github.com/analogjs/analog/issues/1708)) ([a0bfb70](https://github.com/analogjs/analog/commit/a0bfb705c097f12bfd13f46f8da516c1eff0033c))
12+
13+
# [1.16.0-beta.13](https://github.com/analogjs/analog/compare/v1.16.0-beta.12...v1.16.0-beta.13) (2025-04-24)
14+
15+
### Features
16+
17+
- **content:** add ability to pass extensions to marked instance ([#1707](https://github.com/analogjs/analog/issues/1707)) ([47d1598](https://github.com/analogjs/analog/commit/47d15989fdcfa3a9dfa072ebe5925381b6812cbb))
18+
19+
# [1.16.0-beta.12](https://github.com/analogjs/analog/compare/v1.16.0-beta.11...v1.16.0-beta.12) (2025-04-24)
20+
21+
### Bug Fixes
22+
23+
- **storybook-angular:** adjust vite peer dep ([17e23d5](https://github.com/analogjs/analog/commit/17e23d5bd75d56e6f5957ff7509c649ad807a226))
24+
25+
# [1.16.0-beta.11](https://github.com/analogjs/analog/compare/v1.16.0-beta.10...v1.16.0-beta.11) (2025-04-24)
26+
27+
### Bug Fixes
28+
29+
- **storybook-angular:** adjust peer deps versions ([0042da6](https://github.com/analogjs/analog/commit/0042da6955e170f6f9e2ee6865e0b72525318366))
30+
31+
# [1.16.0-beta.10](https://github.com/analogjs/analog/compare/v1.16.0-beta.9...v1.16.0-beta.10) (2025-04-24)
32+
33+
### Bug Fixes
34+
35+
- **storybook-angular:** move storybook to peer deps ([dc91f4b](https://github.com/analogjs/analog/commit/dc91f4be0af0dcccef4b0380b0861399e3cf185d))
36+
37+
# [1.16.0-beta.9](https://github.com/analogjs/analog/compare/v1.16.0-beta.8...v1.16.0-beta.9) (2025-04-24)
38+
39+
### Bug Fixes
40+
41+
- **storybook-angular:** only include explicit deps in package.json ([#1703](https://github.com/analogjs/analog/issues/1703)) ([63ef9fe](https://github.com/analogjs/analog/commit/63ef9fec6a9b66637192ec0cf4e30820e0258e43))
42+
43+
# [1.16.0-beta.8](https://github.com/analogjs/analog/compare/v1.16.0-beta.7...v1.16.0-beta.8) (2025-04-23)
44+
45+
### Bug Fixes
46+
47+
- **nx-plugin:** add middleware include to app templates, update docs ([#1701](https://github.com/analogjs/analog/issues/1701)) ([1ff4ebb](https://github.com/analogjs/analog/commit/1ff4ebb1f0dee0857ee5f4f86a0c18962f731b57))
48+
49+
# [1.16.0-beta.7](https://github.com/analogjs/analog/compare/v1.16.0-beta.6...v1.16.0-beta.7) (2025-04-23)
50+
51+
### Features
52+
53+
- introduce @analogjs/storybook-angular package ([#1699](https://github.com/analogjs/analog/issues/1699)) ([f0c5760](https://github.com/analogjs/analog/commit/f0c5760226fe6c80b63e6c521d2ecaacdb2f3b86))
54+
55+
# [1.16.0-beta.6](https://github.com/analogjs/analog/compare/v1.16.0-beta.5...v1.16.0-beta.6) (2025-04-23)
56+
57+
### Bug Fixes
58+
59+
- **vite-plugin-nitro:** remove compressed index files for SSR-only rendering ([#1700](https://github.com/analogjs/analog/issues/1700)) ([06419c1](https://github.com/analogjs/analog/commit/06419c108f7753a50990e85ee28995c50affc079))
60+
61+
# [1.16.0-beta.5](https://github.com/analogjs/analog/compare/v1.16.0-beta.4...v1.16.0-beta.5) (2025-04-22)
62+
63+
### Features
64+
65+
- **nx-plugin:** update templates to use Tailwind version 4.x ([#1692](https://github.com/analogjs/analog/issues/1692)) ([2e561ed](https://github.com/analogjs/analog/commit/2e561ed41e2be22893115455a2f57f6082856a58))
66+
67+
# [1.16.0-beta.4](https://github.com/analogjs/analog/compare/v1.16.0-beta.3...v1.16.0-beta.4) (2025-04-22)
68+
69+
### Bug Fixes
70+
71+
- **platform:** align logic for determining client only rendering ([#1695](https://github.com/analogjs/analog/issues/1695)) ([1f7f560](https://github.com/analogjs/analog/commit/1f7f5601f43e4a9dd99c4783a20eaeb2b55b83a3))
72+
73+
# [1.16.0-beta.3](https://github.com/analogjs/analog/compare/v1.16.0-beta.2...v1.16.0-beta.3) (2025-04-21)
74+
75+
### Bug Fixes
76+
77+
- **vite-plugin-angular:** check for compiler when using JiT and HMR ([#1693](https://github.com/analogjs/analog/issues/1693)) ([0173944](https://github.com/analogjs/analog/commit/01739448589da6100a3b9cfd4274174db3f1050e))
78+
79+
# [1.16.0-beta.2](https://github.com/analogjs/analog/compare/v1.16.0-beta.1...v1.16.0-beta.2) (2025-04-16)
80+
81+
### Bug Fixes
82+
83+
- **vite-plugin-nitro:** fix behavior when opting out of prerendering ([#1688](https://github.com/analogjs/analog/issues/1688)) ([aa7f02a](https://github.com/analogjs/analog/commit/aa7f02abc457d2d8d7a2af97b4fb1847ebb0ae19))
84+
85+
# [1.16.0-beta.1](https://github.com/analogjs/analog/compare/v1.15.1...v1.16.0-beta.1) (2025-04-10)
86+
87+
### Features
88+
89+
- **vite-plugin-nitro:** make source root configurable/optional ([#1681](https://github.com/analogjs/analog/issues/1681)) ([6477173](https://github.com/analogjs/analog/commit/6477173e7b4ab3759421b96bbd4c6df1aea25b05))
90+
191
## [1.15.1](https://github.com/analogjs/analog/compare/v1.15.0...v1.15.1) (2025-04-09)
292

393
### Bug Fixes

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-136-orange.svg?style=flat-square)](#contributors-)
5+
[![All Contributors](https://img.shields.io/badge/all_contributors-138-orange.svg?style=flat-square)](#contributors-)
66
<!-- ALL-CONTRIBUTORS-BADGE:END -->
77
<!-- prettier-ignore-end -->
88

@@ -287,6 +287,8 @@ Thanks goes to these wonderful people for contributing to Analog ([emoji key](ht
287287
<td align="center" valign="top" width="14.28%"><a href="https://3cloudsolutions.com"><img src="https://avatars.githubusercontent.com/u/1328532?v=4?s=100" width="100px;" alt="Roydon Gyles-Bedford"/><br /><sub><b>Roydon Gyles-Bedford</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=rgylesbedford" title="Code">💻</a></td>
288288
<td align="center" valign="top" width="14.28%"><a href="https://jordanpowell88.com"><img src="https://avatars.githubusercontent.com/u/3605268?v=4?s=100" width="100px;" alt="Jordan"/><br /><sub><b>Jordan</b></sub></a><br /><a href="#infra-jordanpowell88" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
289289
<td align="center" valign="top" width="14.28%"><a href="https://shannonmoeller.com"><img src="https://avatars.githubusercontent.com/u/155164?v=4?s=100" width="100px;" alt="Shannon Moeller 🧢"/><br /><sub><b>Shannon Moeller 🧢</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=shannonmoeller" title="Code">💻</a></td>
290+
<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>
291+
<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>
290292
</tr>
291293
</tbody>
292294
</table>

apps/docs-app/docs/contributors.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ Andres is a software engineer for HeroDevs, Angular and Firebase GDE.
234234
<td align="center" valign="top" width="14.28%"><a href="https://3cloudsolutions.com"><img src="https://avatars.githubusercontent.com/u/1328532?v=4?s=100" width="100px;" alt="Roydon Gyles-Bedford"/><br /><sub><b>Roydon Gyles-Bedford</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=rgylesbedford" title="Code">💻</a></td>
235235
<td align="center" valign="top" width="14.28%"><a href="https://jordanpowell88.com"><img src="https://avatars.githubusercontent.com/u/3605268?v=4?s=100" width="100px;" alt="Jordan"/><br /><sub><b>Jordan</b></sub></a><br /><a href="#infra-jordanpowell88" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
236236
<td align="center" valign="top" width="14.28%"><a href="https://shannonmoeller.com"><img src="https://avatars.githubusercontent.com/u/155164?v=4?s=100" width="100px;" alt="Shannon Moeller 🧢"/><br /><sub><b>Shannon Moeller 🧢</b></sub></a><br /><a href="https://github.com/analogjs/analog/commits?author=shannonmoeller" title="Code">💻</a></td>
237+
<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>
238+
<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>
237239
</tr>
238240
</tbody>
239241
</table>

apps/docs-app/docs/features/routing/middleware.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ src/
1313
└── auth.ts
1414
```
1515

16+
Also, if not present, add the middleware files to `include` array in the `tsconfig.app.json`.
17+
18+
```json
19+
{
20+
// other config ...
21+
"include": [
22+
"src/**/*.d.ts",
23+
"src/app/pages/**/*.page.ts",
24+
"src/server/middleware/**/*.ts" <----
25+
],
26+
}
27+
```
28+
1629
Middleware is defined using the `defineEventHandler` function.
1730

1831
```ts
@@ -50,3 +63,25 @@ export default defineEventHandler(async (event) => {
5063
}
5164
});
5265
```
66+
67+
## Accessing Environment Variables
68+
69+
Use the `process.env` global to access environment variables inside the middleware functions. Both server-only and publicly accessible environment variables defined in `.env` files can be read from the middleware.
70+
71+
```ts
72+
import { defineEventHandler, getRequestURL } from 'h3';
73+
74+
export default defineEventHandler((event) => {
75+
console.log('Path:', getRequestURL(event).pathname);
76+
console.log(
77+
'Server Only Environment Variable:',
78+
process.env['SERVER_ONLY_VARIABLE'],
79+
);
80+
console.log(
81+
'Public Environment Variable:',
82+
process.env['VITE_EXAMPLE_VARIABLE'],
83+
);
84+
});
85+
```
86+
87+
Learn more about [environment variables](https://vite.dev/guide/env-and-mode.html#env-variables) in the Vite documentation.

apps/docs-app/docs/features/server/server-side-rendering.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ For more information about externals with SSR, check out the [Vite documentation
2929

3030
## Hybrid Rendering with Client-Only Routes
3131

32-
SSR is enabled by default. For a hybrid approach, you can specific some routes to only be rendered client-side, and not be server side rendered. This is done through the `routeRules` configuration object by specifying an `ssr` option.
32+
SSR is enabled by default. For a hybrid approach, you can specify some routes to only be rendered client-side, and not be server side rendered. This is done through the `routeRules` configuration object by specifying an `ssr` option.
3333

3434
```ts
3535
import { defineConfig } from 'vite';
@@ -94,24 +94,18 @@ export default defineConfig(({ mode }) => ({
9494
}));
9595
```
9696

97-
You can opt out of prerendering by passing an empty array of routes and disabling prerender on the root route.
97+
You can opt-out of prerendering altogether by passing an empty array of routes.
9898

9999
```js
100100
import { defineConfig } from 'vite';
101101
import analog from '@analogjs/platform';
102+
102103
// https://vitejs.dev/config/
103104
export default defineConfig(({ mode }) => ({
104105
// ...other config
105106
plugins: [
106107
analog({
107108
ssr: true,
108-
nitro: {
109-
routeRules: {
110-
'/': {
111-
prerender: false,
112-
},
113-
},
114-
},
115109
prerender: {
116110
routes: async () => {
117111
return [];

apps/docs-app/docs/guides/compatibility.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
# Version Compatibility
22

3-
Analog is compatible across multiple versions of Angular, Nx, and Vite.
3+
Analog is compatible across multiple versions of Angular and Vite.
44

55
Its always recommended to use the latest version of Analog because there are bug fixes and features continually being added.
66

7-
Below is a reference table that matches versions of Nx and Angular with the Analog version that is compatible with it.
7+
Below is a reference table that matches compatible versions of Angular with the Analog and Vite.
8+
9+
# Angular Version Support
10+
11+
| Angular Version | Analog Version | Vite Version |
12+
| --------------- | -------------- | ------------ |
13+
| ^19.1.0 | **latest** | ^6.0.0 |
14+
| ^18.0.0 | **latest** | ^5.0.0 |
15+
| ^17.0.0 | **latest** | ^5.0.0 |
16+
| ^17.0.0 | **latest** | ^5.0.0 |
17+
| ^16.1.0 | **latest** | ^5.0.0 |
18+
| ~15.2.X | **latest** | ^5.0.0 |
19+
20+
You can also [migrate and existing Angular Single Page Application](/docs/guides/migrating) to Analog.
21+
22+
# Nx Version Support
23+
24+
Using Nx is not a requirement to use Analog. Analog uses the Nx Devkit for supporting Nx workspaces and Angular CLI workspaces
825

926
The table shows the minimum version of Nx, the supported Angular version, and the minimum supported version of Analog and Vite.
1027

0 commit comments

Comments
 (0)