From 026b3dce2f5cfe07da65922496b4c366642b3788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Andr=C3=A9s=20Padilla?= Date: Thu, 26 Dec 2024 13:38:17 -0500 Subject: [PATCH 01/30] feat(vitest-angular): add UI and coverage options to test builder (#1521) --- .../vitest-angular/src/lib/builders/test/schema.d.ts | 2 ++ .../vitest-angular/src/lib/builders/test/schema.json | 8 ++++++++ .../vitest-angular/src/lib/builders/test/vitest.impl.ts | 9 ++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/vitest-angular/src/lib/builders/test/schema.d.ts b/packages/vitest-angular/src/lib/builders/test/schema.d.ts index 9b8062140..1cdd3d006 100644 --- a/packages/vitest-angular/src/lib/builders/test/schema.d.ts +++ b/packages/vitest-angular/src/lib/builders/test/schema.d.ts @@ -4,4 +4,6 @@ export interface VitestSchema { reportsDirectory?: string; testFiles?: string[]; watch?: boolean; + ui?: boolean; + coverage?: boolean; } diff --git a/packages/vitest-angular/src/lib/builders/test/schema.json b/packages/vitest-angular/src/lib/builders/test/schema.json index 95a643bb9..2a7877312 100644 --- a/packages/vitest-angular/src/lib/builders/test/schema.json +++ b/packages/vitest-angular/src/lib/builders/test/schema.json @@ -28,6 +28,14 @@ "watch": { "description": "Watch files for changes and rerun tests related to changed files.", "type": "boolean" + }, + "ui": { + "description": "Run tests using Vitest UI Mode.", + "type": "boolean" + }, + "coverage": { + "description": "Enable code coverage analysis.", + "type": "boolean" } }, "required": [] diff --git a/packages/vitest-angular/src/lib/builders/test/vitest.impl.ts b/packages/vitest-angular/src/lib/builders/test/vitest.impl.ts index e12df71a3..46c56008e 100644 --- a/packages/vitest-angular/src/lib/builders/test/vitest.impl.ts +++ b/packages/vitest-angular/src/lib/builders/test/vitest.impl.ts @@ -20,12 +20,19 @@ async function vitestBuilder( const projectConfig = await context.getProjectMetadata( context.target as unknown as string ); - const extraArgs = await getExtraArgs(options); + const { coverageArgs, ...extraArgs } = await getExtraArgs(options); const watch = options.watch === true; + const ui = options.ui === true; + const coverageEnabled = options.coverage === true; const config = { root: `${projectConfig['root'] || '.'}`, watch, + ui, config: options.configFile, + coverage: { + enabled: coverageEnabled, + ...coverageArgs, + }, ...extraArgs, }; From 9540662e8498a95836fe61f45224268232c3806c Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 26 Dec 2024 18:38:57 +0000 Subject: [PATCH 02/30] chore: release 1.11.0-beta.2 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae7d75653..77a80c9b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.11.0-beta.2](https://github.com/analogjs/analog/compare/v1.11.0-beta.1...v1.11.0-beta.2) (2024-12-26) + +### Features + +- **vitest-angular:** add UI and coverage options to test builder ([#1521](https://github.com/analogjs/analog/issues/1521)) ([026b3dc](https://github.com/analogjs/analog/commit/026b3dce2f5cfe07da65922496b4c366642b3788)) + # [1.11.0-beta.1](https://github.com/analogjs/analog/compare/v1.10.3...v1.11.0-beta.1) (2024-12-20) ### Bug Fixes diff --git a/package.json b/package.json index 1283b7817..cc81beb9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.11.0-beta.1", + "version": "1.11.0-beta.2", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 13b5b3eb0..0db7f4218 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.11.0-beta.1", + "version": "1.11.0-beta.2", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.11.0-beta.1" + "@analogjs/vite-plugin-angular": "^1.11.0-beta.2" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index b970984f2..6057da783 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.11.0-beta.1", + "version": "1.11.0-beta.2", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 689e07a2a..b505b7a12 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.11.0-beta.1", + "version": "1.11.0-beta.2", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index 769fcd1bb..af1f1969c 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.1", - "@analogjs/router": "^1.11.0-beta.1", + "@analogjs/content": "^1.11.0-beta.2", + "@analogjs/router": "^1.11.0-beta.2", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.1", - "@analogjs/vitest-angular": "^1.11.0-beta.1", + "@analogjs/platform": "^1.11.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", + "@analogjs/vitest-angular": "^1.11.0-beta.2", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index f4ccf0518..42495fb1c 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.1", - "@analogjs/router": "^1.11.0-beta.1", + "@analogjs/content": "^1.11.0-beta.2", + "@analogjs/router": "^1.11.0-beta.2", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.1", - "@analogjs/vitest-angular": "^1.11.0-beta.1", + "@analogjs/platform": "^1.11.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", + "@analogjs/vitest-angular": "^1.11.0-beta.2", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index 1e2e748a6..e4d4c9d42 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.1", - "@analogjs/router": "^1.11.0-beta.1", + "@analogjs/content": "^1.11.0-beta.2", + "@analogjs/router": "^1.11.0-beta.2", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.1", - "@analogjs/vitest-angular": "^1.11.0-beta.1", + "@analogjs/platform": "^1.11.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", + "@analogjs/vitest-angular": "^1.11.0-beta.2", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 7bcb35d5c..4442fe598 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.1", - "@analogjs/router": "^1.11.0-beta.1", + "@analogjs/content": "^1.11.0-beta.2", + "@analogjs/router": "^1.11.0-beta.2", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.1", - "@analogjs/vitest-angular": "^1.11.0-beta.1", + "@analogjs/platform": "^1.11.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", + "@analogjs/vitest-angular": "^1.11.0-beta.2", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index ab5dd374c..e708ed9a8 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.1", - "@analogjs/router": "^1.11.0-beta.1", + "@analogjs/content": "^1.11.0-beta.2", + "@analogjs/router": "^1.11.0-beta.2", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.1", - "@analogjs/vitest-angular": "^1.11.0-beta.1", + "@analogjs/platform": "^1.11.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", + "@analogjs/vitest-angular": "^1.11.0-beta.2", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index ab5dd374c..e708ed9a8 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.1", - "@analogjs/router": "^1.11.0-beta.1", + "@analogjs/content": "^1.11.0-beta.2", + "@analogjs/router": "^1.11.0-beta.2", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.1", - "@analogjs/vitest-angular": "^1.11.0-beta.1", + "@analogjs/platform": "^1.11.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", + "@analogjs/vitest-angular": "^1.11.0-beta.2", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index 713c66596..613401e61 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.11.0-beta.1", + "version": "1.11.0-beta.2", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.1", - "@analogjs/vite-plugin-nitro": "^1.11.0-beta.1", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", + "@analogjs/vite-plugin-nitro": "^1.11.0-beta.2", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index 48b3a3d90..9c365af0e 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.11.0-beta.1", + "version": "1.11.0-beta.2", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.11.0-beta.1", + "@analogjs/content": "^1.11.0-beta.2", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 3360c15e5..6f6a2dee1 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.11.0-beta.1", + "version": "1.11.0-beta.2", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index e0db2176d..1b6826604 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.11.0-beta.1", + "version": "1.11.0-beta.2", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index aaad64477..493012453 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.11.0-beta.1", + "version": "1.11.0-beta.2", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From 0602a8f79ae3c16897c966f3defe7ac3309c32a6 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Fri, 27 Dec 2024 11:06:15 -0600 Subject: [PATCH 03/30] feat(vite-plugin-angular): introduce support for Angular v19 HMR/live reload (#1523) --- apps/analog-app/vite.config.ts | 1 + apps/ng-app/vite.config.ts | 1 + packages/platform/src/lib/options.ts | 6 + packages/platform/src/lib/platform-plugin.ts | 1 + .../src/lib/angular-vite-plugin.ts | 205 +++++++++- .../src/lib/utils/hmr-candidates.ts | 367 ++++++++++++++++++ 6 files changed, 569 insertions(+), 12 deletions(-) create mode 100644 packages/vite-plugin-angular/src/lib/utils/hmr-candidates.ts diff --git a/apps/analog-app/vite.config.ts b/apps/analog-app/vite.config.ts index df67017c8..920c32039 100644 --- a/apps/analog-app/vite.config.ts +++ b/apps/analog-app/vite.config.ts @@ -43,6 +43,7 @@ export default defineConfig(({ mode }) => { supportAnalogFormat: true, }, }, + liveReload: true, }), nxViteTsPaths(), visualizer() as Plugin, diff --git a/apps/ng-app/vite.config.ts b/apps/ng-app/vite.config.ts index 1bfd46716..4c6292004 100644 --- a/apps/ng-app/vite.config.ts +++ b/apps/ng-app/vite.config.ts @@ -20,6 +20,7 @@ export default defineConfig(({ mode }) => ({ analog({ ssr: false, static: true, + liveReload: true, vite: { experimental: { supportAnalogFormat: true, diff --git a/packages/platform/src/lib/options.ts b/packages/platform/src/lib/options.ts index 129909309..c1ce56665 100644 --- a/packages/platform/src/lib/options.ts +++ b/packages/platform/src/lib/options.ts @@ -37,6 +37,12 @@ export interface Options { index?: string; workspaceRoot?: string; content?: ContentPluginOptions; + + /** + * Enables Angular's HMR during development + */ + liveReload?: boolean; + /** * Additional page paths to include */ diff --git a/packages/platform/src/lib/platform-plugin.ts b/packages/platform/src/lib/platform-plugin.ts index 5417f3cd6..e5130c954 100644 --- a/packages/platform/src/lib/platform-plugin.ts +++ b/packages/platform/src/lib/platform-plugin.ts @@ -36,6 +36,7 @@ export function platformPlugin(opts: Options = {}): Plugin[] { ), ], additionalContentDirs: platformOptions.additionalContentDirs, + liveReload: platformOptions.liveReload, ...(opts?.vite ?? {}), }), serverModePlugin(), diff --git a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts index bba61b12c..de4e1c6bf 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts @@ -1,9 +1,10 @@ import { CompilerHost, NgtscProgram } from '@angular/compiler-cli'; -import { dirname, resolve } from 'node:path'; +import { dirname, relative, resolve } from 'node:path'; import * as compilerCli from '@angular/compiler-cli'; import * as ts from 'typescript'; import { createRequire } from 'node:module'; +import { ServerResponse } from 'node:http'; import { ModuleNode, normalizePath, @@ -11,6 +12,7 @@ import { ViteDevServer, preprocessCSS, ResolvedConfig, + Connect, } from 'vite'; import { createCompilerPlugin } from './compiler-plugin.js'; @@ -30,6 +32,7 @@ import { buildOptimizerPlugin } from './angular-build-optimizer-plugin.js'; import { createJitResourceTransformer, SourceFileCache, + angularMajor, } from './utils/devkit.js'; import { angularVitestPlugins } from './angular-vitest-plugin.js'; import { angularStorybookPlugin } from './angular-storybook-plugin.js'; @@ -43,6 +46,7 @@ import { } from './authoring/markdown-transform.js'; import { routerPlugin } from './router-plugin.js'; import { pendingTasksPlugin } from './angular-pending-tasks.plugin.js'; +import { analyzeFileUpdates } from './utils/hmr-candidates.js'; export interface PluginOptions { tsconfig?: string; @@ -73,6 +77,7 @@ export interface PluginOptions { */ include?: string[]; additionalContentDirs?: string[]; + liveReload?: boolean; } interface EmitFileResult { @@ -80,10 +85,15 @@ interface EmitFileResult { map?: string; dependencies: readonly string[]; hash?: Uint8Array; - errors: (string | ts.DiagnosticMessageChain)[]; - warnings: (string | ts.DiagnosticMessageChain)[]; + errors?: (string | ts.DiagnosticMessageChain)[]; + warnings?: (string | ts.DiagnosticMessageChain)[]; + hmrUpdateCode?: string | null; + hmrEligible?: boolean; } -type FileEmitter = (file: string) => Promise; +type FileEmitter = ( + file: string, + source?: ts.SourceFile +) => Promise; /** * TypeScript file extension regex @@ -91,6 +101,8 @@ type FileEmitter = (file: string) => Promise; * Ignore .tsx extensions */ const TS_EXT_REGEX = /\.[cm]?(ts|analog|ag)[^x]?\??/; +const ANGULAR_COMPONENT_PREFIX = '/@ng/component'; +const classNames = new Map(); export function angular(options?: PluginOptions): Plugin[] { /** @@ -122,6 +134,7 @@ export function angular(options?: PluginOptions): Plugin[] { : defaultMarkdownTemplateTransforms, include: options?.include ?? [], additionalContentDirs: options?.additionalContentDirs ?? [], + liveReload: options?.liveReload ?? false, }; // The file emitter created during `onStart` that will be used during the build in `onLoad` callbacks for TS files @@ -160,6 +173,10 @@ export function angular(options?: PluginOptions): Plugin[] { function angularPlugin(): Plugin { let isProd = false; + if (angularMajor < 19 || isTest) { + pluginOptions.liveReload = false; + } + return { name: '@analogjs/vite-plugin-angular', async watchChange() { @@ -232,6 +249,43 @@ export function angular(options?: PluginOptions): Plugin[] { setupCompilation(resolvedConfig); await buildAndAnalyze(); }); + + if (pluginOptions.liveReload) { + const angularComponentMiddleware: Connect.HandleFunction = async ( + req: Connect.IncomingMessage, + res: ServerResponse, + next: Connect.NextFunction + ) => { + if (req.url === undefined || res.writableEnded) { + return; + } + + if (!req.url.startsWith(ANGULAR_COMPONENT_PREFIX)) { + next(); + + return; + } + + const requestUrl = new URL(req.url, 'http://localhost'); + const componentId = requestUrl.searchParams.get('c'); + + if (!componentId) { + res.statusCode = 400; + res.end(); + + return; + } + + const [fileId] = decodeURIComponent(componentId).split('@'); + const result = await fileEmitter?.(resolve(process.cwd(), fileId)); + + res.setHeader('Content-Type', 'text/javascript'); + res.setHeader('Cache-Control', 'no-cache'); + res.end(`${result?.hmrUpdateCode || ''}`); + }; + + viteServer.middlewares.use(angularComponentMiddleware); + } }, async buildStart() { setupCompilation(resolvedConfig); @@ -253,8 +307,44 @@ export function angular(options?: PluginOptions): Plugin[] { } if (TS_EXT_REGEX.test(ctx.file)) { - sourceFileCache.invalidate([ctx.file.replace(/\?(.*)/, '')]); + let [fileId] = ctx.file.split('?'); + + if ( + pluginOptions.supportAnalogFormat && + ['ag', 'analog', 'agx'].some((ext) => fileId.endsWith(ext)) + ) { + fileId += '.ts'; + } + + const stale = sourceFileCache.get(fileId); + sourceFileCache.invalidate([fileId]); await buildAndAnalyze(); + + const result = await fileEmitter?.(fileId, stale); + + if ( + pluginOptions.liveReload && + !!result?.hmrEligible && + classNames.get(fileId) + ) { + const relativeFileId = `${relative( + process.cwd(), + fileId + )}@${classNames.get(fileId)}`; + + sendHMRComponentUpdate(ctx.server, relativeFileId); + + return ctx.modules.map((mod) => { + if (mod.id === ctx.file) { + return { + ...mod, + isSelfAccepting: true, + } as ModuleNode; + } + + return mod; + }); + } } if (/\.(html|htm|css|less|sass|scss)$/.test(ctx.file)) { @@ -265,21 +355,49 @@ export function angular(options?: PluginOptions): Plugin[] { const isDirect = ctx.modules.find( (mod) => ctx.file === mod.file && mod.id?.includes('?direct') ); - if (isDirect) { return ctx.modules; } const mods: ModuleNode[] = []; + const updates: string[] = []; ctx.modules.forEach((mod) => { mod.importers.forEach((imp) => { - sourceFileCache.invalidate([imp.id as string]); + sourceFileCache.invalidate([imp.id]); ctx.server.moduleGraph.invalidateModule(imp); - mods.push(imp); + + if (pluginOptions.liveReload && classNames.get(imp.id)) { + updates.push(imp.id as string); + } else { + mods.push(imp); + } }); }); await buildAndAnalyze(); + + if (updates.length > 0) { + updates.forEach((updateId) => { + const impRelativeFileId = `${relative( + process.cwd(), + updateId + )}@${classNames.get(updateId)}`; + + sendHMRComponentUpdate(ctx.server, impRelativeFileId); + }); + + return ctx.modules.map((mod) => { + if (mod.id === ctx.file) { + return { + ...mod, + isSelfAccepting: true, + } as ModuleNode; + } + + return mod; + }); + } + return mods; } @@ -295,6 +413,31 @@ export function angular(options?: PluginOptions): Plugin[] { return undefined; }, + async load(id, options) { + if ( + pluginOptions.liveReload && + options?.ssr && + id.startsWith(ANGULAR_COMPONENT_PREFIX) + ) { + const requestUrl = new URL(id.slice(1), 'http://localhost'); + const componentId = requestUrl.searchParams.get('c'); + + if (!componentId) { + return; + } + + const result = await fileEmitter?.( + resolve( + process.cwd(), + decodeURIComponent(componentId).split('@')[0] + ) + ); + + return result?.hmrUpdateCode || ''; + } + + return; + }, async transform(code, id) { // Skip transforming node_modules if (id.includes('node_modules')) { @@ -543,6 +686,13 @@ export function angular(options?: PluginOptions): Plugin[] { tsCompilerOptions.compilationMode = 'experimental-local'; } + if (pluginOptions.liveReload) { + tsCompilerOptions['_enableHmr'] = true; + // Workaround for https://github.com/angular/angular/issues/59310 + // Force extra instructions to be generated for HMR w/defer + tsCompilerOptions['supportTestBed'] = true; + } + rootNames = rn.concat(analogFiles, includeFiles); compilerOptions = tsCompilerOptions; host = ts.createIncrementalCompilerHost(compilerOptions); @@ -636,23 +786,43 @@ export function angular(options?: PluginOptions): Plugin[] { jit ? {} : angularCompiler!.prepareEmit().transformers ), () => [], - angularCompiler! + angularCompiler!, + pluginOptions.liveReload ); } } +function sendHMRComponentUpdate(server: ViteDevServer, id: string) { + server.ws.send('angular:component-update', { + id: encodeURIComponent(id), + timestamp: Date.now(), + }); + + classNames.delete(id); +} + export function createFileEmitter( program: ts.BuilderProgram, transformers: ts.CustomTransformers = {}, onAfterEmit?: (sourceFile: ts.SourceFile) => void, - angularCompiler?: NgtscProgram['compiler'] + angularCompiler?: NgtscProgram['compiler'], + liveReload?: boolean ): FileEmitter { - return async (file: string) => { + return async (file: string, stale?: ts.SourceFile) => { const sourceFile = program.getSourceFile(file); if (!sourceFile) { return undefined; } + if (stale) { + const hmrEligible = !!analyzeFileUpdates( + stale, + sourceFile, + angularCompiler! + ); + return { dependencies: [], hmrEligible }; + } + const diagnostics = angularCompiler ? angularCompiler.getDiagnosticsForFile(sourceFile, 1) : []; @@ -665,6 +835,17 @@ export function createFileEmitter( .filter((d) => d.category === ts.DiagnosticCategory?.Warning) .map((d) => d.messageText); + let hmrUpdateCode: string | null | undefined = undefined; + + if (liveReload) { + for (const node of sourceFile.statements) { + if (ts.isClassDeclaration(node) && node.name != null) { + hmrUpdateCode = angularCompiler?.emitHmrUpdateModule(node); + classNames.set(file, node.name.getText()); + } + } + } + let content: string | undefined; program.emit( sourceFile, @@ -680,6 +861,6 @@ export function createFileEmitter( onAfterEmit?.(sourceFile); - return { content, dependencies: [], errors, warnings }; + return { content, dependencies: [], errors, warnings, hmrUpdateCode }; }; } diff --git a/packages/vite-plugin-angular/src/lib/utils/hmr-candidates.ts b/packages/vite-plugin-angular/src/lib/utils/hmr-candidates.ts new file mode 100644 index 000000000..d4637d8ac --- /dev/null +++ b/packages/vite-plugin-angular/src/lib/utils/hmr-candidates.ts @@ -0,0 +1,367 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.dev/license + */ + +import type ng from '@angular/compiler-cli'; +import assert from 'node:assert'; +import ts from 'typescript'; + +/** + * Analyzes one or more modified files for changes to determine if any + * class declarations for Angular components are candidates for hot + * module replacement (HMR). If any source files are also modified but + * are not candidates then all candidates become invalid. This invalidation + * ensures that a full rebuild occurs and the running application stays + * synchronized with the code. + * @param modifiedFiles A set of modified files to analyze. + * @param param1 An Angular compiler instance + * @param staleSourceFiles A map of paths to previous source file instances. + * @returns A set of HMR candidate component class declarations. + */ +export function collectHmrCandidates( + modifiedFiles: Set, + { compiler }: ng.NgtscProgram, + staleSourceFiles: Map | undefined +): Set { + const candidates = new Set(); + + for (const file of modifiedFiles) { + // If the file is a template for component(s), add component classes as candidates + const templateFileNodes = compiler.getComponentsWithTemplateFile(file); + if (templateFileNodes.size) { + templateFileNodes.forEach((node) => + candidates.add(node as ts.ClassDeclaration) + ); + continue; + } + + // If the file is a style for component(s), add component classes as candidates + const styleFileNodes = compiler.getComponentsWithStyleFile(file); + if (styleFileNodes.size) { + styleFileNodes.forEach((node) => + candidates.add(node as ts.ClassDeclaration) + ); + continue; + } + + const staleSource = staleSourceFiles?.get(file); + if (staleSource === undefined) { + // Unknown file requires a rebuild so clear out the candidates and stop collecting + candidates.clear(); + break; + } + + const updatedSource = compiler.getCurrentProgram().getSourceFile(file); + if (updatedSource === undefined) { + // No longer existing program file requires a rebuild so clear out the candidates and stop collecting + candidates.clear(); + break; + } + + // Analyze the stale and updated file for changes + const fileCandidates = analyzeFileUpdates( + staleSource, + updatedSource, + compiler + ); + if (fileCandidates) { + fileCandidates.forEach((node) => candidates.add(node)); + } else { + // Unsupported HMR changes present + // Only template and style literal changes are allowed. + candidates.clear(); + break; + } + } + + return candidates; +} + +/** + * Analyzes the updates of a source file for potential HMR component class candidates. + * A source file can contain candidates if only the Angular component metadata of a class + * has been changed and the metadata changes are only of supported fields. + * @param stale The stale (previous) source file instance. + * @param updated The updated source file instance. + * @param compiler An Angular compiler instance. + * @returns An array of candidate class declarations; or `null` if unsupported changes are present. + */ +export function analyzeFileUpdates( + stale: ts.SourceFile, + updated: ts.SourceFile, + compiler: ng.NgtscProgram['compiler'] +): ts.ClassDeclaration[] | null { + if (stale.statements.length !== updated.statements.length) { + return null; + } + + const candidates: ts.ClassDeclaration[] = []; + + for (let i = 0; i < updated.statements.length; ++i) { + const updatedNode = updated.statements[i]; + const staleNode = stale.statements[i]; + + if (ts.isClassDeclaration(updatedNode)) { + if (!ts.isClassDeclaration(staleNode)) { + return null; + } + + // Check class declaration differences (name/heritage/modifiers) + if (updatedNode.name?.text !== staleNode.name?.text) { + return null; + } + if ( + !equalRangeText( + updatedNode.heritageClauses, + updated, + staleNode.heritageClauses, + stale + ) + ) { + return null; + } + const updatedModifiers = ts.getModifiers(updatedNode); + const staleModifiers = ts.getModifiers(staleNode); + if ( + updatedModifiers?.length !== staleModifiers?.length || + !updatedModifiers?.every((updatedModifier) => + staleModifiers?.some( + (staleModifier) => updatedModifier.kind === staleModifier.kind + ) + ) + ) { + return null; + } + + // Check for component class nodes + const meta = compiler.getMeta(updatedNode); + if ( + meta?.decorator && + (meta as { isComponent?: boolean }).isComponent === true + ) { + const updatedDecorators = ts.getDecorators(updatedNode); + const staleDecorators = ts.getDecorators(staleNode); + if ( + !staleDecorators || + staleDecorators.length !== updatedDecorators?.length + ) { + return null; + } + + // TODO: Check other decorators instead of assuming all multi-decorator components are unsupported + if (staleDecorators.length > 1) { + return null; + } + + // Find index of component metadata decorator + const metaDecoratorIndex = updatedDecorators?.indexOf(meta.decorator); + assert( + metaDecoratorIndex !== undefined, + 'Component metadata decorator should always be present on component class.' + ); + const updatedDecoratorExpression = meta.decorator.expression; + assert( + ts.isCallExpression(updatedDecoratorExpression) && + updatedDecoratorExpression.arguments.length === 1, + 'Component metadata decorator should contain a call expression with a single argument.' + ); + + // Check the matching stale index for the component decorator + const staleDecoratorExpression = + staleDecorators[metaDecoratorIndex]?.expression; + if ( + !staleDecoratorExpression || + !ts.isCallExpression(staleDecoratorExpression) || + staleDecoratorExpression.arguments.length !== 1 + ) { + return null; + } + + // Check decorator name/expression + // NOTE: This would typically be `Component` but can also be a property expression or some other alias. + // To avoid complex checks, this ensures the textual representation does not change. This has a low chance + // of a false positive if the expression is changed to still reference the `Component` type but has different + // text. However, it is rare for `Component` to not be used directly and additionally unlikely that it would + // be changed between edits. A false positive would also only lead to a difference of a full page reload versus + // an HMR update. + if ( + !equalRangeText( + updatedDecoratorExpression.expression, + updated, + staleDecoratorExpression.expression, + stale + ) + ) { + return null; + } + + // Compare component meta decorator object literals + if ( + hasUnsupportedMetaUpdates( + staleDecoratorExpression, + stale, + updatedDecoratorExpression, + updated + ) + ) { + return null; + } + + // Compare text of the member nodes to determine if any changes have occurred + if ( + !equalRangeText( + updatedNode.members, + updated, + staleNode.members, + stale + ) + ) { + // A change to a member outside a component's metadata is unsupported + return null; + } + + // If all previous class checks passed, this class is supported for HMR updates + candidates.push(updatedNode); + continue; + } + } + + // Compare text of the statement nodes to determine if any changes have occurred + // TODO: Consider expanding this to check semantic updates for each node kind + if (!equalRangeText(updatedNode, updated, staleNode, stale)) { + // A change to a statement outside a component's metadata is unsupported + return null; + } + } + + return candidates; +} + +/** + * The set of Angular component metadata fields that are supported by HMR updates. + */ +const SUPPORTED_FIELDS = new Set([ + 'template', + 'templateUrl', + 'styles', + 'styleUrl', + 'stylesUrl', +]); + +/** + * Analyzes the metadata fields of a decorator call expression for unsupported HMR updates. + * Only updates to supported fields can be present for HMR to be viable. + * @param staleCall A call expression instance. + * @param staleSource The source file instance containing the stale call instance. + * @param updatedCall A call expression instance. + * @param updatedSource The source file instance containing the updated call instance. + * @returns true, if unsupported metadata updates are present; false, otherwise. + */ +function hasUnsupportedMetaUpdates( + staleCall: ts.CallExpression, + staleSource: ts.SourceFile, + updatedCall: ts.CallExpression, + updatedSource: ts.SourceFile +): boolean { + const staleObject = staleCall.arguments[0]; + const updatedObject = updatedCall.arguments[0]; + + if ( + !ts.isObjectLiteralExpression(staleObject) || + !ts.isObjectLiteralExpression(updatedObject) + ) { + return true; + } + + const unsupportedFields: ts.Node[] = []; + + for (const property of staleObject.properties) { + if ( + !ts.isPropertyAssignment(property) || + ts.isComputedPropertyName(property.name) + ) { + // Unsupported object literal property + return true; + } + + const name = property.name.text; + if (SUPPORTED_FIELDS.has(name)) { + continue; + } + + unsupportedFields.push(property.initializer); + } + + let i = 0; + for (const property of updatedObject.properties) { + if ( + !ts.isPropertyAssignment(property) || + ts.isComputedPropertyName(property.name) + ) { + // Unsupported object literal property + return true; + } + + const name = property.name.text; + if (SUPPORTED_FIELDS.has(name)) { + continue; + } + + // Compare in order + if ( + !equalRangeText( + property.initializer, + updatedSource, + unsupportedFields[i++], + staleSource + ) + ) { + return true; + } + } + + return i !== unsupportedFields.length; +} + +/** + * Compares the text from a provided range in a source file to the text of a range in a second source file. + * The comparison avoids making any intermediate string copies. + * @param firstRange A text range within the first source file. + * @param firstSource A source file instance. + * @param secondRange A text range within the second source file. + * @param secondSource A source file instance. + * @returns true, if the text from both ranges is equal; false, otherwise. + */ +function equalRangeText( + firstRange: ts.ReadonlyTextRange | undefined, + firstSource: ts.SourceFile, + secondRange: ts.ReadonlyTextRange | undefined, + secondSource: ts.SourceFile +): boolean { + // Check matching undefined values + if (!firstRange || !secondRange) { + return firstRange === secondRange; + } + + // Ensure lengths are equal + const firstLength = firstRange.end - firstRange.pos; + const secondLength = secondRange.end - secondRange.pos; + if (firstLength !== secondLength) { + return false; + } + + // Check each character + for (let i = 0; i < firstLength; ++i) { + const firstChar = firstSource.text.charCodeAt(i + firstRange.pos); + const secondChar = secondSource.text.charCodeAt(i + secondRange.pos); + if (firstChar !== secondChar) { + return false; + } + } + + return true; +} From b3f8a93610e8a510ad709236f50e761620e50f89 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 27 Dec 2024 17:06:56 +0000 Subject: [PATCH 04/30] chore: release 1.11.0-beta.3 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77a80c9b5..c686b9199 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.11.0-beta.3](https://github.com/analogjs/analog/compare/v1.11.0-beta.2...v1.11.0-beta.3) (2024-12-27) + +### Features + +- **vite-plugin-angular:** introduce support for Angular v19 HMR/live reload ([#1523](https://github.com/analogjs/analog/issues/1523)) ([0602a8f](https://github.com/analogjs/analog/commit/0602a8f79ae3c16897c966f3defe7ac3309c32a6)) + # [1.11.0-beta.2](https://github.com/analogjs/analog/compare/v1.11.0-beta.1...v1.11.0-beta.2) (2024-12-26) ### Features diff --git a/package.json b/package.json index cc81beb9b..311abf20b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.11.0-beta.2", + "version": "1.11.0-beta.3", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 0db7f4218..5598987f9 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.11.0-beta.2", + "version": "1.11.0-beta.3", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.11.0-beta.2" + "@analogjs/vite-plugin-angular": "^1.11.0-beta.3" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 6057da783..4e8d5eb7e 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.11.0-beta.2", + "version": "1.11.0-beta.3", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index b505b7a12..aecb05f82 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.11.0-beta.2", + "version": "1.11.0-beta.3", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index af1f1969c..7f0e2925f 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.2", - "@analogjs/router": "^1.11.0-beta.2", + "@analogjs/content": "^1.11.0-beta.3", + "@analogjs/router": "^1.11.0-beta.3", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", - "@analogjs/vitest-angular": "^1.11.0-beta.2", + "@analogjs/platform": "^1.11.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", + "@analogjs/vitest-angular": "^1.11.0-beta.3", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index 42495fb1c..f4eb651cc 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.2", - "@analogjs/router": "^1.11.0-beta.2", + "@analogjs/content": "^1.11.0-beta.3", + "@analogjs/router": "^1.11.0-beta.3", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", - "@analogjs/vitest-angular": "^1.11.0-beta.2", + "@analogjs/platform": "^1.11.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", + "@analogjs/vitest-angular": "^1.11.0-beta.3", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index e4d4c9d42..6c29724e6 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.2", - "@analogjs/router": "^1.11.0-beta.2", + "@analogjs/content": "^1.11.0-beta.3", + "@analogjs/router": "^1.11.0-beta.3", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", - "@analogjs/vitest-angular": "^1.11.0-beta.2", + "@analogjs/platform": "^1.11.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", + "@analogjs/vitest-angular": "^1.11.0-beta.3", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 4442fe598..2a29662da 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.2", - "@analogjs/router": "^1.11.0-beta.2", + "@analogjs/content": "^1.11.0-beta.3", + "@analogjs/router": "^1.11.0-beta.3", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", - "@analogjs/vitest-angular": "^1.11.0-beta.2", + "@analogjs/platform": "^1.11.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", + "@analogjs/vitest-angular": "^1.11.0-beta.3", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index e708ed9a8..81b517712 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.2", - "@analogjs/router": "^1.11.0-beta.2", + "@analogjs/content": "^1.11.0-beta.3", + "@analogjs/router": "^1.11.0-beta.3", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", - "@analogjs/vitest-angular": "^1.11.0-beta.2", + "@analogjs/platform": "^1.11.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", + "@analogjs/vitest-angular": "^1.11.0-beta.3", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index e708ed9a8..81b517712 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.2", - "@analogjs/router": "^1.11.0-beta.2", + "@analogjs/content": "^1.11.0-beta.3", + "@analogjs/router": "^1.11.0-beta.3", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", - "@analogjs/vitest-angular": "^1.11.0-beta.2", + "@analogjs/platform": "^1.11.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", + "@analogjs/vitest-angular": "^1.11.0-beta.3", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index 613401e61..c4746c127 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.11.0-beta.2", + "version": "1.11.0-beta.3", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.2", - "@analogjs/vite-plugin-nitro": "^1.11.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", + "@analogjs/vite-plugin-nitro": "^1.11.0-beta.3", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index 9c365af0e..b2b7aee97 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.11.0-beta.2", + "version": "1.11.0-beta.3", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.11.0-beta.2", + "@analogjs/content": "^1.11.0-beta.3", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 6f6a2dee1..19c2025ae 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.11.0-beta.2", + "version": "1.11.0-beta.3", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 1b6826604..9dacf5002 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.11.0-beta.2", + "version": "1.11.0-beta.3", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index 493012453..8c305956e 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.11.0-beta.2", + "version": "1.11.0-beta.3", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From 7b783d9d114f5050a14786254aab6d3f198cc893 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Fri, 27 Dec 2024 20:25:23 -0600 Subject: [PATCH 05/30] fix(vite-plugin-angular): invalidation fixes for HMR/live reload (#1526) --- .../src/lib/angular-vite-plugin.ts | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts index de4e1c6bf..987d80a05 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts @@ -277,8 +277,20 @@ export function angular(options?: PluginOptions): Plugin[] { } const [fileId] = decodeURIComponent(componentId).split('@'); - const result = await fileEmitter?.(resolve(process.cwd(), fileId)); + const resolvedId = resolve(process.cwd(), fileId); + const invalidated = + !!server.moduleGraph.getModuleById(resolvedId) + ?.lastInvalidationTimestamp; + + // don't send an HMR update until the file has been invalidated + if (!invalidated) { + res.setHeader('Content-Type', 'text/javascript'); + res.setHeader('Cache-Control', 'no-cache'); + res.end(''); + return; + } + const result = await fileEmitter?.(resolvedId); res.setHeader('Content-Type', 'text/javascript'); res.setHeader('Cache-Control', 'no-cache'); res.end(`${result?.hmrUpdateCode || ''}`); @@ -336,6 +348,11 @@ export function angular(options?: PluginOptions): Plugin[] { return ctx.modules.map((mod) => { if (mod.id === ctx.file) { + // support Vite 6 + if ('_clientModule' in mod) { + (mod as any)['_clientModule'].isSelfAccepting = true; + } + return { ...mod, isSelfAccepting: true, @@ -388,6 +405,11 @@ export function angular(options?: PluginOptions): Plugin[] { return ctx.modules.map((mod) => { if (mod.id === ctx.file) { + // support Vite 6 + if ('_clientModule' in mod) { + (mod as any)['_clientModule'].isSelfAccepting = true; + } + return { ...mod, isSelfAccepting: true, From b54964a334fc4b9c3631825b45568b3df230f4fd Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 28 Dec 2024 02:26:05 +0000 Subject: [PATCH 06/30] chore: release 1.11.0-beta.4 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c686b9199..802cb5435 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.11.0-beta.4](https://github.com/analogjs/analog/compare/v1.11.0-beta.3...v1.11.0-beta.4) (2024-12-28) + +### Bug Fixes + +- **vite-plugin-angular:** invalidation fixes for HMR/live reload ([#1526](https://github.com/analogjs/analog/issues/1526)) ([7b783d9](https://github.com/analogjs/analog/commit/7b783d9d114f5050a14786254aab6d3f198cc893)) + # [1.11.0-beta.3](https://github.com/analogjs/analog/compare/v1.11.0-beta.2...v1.11.0-beta.3) (2024-12-27) ### Features diff --git a/package.json b/package.json index 311abf20b..2669a3eb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.11.0-beta.3", + "version": "1.11.0-beta.4", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 5598987f9..a3d3b37ea 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.11.0-beta.3", + "version": "1.11.0-beta.4", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.11.0-beta.3" + "@analogjs/vite-plugin-angular": "^1.11.0-beta.4" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 4e8d5eb7e..8b5ea82d4 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.11.0-beta.3", + "version": "1.11.0-beta.4", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index aecb05f82..16a2fb2f5 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.11.0-beta.3", + "version": "1.11.0-beta.4", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index 7f0e2925f..da8f543d2 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.3", - "@analogjs/router": "^1.11.0-beta.3", + "@analogjs/content": "^1.11.0-beta.4", + "@analogjs/router": "^1.11.0-beta.4", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", - "@analogjs/vitest-angular": "^1.11.0-beta.3", + "@analogjs/platform": "^1.11.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", + "@analogjs/vitest-angular": "^1.11.0-beta.4", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index f4eb651cc..805a13340 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.3", - "@analogjs/router": "^1.11.0-beta.3", + "@analogjs/content": "^1.11.0-beta.4", + "@analogjs/router": "^1.11.0-beta.4", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", - "@analogjs/vitest-angular": "^1.11.0-beta.3", + "@analogjs/platform": "^1.11.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", + "@analogjs/vitest-angular": "^1.11.0-beta.4", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index 6c29724e6..603c16674 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.3", - "@analogjs/router": "^1.11.0-beta.3", + "@analogjs/content": "^1.11.0-beta.4", + "@analogjs/router": "^1.11.0-beta.4", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", - "@analogjs/vitest-angular": "^1.11.0-beta.3", + "@analogjs/platform": "^1.11.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", + "@analogjs/vitest-angular": "^1.11.0-beta.4", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 2a29662da..7188e0ce0 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.3", - "@analogjs/router": "^1.11.0-beta.3", + "@analogjs/content": "^1.11.0-beta.4", + "@analogjs/router": "^1.11.0-beta.4", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", - "@analogjs/vitest-angular": "^1.11.0-beta.3", + "@analogjs/platform": "^1.11.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", + "@analogjs/vitest-angular": "^1.11.0-beta.4", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index 81b517712..c439d23a7 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.3", - "@analogjs/router": "^1.11.0-beta.3", + "@analogjs/content": "^1.11.0-beta.4", + "@analogjs/router": "^1.11.0-beta.4", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", - "@analogjs/vitest-angular": "^1.11.0-beta.3", + "@analogjs/platform": "^1.11.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", + "@analogjs/vitest-angular": "^1.11.0-beta.4", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index 81b517712..c439d23a7 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.3", - "@analogjs/router": "^1.11.0-beta.3", + "@analogjs/content": "^1.11.0-beta.4", + "@analogjs/router": "^1.11.0-beta.4", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", - "@analogjs/vitest-angular": "^1.11.0-beta.3", + "@analogjs/platform": "^1.11.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", + "@analogjs/vitest-angular": "^1.11.0-beta.4", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index c4746c127..dfd66b2b3 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.11.0-beta.3", + "version": "1.11.0-beta.4", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.3", - "@analogjs/vite-plugin-nitro": "^1.11.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", + "@analogjs/vite-plugin-nitro": "^1.11.0-beta.4", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index b2b7aee97..ae83e49c3 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.11.0-beta.3", + "version": "1.11.0-beta.4", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.11.0-beta.3", + "@analogjs/content": "^1.11.0-beta.4", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 19c2025ae..7b0439fbe 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.11.0-beta.3", + "version": "1.11.0-beta.4", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 9dacf5002..114bd535a 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.11.0-beta.3", + "version": "1.11.0-beta.4", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index 8c305956e..e28ed5feb 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.11.0-beta.3", + "version": "1.11.0-beta.4", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From 3657bf17c1f2c3ee03bd008de008b6fdf80b2795 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 30 Dec 2024 12:31:46 -0600 Subject: [PATCH 07/30] feat(vite-plugin-nitro): add support for Firebase App Hosting deployment (#1529) --- .../docs/features/deployment/providers.md | 272 +++++++++--------- .../src/lib/vite-plugin-nitro.ts | 41 +++ 2 files changed, 182 insertions(+), 131 deletions(-) diff --git a/apps/docs-app/docs/features/deployment/providers.md b/apps/docs-app/docs/features/deployment/providers.md index f199c0b97..c499eedf6 100644 --- a/apps/docs-app/docs/features/deployment/providers.md +++ b/apps/docs-app/docs/features/deployment/providers.md @@ -5,6 +5,137 @@ import TabItem from '@theme/TabItem'; Analog supports deployment to many providers with little or no additional configuration using [Nitro](https://nitro.unjs.io) as its underlying server engine. You can find more providers in the [Nitro deployment docs](https://nitro.unjs.io/deploy). +## Zerops + +:::info +[Zerops](https://zerops.io) is the **official** deployment partner for AnalogJS. +::: + +Analog supports deploying both static and server-side rendered apps to [Zerops](https://zerops.io) with a simple configuration file. + +> One Zerops project can contain multiple Analog projects. See example repositories for [static](https://github.com/zeropsio/recipe-analog-static) and [server-side rendered](https://github.com/zeropsio/recipe-analog-nodejs) Analog apps for a quick start. + +### Static (SSG) Analog app + +If your project is not SSG Ready, set up your project for [Static Site Generation](/docs/features/server/static-site-generation). + +#### 1. Create a project in Zerops + +Projects and services can be added either through a [Project add](https://app.zerops.io/dashboard/project-add) wizard or imported using a YAML structure: + +```yml +project: + name: recipe-analog +services: + - hostname: app + type: static +``` + +This creates a project called `recipe-analog` with a Zerops Static service called `app`. + +#### 2. Add zerops.yml configuration + +To tell Zerops how to build and run your site, add a `zerops.yml` to your repository: + +```yml +zerops: + - setup: app + build: + base: nodejs@20 + buildCommands: + - pnpm i + - pnpm build + deployFiles: + - public + - dist/analog/public/~ + run: + base: static +``` + +#### 3. [Trigger the build & deploy pipeline](#build--deploy-your-code) + +### Server-side rendered (SSR) Analog app + +If your project is not SSR Ready, set up your project for [Server Side Rendering](/docs/features/server/server-side-rendering). + +#### 1. Create a project in Zerops + +Projects and services can be added either through a [Project add](https://app.zerops.io/dashboard/project-add) wizard or imported using a YAML structure: + +```yml +project: + name: recipe-analog +services: + - hostname: app + type: nodejs@20 +``` + +This creates a project called `recipe-analog` with a Zerops Node.js service called `app`. + +#### 2. Add zerops.yml configuration + +To tell Zerops how to build and run your site, add a `zerops.yml` to your repository: + +```yml +zerops: + - setup: app + build: + base: nodejs@20 + buildCommands: + - pnpm i + - pnpm build + deployFiles: + - public + - node_modules + - dist + run: + base: nodejs@20 + ports: + - port: 3000 + httpSupport: true + start: node dist/analog/server/index.mjs +``` + +#### 3. [Trigger the build & deploy pipeline](#build-deploy-your-code) + +--- + +### Build & deploy your code + +#### Trigger the pipeline by connecting the service with your GitHub / GitLab repository + +Your code can be deployed automatically on each commit or a new tag by connecting the service with your GitHub / GitLab repository. This connection can be set up in the service detail. + +#### Trigger the pipeline using Zerops CLI (zcli) + +You can also trigger the pipeline manually from your terminal or your existing CI/CD by using Zerops CLI. + +1. Install the Zerops CLI. + +```bash +# To download the zcli binary directly, +# use https://github.com/zeropsio/zcli/releases +npm i -g @zerops/zcli +``` + +2. Open [Settings > Access Token Management](https://app.zerops.io/settings/token-management) in the Zerops app and generate a new access token. + +3. Log in using your access token with the following command: + +```bash +zcli login +``` + +4. Navigate to the root of your app (where `zerops.yml` is located) and run the following command to trigger the deploy: + +```bash +zcli push +``` + +#### Trigger the pipeline using GitHub / Gitlab + +You can also check out [Github Integration](https://docs.zerops.io/references/github-integration) / [Gitlab Integration](https://docs.zerops.io/references/gitlab-integration) in [Zerops Docs](https://docs.zerops.io/) for git integration. + ## Netlify Analog supports deploying on [Netlify](https://netlify.com/) with minimal configuration. @@ -161,9 +292,17 @@ BUILD_PRESET=cloudflare-pages npm run build npx wrangler pages dev ./dist/analog/public ``` -## Firebase +## Firebase App Hosting + +Analog supports [Firebase App Hosting](https://firebase.google.com/docs/app-hosting) with no additional configuration out of the box. + +**Note**: You need to be on the **Blaze plan** to deploy Analog applications with Firebase App Hosting. -Analog supports [Firebase Hosting](https://firebase.google.com/docs/hosting) with Cloud Functions out of the box. +Follow the [Getting Started instructions](https://firebase.google.com/docs/app-hosting/get-started#step-1:) to connect your GitHub repository to Firebase App Hosting. + +## Firebase Hosting + +Analog supports [Firebase Hosting](https://firebase.google.com/docs/hosting) with Cloud Functions and [Firebase App Hosting](https://firebase.google.com/docs/app-hosting) out of the box. See a [Sample Repo](https://github.com/brandonroberts/analog-angular-firebase-example) with Firebase configured @@ -462,132 +601,3 @@ jobs: echo "DRY_RUN_OPTION=$DRY_RUN_OPTION" npx angular-cli-ghpages --no-silent --dir="${{env.TARGET_DIR}}" $CNAME_OPTION $DRY_RUN_OPTION ``` - -## Zerops - -Analog supports deploying both static and server-side rendered apps to [Zerops](https://zerops.io) with a simple configuration file. - -:::info -One Zerops project can contain multiple Analog projects. See example repositories for [static](https://github.com/zeropsio/recipe-analog-static) and [server-side rendered](https://github.com/zeropsio/recipe-analog-nodejs) Analog apps for a quick start. -::: - -### Static (SSG) Analog app - -If your project is not SSG Ready, set up your project for [Static Site Generation](/docs/features/server/static-site-generation). - -#### 1. Create a project in Zerops - -Projects and services can be added either through a [Project add](https://app.zerops.io/dashboard/project-add) wizard or imported using a YAML structure: - -```yml -project: - name: recipe-analog -services: - - hostname: app - type: static -``` - -This creates a project called `recipe-analog` with a Zerops Static service called `app`. - -#### 2. Add zerops.yml configuration - -To tell Zerops how to build and run your site, add a `zerops.yml` to your repository: - -```yml -zerops: - - setup: app - build: - base: nodejs@20 - buildCommands: - - pnpm i - - pnpm build - deployFiles: - - public - - dist/analog/public/~ - run: - base: static -``` - -#### 3. [Trigger the build & deploy pipeline](#build--deploy-your-code) - -### Server-side rendered (SSR) Analog app - -If your project is not SSR Ready, set up your project for [Server Side Rendering](/docs/features/server/server-side-rendering). - -#### 1. Create a project in Zerops - -Projects and services can be added either through a [Project add](https://app.zerops.io/dashboard/project-add) wizard or imported using a YAML structure: - -```yml -project: - name: recipe-analog -services: - - hostname: app - type: nodejs@20 -``` - -This creates a project called `recipe-analog` with a Zerops Node.js service called `app`. - -#### 2. Add zerops.yml configuration - -To tell Zerops how to build and run your site, add a `zerops.yml` to your repository: - -```yml -zerops: - - setup: app - build: - base: nodejs@20 - buildCommands: - - pnpm i - - pnpm build - deployFiles: - - public - - node_modules - - dist - run: - base: nodejs@20 - ports: - - port: 3000 - httpSupport: true - start: node dist/analog/server/index.mjs -``` - -#### 3. [Trigger the build & deploy pipeline](#build-deploy-your-code) - ---- - -### Build & deploy your code - -#### Trigger the pipeline by connecting the service with your GitHub / GitLab repository - -Your code can be deployed automatically on each commit or a new tag by connecting the service with your GitHub / GitLab repository. This connection can be set up in the service detail. - -#### Trigger the pipeline using Zerops CLI (zcli) - -You can also trigger the pipeline manually from your terminal or your existing CI/CD by using Zerops CLI. - -1. Install the Zerops CLI. - -```bash -# To download the zcli binary directly, -# use https://github.com/zeropsio/zcli/releases -npm i -g @zerops/zcli -``` - -2. Open [Settings > Access Token Management](https://app.zerops.io/settings/token-management) in the Zerops app and generate a new access token. - -3. Log in using your access token with the following command: - -```bash -zcli login -``` - -4. Navigate to the root of your app (where `zerops.yml` is located) and run the following command to trigger the deploy: - -```bash -zcli push -``` - -#### Trigger the pipeline using Github / Gitlab - -You can also check out [Github Integration](https://docs.zerops.io/references/github-integration) / [Gitlab Integration](https://docs.zerops.io/references/gitlab-integration) in [Zerops Docs](https://docs.zerops.io/) for git integration. diff --git a/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts b/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts index ffc646b95..02dc37589 100644 --- a/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts +++ b/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts @@ -174,6 +174,10 @@ export function nitro(options?: Options, nitroOptions?: NitroConfig): Plugin[] { nitroConfig = withCloudflareOutput(nitroConfig); } + if (isFirebaseAppHosting()) { + nitroConfig = withAppHostingOutput(nitroConfig); + } + if (!ssrBuild && !isTest) { // store the client output path for the SSR build config clientOutputPath = resolve( @@ -434,3 +438,40 @@ const withCloudflareOutput = (nitroConfig: NitroConfig | undefined) => ({ serverDir: '{{ output.publicDir }}/_worker.js', }, }); + +const isFirebaseAppHosting = () => !!process.env['NG_BUILD_LOGS_JSON']; +const withAppHostingOutput = (nitroConfig: NitroConfig) => { + let hasOutput = false; + + return { + ...nitroConfig, + serveStatic: true, + rollupConfig: { + ...nitroConfig.rollupConfig, + output: { + ...nitroConfig.rollupConfig?.output, + entryFileNames: 'server.mjs', + }, + }, + hooks: { + ...nitroConfig.hooks, + compiled: () => { + if (!hasOutput) { + const buildOutput = { + errors: [], + warnings: [], + outputPaths: { + root: `${nitroConfig.output?.dir}`, + browser: `${nitroConfig.output?.publicDir}`, + server: `${nitroConfig.output?.dir}/server`, + }, + }; + + // Log the build output for Firebase App Hosting to pick up + console.log(JSON.stringify(buildOutput, null, 2)); + hasOutput = true; + } + }, + }, + }; +}; From d9bc6344730d93f1aa9165133536d44184182b32 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 30 Dec 2024 18:32:32 +0000 Subject: [PATCH 08/30] chore: release 1.11.0-beta.5 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 802cb5435..73d8a164e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.11.0-beta.5](https://github.com/analogjs/analog/compare/v1.11.0-beta.4...v1.11.0-beta.5) (2024-12-30) + +### Features + +- **vite-plugin-nitro:** add support for Firebase App Hosting deployment ([#1529](https://github.com/analogjs/analog/issues/1529)) ([3657bf1](https://github.com/analogjs/analog/commit/3657bf17c1f2c3ee03bd008de008b6fdf80b2795)) + # [1.11.0-beta.4](https://github.com/analogjs/analog/compare/v1.11.0-beta.3...v1.11.0-beta.4) (2024-12-28) ### Bug Fixes diff --git a/package.json b/package.json index 2669a3eb3..825381e83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.11.0-beta.4", + "version": "1.11.0-beta.5", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index a3d3b37ea..33ba24f87 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.11.0-beta.4", + "version": "1.11.0-beta.5", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.11.0-beta.4" + "@analogjs/vite-plugin-angular": "^1.11.0-beta.5" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 8b5ea82d4..247811cde 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.11.0-beta.4", + "version": "1.11.0-beta.5", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 16a2fb2f5..3cd6db1c8 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.11.0-beta.4", + "version": "1.11.0-beta.5", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index da8f543d2..f0eb95181 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.4", - "@analogjs/router": "^1.11.0-beta.4", + "@analogjs/content": "^1.11.0-beta.5", + "@analogjs/router": "^1.11.0-beta.5", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", - "@analogjs/vitest-angular": "^1.11.0-beta.4", + "@analogjs/platform": "^1.11.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", + "@analogjs/vitest-angular": "^1.11.0-beta.5", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index 805a13340..1e1247583 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.4", - "@analogjs/router": "^1.11.0-beta.4", + "@analogjs/content": "^1.11.0-beta.5", + "@analogjs/router": "^1.11.0-beta.5", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", - "@analogjs/vitest-angular": "^1.11.0-beta.4", + "@analogjs/platform": "^1.11.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", + "@analogjs/vitest-angular": "^1.11.0-beta.5", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index 603c16674..2f396da55 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.4", - "@analogjs/router": "^1.11.0-beta.4", + "@analogjs/content": "^1.11.0-beta.5", + "@analogjs/router": "^1.11.0-beta.5", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", - "@analogjs/vitest-angular": "^1.11.0-beta.4", + "@analogjs/platform": "^1.11.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", + "@analogjs/vitest-angular": "^1.11.0-beta.5", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 7188e0ce0..34bc61702 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.4", - "@analogjs/router": "^1.11.0-beta.4", + "@analogjs/content": "^1.11.0-beta.5", + "@analogjs/router": "^1.11.0-beta.5", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", - "@analogjs/vitest-angular": "^1.11.0-beta.4", + "@analogjs/platform": "^1.11.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", + "@analogjs/vitest-angular": "^1.11.0-beta.5", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index c439d23a7..0dfb385e2 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.4", - "@analogjs/router": "^1.11.0-beta.4", + "@analogjs/content": "^1.11.0-beta.5", + "@analogjs/router": "^1.11.0-beta.5", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", - "@analogjs/vitest-angular": "^1.11.0-beta.4", + "@analogjs/platform": "^1.11.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", + "@analogjs/vitest-angular": "^1.11.0-beta.5", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index c439d23a7..0dfb385e2 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.4", - "@analogjs/router": "^1.11.0-beta.4", + "@analogjs/content": "^1.11.0-beta.5", + "@analogjs/router": "^1.11.0-beta.5", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", - "@analogjs/vitest-angular": "^1.11.0-beta.4", + "@analogjs/platform": "^1.11.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", + "@analogjs/vitest-angular": "^1.11.0-beta.5", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index dfd66b2b3..d68d5130b 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.11.0-beta.4", + "version": "1.11.0-beta.5", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.4", - "@analogjs/vite-plugin-nitro": "^1.11.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", + "@analogjs/vite-plugin-nitro": "^1.11.0-beta.5", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index ae83e49c3..5526fd011 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.11.0-beta.4", + "version": "1.11.0-beta.5", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.11.0-beta.4", + "@analogjs/content": "^1.11.0-beta.5", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 7b0439fbe..ee20bef3e 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.11.0-beta.4", + "version": "1.11.0-beta.5", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 114bd535a..db8b361f9 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.11.0-beta.4", + "version": "1.11.0-beta.5", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index e28ed5feb..f03ab6e99 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.11.0-beta.4", + "version": "1.11.0-beta.5", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From 09b1fa57a5dd038d5631febe5091311c0d9e1050 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 30 Dec 2024 12:53:16 -0600 Subject: [PATCH 09/30] fix(vite-plugin-nitro): normalize outputPaths for app hosting --- packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts b/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts index 02dc37589..471ef7d95 100644 --- a/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts +++ b/packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts @@ -4,7 +4,7 @@ import type { Plugin, UserConfig, ViteDevServer } from 'vite'; import { mergeConfig, normalizePath } from 'vite'; import { dirname, join, relative, resolve } from 'node:path'; import { platform } from 'node:os'; -import { fileURLToPath } from 'node:url'; +import { fileURLToPath, pathToFileURL } from 'node:url'; import { readFileSync, writeFileSync } from 'node:fs'; import { buildServer } from './build-server.js'; @@ -461,9 +461,9 @@ const withAppHostingOutput = (nitroConfig: NitroConfig) => { errors: [], warnings: [], outputPaths: { - root: `${nitroConfig.output?.dir}`, - browser: `${nitroConfig.output?.publicDir}`, - server: `${nitroConfig.output?.dir}/server`, + root: pathToFileURL(`${nitroConfig.output?.dir}`), + browser: pathToFileURL(`${nitroConfig.output?.publicDir}`), + server: pathToFileURL(`${nitroConfig.output?.dir}/server`), }, }; From 930b6f0714b5f593ed5ce797e2284a2f15596d87 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 30 Dec 2024 18:55:08 +0000 Subject: [PATCH 10/30] chore: release 1.11.0-beta.6 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73d8a164e..89f149886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.11.0-beta.6](https://github.com/analogjs/analog/compare/v1.11.0-beta.5...v1.11.0-beta.6) (2024-12-30) + +### Bug Fixes + +- **vite-plugin-nitro:** normalize outputPaths for app hosting ([09b1fa5](https://github.com/analogjs/analog/commit/09b1fa57a5dd038d5631febe5091311c0d9e1050)) + # [1.11.0-beta.5](https://github.com/analogjs/analog/compare/v1.11.0-beta.4...v1.11.0-beta.5) (2024-12-30) ### Features diff --git a/package.json b/package.json index 825381e83..fc4530aa7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.11.0-beta.5", + "version": "1.11.0-beta.6", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 33ba24f87..05920d1cf 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.11.0-beta.5", + "version": "1.11.0-beta.6", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.11.0-beta.5" + "@analogjs/vite-plugin-angular": "^1.11.0-beta.6" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 247811cde..4cc6b8bb7 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.11.0-beta.5", + "version": "1.11.0-beta.6", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 3cd6db1c8..910f2f1b7 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.11.0-beta.5", + "version": "1.11.0-beta.6", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index f0eb95181..6b128b7b3 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.5", - "@analogjs/router": "^1.11.0-beta.5", + "@analogjs/content": "^1.11.0-beta.6", + "@analogjs/router": "^1.11.0-beta.6", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", - "@analogjs/vitest-angular": "^1.11.0-beta.5", + "@analogjs/platform": "^1.11.0-beta.6", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", + "@analogjs/vitest-angular": "^1.11.0-beta.6", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index 1e1247583..a2a53a459 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.5", - "@analogjs/router": "^1.11.0-beta.5", + "@analogjs/content": "^1.11.0-beta.6", + "@analogjs/router": "^1.11.0-beta.6", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", - "@analogjs/vitest-angular": "^1.11.0-beta.5", + "@analogjs/platform": "^1.11.0-beta.6", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", + "@analogjs/vitest-angular": "^1.11.0-beta.6", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index 2f396da55..b2bd10ca7 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.5", - "@analogjs/router": "^1.11.0-beta.5", + "@analogjs/content": "^1.11.0-beta.6", + "@analogjs/router": "^1.11.0-beta.6", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", - "@analogjs/vitest-angular": "^1.11.0-beta.5", + "@analogjs/platform": "^1.11.0-beta.6", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", + "@analogjs/vitest-angular": "^1.11.0-beta.6", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 34bc61702..42d5b440d 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.5", - "@analogjs/router": "^1.11.0-beta.5", + "@analogjs/content": "^1.11.0-beta.6", + "@analogjs/router": "^1.11.0-beta.6", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", - "@analogjs/vitest-angular": "^1.11.0-beta.5", + "@analogjs/platform": "^1.11.0-beta.6", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", + "@analogjs/vitest-angular": "^1.11.0-beta.6", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index 0dfb385e2..1f25e68e4 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.5", - "@analogjs/router": "^1.11.0-beta.5", + "@analogjs/content": "^1.11.0-beta.6", + "@analogjs/router": "^1.11.0-beta.6", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", - "@analogjs/vitest-angular": "^1.11.0-beta.5", + "@analogjs/platform": "^1.11.0-beta.6", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", + "@analogjs/vitest-angular": "^1.11.0-beta.6", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index 0dfb385e2..1f25e68e4 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.5", - "@analogjs/router": "^1.11.0-beta.5", + "@analogjs/content": "^1.11.0-beta.6", + "@analogjs/router": "^1.11.0-beta.6", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", - "@analogjs/vitest-angular": "^1.11.0-beta.5", + "@analogjs/platform": "^1.11.0-beta.6", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", + "@analogjs/vitest-angular": "^1.11.0-beta.6", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index d68d5130b..bf785c0ed 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.11.0-beta.5", + "version": "1.11.0-beta.6", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.5", - "@analogjs/vite-plugin-nitro": "^1.11.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", + "@analogjs/vite-plugin-nitro": "^1.11.0-beta.6", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index 5526fd011..bfb5fd11a 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.11.0-beta.5", + "version": "1.11.0-beta.6", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.11.0-beta.5", + "@analogjs/content": "^1.11.0-beta.6", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index ee20bef3e..2cd607bfe 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.11.0-beta.5", + "version": "1.11.0-beta.6", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index db8b361f9..ccc1d7e9d 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.11.0-beta.5", + "version": "1.11.0-beta.6", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index f03ab6e99..3de333adf 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.11.0-beta.5", + "version": "1.11.0-beta.6", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From c43491bd97f2928fa27d2e22ac3a18fca9a2194b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 31 Dec 2024 22:24:50 +0000 Subject: [PATCH 11/30] chore: release 1.11.0 [skip ci] --- CHANGELOG.md | 15 +++++++++++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../template-angular-v16/package.json | 10 +++++----- .../template-angular-v17/package.json | 10 +++++----- .../template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- .../create-analog/template-latest/package.json | 10 +++++----- .../create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 58 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f149886..da1f5a61f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# [1.11.0](https://github.com/analogjs/analog/compare/v1.10.3...v1.11.0) (2024-12-31) + +### Bug Fixes + +- **vite-plugin-angular:** invalidation fixes for HMR/live reload ([#1526](https://github.com/analogjs/analog/issues/1526)) ([7b783d9](https://github.com/analogjs/analog/commit/7b783d9d114f5050a14786254aab6d3f198cc893)) +- **vite-plugin-nitro:** normalize outputPaths for app hosting ([09b1fa5](https://github.com/analogjs/analog/commit/09b1fa57a5dd038d5631febe5091311c0d9e1050)) +- **vitest-angular:** reuse vitest server in watch mode for build-test ([#1519](https://github.com/analogjs/analog/issues/1519)) ([724d1f1](https://github.com/analogjs/analog/commit/724d1f13caa55c6fc315321ef75d29eff9b96e41)) + +### Features + +- **router:** introduce support for Analog Server Components ([#1518](https://github.com/analogjs/analog/issues/1518)) ([44289b0](https://github.com/analogjs/analog/commit/44289b0008a9a62288d22866ec089f48fa502d80)) +- **vite-plugin-angular:** introduce support for Angular v19 HMR/live reload ([#1523](https://github.com/analogjs/analog/issues/1523)) ([0602a8f](https://github.com/analogjs/analog/commit/0602a8f79ae3c16897c966f3defe7ac3309c32a6)) +- **vite-plugin-nitro:** add support for Firebase App Hosting deployment ([#1529](https://github.com/analogjs/analog/issues/1529)) ([3657bf1](https://github.com/analogjs/analog/commit/3657bf17c1f2c3ee03bd008de008b6fdf80b2795)) +- **vitest-angular:** add UI and coverage options to test builder ([#1521](https://github.com/analogjs/analog/issues/1521)) ([026b3dc](https://github.com/analogjs/analog/commit/026b3dce2f5cfe07da65922496b4c366642b3788)) + # [1.11.0-beta.6](https://github.com/analogjs/analog/compare/v1.11.0-beta.5...v1.11.0-beta.6) (2024-12-30) ### Bug Fixes diff --git a/package.json b/package.json index fc4530aa7..50f5b6b3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.11.0-beta.6", + "version": "1.11.0", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 05920d1cf..382214288 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.11.0-beta.6", + "version": "1.11.0", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.11.0-beta.6" + "@analogjs/vite-plugin-angular": "^1.11.0" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 4cc6b8bb7..3090209b6 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.11.0-beta.6", + "version": "1.11.0", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 910f2f1b7..edf7db07b 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.11.0-beta.6", + "version": "1.11.0", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index 6b128b7b3..f7940eb57 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.6", - "@analogjs/router": "^1.11.0-beta.6", + "@analogjs/content": "^1.11.0", + "@analogjs/router": "^1.11.0", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.6", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", - "@analogjs/vitest-angular": "^1.11.0-beta.6", + "@analogjs/platform": "^1.11.0", + "@analogjs/vite-plugin-angular": "^1.11.0", + "@analogjs/vitest-angular": "^1.11.0", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index a2a53a459..ad90cb5f2 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0-beta.6", - "@analogjs/router": "^1.11.0-beta.6", + "@analogjs/content": "^1.11.0", + "@analogjs/router": "^1.11.0", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.6", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", - "@analogjs/vitest-angular": "^1.11.0-beta.6", + "@analogjs/platform": "^1.11.0", + "@analogjs/vite-plugin-angular": "^1.11.0", + "@analogjs/vitest-angular": "^1.11.0", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index b2bd10ca7..35adecff1 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.6", - "@analogjs/router": "^1.11.0-beta.6", + "@analogjs/content": "^1.11.0", + "@analogjs/router": "^1.11.0", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.6", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", - "@analogjs/vitest-angular": "^1.11.0-beta.6", + "@analogjs/platform": "^1.11.0", + "@analogjs/vite-plugin-angular": "^1.11.0", + "@analogjs/vitest-angular": "^1.11.0", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 42d5b440d..c6603de4d 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.6", - "@analogjs/router": "^1.11.0-beta.6", + "@analogjs/content": "^1.11.0", + "@analogjs/router": "^1.11.0", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.6", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", - "@analogjs/vitest-angular": "^1.11.0-beta.6", + "@analogjs/platform": "^1.11.0", + "@analogjs/vite-plugin-angular": "^1.11.0", + "@analogjs/vitest-angular": "^1.11.0", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index 1f25e68e4..323f088e1 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.6", - "@analogjs/router": "^1.11.0-beta.6", + "@analogjs/content": "^1.11.0", + "@analogjs/router": "^1.11.0", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.6", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", - "@analogjs/vitest-angular": "^1.11.0-beta.6", + "@analogjs/platform": "^1.11.0", + "@analogjs/vite-plugin-angular": "^1.11.0", + "@analogjs/vitest-angular": "^1.11.0", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index 1f25e68e4..323f088e1 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0-beta.6", - "@analogjs/router": "^1.11.0-beta.6", + "@analogjs/content": "^1.11.0", + "@analogjs/router": "^1.11.0", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0-beta.6", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", - "@analogjs/vitest-angular": "^1.11.0-beta.6", + "@analogjs/platform": "^1.11.0", + "@analogjs/vite-plugin-angular": "^1.11.0", + "@analogjs/vitest-angular": "^1.11.0", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index bf785c0ed..46713ad60 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.11.0-beta.6", + "version": "1.11.0", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.11.0-beta.6", - "@analogjs/vite-plugin-nitro": "^1.11.0-beta.6", + "@analogjs/vite-plugin-angular": "^1.11.0", + "@analogjs/vite-plugin-nitro": "^1.11.0", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index bfb5fd11a..c8979638b 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.11.0-beta.6", + "version": "1.11.0", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.11.0-beta.6", + "@analogjs/content": "^1.11.0", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 2cd607bfe..e6c7db8df 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.11.0-beta.6", + "version": "1.11.0", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index ccc1d7e9d..5a884d0e1 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.11.0-beta.6", + "version": "1.11.0", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index 3de333adf..e21171bb7 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.11.0-beta.6", + "version": "1.11.0", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From 4610be7378392662bec3a56f63290cc15ce721cc Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Fri, 3 Jan 2025 12:43:35 -0600 Subject: [PATCH 12/30] fix(vite-plugin-angular): skip rebuilds before invalidation during testing (#1536) --- packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts index 987d80a05..6eed18244 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts @@ -509,9 +509,11 @@ export function angular(options?: PluginOptions): Plugin[] { if (isTest) { const tsMod = viteServer?.moduleGraph.getModuleById(id); if (tsMod) { - sourceFileCache.invalidate([id]); + const invalidated = tsMod.lastInvalidationTimestamp; + + if (testWatchMode && invalidated) { + sourceFileCache.invalidate([id]); - if (testWatchMode) { await buildAndAnalyze(); } } From b6f4d2c020718cc855ecd2c69658e578a2e6f2bb Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 3 Jan 2025 18:44:17 +0000 Subject: [PATCH 13/30] chore: release 1.11.1-beta.1 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da1f5a61f..27a6d71ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.11.1-beta.1](https://github.com/analogjs/analog/compare/v1.11.0...v1.11.1-beta.1) (2025-01-03) + +### Bug Fixes + +- **vite-plugin-angular:** skip rebuilds before invalidation during testing ([#1536](https://github.com/analogjs/analog/issues/1536)) ([4610be7](https://github.com/analogjs/analog/commit/4610be7378392662bec3a56f63290cc15ce721cc)) + # [1.11.0](https://github.com/analogjs/analog/compare/v1.10.3...v1.11.0) (2024-12-31) ### Bug Fixes diff --git a/package.json b/package.json index 50f5b6b3b..eac3a77e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.11.0", + "version": "1.11.1-beta.1", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 382214288..4c945b4d8 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.11.0", + "version": "1.11.1-beta.1", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.11.0" + "@analogjs/vite-plugin-angular": "^1.11.1-beta.1" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 3090209b6..4681e5e75 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.11.0", + "version": "1.11.1-beta.1", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index edf7db07b..043a8c80b 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.11.0", + "version": "1.11.1-beta.1", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index f7940eb57..fb6bcca66 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0", - "@analogjs/router": "^1.11.0", + "@analogjs/content": "^1.11.1-beta.1", + "@analogjs/router": "^1.11.1-beta.1", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0", - "@analogjs/vite-plugin-angular": "^1.11.0", - "@analogjs/vitest-angular": "^1.11.0", + "@analogjs/platform": "^1.11.1-beta.1", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", + "@analogjs/vitest-angular": "^1.11.1-beta.1", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index ad90cb5f2..bf81456e5 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.0", - "@analogjs/router": "^1.11.0", + "@analogjs/content": "^1.11.1-beta.1", + "@analogjs/router": "^1.11.1-beta.1", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0", - "@analogjs/vite-plugin-angular": "^1.11.0", - "@analogjs/vitest-angular": "^1.11.0", + "@analogjs/platform": "^1.11.1-beta.1", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", + "@analogjs/vitest-angular": "^1.11.1-beta.1", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index 35adecff1..1df362924 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0", - "@analogjs/router": "^1.11.0", + "@analogjs/content": "^1.11.1-beta.1", + "@analogjs/router": "^1.11.1-beta.1", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.11.0", - "@analogjs/vite-plugin-angular": "^1.11.0", - "@analogjs/vitest-angular": "^1.11.0", + "@analogjs/platform": "^1.11.1-beta.1", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", + "@analogjs/vitest-angular": "^1.11.1-beta.1", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index c6603de4d..a5043301c 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0", - "@analogjs/router": "^1.11.0", + "@analogjs/content": "^1.11.1-beta.1", + "@analogjs/router": "^1.11.1-beta.1", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0", - "@analogjs/vite-plugin-angular": "^1.11.0", - "@analogjs/vitest-angular": "^1.11.0", + "@analogjs/platform": "^1.11.1-beta.1", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", + "@analogjs/vitest-angular": "^1.11.1-beta.1", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index 323f088e1..4c6df7847 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0", - "@analogjs/router": "^1.11.0", + "@analogjs/content": "^1.11.1-beta.1", + "@analogjs/router": "^1.11.1-beta.1", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0", - "@analogjs/vite-plugin-angular": "^1.11.0", - "@analogjs/vitest-angular": "^1.11.0", + "@analogjs/platform": "^1.11.1-beta.1", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", + "@analogjs/vitest-angular": "^1.11.1-beta.1", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index 323f088e1..4c6df7847 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.0", - "@analogjs/router": "^1.11.0", + "@analogjs/content": "^1.11.1-beta.1", + "@analogjs/router": "^1.11.1-beta.1", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.0", - "@analogjs/vite-plugin-angular": "^1.11.0", - "@analogjs/vitest-angular": "^1.11.0", + "@analogjs/platform": "^1.11.1-beta.1", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", + "@analogjs/vitest-angular": "^1.11.1-beta.1", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index 46713ad60..522040f5e 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.11.0", + "version": "1.11.1-beta.1", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.11.0", - "@analogjs/vite-plugin-nitro": "^1.11.0", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", + "@analogjs/vite-plugin-nitro": "^1.11.1-beta.1", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index c8979638b..dc46f9b15 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.11.0", + "version": "1.11.1-beta.1", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.11.0", + "@analogjs/content": "^1.11.1-beta.1", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index e6c7db8df..eac35c123 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.11.0", + "version": "1.11.1-beta.1", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 5a884d0e1..2ad1820a6 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.11.0", + "version": "1.11.1-beta.1", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index e21171bb7..1692ed5a9 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.11.0", + "version": "1.11.1-beta.1", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From e6e81985d3d67d70e2036e969c2952e34f3da583 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Fri, 3 Jan 2025 18:51:32 -0600 Subject: [PATCH 14/30] ci: skip caching for Vite Ecosystem CI tests, fix segfault with node 22 for card tests (#1537) --- libs/card/vite.config.ts | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/card/vite.config.ts b/libs/card/vite.config.ts index d68a9fa3a..809e466d2 100644 --- a/libs/card/vite.config.ts +++ b/libs/card/vite.config.ts @@ -15,6 +15,7 @@ export default defineConfig(({ mode }) => { setupFiles: ['src/test-setup.ts'], include: ['**/*.spec.ts'], cacheDir: '../../node_modules/.vitest', + pool: 'vmForks', }, define: { 'import.meta.vitest': mode !== 'production', diff --git a/package.json b/package.json index eac3a77e8..b6cfd7901 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "e2e": "nx run-many --target e2e --projects create-analog-e2e,analog-app-e2e-cypress --parallel=1 --exclude analog-app-e2e-playwright", "test": "nx run-many --target test", "build:vite-ci": "npm run build", - "test:vite-ci": "nx run-many --target test --all", + "test:vite-ci": "nx run-many --target test --all --skip-nx-cache", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", "contributors:add": "all-contributors add", "contributors:generate": "all-contributors generate", From ee67cc62d3bce1b0190e28d3b542a520137798c7 Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Mon, 6 Jan 2025 14:56:54 +0000 Subject: [PATCH 15/30] fix(vite-plugin-angular): fix HMR of component styles w/tsconfig flag (#1539) --- packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts index 6eed18244..f07fb4766 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts @@ -712,6 +712,7 @@ export function angular(options?: PluginOptions): Plugin[] { if (pluginOptions.liveReload) { tsCompilerOptions['_enableHmr'] = true; + tsCompilerOptions['externalRuntimeStyles'] = true; // Workaround for https://github.com/angular/angular/issues/59310 // Force extra instructions to be generated for HMR w/defer tsCompilerOptions['supportTestBed'] = true; From bd8ed00bf8632b51c151ba3d5e652968eedeebba Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 6 Jan 2025 14:57:37 +0000 Subject: [PATCH 16/30] chore: release 1.11.1-beta.2 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27a6d71ad..dd75d6961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.11.1-beta.2](https://github.com/analogjs/analog/compare/v1.11.1-beta.1...v1.11.1-beta.2) (2025-01-06) + +### Bug Fixes + +- **vite-plugin-angular:** fix HMR of component styles w/tsconfig flag ([#1539](https://github.com/analogjs/analog/issues/1539)) ([ee67cc6](https://github.com/analogjs/analog/commit/ee67cc62d3bce1b0190e28d3b542a520137798c7)) + ## [1.11.1-beta.1](https://github.com/analogjs/analog/compare/v1.11.0...v1.11.1-beta.1) (2025-01-03) ### Bug Fixes diff --git a/package.json b/package.json index b6cfd7901..99bd36e34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.11.1-beta.1", + "version": "1.11.1-beta.2", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 4c945b4d8..8e4a08c20 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.11.1-beta.1", + "version": "1.11.1-beta.2", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.11.1-beta.1" + "@analogjs/vite-plugin-angular": "^1.11.1-beta.2" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 4681e5e75..0c4f86af9 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.11.1-beta.1", + "version": "1.11.1-beta.2", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 043a8c80b..2c47dea4f 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.11.1-beta.1", + "version": "1.11.1-beta.2", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index fb6bcca66..fbf09f16a 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.1-beta.1", - "@analogjs/router": "^1.11.1-beta.1", + "@analogjs/content": "^1.11.1-beta.2", + "@analogjs/router": "^1.11.1-beta.2", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", - "@analogjs/vitest-angular": "^1.11.1-beta.1", + "@analogjs/platform": "^1.11.1-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", + "@analogjs/vitest-angular": "^1.11.1-beta.2", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index bf81456e5..88901103c 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.1-beta.1", - "@analogjs/router": "^1.11.1-beta.1", + "@analogjs/content": "^1.11.1-beta.2", + "@analogjs/router": "^1.11.1-beta.2", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", - "@analogjs/vitest-angular": "^1.11.1-beta.1", + "@analogjs/platform": "^1.11.1-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", + "@analogjs/vitest-angular": "^1.11.1-beta.2", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index 1df362924..f01e398cd 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.1-beta.1", - "@analogjs/router": "^1.11.1-beta.1", + "@analogjs/content": "^1.11.1-beta.2", + "@analogjs/router": "^1.11.1-beta.2", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", - "@analogjs/vitest-angular": "^1.11.1-beta.1", + "@analogjs/platform": "^1.11.1-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", + "@analogjs/vitest-angular": "^1.11.1-beta.2", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index a5043301c..b477fa39a 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.1-beta.1", - "@analogjs/router": "^1.11.1-beta.1", + "@analogjs/content": "^1.11.1-beta.2", + "@analogjs/router": "^1.11.1-beta.2", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", - "@analogjs/vitest-angular": "^1.11.1-beta.1", + "@analogjs/platform": "^1.11.1-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", + "@analogjs/vitest-angular": "^1.11.1-beta.2", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index 4c6df7847..d59666522 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.1-beta.1", - "@analogjs/router": "^1.11.1-beta.1", + "@analogjs/content": "^1.11.1-beta.2", + "@analogjs/router": "^1.11.1-beta.2", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", - "@analogjs/vitest-angular": "^1.11.1-beta.1", + "@analogjs/platform": "^1.11.1-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", + "@analogjs/vitest-angular": "^1.11.1-beta.2", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index 4c6df7847..d59666522 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.1-beta.1", - "@analogjs/router": "^1.11.1-beta.1", + "@analogjs/content": "^1.11.1-beta.2", + "@analogjs/router": "^1.11.1-beta.2", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.1", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", - "@analogjs/vitest-angular": "^1.11.1-beta.1", + "@analogjs/platform": "^1.11.1-beta.2", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", + "@analogjs/vitest-angular": "^1.11.1-beta.2", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index 522040f5e..ad2f35a39 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.11.1-beta.1", + "version": "1.11.1-beta.2", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.1", - "@analogjs/vite-plugin-nitro": "^1.11.1-beta.1", + "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", + "@analogjs/vite-plugin-nitro": "^1.11.1-beta.2", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index dc46f9b15..f59b26a08 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.11.1-beta.1", + "version": "1.11.1-beta.2", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.11.1-beta.1", + "@analogjs/content": "^1.11.1-beta.2", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index eac35c123..b229185fa 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.11.1-beta.1", + "version": "1.11.1-beta.2", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 2ad1820a6..62603b7f0 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.11.1-beta.1", + "version": "1.11.1-beta.2", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index 1692ed5a9..8b3f98d85 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.11.1-beta.1", + "version": "1.11.1-beta.2", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From 56b0ffe42db52d76fc12ee22f895917f2be3b4a5 Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Mon, 6 Jan 2025 14:59:16 +0000 Subject: [PATCH 17/30] feat(vite-plugin-angular): fix .ts typechecking and add disableTypeChecking option (#1538) --- .../src/lib/angular-vite-plugin.ts | 42 ++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts index f07fb4766..cec328932 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts @@ -78,6 +78,7 @@ export interface PluginOptions { include?: string[]; additionalContentDirs?: string[]; liveReload?: boolean; + disableTypeChecking?: boolean; } interface EmitFileResult { @@ -135,6 +136,7 @@ export function angular(options?: PluginOptions): Plugin[] { include: options?.include ?? [], additionalContentDirs: options?.additionalContentDirs ?? [], liveReload: options?.liveReload ?? false, + disableTypeChecking: options?.disableTypeChecking ?? false, }; // The file emitter created during `onStart` that will be used during the build in `onLoad` callbacks for TS files @@ -812,7 +814,8 @@ export function angular(options?: PluginOptions): Plugin[] { ), () => [], angularCompiler!, - pluginOptions.liveReload + pluginOptions.liveReload, + pluginOptions.disableTypeChecking ); } } @@ -831,7 +834,8 @@ export function createFileEmitter( transformers: ts.CustomTransformers = {}, onAfterEmit?: (sourceFile: ts.SourceFile) => void, angularCompiler?: NgtscProgram['compiler'], - liveReload?: boolean + liveReload?: boolean, + disableTypeChecking?: boolean ): FileEmitter { return async (file: string, stale?: ts.SourceFile) => { const sourceFile = program.getSourceFile(file); @@ -848,9 +852,12 @@ export function createFileEmitter( return { dependencies: [], hmrEligible }; } - const diagnostics = angularCompiler - ? angularCompiler.getDiagnosticsForFile(sourceFile, 1) - : []; + const diagnostics = getDiagnosticsForSourceFile( + sourceFile, + !!disableTypeChecking, + program, + angularCompiler + ); const errors = diagnostics .filter((d) => d.category === ts.DiagnosticCategory?.Error) @@ -889,3 +896,28 @@ export function createFileEmitter( return { content, dependencies: [], errors, warnings, hmrUpdateCode }; }; } + +function getDiagnosticsForSourceFile( + sourceFile: ts.SourceFile, + disableTypeChecking: boolean, + program: ts.BuilderProgram, + angularCompiler?: NgtscProgram['compiler'] +) { + const syntacticDiagnostics = program.getSyntacticDiagnostics(sourceFile); + + if (disableTypeChecking) { + // Syntax errors are cheap to compute and the app will not run if there are any + // So always show these types of errors regardless if type checking is disabled + return syntacticDiagnostics; + } + + const semanticDiagnostics = program.getSemanticDiagnostics(sourceFile); + const angularDiagnostics = angularCompiler + ? angularCompiler.getDiagnosticsForFile(sourceFile, 1) + : []; + return [ + ...syntacticDiagnostics, + ...semanticDiagnostics, + ...angularDiagnostics, + ]; +} From df932fe87b89ecf5ae0fa97ccbf5d3fd5727e102 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:59:28 -0600 Subject: [PATCH 18/30] docs: add mattlewis92 as a contributor for code (#1540) Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- apps/docs-app/docs/contributors.mdx | 1 + .../current/contributors.mdx | 1 + .../current/contributors.mdx | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index d9e2ffb63..b071c9af2 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1205,6 +1205,15 @@ "contributions": [ "infra" ] + }, + { + "login": "mattlewis92", + "name": "Matt Lewis", + "avatar_url": "https://avatars.githubusercontent.com/u/6425649?v=4", + "profile": "https://mattlewis.me/", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index a5c715e03..af2c3379a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![All Contributors](https://img.shields.io/badge/all_contributors-127-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-128-orange.svg?style=flat-square)](#contributors-) @@ -276,6 +276,7 @@ Thanks goes to these wonderful people for contributing to Analog ([emoji key](ht Alex Rose-Pizant
Alex Rose-Pizant

🚇 + Matt Lewis
Matt Lewis

💻 diff --git a/apps/docs-app/docs/contributors.mdx b/apps/docs-app/docs/contributors.mdx index 15bc59f00..ddfa06628 100644 --- a/apps/docs-app/docs/contributors.mdx +++ b/apps/docs-app/docs/contributors.mdx @@ -223,6 +223,7 @@ Andres is a software engineer for HeroDevs, Angular and Firebase GDE. Alex Rose-Pizant
Alex Rose-Pizant

🚇 + Matt Lewis
Matt Lewis

💻 diff --git a/apps/docs-app/i18n/de/docusaurus-plugin-content-docs/current/contributors.mdx b/apps/docs-app/i18n/de/docusaurus-plugin-content-docs/current/contributors.mdx index a5ba41148..5f8fe3303 100644 --- a/apps/docs-app/i18n/de/docusaurus-plugin-content-docs/current/contributors.mdx +++ b/apps/docs-app/i18n/de/docusaurus-plugin-content-docs/current/contributors.mdx @@ -223,6 +223,7 @@ Andres ist Softwareentwickler für HeroDevs, Angular und Firebase GDE. Alex Rose-Pizant
Alex Rose-Pizant

🚇 + Matt Lewis
Matt Lewis

💻 diff --git a/apps/docs-app/i18n/es/docusaurus-plugin-content-docs/current/contributors.mdx b/apps/docs-app/i18n/es/docusaurus-plugin-content-docs/current/contributors.mdx index 8c6c194de..ef501305d 100644 --- a/apps/docs-app/i18n/es/docusaurus-plugin-content-docs/current/contributors.mdx +++ b/apps/docs-app/i18n/es/docusaurus-plugin-content-docs/current/contributors.mdx @@ -223,6 +223,7 @@ Andres es un ingeniero en software para HeroDevs, GDE en Angular y Firebase. Alex Rose-Pizant
Alex Rose-Pizant

🚇 + Matt Lewis
Matt Lewis

💻 From 9993ce0f098af3bdc3f5dd9d4b3139c2017e7ce6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 6 Jan 2025 15:00:09 +0000 Subject: [PATCH 19/30] chore: release 1.12.0-beta.1 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd75d6961..635154065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.12.0-beta.1](https://github.com/analogjs/analog/compare/v1.11.1-beta.2...v1.12.0-beta.1) (2025-01-06) + +### Features + +- **vite-plugin-angular:** fix .ts typechecking and add disableTypeChecking option ([#1538](https://github.com/analogjs/analog/issues/1538)) ([56b0ffe](https://github.com/analogjs/analog/commit/56b0ffe42db52d76fc12ee22f895917f2be3b4a5)) + ## [1.11.1-beta.2](https://github.com/analogjs/analog/compare/v1.11.1-beta.1...v1.11.1-beta.2) (2025-01-06) ### Bug Fixes diff --git a/package.json b/package.json index 99bd36e34..d74e53c3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.11.1-beta.2", + "version": "1.12.0-beta.1", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 8e4a08c20..11193625d 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.11.1-beta.2", + "version": "1.12.0-beta.1", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.11.1-beta.2" + "@analogjs/vite-plugin-angular": "^1.12.0-beta.1" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 0c4f86af9..81378d528 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.11.1-beta.2", + "version": "1.12.0-beta.1", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 2c47dea4f..703e97e11 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.11.1-beta.2", + "version": "1.12.0-beta.1", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index fbf09f16a..eb7676396 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.1-beta.2", - "@analogjs/router": "^1.11.1-beta.2", + "@analogjs/content": "^1.12.0-beta.1", + "@analogjs/router": "^1.12.0-beta.1", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", - "@analogjs/vitest-angular": "^1.11.1-beta.2", + "@analogjs/platform": "^1.12.0-beta.1", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", + "@analogjs/vitest-angular": "^1.12.0-beta.1", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index 88901103c..249546b5e 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.11.1-beta.2", - "@analogjs/router": "^1.11.1-beta.2", + "@analogjs/content": "^1.12.0-beta.1", + "@analogjs/router": "^1.12.0-beta.1", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", - "@analogjs/vitest-angular": "^1.11.1-beta.2", + "@analogjs/platform": "^1.12.0-beta.1", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", + "@analogjs/vitest-angular": "^1.12.0-beta.1", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index f01e398cd..2529fb6e9 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.1-beta.2", - "@analogjs/router": "^1.11.1-beta.2", + "@analogjs/content": "^1.12.0-beta.1", + "@analogjs/router": "^1.12.0-beta.1", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", - "@analogjs/vitest-angular": "^1.11.1-beta.2", + "@analogjs/platform": "^1.12.0-beta.1", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", + "@analogjs/vitest-angular": "^1.12.0-beta.1", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index b477fa39a..4f148a48f 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.1-beta.2", - "@analogjs/router": "^1.11.1-beta.2", + "@analogjs/content": "^1.12.0-beta.1", + "@analogjs/router": "^1.12.0-beta.1", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", - "@analogjs/vitest-angular": "^1.11.1-beta.2", + "@analogjs/platform": "^1.12.0-beta.1", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", + "@analogjs/vitest-angular": "^1.12.0-beta.1", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index d59666522..f85659fb0 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.1-beta.2", - "@analogjs/router": "^1.11.1-beta.2", + "@analogjs/content": "^1.12.0-beta.1", + "@analogjs/router": "^1.12.0-beta.1", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", - "@analogjs/vitest-angular": "^1.11.1-beta.2", + "@analogjs/platform": "^1.12.0-beta.1", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", + "@analogjs/vitest-angular": "^1.12.0-beta.1", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index d59666522..f85659fb0 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.11.1-beta.2", - "@analogjs/router": "^1.11.1-beta.2", + "@analogjs/content": "^1.12.0-beta.1", + "@analogjs/router": "^1.12.0-beta.1", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.11.1-beta.2", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", - "@analogjs/vitest-angular": "^1.11.1-beta.2", + "@analogjs/platform": "^1.12.0-beta.1", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", + "@analogjs/vitest-angular": "^1.12.0-beta.1", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index ad2f35a39..9720c44c1 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.11.1-beta.2", + "version": "1.12.0-beta.1", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.11.1-beta.2", - "@analogjs/vite-plugin-nitro": "^1.11.1-beta.2", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", + "@analogjs/vite-plugin-nitro": "^1.12.0-beta.1", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index f59b26a08..46f5ff810 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.11.1-beta.2", + "version": "1.12.0-beta.1", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.11.1-beta.2", + "@analogjs/content": "^1.12.0-beta.1", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index b229185fa..3f88bcd04 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.11.1-beta.2", + "version": "1.12.0-beta.1", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 62603b7f0..2634d8eca 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.11.1-beta.2", + "version": "1.12.0-beta.1", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index 8b3f98d85..553f6f464 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.11.1-beta.2", + "version": "1.12.0-beta.1", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From cf7c64f2e5500932f5e2f71ca1916a79e0af4e67 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 6 Jan 2025 10:19:37 -0600 Subject: [PATCH 20/30] ci: disable file parallelism for card lib (#1541) --- libs/card/vite.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/card/vite.config.ts b/libs/card/vite.config.ts index 809e466d2..5ec2c5193 100644 --- a/libs/card/vite.config.ts +++ b/libs/card/vite.config.ts @@ -16,6 +16,7 @@ export default defineConfig(({ mode }) => { include: ['**/*.spec.ts'], cacheDir: '../../node_modules/.vitest', pool: 'vmForks', + fileParallelism: false, }, define: { 'import.meta.vitest': mode !== 'production', From de851003761a77e6f536a0c8a43351f5f21274de Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 6 Jan 2025 20:36:12 -0600 Subject: [PATCH 21/30] perf(platform): exclude TypeScript files from Vite esbuild plugin (#1543) --- .gitignore | 3 +- apps/analog-app/vite.config.ts | 10 +- package.json | 1 + packages/platform/src/lib/deps-plugin.ts | 1 + pnpm-lock.yaml | 209 ++++++++++++++++------- 5 files changed, 156 insertions(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index 96fd2f3e1..415d0841d 100644 --- a/.gitignore +++ b/.gitignore @@ -66,4 +66,5 @@ tmpanalogapp* .nx/cache .nx/workspace-data -vite.config.*.timestamp* \ No newline at end of file +vite.config.*.timestamp* +.vite-inspect \ No newline at end of file diff --git a/apps/analog-app/vite.config.ts b/apps/analog-app/vite.config.ts index 920c32039..23208b512 100644 --- a/apps/analog-app/vite.config.ts +++ b/apps/analog-app/vite.config.ts @@ -4,6 +4,7 @@ import analog from '@analogjs/platform'; import { visualizer } from 'rollup-plugin-visualizer'; import { defineConfig, Plugin, splitVendorChunkPlugin } from 'vite'; import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; +import inspect from 'vite-plugin-inspect'; // Only run in Netlify CI let base = process.env['URL'] || 'http://localhost:3000'; @@ -14,7 +15,7 @@ if (process.env['NETLIFY'] === 'true') { } // https://vitejs.dev/config/ -export default defineConfig(({ mode }) => { +export default defineConfig(({ mode, isSsrBuild }) => { return { root: __dirname, publicDir: 'src/public', @@ -47,7 +48,12 @@ export default defineConfig(({ mode }) => { }), nxViteTsPaths(), visualizer() as Plugin, - splitVendorChunkPlugin(), + // splitVendorChunkPlugin(), + !isSsrBuild && + inspect({ + build: true, + outputDir: '../../.vite-inspect/analog-app', + }), ], test: { reporters: ['default'], diff --git a/package.json b/package.json index d74e53c3f..58ba674f4 100644 --- a/package.json +++ b/package.json @@ -175,6 +175,7 @@ "vfile": "^6.0.3", "vite": "^5.4.0", "vite-plugin-eslint": "^1.8.1", + "vite-plugin-inspect": "~0.8", "vite-tsconfig-paths": "4.2.0", "vitefu": "^0.2.5", "vitest": "^2.0.0", diff --git a/packages/platform/src/lib/deps-plugin.ts b/packages/platform/src/lib/deps-plugin.ts index 1d913f110..a91405123 100644 --- a/packages/platform/src/lib/deps-plugin.ts +++ b/packages/platform/src/lib/deps-plugin.ts @@ -12,6 +12,7 @@ export function depsPlugin(options?: Options): Plugin[] { name: 'analogjs-deps-plugin', config() { return { + esbuild: { exclude: ['**/*.ts', '**/*.js'] }, ssr: { noExternal: [ '@analogjs/**', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2023c6b6..89a0075dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -405,6 +405,9 @@ importers: vite-plugin-eslint: specifier: ^1.8.1 version: 1.8.1(eslint@8.57.0)(vite@5.4.10(@types/node@18.19.15)(less@4.1.3)(sass@1.80.7)(stylus@0.64.0)(terser@5.36.0)) + vite-plugin-inspect: + specifier: ~0.8 + version: 0.8.9(rollup@4.26.0)(vite@5.4.10(@types/node@18.19.15)(less@4.1.3)(sass@1.80.7)(stylus@0.64.0)(terser@5.36.0)) vite-tsconfig-paths: specifier: 4.2.0 version: 4.2.0(typescript@5.5.4)(vite@5.4.10(@types/node@18.19.15)(less@4.1.3)(sass@1.80.7)(stylus@0.64.0)(terser@5.36.0)) @@ -800,6 +803,9 @@ packages: '@angular/platform-browser': 19.0.4 rxjs: ^6.5.3 || ^7.4.0 + '@antfu/utils@0.7.10': + resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} + '@astrojs/compiler@2.8.0': resolution: {integrity: sha512-yrpD1WRGqsJwANaDIdtHo+YVjvIOFAjC83lu5qENIgrafwZcJgSXDuwVMXOgok4tFzpeKLsFQ6c3FoUdloLWBQ==} @@ -4132,9 +4138,6 @@ packages: resolution: {integrity: sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==} engines: {node: '>=12'} - '@polka/url@1.0.0-next.21': - resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} - '@polka/url@1.0.0-next.25': resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} @@ -4224,6 +4227,15 @@ packages: rollup: optional: true + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/rollup-android-arm-eabi@4.24.4': resolution: {integrity: sha512-jfUJrFct/hTA0XDM5p/htWKoNNTbDLY0KRwEt6pyOA6k2fmk0WVwl65PdUdJZgzGEHWx+49LilkcSaumQRyNQw==} cpu: [arm] @@ -4829,9 +4841,6 @@ packages: '@types/estree-jsx@1.0.1': resolution: {integrity: sha512-sHyakZlAezNFxmYRo0fopDZW+XvK6ipeZkkp5EAOLjdPfZp8VjZBJ67vSRI99RSCAoqXVmXOHS4fnWoxpuGQtQ==} - '@types/estree@1.0.0': - resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} - '@types/estree@1.0.1': resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} @@ -7012,6 +7021,15 @@ packages: supports-color: optional: true + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize-keys@1.1.0: resolution: {integrity: sha512-ocLWuYzRPoS9bfiSdDd3cxvrzovVMZnRDVEzAs+hWIVXGDbHxWMECij2OBuyB/An0FFW/nLuq6Kv1i/YC5Qfzg==} engines: {node: '>=0.10.0'} @@ -7387,6 +7405,9 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + error-stack-parser-es@0.1.5: + resolution: {integrity: sha512-xHku1X40RO+fO8yJ8Wh2f2rZWVjqyhb1zgq1yZ8aZRQkv6OOKhKWRUaht3eSCUbAOBaKIgM+ykwFLE+QUxgGeg==} + es-define-property@1.0.0: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} @@ -7487,6 +7508,7 @@ packages: eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true espree@9.5.0: @@ -11840,6 +11862,7 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qs@6.10.4: @@ -12667,6 +12690,10 @@ packages: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} + sirv@3.0.0: + resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} + engines: {node: '>=18'} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -13865,6 +13892,16 @@ packages: eslint: '>=7' vite: '>=2' + vite-plugin-inspect@0.8.9: + resolution: {integrity: sha512-22/8qn+LYonzibb1VeFZmISdVao5kC22jmEKm24vfFE8siEn47EpVcCLYMv6iKOYMJfjSvSJfueOwcFCkUnV3A==} + engines: {node: '>=14'} + peerDependencies: + '@nuxt/kit': '*' + vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.1 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + vite-tsconfig-paths@4.2.0: resolution: {integrity: sha512-jGpus0eUy5qbbMVGiTxCL1iB9ZGN6Bd37VGLJU39kTDD6ZfULTTb1bcc5IeTWqWJKiWV5YihCaibeASPiGi8kw==} peerDependencies: @@ -14942,6 +14979,8 @@ snapshots: rxjs: 7.8.1 tslib: 2.8.1 + '@antfu/utils@0.7.10': {} + '@astrojs/compiler@2.8.0': {} '@astrojs/internal-helpers@0.2.0': {} @@ -15014,7 +15053,7 @@ snapshots: '@astrojs/telemetry@3.1.0': dependencies: ci-info: 4.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) dlv: 1.1.3 dset: 3.1.3 is-docker: 3.0.0 @@ -15092,7 +15131,7 @@ snapshots: '@babel/traverse': 7.24.5 '@babel/types': 7.24.6 convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -15112,7 +15151,7 @@ snapshots: '@babel/traverse': 7.25.6 '@babel/types': 7.25.6 convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -15315,7 +15354,7 @@ snapshots: '@babel/core': 7.25.2 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -15326,7 +15365,7 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -17140,7 +17179,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.7 '@babel/parser': 7.23.0 '@babel/types': 7.23.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17155,7 +17194,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.7 '@babel/parser': 7.24.5 '@babel/types': 7.24.5 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17167,7 +17206,7 @@ snapshots: '@babel/parser': 7.25.6 '@babel/template': 7.25.0 '@babel/types': 7.25.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17179,7 +17218,7 @@ snapshots: '@babel/parser': 7.26.2 '@babel/template': 7.25.9 '@babel/types': 7.26.0 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17333,7 +17372,7 @@ snapshots: dependencies: '@commitlint/top-level': 17.4.0 '@commitlint/types': 17.4.0 - fs-extra: 11.1.1 + fs-extra: 11.2.0 git-raw-commits: 2.0.11 minimist: 1.2.8 @@ -18440,7 +18479,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) espree: 9.6.1 globals: 13.21.0 ignore: 5.2.4 @@ -18462,7 +18501,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.2 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -19944,8 +19983,6 @@ snapshots: '@pnpm/network.ca-file': 1.0.2 config-chain: 1.1.13 - '@polka/url@1.0.0-next.21': {} - '@polka/url@1.0.0-next.25': {} '@redocly/ajv@8.11.2': @@ -19980,7 +20017,7 @@ snapshots: '@rollup/plugin-commonjs@28.0.1(rollup@4.26.0)': dependencies: - '@rollup/pluginutils': 5.1.3(rollup@4.26.0) + '@rollup/pluginutils': 5.1.4(rollup@4.26.0) commondir: 1.0.1 estree-walker: 2.0.2 fdir: 6.4.2(picomatch@4.0.2) @@ -19992,7 +20029,7 @@ snapshots: '@rollup/plugin-inject@5.0.5(rollup@4.26.0)': dependencies: - '@rollup/pluginutils': 5.1.3(rollup@4.26.0) + '@rollup/pluginutils': 5.1.4(rollup@4.26.0) estree-walker: 2.0.2 magic-string: 0.30.12 optionalDependencies: @@ -20000,19 +20037,19 @@ snapshots: '@rollup/plugin-json@6.1.0(rollup@4.24.4)': dependencies: - '@rollup/pluginutils': 5.1.3(rollup@4.24.4) + '@rollup/pluginutils': 5.1.4(rollup@4.24.4) optionalDependencies: rollup: 4.24.4 '@rollup/plugin-json@6.1.0(rollup@4.26.0)': dependencies: - '@rollup/pluginutils': 5.1.3(rollup@4.26.0) + '@rollup/pluginutils': 5.1.4(rollup@4.26.0) optionalDependencies: rollup: 4.26.0 '@rollup/plugin-node-resolve@15.3.0(rollup@4.26.0)': dependencies: - '@rollup/pluginutils': 5.1.3(rollup@4.26.0) + '@rollup/pluginutils': 5.1.4(rollup@4.26.0) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 @@ -20022,7 +20059,7 @@ snapshots: '@rollup/plugin-replace@6.0.1(rollup@4.26.0)': dependencies: - '@rollup/pluginutils': 5.1.3(rollup@4.26.0) + '@rollup/pluginutils': 5.1.4(rollup@4.26.0) magic-string: 0.30.12 optionalDependencies: rollup: 4.26.0 @@ -20040,7 +20077,15 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/pluginutils@5.1.3(rollup@4.24.4)': + '@rollup/pluginutils@5.1.3(rollup@4.26.0)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.26.0 + + '@rollup/pluginutils@5.1.4(rollup@4.24.4)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 @@ -20048,7 +20093,7 @@ snapshots: optionalDependencies: rollup: 4.24.4 - '@rollup/pluginutils@5.1.3(rollup@4.26.0)': + '@rollup/pluginutils@5.1.4(rollup@4.26.0)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 @@ -20199,7 +20244,7 @@ snapshots: conventional-changelog-angular: 7.0.0 conventional-commits-filter: 4.0.0 conventional-commits-parser: 5.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) import-from-esm: 1.3.3 lodash-es: 4.17.21 micromatch: 4.0.5 @@ -20245,7 +20290,7 @@ snapshots: '@octokit/plugin-throttling': 8.1.3(@octokit/core@5.1.0) '@semantic-release/error': 4.0.0 aggregate-error: 5.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) dir-glob: 3.0.1 globby: 14.0.0 http-proxy-agent: 7.0.0 @@ -20282,7 +20327,7 @@ snapshots: conventional-changelog-writer: 7.0.1 conventional-commits-filter: 4.0.0 conventional-commits-parser: 5.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) get-stream: 7.0.1 import-from-esm: 1.3.3 into-stream: 7.0.0 @@ -20675,15 +20720,13 @@ snapshots: '@types/eslint@8.37.0': dependencies: - '@types/estree': 1.0.0 + '@types/estree': 1.0.6 '@types/json-schema': 7.0.11 '@types/estree-jsx@1.0.1': dependencies: '@types/estree': 1.0.6 - '@types/estree@1.0.0': {} - '@types/estree@1.0.1': {} '@types/estree@1.0.5': {} @@ -20958,7 +21001,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.5.4) '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.5.4) - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -20988,7 +21031,7 @@ snapshots: dependencies: '@typescript-eslint/types': 7.4.0 '@typescript-eslint/visitor-keys': 7.4.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -21003,7 +21046,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.13.0 '@typescript-eslint/visitor-keys': 8.13.0 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 @@ -21018,7 +21061,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.5.0 '@typescript-eslint/visitor-keys': 8.5.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.4 @@ -21321,13 +21364,13 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) transitivePeerDependencies: - supports-color agent-base@7.1.1(supports-color@9.4.0): dependencies: - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) transitivePeerDependencies: - supports-color @@ -21642,7 +21685,7 @@ snapshots: caniuse-lite: 1.0.30001660 fraction.js: 4.3.7 normalize-range: 0.1.2 - picocolors: 1.0.1 + picocolors: 1.1.1 postcss: 8.4.41 postcss-value-parser: 4.2.0 @@ -21652,7 +21695,7 @@ snapshots: caniuse-lite: 1.0.30001660 fraction.js: 4.3.7 normalize-range: 0.1.2 - picocolors: 1.0.1 + picocolors: 1.1.1 postcss: 8.4.49 postcss-value-parser: 4.2.0 @@ -23453,6 +23496,18 @@ snapshots: optionalDependencies: supports-color: 9.4.0 + debug@4.4.0(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + debug@4.4.0(supports-color@9.4.0): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 9.4.0 + decamelize-keys@1.1.0: dependencies: decamelize: 1.2.0 @@ -23574,7 +23629,7 @@ snapshots: detect-port@1.5.1: dependencies: address: 1.2.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) transitivePeerDependencies: - supports-color @@ -23776,6 +23831,8 @@ snapshots: dependencies: is-arrayish: 0.2.1 + error-stack-parser-es@0.1.5: {} + es-define-property@1.0.0: dependencies: get-intrinsic: 1.2.4 @@ -24239,7 +24296,7 @@ snapshots: extract-zip@2.0.1(supports-color@8.1.1): dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@8.1.1) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -25261,14 +25318,14 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) transitivePeerDependencies: - supports-color http-proxy-agent@7.0.0: dependencies: agent-base: 7.1.1(supports-color@9.4.0) - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) transitivePeerDependencies: - supports-color @@ -25343,7 +25400,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) transitivePeerDependencies: - supports-color @@ -25414,7 +25471,7 @@ snapshots: import-from-esm@1.3.3: dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.0(supports-color@9.4.0) import-meta-resolve: 4.0.0 transitivePeerDependencies: - supports-color @@ -25494,7 +25551,7 @@ snapshots: dependencies: '@ioredis/commands': 1.2.0 cluster-key-slot: 1.1.1 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) denque: 2.1.0 lodash.defaults: 4.2.0 lodash.isarguments: 3.1.0 @@ -25738,7 +25795,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) istanbul-lib-coverage: 3.2.0 source-map: 0.6.1 transitivePeerDependencies: @@ -26331,7 +26388,7 @@ snapshots: content-disposition: 0.5.4 content-type: 1.0.5 cookies: 0.9.1 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) delegates: 1.0.0 depd: 2.0.0 destroy: 1.2.0 @@ -26668,7 +26725,7 @@ snapshots: log4js@6.9.1: dependencies: date-format: 4.0.14 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) flatted: 3.2.7 rfdc: 1.4.1 streamroller: 3.1.5 @@ -27485,7 +27542,7 @@ snapshots: micromark@3.1.0: dependencies: '@types/debug': 4.1.7 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.0.6 micromark-factory-space: 1.0.0 @@ -27507,7 +27564,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.7 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.0 @@ -29456,7 +29513,7 @@ snapshots: postcss@8.4.41: dependencies: nanoid: 3.3.7 - picocolors: 1.0.1 + picocolors: 1.1.1 source-map-js: 1.2.0 postcss@8.4.47: @@ -30678,7 +30735,7 @@ snapshots: sirv@1.0.19: dependencies: - '@polka/url': 1.0.0-next.21 + '@polka/url': 1.0.0-next.25 mrmime: 1.0.1 totalist: 1.1.0 @@ -30688,6 +30745,12 @@ snapshots: mrmime: 2.0.0 totalist: 3.0.1 + sirv@3.0.0: + dependencies: + '@polka/url': 1.0.0-next.25 + mrmime: 2.0.0 + totalist: 3.0.1 + sisteransi@1.0.5: {} sitemap@7.1.2: @@ -30747,7 +30810,7 @@ snapshots: socks-proxy-agent@8.0.4: dependencies: agent-base: 7.1.1(supports-color@9.4.0) - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -30823,7 +30886,7 @@ snapshots: spdy-transport@3.0.0: dependencies: - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 @@ -30834,7 +30897,7 @@ snapshots: spdy@4.0.2: dependencies: - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) handle-thing: 2.0.1 http-deceiver: 1.2.7 select-hose: 2.0.0 @@ -30929,7 +30992,7 @@ snapshots: streamroller@3.1.5: dependencies: date-format: 4.0.14 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) fs-extra: 8.1.0 transitivePeerDependencies: - supports-color @@ -31070,7 +31133,7 @@ snapshots: stylus@0.64.0: dependencies: '@adobe/css-tools': 4.3.3 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) glob: 10.4.5 sax: 1.4.1 source-map: 0.7.4 @@ -31516,7 +31579,7 @@ snapshots: tuf-js@3.0.1: dependencies: '@tufjs/models': 3.0.1 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) make-fetch-happen: 14.0.3 transitivePeerDependencies: - supports-color @@ -31646,7 +31709,7 @@ snapshots: unimport@3.13.2(rollup@4.26.0): dependencies: - '@rollup/pluginutils': 5.1.3(rollup@4.26.0) + '@rollup/pluginutils': 5.1.4(rollup@4.26.0) acorn: 8.14.0 escape-string-regexp: 5.0.0 estree-walker: 3.0.3 @@ -31983,7 +32046,7 @@ snapshots: vite-node@2.1.5(@types/node@18.19.15)(less@4.1.3)(sass@1.80.7)(stylus@0.64.0)(terser@5.36.0): dependencies: cac: 6.7.14 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.4.0(supports-color@9.4.0) es-module-lexer: 1.5.4 pathe: 1.1.2 vite: 5.4.11(@types/node@18.19.15)(less@4.1.3)(sass@1.80.7)(stylus@0.64.0)(terser@5.36.0) @@ -32006,6 +32069,22 @@ snapshots: rollup: 2.79.1 vite: 5.4.10(@types/node@18.19.15)(less@4.1.3)(sass@1.80.7)(stylus@0.64.0)(terser@5.36.0) + vite-plugin-inspect@0.8.9(rollup@4.26.0)(vite@5.4.10(@types/node@18.19.15)(less@4.1.3)(sass@1.80.7)(stylus@0.64.0)(terser@5.36.0)): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.1.4(rollup@4.26.0) + debug: 4.4.0(supports-color@9.4.0) + error-stack-parser-es: 0.1.5 + fs-extra: 11.2.0 + open: 10.1.0 + perfect-debounce: 1.0.0 + picocolors: 1.1.1 + sirv: 3.0.0 + vite: 5.4.10(@types/node@18.19.15)(less@4.1.3)(sass@1.80.7)(stylus@0.64.0)(terser@5.36.0) + transitivePeerDependencies: + - rollup + - supports-color + vite-tsconfig-paths@4.2.0(typescript@5.5.4)(vite@5.4.10(@types/node@18.19.15)(less@4.1.3)(sass@1.80.7)(stylus@0.64.0)(terser@5.36.0)): dependencies: debug: 4.3.4(supports-color@8.1.1) @@ -32155,7 +32234,7 @@ snapshots: gzip-size: 6.0.0 html-escaper: 2.0.2 opener: 1.5.2 - picocolors: 1.0.1 + picocolors: 1.1.1 sirv: 2.0.4 ws: 7.5.9 transitivePeerDependencies: From cf3ec7d240acf2e1f8297bb1fc35623f5811d27e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 7 Jan 2025 02:37:10 +0000 Subject: [PATCH 22/30] chore: release 1.12.0-beta.2 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 635154065..d6c784dda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.12.0-beta.2](https://github.com/analogjs/analog/compare/v1.12.0-beta.1...v1.12.0-beta.2) (2025-01-07) + +### Performance Improvements + +- **platform:** exclude TypeScript files from Vite esbuild plugin ([#1543](https://github.com/analogjs/analog/issues/1543)) ([de85100](https://github.com/analogjs/analog/commit/de851003761a77e6f536a0c8a43351f5f21274de)) + # [1.12.0-beta.1](https://github.com/analogjs/analog/compare/v1.11.1-beta.2...v1.12.0-beta.1) (2025-01-06) ### Features diff --git a/package.json b/package.json index 58ba674f4..5a87795b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.12.0-beta.1", + "version": "1.12.0-beta.2", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 11193625d..2fd66803c 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.12.0-beta.1", + "version": "1.12.0-beta.2", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.12.0-beta.1" + "@analogjs/vite-plugin-angular": "^1.12.0-beta.2" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 81378d528..9b5fc507b 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.12.0-beta.1", + "version": "1.12.0-beta.2", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 703e97e11..4760eb67f 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.12.0-beta.1", + "version": "1.12.0-beta.2", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index eb7676396..8e2e3dec3 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.1", - "@analogjs/router": "^1.12.0-beta.1", + "@analogjs/content": "^1.12.0-beta.2", + "@analogjs/router": "^1.12.0-beta.2", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", - "@analogjs/vitest-angular": "^1.12.0-beta.1", + "@analogjs/platform": "^1.12.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", + "@analogjs/vitest-angular": "^1.12.0-beta.2", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index 249546b5e..edfd0c296 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.1", - "@analogjs/router": "^1.12.0-beta.1", + "@analogjs/content": "^1.12.0-beta.2", + "@analogjs/router": "^1.12.0-beta.2", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", - "@analogjs/vitest-angular": "^1.12.0-beta.1", + "@analogjs/platform": "^1.12.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", + "@analogjs/vitest-angular": "^1.12.0-beta.2", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index 2529fb6e9..a47a696f6 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.1", - "@analogjs/router": "^1.12.0-beta.1", + "@analogjs/content": "^1.12.0-beta.2", + "@analogjs/router": "^1.12.0-beta.2", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", - "@analogjs/vitest-angular": "^1.12.0-beta.1", + "@analogjs/platform": "^1.12.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", + "@analogjs/vitest-angular": "^1.12.0-beta.2", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 4f148a48f..225e30b47 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.1", - "@analogjs/router": "^1.12.0-beta.1", + "@analogjs/content": "^1.12.0-beta.2", + "@analogjs/router": "^1.12.0-beta.2", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", - "@analogjs/vitest-angular": "^1.12.0-beta.1", + "@analogjs/platform": "^1.12.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", + "@analogjs/vitest-angular": "^1.12.0-beta.2", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index f85659fb0..3cebce955 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.1", - "@analogjs/router": "^1.12.0-beta.1", + "@analogjs/content": "^1.12.0-beta.2", + "@analogjs/router": "^1.12.0-beta.2", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", - "@analogjs/vitest-angular": "^1.12.0-beta.1", + "@analogjs/platform": "^1.12.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", + "@analogjs/vitest-angular": "^1.12.0-beta.2", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index f85659fb0..3cebce955 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.1", - "@analogjs/router": "^1.12.0-beta.1", + "@analogjs/content": "^1.12.0-beta.2", + "@analogjs/router": "^1.12.0-beta.2", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.1", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", - "@analogjs/vitest-angular": "^1.12.0-beta.1", + "@analogjs/platform": "^1.12.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", + "@analogjs/vitest-angular": "^1.12.0-beta.2", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index 9720c44c1..e02cb93f1 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.12.0-beta.1", + "version": "1.12.0-beta.2", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.1", - "@analogjs/vite-plugin-nitro": "^1.12.0-beta.1", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", + "@analogjs/vite-plugin-nitro": "^1.12.0-beta.2", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index 46f5ff810..332face87 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.12.0-beta.1", + "version": "1.12.0-beta.2", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.12.0-beta.1", + "@analogjs/content": "^1.12.0-beta.2", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 3f88bcd04..9ea0bd988 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.12.0-beta.1", + "version": "1.12.0-beta.2", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 2634d8eca..60844bfab 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.12.0-beta.1", + "version": "1.12.0-beta.2", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index 553f6f464..df1e58163 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.12.0-beta.1", + "version": "1.12.0-beta.2", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From eff770c7e40ce3eb6fe3fe523596c672f1f4fb8c Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Tue, 7 Jan 2025 07:51:42 -0600 Subject: [PATCH 23/30] revert: Revert "fix(vite-plugin-angular): fix HMR of component styles" (#1544) --- packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts index cec328932..f8d0d609a 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts @@ -714,7 +714,6 @@ export function angular(options?: PluginOptions): Plugin[] { if (pluginOptions.liveReload) { tsCompilerOptions['_enableHmr'] = true; - tsCompilerOptions['externalRuntimeStyles'] = true; // Workaround for https://github.com/angular/angular/issues/59310 // Force extra instructions to be generated for HMR w/defer tsCompilerOptions['supportTestBed'] = true; From 5ec113f3d789336ca0753c78c3a83b29263710df Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Tue, 7 Jan 2025 14:12:41 +0000 Subject: [PATCH 24/30] fix(vite-plugin-angular): correctly implement HMR of component styles (#1542) --- .../src/lib/angular-vite-plugin.ts | 126 +++++++++++++++--- packages/vite-plugin-angular/src/lib/host.ts | 67 ++++++---- 2 files changed, 145 insertions(+), 48 deletions(-) diff --git a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts index f8d0d609a..0d647f864 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts @@ -14,6 +14,7 @@ import { ResolvedConfig, Connect, } from 'vite'; +import * as ngCompiler from '@angular/compiler'; import { createCompilerPlugin } from './compiler-plugin.js'; import { @@ -151,6 +152,7 @@ export function angular(options?: PluginOptions): Plugin[] { let builderProgram: ts.EmitAndSemanticDiagnosticsBuilderProgram; let watchMode = false; let testWatchMode = false; + let inlineComponentStyles: Map | undefined; const sourceFileCache = new SourceFileCache(); const isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST']; const isStackBlitz = !!process.versions['webcontainer']; @@ -350,15 +352,7 @@ export function angular(options?: PluginOptions): Plugin[] { return ctx.modules.map((mod) => { if (mod.id === ctx.file) { - // support Vite 6 - if ('_clientModule' in mod) { - (mod as any)['_clientModule'].isSelfAccepting = true; - } - - return { - ...mod, - isSelfAccepting: true, - } as ModuleNode; + return markModuleSelfAccepting(mod); } return mod; @@ -375,6 +369,45 @@ export function angular(options?: PluginOptions): Plugin[] { (mod) => ctx.file === mod.file && mod.id?.includes('?direct') ); if (isDirect) { + if (pluginOptions.liveReload && isDirect?.id && isDirect.file) { + const isComponentStyle = + isDirect.type === 'css' && isComponentStyleSheet(isDirect.id); + if (isComponentStyle) { + const { encapsulation } = getComponentStyleSheetMeta( + isDirect.id + ); + + // Track if the component uses ShadowDOM encapsulation + // Shadow DOM components currently require a full reload. + // Vite's CSS hot replacement does not support shadow root searching. + if (encapsulation !== 'shadow') { + ctx.server.ws.send({ + type: 'update', + updates: [ + { + type: 'css-update', + timestamp: Date.now(), + path: isDirect.id, + acceptedPath: isDirect.file, + }, + ], + }); + + return ctx.modules + .filter((mod) => { + // Component stylesheets will have 2 modules (*.component.scss and *.component.scss?direct&ngcomp=xyz&e=x) + // We remove the module with the query params to prevent vite double logging the stylesheet name "hmr update *.component.scss, *.component.scss?direct&ngcomp=xyz&e=x" + return mod.file !== ctx.file || mod.id !== isDirect.id; + }) + .map((mod) => { + if (mod.file === ctx.file) { + return markModuleSelfAccepting(mod); + } + return mod; + }) as ModuleNode[]; + } + } + } return ctx.modules; } @@ -407,15 +440,7 @@ export function angular(options?: PluginOptions): Plugin[] { return ctx.modules.map((mod) => { if (mod.id === ctx.file) { - // support Vite 6 - if ('_clientModule' in mod) { - (mod as any)['_clientModule'].isSelfAccepting = true; - } - - return { - ...mod, - isSelfAccepting: true, - } as ModuleNode; + return markModuleSelfAccepting(mod); } return mod; @@ -438,6 +463,17 @@ export function angular(options?: PluginOptions): Plugin[] { return undefined; }, async load(id, options) { + if (isComponentStyleSheet(id)) { + const filename = new URL(id, 'http://localhost').pathname.replace( + /^\//, + '' + ); + const componentStyles = inlineComponentStyles?.get(filename); + if (componentStyles) { + return componentStyles; + } + } + if ( pluginOptions.liveReload && options?.ssr && @@ -497,6 +533,20 @@ export function angular(options?: PluginOptions): Plugin[] { return; } + /** + * Encapsulate component stylesheets that use emulated encapsulation + */ + if (pluginOptions.liveReload && isComponentStyleSheet(id)) { + const { encapsulation, componentId } = getComponentStyleSheetMeta(id); + if (encapsulation === 'emulated' && componentId) { + const encapsulated = ngCompiler.encapsulateStyle(code, componentId); + return { + code: encapsulated, + map: null, + }; + } + } + if (TS_EXT_REGEX.test(id)) { if (id.includes('.ts?')) { // Strip the query string off the ID @@ -712,7 +762,7 @@ export function angular(options?: PluginOptions): Plugin[] { tsCompilerOptions.compilationMode = 'experimental-local'; } - if (pluginOptions.liveReload) { + if (pluginOptions.liveReload && watchMode) { tsCompilerOptions['_enableHmr'] = true; // Workaround for https://github.com/angular/angular/issues/59310 // Force extra instructions to be generated for HMR w/defer @@ -727,11 +777,15 @@ export function angular(options?: PluginOptions): Plugin[] { preprocessCSS(code, filename, config as any); if (!jit) { + inlineComponentStyles = tsCompilerOptions['externalRuntimeStyles'] + ? new Map() + : undefined; augmentHostWithResources(host, styleTransform, { inlineStylesExtension: pluginOptions.inlineStylesExtension, supportAnalogFormat: pluginOptions.supportAnalogFormat, isProd, markdownTemplateTransforms: pluginOptions.markdownTemplateTransforms, + inlineComponentStyles, }); } } @@ -920,3 +974,37 @@ function getDiagnosticsForSourceFile( ...angularDiagnostics, ]; } + +function markModuleSelfAccepting(mod: ModuleNode): ModuleNode { + // support Vite 6 + if ('_clientModule' in mod) { + (mod as any)['_clientModule'].isSelfAccepting = true; + } + + return { + ...mod, + isSelfAccepting: true, + } as ModuleNode; +} + +function isComponentStyleSheet(id: string): boolean { + return id.includes('ngcomp='); +} + +function getComponentStyleSheetMeta(id: string): { + componentId: string; + encapsulation: 'emulated' | 'shadow' | 'none'; +} { + const params = new URL(id, 'http://localhost').searchParams; + const encapsulationMapping = { + '0': 'emulated', + '2': 'none', + '3': 'shadow', + }; + return { + componentId: params.get('ngcomp')!, + encapsulation: encapsulationMapping[ + params.get('e') as keyof typeof encapsulationMapping + ] as 'emulated' | 'shadow' | 'none', + }; +} diff --git a/packages/vite-plugin-angular/src/lib/host.ts b/packages/vite-plugin-angular/src/lib/host.ts index 3b29fc241..8b0ac807b 100644 --- a/packages/vite-plugin-angular/src/lib/host.ts +++ b/packages/vite-plugin-angular/src/lib/host.ts @@ -23,7 +23,7 @@ export function augmentHostWithResources( options?: { ssr?: boolean } ) => ReturnType | null, options: { - inlineStylesExtension?: string; + inlineStylesExtension: string; supportAnalogFormat?: | boolean | { @@ -32,13 +32,15 @@ export function augmentHostWithResources( isProd?: boolean; markdownTemplateTransforms?: MarkdownTemplateTransform[]; - } = {} + inlineComponentStyles?: Map; + } ) { const ts = require('typescript'); const resourceHost = host as CompilerHost; const baseGetSourceFile = ( resourceHost as ts.CompilerHost ).getSourceFile.bind(resourceHost); + const externalStylesheets = new Map(); if (options.supportAnalogFormat) { (resourceHost as ts.CompilerHost).getSourceFile = ( @@ -146,36 +148,43 @@ export function augmentHostWithResources( return null; } - if (options.inlineStylesExtension) { - // Resource file only exists for external stylesheets - const filename = - context.resourceFile ?? - `${context.containingFile.replace( - /(\.analog|\.ag)?\.ts$/, - (...args) => { - // NOTE: if the original file name contains `.analog`, we turn that into `-analog.css` - if ( - args.includes('.analog') || - args.includes('.ag') || - args.includes('.agx') - ) { - return `-analog.${options?.inlineStylesExtension}`; - } - return `.${options?.inlineStylesExtension}`; - } - )}`; - - let stylesheetResult; - - try { - stylesheetResult = await transform(data, `${filename}?direct`); - } catch (e) { - console.error(`${e}`); - } + if (options.inlineComponentStyles) { + const id = createHash('sha256') + .update(context.containingFile) + .update(context.className) + .update(String(context.order)) + .update(data) + .digest('hex'); + const filename = id + '.' + options.inlineStylesExtension; + options.inlineComponentStyles.set(filename, data); + return { content: filename }; + } - return { content: stylesheetResult?.code || '' }; + // Resource file only exists for external stylesheets + const filename = + context.resourceFile ?? + `${context.containingFile.replace(/(\.analog|\.ag)?\.ts$/, (...args) => { + // NOTE: if the original file name contains `.analog`, we turn that into `-analog.css` + if ( + args.includes('.analog') || + args.includes('.ag') || + args.includes('.agx') + ) { + return `-analog.${options?.inlineStylesExtension}`; + } + return `.${options?.inlineStylesExtension}`; + })}`; + + let stylesheetResult; + + try { + stylesheetResult = await transform(data, `${filename}?direct`); + } catch (e) { + console.error(`${e}`); } + return { content: stylesheetResult?.code || '' }; + return null; }; } From cb3becb7c4d4b82d725092c580c924d17230820b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 7 Jan 2025 14:13:30 +0000 Subject: [PATCH 25/30] chore: release 1.12.0-beta.3 [skip ci] --- CHANGELOG.md | 10 ++++++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 53 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6c784dda..e953a6224 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# [1.12.0-beta.3](https://github.com/analogjs/analog/compare/v1.12.0-beta.2...v1.12.0-beta.3) (2025-01-07) + +### Bug Fixes + +- **vite-plugin-angular:** correctly implement HMR of component styles ([#1542](https://github.com/analogjs/analog/issues/1542)) ([5ec113f](https://github.com/analogjs/analog/commit/5ec113f3d789336ca0753c78c3a83b29263710df)) + +### Reverts + +- Revert "fix(vite-plugin-angular): fix HMR of component styles" ([#1544](https://github.com/analogjs/analog/issues/1544)) ([eff770c](https://github.com/analogjs/analog/commit/eff770c7e40ce3eb6fe3fe523596c672f1f4fb8c)) + # [1.12.0-beta.2](https://github.com/analogjs/analog/compare/v1.12.0-beta.1...v1.12.0-beta.2) (2025-01-07) ### Performance Improvements diff --git a/package.json b/package.json index 5a87795b0..1346b55b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.12.0-beta.2", + "version": "1.12.0-beta.3", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 2fd66803c..4ffa514e2 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.12.0-beta.2", + "version": "1.12.0-beta.3", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.12.0-beta.2" + "@analogjs/vite-plugin-angular": "^1.12.0-beta.3" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 9b5fc507b..5114bbcb3 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.12.0-beta.2", + "version": "1.12.0-beta.3", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 4760eb67f..f10118bee 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.12.0-beta.2", + "version": "1.12.0-beta.3", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index 8e2e3dec3..ffc83c9c3 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.2", - "@analogjs/router": "^1.12.0-beta.2", + "@analogjs/content": "^1.12.0-beta.3", + "@analogjs/router": "^1.12.0-beta.3", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", - "@analogjs/vitest-angular": "^1.12.0-beta.2", + "@analogjs/platform": "^1.12.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", + "@analogjs/vitest-angular": "^1.12.0-beta.3", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index edfd0c296..870644421 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.2", - "@analogjs/router": "^1.12.0-beta.2", + "@analogjs/content": "^1.12.0-beta.3", + "@analogjs/router": "^1.12.0-beta.3", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", - "@analogjs/vitest-angular": "^1.12.0-beta.2", + "@analogjs/platform": "^1.12.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", + "@analogjs/vitest-angular": "^1.12.0-beta.3", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index a47a696f6..0aad74f92 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.2", - "@analogjs/router": "^1.12.0-beta.2", + "@analogjs/content": "^1.12.0-beta.3", + "@analogjs/router": "^1.12.0-beta.3", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", - "@analogjs/vitest-angular": "^1.12.0-beta.2", + "@analogjs/platform": "^1.12.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", + "@analogjs/vitest-angular": "^1.12.0-beta.3", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 225e30b47..3d10c2154 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.2", - "@analogjs/router": "^1.12.0-beta.2", + "@analogjs/content": "^1.12.0-beta.3", + "@analogjs/router": "^1.12.0-beta.3", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", - "@analogjs/vitest-angular": "^1.12.0-beta.2", + "@analogjs/platform": "^1.12.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", + "@analogjs/vitest-angular": "^1.12.0-beta.3", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index 3cebce955..8309dde60 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.2", - "@analogjs/router": "^1.12.0-beta.2", + "@analogjs/content": "^1.12.0-beta.3", + "@analogjs/router": "^1.12.0-beta.3", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", - "@analogjs/vitest-angular": "^1.12.0-beta.2", + "@analogjs/platform": "^1.12.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", + "@analogjs/vitest-angular": "^1.12.0-beta.3", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index 3cebce955..8309dde60 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.2", - "@analogjs/router": "^1.12.0-beta.2", + "@analogjs/content": "^1.12.0-beta.3", + "@analogjs/router": "^1.12.0-beta.3", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.2", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", - "@analogjs/vitest-angular": "^1.12.0-beta.2", + "@analogjs/platform": "^1.12.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", + "@analogjs/vitest-angular": "^1.12.0-beta.3", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index e02cb93f1..ae3595583 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.12.0-beta.2", + "version": "1.12.0-beta.3", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.2", - "@analogjs/vite-plugin-nitro": "^1.12.0-beta.2", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", + "@analogjs/vite-plugin-nitro": "^1.12.0-beta.3", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index 332face87..66fbee347 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.12.0-beta.2", + "version": "1.12.0-beta.3", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.12.0-beta.2", + "@analogjs/content": "^1.12.0-beta.3", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 9ea0bd988..40d95c973 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.12.0-beta.2", + "version": "1.12.0-beta.3", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 60844bfab..e19077b04 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.12.0-beta.2", + "version": "1.12.0-beta.3", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index df1e58163..c465d0b27 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.12.0-beta.2", + "version": "1.12.0-beta.3", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From 6b9c75cf29cd3539b5b4d93606ba43ef41c351f1 Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Mon, 6 Jan 2025 14:56:54 +0000 Subject: [PATCH 26/30] fix(vite-plugin-angular): fix HMR of component styles w/tsconfig flag (#1539) --- packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts index 0d647f864..0a3ae3059 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts @@ -764,6 +764,7 @@ export function angular(options?: PluginOptions): Plugin[] { if (pluginOptions.liveReload && watchMode) { tsCompilerOptions['_enableHmr'] = true; + tsCompilerOptions['externalRuntimeStyles'] = true; // Workaround for https://github.com/angular/angular/issues/59310 // Force extra instructions to be generated for HMR w/defer tsCompilerOptions['supportTestBed'] = true; From 06760c477cebeaf8b59de28ae4699bb8cd51f829 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 7 Jan 2025 14:15:36 +0000 Subject: [PATCH 27/30] chore: release 1.12.0-beta.4 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e953a6224..cdf3efd0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.12.0-beta.4](https://github.com/analogjs/analog/compare/v1.12.0-beta.3...v1.12.0-beta.4) (2025-01-07) + +### Bug Fixes + +- **vite-plugin-angular:** fix HMR of component styles w/tsconfig flag ([#1539](https://github.com/analogjs/analog/issues/1539)) ([6b9c75c](https://github.com/analogjs/analog/commit/6b9c75cf29cd3539b5b4d93606ba43ef41c351f1)) + # [1.12.0-beta.3](https://github.com/analogjs/analog/compare/v1.12.0-beta.2...v1.12.0-beta.3) (2025-01-07) ### Bug Fixes diff --git a/package.json b/package.json index 1346b55b0..85ec42e12 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index 4ffa514e2..dfde9d2ea 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.12.0-beta.3" + "@analogjs/vite-plugin-angular": "^1.12.0-beta.4" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 5114bbcb3..5521accdd 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index f10118bee..3b281425f 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index ffc83c9c3..f00498e79 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.3", - "@analogjs/router": "^1.12.0-beta.3", + "@analogjs/content": "^1.12.0-beta.4", + "@analogjs/router": "^1.12.0-beta.4", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", - "@analogjs/vitest-angular": "^1.12.0-beta.3", + "@analogjs/platform": "^1.12.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", + "@analogjs/vitest-angular": "^1.12.0-beta.4", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index 870644421..493785f59 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.3", - "@analogjs/router": "^1.12.0-beta.3", + "@analogjs/content": "^1.12.0-beta.4", + "@analogjs/router": "^1.12.0-beta.4", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", - "@analogjs/vitest-angular": "^1.12.0-beta.3", + "@analogjs/platform": "^1.12.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", + "@analogjs/vitest-angular": "^1.12.0-beta.4", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index 0aad74f92..dddc2f2f6 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.3", - "@analogjs/router": "^1.12.0-beta.3", + "@analogjs/content": "^1.12.0-beta.4", + "@analogjs/router": "^1.12.0-beta.4", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", - "@analogjs/vitest-angular": "^1.12.0-beta.3", + "@analogjs/platform": "^1.12.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", + "@analogjs/vitest-angular": "^1.12.0-beta.4", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 3d10c2154..427d20cc4 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.3", - "@analogjs/router": "^1.12.0-beta.3", + "@analogjs/content": "^1.12.0-beta.4", + "@analogjs/router": "^1.12.0-beta.4", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", - "@analogjs/vitest-angular": "^1.12.0-beta.3", + "@analogjs/platform": "^1.12.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", + "@analogjs/vitest-angular": "^1.12.0-beta.4", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index 8309dde60..388a9fb7f 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.3", - "@analogjs/router": "^1.12.0-beta.3", + "@analogjs/content": "^1.12.0-beta.4", + "@analogjs/router": "^1.12.0-beta.4", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", - "@analogjs/vitest-angular": "^1.12.0-beta.3", + "@analogjs/platform": "^1.12.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", + "@analogjs/vitest-angular": "^1.12.0-beta.4", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index 8309dde60..388a9fb7f 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.3", - "@analogjs/router": "^1.12.0-beta.3", + "@analogjs/content": "^1.12.0-beta.4", + "@analogjs/router": "^1.12.0-beta.4", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.3", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", - "@analogjs/vitest-angular": "^1.12.0-beta.3", + "@analogjs/platform": "^1.12.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", + "@analogjs/vitest-angular": "^1.12.0-beta.4", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index ae3595583..c91fa1c56 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.3", - "@analogjs/vite-plugin-nitro": "^1.12.0-beta.3", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", + "@analogjs/vite-plugin-nitro": "^1.12.0-beta.4", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index 66fbee347..80130cbfd 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.12.0-beta.3", + "@analogjs/content": "^1.12.0-beta.4", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 40d95c973..e7e74d11b 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index e19077b04..dbe8787b2 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index c465d0b27..65fe4317b 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From 3f365e9b9bdcb45573977270c8c4136b0a592e10 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Tue, 7 Jan 2025 08:55:47 -0600 Subject: [PATCH 28/30] fix(vite-plugin-angular): use ssr.noExternal for matching libraries during testing (#1545) --- .../vite-plugin-angular/src/lib/angular-vitest-plugin.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/vite-plugin-angular/src/lib/angular-vitest-plugin.ts b/packages/vite-plugin-angular/src/lib/angular-vitest-plugin.ts index 8efbdf497..316cd69bd 100644 --- a/packages/vite-plugin-angular/src/lib/angular-vitest-plugin.ts +++ b/packages/vite-plugin-angular/src/lib/angular-vitest-plugin.ts @@ -18,15 +18,10 @@ export function angularVitestPlugin(): Plugin { exclude: ['@angular/cdk/testing'], }, ssr: { - noExternal: [/cdk\/fesm2022/], + noExternal: [/cdk\/fesm2022/, /fesm2022(.*?)testing/, /fesm2015/], }, test: { pool: userConfig.test?.pool ?? 'vmThreads', - server: { - deps: { - inline: [/fesm2022(.*?)testing/], - }, - }, }, }; }, From 6c00cf2db7d37ad93fd05ff015e90e39976836e1 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 7 Jan 2025 14:56:33 +0000 Subject: [PATCH 29/30] chore: release 1.12.0-beta.5 [skip ci] --- CHANGELOG.md | 6 ++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../create-analog/template-angular-v16/package.json | 10 +++++----- .../create-analog/template-angular-v17/package.json | 10 +++++----- .../create-analog/template-angular-v18/package.json | 10 +++++----- packages/create-analog/template-blog/package.json | 10 +++++----- packages/create-analog/template-latest/package.json | 10 +++++----- packages/create-analog/template-minimal/package.json | 10 +++++----- packages/platform/package.json | 6 +++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdf3efd0b..54dfe36b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.12.0-beta.5](https://github.com/analogjs/analog/compare/v1.12.0-beta.4...v1.12.0-beta.5) (2025-01-07) + +### Bug Fixes + +- **vite-plugin-angular:** use ssr.noExternal for matching libraries during testing ([#1545](https://github.com/analogjs/analog/issues/1545)) ([3f365e9](https://github.com/analogjs/analog/commit/3f365e9b9bdcb45573977270c8c4136b0a592e10)) + # [1.12.0-beta.4](https://github.com/analogjs/analog/compare/v1.12.0-beta.3...v1.12.0-beta.4) (2025-01-07) ### Bug Fixes diff --git a/package.json b/package.json index 85ec42e12..6125846b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.12.0-beta.4", + "version": "1.12.0-beta.5", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index dfde9d2ea..f109cf106 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.12.0-beta.4", + "version": "1.12.0-beta.5", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.12.0-beta.4" + "@analogjs/vite-plugin-angular": "^1.12.0-beta.5" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index 5521accdd..bf1504140 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.12.0-beta.4", + "version": "1.12.0-beta.5", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 3b281425f..1e63bb20c 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.12.0-beta.4", + "version": "1.12.0-beta.5", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index f00498e79..52fdd4076 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.4", - "@analogjs/router": "^1.12.0-beta.4", + "@analogjs/content": "^1.12.0-beta.5", + "@analogjs/router": "^1.12.0-beta.5", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", - "@analogjs/vitest-angular": "^1.12.0-beta.4", + "@analogjs/platform": "^1.12.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", + "@analogjs/vitest-angular": "^1.12.0-beta.5", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index 493785f59..845c54e57 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.4", - "@analogjs/router": "^1.12.0-beta.4", + "@analogjs/content": "^1.12.0-beta.5", + "@analogjs/router": "^1.12.0-beta.5", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", - "@analogjs/vitest-angular": "^1.12.0-beta.4", + "@analogjs/platform": "^1.12.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", + "@analogjs/vitest-angular": "^1.12.0-beta.5", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index dddc2f2f6..37081ee0b 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.4", - "@analogjs/router": "^1.12.0-beta.4", + "@analogjs/content": "^1.12.0-beta.5", + "@analogjs/router": "^1.12.0-beta.5", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", - "@analogjs/vitest-angular": "^1.12.0-beta.4", + "@analogjs/platform": "^1.12.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", + "@analogjs/vitest-angular": "^1.12.0-beta.5", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index 427d20cc4..dfb40ce2f 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.4", - "@analogjs/router": "^1.12.0-beta.4", + "@analogjs/content": "^1.12.0-beta.5", + "@analogjs/router": "^1.12.0-beta.5", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", - "@analogjs/vitest-angular": "^1.12.0-beta.4", + "@analogjs/platform": "^1.12.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", + "@analogjs/vitest-angular": "^1.12.0-beta.5", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index 388a9fb7f..b9e0f7cf0 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.4", - "@analogjs/router": "^1.12.0-beta.4", + "@analogjs/content": "^1.12.0-beta.5", + "@analogjs/router": "^1.12.0-beta.5", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", - "@analogjs/vitest-angular": "^1.12.0-beta.4", + "@analogjs/platform": "^1.12.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", + "@analogjs/vitest-angular": "^1.12.0-beta.5", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index 388a9fb7f..b9e0f7cf0 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.4", - "@analogjs/router": "^1.12.0-beta.4", + "@analogjs/content": "^1.12.0-beta.5", + "@analogjs/router": "^1.12.0-beta.5", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.4", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", - "@analogjs/vitest-angular": "^1.12.0-beta.4", + "@analogjs/platform": "^1.12.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", + "@analogjs/vitest-angular": "^1.12.0-beta.5", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index c91fa1c56..550e9fb78 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.12.0-beta.4", + "version": "1.12.0-beta.5", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.4", - "@analogjs/vite-plugin-nitro": "^1.12.0-beta.4", + "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", + "@analogjs/vite-plugin-nitro": "^1.12.0-beta.5", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index 80130cbfd..94c3a5086 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.12.0-beta.4", + "version": "1.12.0-beta.5", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.12.0-beta.4", + "@analogjs/content": "^1.12.0-beta.5", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index e7e74d11b..0c9d6b1e4 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.12.0-beta.4", + "version": "1.12.0-beta.5", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index dbe8787b2..3e2bb93aa 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.12.0-beta.4", + "version": "1.12.0-beta.5", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index 65fe4317b..8f85ec436 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.12.0-beta.4", + "version": "1.12.0-beta.5", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ", From 386ddeb4d048aee3f4834caa71bc351c09f424b0 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 7 Jan 2025 15:15:27 +0000 Subject: [PATCH 30/30] chore: release 1.12.0 [skip ci] --- CHANGELOG.md | 22 +++++++++++++++++++ package.json | 2 +- packages/astro-angular/package.json | 4 ++-- packages/content/package.json | 2 +- packages/create-analog/package.json | 2 +- .../template-angular-v16/package.json | 10 ++++----- .../template-angular-v17/package.json | 10 ++++----- .../template-angular-v18/package.json | 10 ++++----- .../create-analog/template-blog/package.json | 10 ++++----- .../template-latest/package.json | 10 ++++----- .../template-minimal/package.json | 10 ++++----- packages/platform/package.json | 6 ++--- packages/router/package.json | 4 ++-- packages/vite-plugin-angular/package.json | 2 +- packages/vite-plugin-nitro/package.json | 2 +- packages/vitest-angular/package.json | 2 +- 16 files changed, 65 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54dfe36b9..453a1e54f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +# [1.12.0](https://github.com/analogjs/analog/compare/v1.11.0...v1.12.0) (2025-01-07) + +### Bug Fixes + +- **vite-plugin-angular:** correctly implement HMR of component styles ([#1542](https://github.com/analogjs/analog/issues/1542)) ([5ec113f](https://github.com/analogjs/analog/commit/5ec113f3d789336ca0753c78c3a83b29263710df)) +- **vite-plugin-angular:** fix HMR of component styles w/tsconfig flag ([#1539](https://github.com/analogjs/analog/issues/1539)) ([6b9c75c](https://github.com/analogjs/analog/commit/6b9c75cf29cd3539b5b4d93606ba43ef41c351f1)) +- **vite-plugin-angular:** fix HMR of component styles w/tsconfig flag ([#1539](https://github.com/analogjs/analog/issues/1539)) ([ee67cc6](https://github.com/analogjs/analog/commit/ee67cc62d3bce1b0190e28d3b542a520137798c7)) +- **vite-plugin-angular:** skip rebuilds before invalidation during testing ([#1536](https://github.com/analogjs/analog/issues/1536)) ([4610be7](https://github.com/analogjs/analog/commit/4610be7378392662bec3a56f63290cc15ce721cc)) +- **vite-plugin-angular:** use ssr.noExternal for matching libraries during testing ([#1545](https://github.com/analogjs/analog/issues/1545)) ([3f365e9](https://github.com/analogjs/analog/commit/3f365e9b9bdcb45573977270c8c4136b0a592e10)) + +### Features + +- **vite-plugin-angular:** fix .ts typechecking and add disableTypeChecking option ([#1538](https://github.com/analogjs/analog/issues/1538)) ([56b0ffe](https://github.com/analogjs/analog/commit/56b0ffe42db52d76fc12ee22f895917f2be3b4a5)) + +### Performance Improvements + +- **platform:** exclude TypeScript files from Vite esbuild plugin ([#1543](https://github.com/analogjs/analog/issues/1543)) ([de85100](https://github.com/analogjs/analog/commit/de851003761a77e6f536a0c8a43351f5f21274de)) + +### Reverts + +- Revert "fix(vite-plugin-angular): fix HMR of component styles" ([#1544](https://github.com/analogjs/analog/issues/1544)) ([eff770c](https://github.com/analogjs/analog/commit/eff770c7e40ce3eb6fe3fe523596c672f1f4fb8c)) + # [1.12.0-beta.5](https://github.com/analogjs/analog/compare/v1.12.0-beta.4...v1.12.0-beta.5) (2025-01-07) ### Bug Fixes diff --git a/package.json b/package.json index 6125846b5..90d9e0727 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "analogjs-platform", - "version": "1.12.0-beta.5", + "version": "1.12.0", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/astro-angular/package.json b/packages/astro-angular/package.json index f109cf106..873c49940 100644 --- a/packages/astro-angular/package.json +++ b/packages/astro-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/astro-angular", - "version": "1.12.0-beta.5", + "version": "1.12.0", "description": "Use Angular components within Astro", "type": "module", "author": "Brandon Roberts ", @@ -32,7 +32,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "dependencies": { - "@analogjs/vite-plugin-angular": "^1.12.0-beta.5" + "@analogjs/vite-plugin-angular": "^1.12.0" }, "peerDependencies": { "@angular-devkit/build-angular": ">=16.0.0", diff --git a/packages/content/package.json b/packages/content/package.json index bf1504140..b5f63eb76 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/content", - "version": "1.12.0-beta.5", + "version": "1.12.0", "description": "Content Rendering for Analog", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/create-analog/package.json b/packages/create-analog/package.json index 1e63bb20c..87dd6ddf9 100644 --- a/packages/create-analog/package.json +++ b/packages/create-analog/package.json @@ -1,6 +1,6 @@ { "name": "create-analog", - "version": "1.12.0-beta.5", + "version": "1.12.0", "type": "module", "license": "MIT", "author": "Brandon Roberts", diff --git a/packages/create-analog/template-angular-v16/package.json b/packages/create-analog/template-angular-v16/package.json index 52fdd4076..1e516a17a 100644 --- a/packages/create-analog/template-angular-v16/package.json +++ b/packages/create-analog/template-angular-v16/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.5", - "@analogjs/router": "^1.12.0-beta.5", + "@analogjs/content": "^1.12.0", + "@analogjs/router": "^1.12.0", "@angular/animations": "^16.2.0", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.13.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", - "@analogjs/vitest-angular": "^1.12.0-beta.5", + "@analogjs/platform": "^1.12.0", + "@analogjs/vite-plugin-angular": "^1.12.0", + "@analogjs/vitest-angular": "^1.12.0", "@angular-devkit/build-angular": "^16.2.0", "@angular/cli": "^16.2.0", "@angular/compiler-cli": "^16.2.0", diff --git a/packages/create-analog/template-angular-v17/package.json b/packages/create-analog/template-angular-v17/package.json index 845c54e57..168b2acee 100644 --- a/packages/create-analog/template-angular-v17/package.json +++ b/packages/create-analog/template-angular-v17/package.json @@ -15,8 +15,8 @@ "test": "ng test" }, "dependencies": { - "@analogjs/content": "^1.12.0-beta.5", - "@analogjs/router": "^1.12.0-beta.5", + "@analogjs/content": "^1.12.0", + "@analogjs/router": "^1.12.0", "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", - "@analogjs/vitest-angular": "^1.12.0-beta.5", + "@analogjs/platform": "^1.12.0", + "@analogjs/vite-plugin-angular": "^1.12.0", + "@analogjs/vitest-angular": "^1.12.0", "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.0", diff --git a/packages/create-analog/template-angular-v18/package.json b/packages/create-analog/template-angular-v18/package.json index 37081ee0b..a83b69e03 100644 --- a/packages/create-analog/template-angular-v18/package.json +++ b/packages/create-analog/template-angular-v18/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.5", - "@analogjs/router": "^1.12.0-beta.5", + "@analogjs/content": "^1.12.0", + "@analogjs/router": "^1.12.0", "@angular/animations": "^18.0.0", "@angular/build": "^18.0.0", "@angular/common": "^18.0.0", @@ -38,9 +38,9 @@ "zone.js": "~0.14.3" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", - "@analogjs/vitest-angular": "^1.12.0-beta.5", + "@analogjs/platform": "^1.12.0", + "@analogjs/vite-plugin-angular": "^1.12.0", + "@analogjs/vitest-angular": "^1.12.0", "@angular/cli": "^18.0.0", "@angular/compiler-cli": "^18.0.0", "jsdom": "^22.0.0", diff --git a/packages/create-analog/template-blog/package.json b/packages/create-analog/template-blog/package.json index dfb40ce2f..f16b8a7b6 100644 --- a/packages/create-analog/template-blog/package.json +++ b/packages/create-analog/template-blog/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.5", - "@analogjs/router": "^1.12.0-beta.5", + "@analogjs/content": "^1.12.0", + "@analogjs/router": "^1.12.0", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -36,9 +36,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", - "@analogjs/vitest-angular": "^1.12.0-beta.5", + "@analogjs/platform": "^1.12.0", + "@analogjs/vite-plugin-angular": "^1.12.0", + "@analogjs/vitest-angular": "^1.12.0", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-latest/package.json b/packages/create-analog/template-latest/package.json index b9e0f7cf0..641c27962 100644 --- a/packages/create-analog/template-latest/package.json +++ b/packages/create-analog/template-latest/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.5", - "@analogjs/router": "^1.12.0-beta.5", + "@analogjs/content": "^1.12.0", + "@analogjs/router": "^1.12.0", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", - "@analogjs/vitest-angular": "^1.12.0-beta.5", + "@analogjs/platform": "^1.12.0", + "@analogjs/vite-plugin-angular": "^1.12.0", + "@analogjs/vitest-angular": "^1.12.0", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/create-analog/template-minimal/package.json b/packages/create-analog/template-minimal/package.json index b9e0f7cf0..641c27962 100644 --- a/packages/create-analog/template-minimal/package.json +++ b/packages/create-analog/template-minimal/package.json @@ -15,8 +15,8 @@ }, "private": true, "dependencies": { - "@analogjs/content": "^1.12.0-beta.5", - "@analogjs/router": "^1.12.0-beta.5", + "@analogjs/content": "^1.12.0", + "@analogjs/router": "^1.12.0", "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", @@ -37,9 +37,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@analogjs/platform": "^1.12.0-beta.5", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", - "@analogjs/vitest-angular": "^1.12.0-beta.5", + "@analogjs/platform": "^1.12.0", + "@analogjs/vite-plugin-angular": "^1.12.0", + "@analogjs/vitest-angular": "^1.12.0", "@angular-devkit/build-angular": "^19.0.0", "@angular/build": "^19.0.0", "@angular/cli": "^19.0.0", diff --git a/packages/platform/package.json b/packages/platform/package.json index 550e9fb78..78036aee8 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/platform", - "version": "1.12.0-beta.5", + "version": "1.12.0", "description": "The fullstack meta-framework for Angular", "type": "module", "author": "Brandon Roberts ", @@ -29,8 +29,8 @@ }, "dependencies": { "nitropack": "^2.10.0", - "@analogjs/vite-plugin-angular": "^1.12.0-beta.5", - "@analogjs/vite-plugin-nitro": "^1.12.0-beta.5", + "@analogjs/vite-plugin-angular": "^1.12.0", + "@analogjs/vite-plugin-nitro": "^1.12.0", "vitefu": "^0.2.5" }, "peerDependencies": { diff --git a/packages/router/package.json b/packages/router/package.json index 94c3a5086..1302d64a7 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/router", - "version": "1.12.0-beta.5", + "version": "1.12.0", "description": "Filesystem-based routing for Angular", "type": "module", "author": "Brandon Roberts ", @@ -24,7 +24,7 @@ "url": "https://github.com/sponsors/brandonroberts" }, "peerDependencies": { - "@analogjs/content": "^1.12.0-beta.5", + "@analogjs/content": "^1.12.0", "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, diff --git a/packages/vite-plugin-angular/package.json b/packages/vite-plugin-angular/package.json index 0c9d6b1e4..f44a67aab 100644 --- a/packages/vite-plugin-angular/package.json +++ b/packages/vite-plugin-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-angular", - "version": "1.12.0-beta.5", + "version": "1.12.0", "description": "Vite Plugin for Angular", "type": "module", "keywords": [ diff --git a/packages/vite-plugin-nitro/package.json b/packages/vite-plugin-nitro/package.json index 3e2bb93aa..381f93217 100644 --- a/packages/vite-plugin-nitro/package.json +++ b/packages/vite-plugin-nitro/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vite-plugin-nitro", - "version": "1.12.0-beta.5", + "version": "1.12.0", "description": "A Vite plugin for adding a nitro API server", "type": "module", "author": "Brandon Roberts ", diff --git a/packages/vitest-angular/package.json b/packages/vitest-angular/package.json index 8f85ec436..b765e3e10 100644 --- a/packages/vitest-angular/package.json +++ b/packages/vitest-angular/package.json @@ -1,6 +1,6 @@ { "name": "@analogjs/vitest-angular", - "version": "1.12.0-beta.5", + "version": "1.12.0", "description": "Vitest Builder for Angular", "type": "commonjs", "author": "Brandon Roberts ",