diff --git a/CHANGELOG.md b/CHANGELOG.md index 892d7661c..399d09e8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 0.0.43 - 2026-11-03 + +- Supported named `deferredImports` blocks (Angular 22.2), and kept native `?.` when linking v22 declarations. +- Defaulted the Vite plugin's `angularVersion` to the installed `@angular/core` version. +- Added `transformForBrowser`: TypeScript with Angular's settings, matching tsc, with async lowered for zone.js. +- Downleveled async/await for zone.js in the Vite plugin like the Angular CLI, and respected package `sideEffects` when marking top-level calls pure. +- Merged compile passes and moved more plugin logic to Rust. +- Closed many ngtsc output gaps: shared long strings and literals in the constant pool, implicit signal `debugName`, the sanitizers added in 22.0.1, dynamic host attribute values, project-wide `preserveWhitespaces`, and legacy i18n message ids. +- Fixed DI tokens: namespace-qualified and same-file interface/type-alias param types, string `@Inject` tokens, `@Attribute()` outside components, flag arrays in `useFactory`/`useClass` deps, and constructor overloads. +- Gave each `@defer` block its own deps function, lazy-loaded `forwardRef(() => X)` imports, deferred imports used only inside `@defer`, and emitted `ɵɵenableIncrementalHydrationRuntime` for incremental hydration. +- Fixed partial output and the linker: NgModule component scope, pipe ctor deps and inherited factories in `ɵɵngDeclareFactory`, escaped metadata strings, `@defer` dependencies, lazy NgModule lists, and declarations in any position. +- Fixed import elision to keep imports the output still uses, and the optimizer's pure wrapping of classes with static members or blocks. +- Read decorator metadata with the partial evaluator, folded number consts in template literals, and wrapped signal query predicates in `forwardRef`. +- Compiled every stacked `@HostListener`/`@HostBinding` on a member, and `animate.enter`/`animate.leave` listeners. +- Fixed parser and lexer cases: a hang on NUL, HTML void names in svg/math, non-ASCII selectors, `<` inside `@let`, escaped strings, and key spans. +- Kept the Vite dev server from serving a stale file while its component fails to compile. +- Updated Oxc to 0.157, napi-rs to 3.16, and other dependencies. + ## 0.0.42 - 2026-10-20 - Linked with the application's `angularVersion`, so `img`/`video` `[src]` keeps `ɵɵsanitizeUrl` on runtimes before 22.2.2. diff --git a/napi/angular-compiler/index.js b/napi/angular-compiler/index.js index 4c2abd30c..b8cfb8e8f 100644 --- a/napi/angular-compiler/index.js +++ b/napi/angular-compiler/index.js @@ -94,12 +94,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-android-arm64/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -117,12 +117,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-android-arm-eabi/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -152,12 +152,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-win32-x64-gnu/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -175,12 +175,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-win32-x64-msvc/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -199,12 +199,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-win32-ia32-msvc/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -222,12 +222,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-win32-arm64-msvc/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -248,12 +248,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-darwin-universal/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -271,12 +271,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-darwin-x64/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -294,12 +294,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-darwin-arm64/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -321,12 +321,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-freebsd-x64/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -344,12 +344,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-freebsd-arm64/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -372,12 +372,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-x64-musl/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -395,12 +395,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-x64-gnu/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -420,12 +420,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-arm64-musl/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -443,12 +443,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-arm64-gnu/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -468,12 +468,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-arm-musleabihf/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -491,12 +491,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-arm-gnueabihf/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -516,12 +516,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-loong64-musl/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -539,12 +539,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-loong64-gnu/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -564,12 +564,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-riscv64-musl/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -587,12 +587,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-riscv64-gnu/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -611,12 +611,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-ppc64-gnu/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -634,12 +634,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-linux-s390x-gnu/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -661,12 +661,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-openharmony-arm64/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -684,12 +684,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-openharmony-x64/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -707,12 +707,12 @@ function requireNative() { const bindingPackageVersion = require('@oxc-angular/binding-openharmony-arm/package.json').version if ( - bindingPackageVersion !== '0.0.42' && + bindingPackageVersion !== '0.0.43' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0' ) { throw new Error( - `Native binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `Native binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } return binding @@ -856,9 +856,9 @@ if (!nativeBinding || forceWasi) { ) { const bindingPackageVersion = require('@oxc-angular/binding-wasm32-wasi/package.json').version - if (bindingPackageVersion !== '0.0.42') { + if (bindingPackageVersion !== '0.0.43') { throw new Error( - `WASI binding package version mismatch, expected 0.0.42 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, + `WASI binding package version mismatch, expected 0.0.43 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`, ) } } diff --git a/napi/angular-compiler/package.json b/napi/angular-compiler/package.json index e145000ee..64c7095ca 100644 --- a/napi/angular-compiler/package.json +++ b/napi/angular-compiler/package.json @@ -1,6 +1,6 @@ { "name": "@oxc-angular/vite", - "version": "0.0.42", + "version": "0.0.43", "description": "Oxc Angular Compiler Vite plugin", "keywords": [ "angular",