Skip to content

fix(@angular/build): ensure the JIT compiler is available for Vitest tests that use providersFile. - #32304

Open
mistrykaran91 wants to merge 1 commit into
angular:mainfrom
mistrykaran91:fix/jit-compiler-vitest-issue
Open

fix(@angular/build): ensure the JIT compiler is available for Vitest tests that use providersFile.#32304
mistrykaran91 wants to merge 1 commit into
angular:mainfrom
mistrykaran91:fix/jit-compiler-vitest-issue

Conversation

@mistrykaran91

Copy link
Copy Markdown
Contributor

Fixes #31993

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Compilation issue when used providerFile with Vitest

Issue Number: #31993

What is the new behavior?

Fixes the compilation issue by addding @angular/compiler

Does this PR introduce a breaking change?

  • Yes
  • No

… is available specifically for Vitest tests that use providersFile.

Fixes angular#31993
enisz added a commit to enisz/bitbutler that referenced this pull request Aug 21, 2026
* #269: add design spec for Angular core v22 upgrade

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TjF4Qi2YtfUiK3Vb5bYs1t

* #269: add implementation plan for Angular core v22 upgrade

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TjF4Qi2YtfUiK3Vb5bYs1t

* #269: upgrade Angular framework to v21

Bumps @angular/core, common, compiler, compiler-cli, forms,
platform-browser, router, build, cli, localize, and cdk to 21.2.x.
@ng-select/ng-select stays untouched at 20.7.0 for a separate issue.

Angular 21 restricts asset input paths to inside the project directory,
so the shared public/ folder moves to packages/app/public/, updating
the Electron i18n loader, electron-builder packaging, and CI path
filters that referenced it.

Also patches a confirmed open upstream bug (angular/angular-cli#31993,
fix angular/angular-cli#32304 unmerged) via patch-package: the
@angular/build Vitest test runner crashes on providersFile without it.

Fixes three pre-existing test issues that were masked by that crash
and only surfaced once the app's 153 spec files could actually run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TjF4Qi2YtfUiK3Vb5bYs1t

* #269: upgrade Angular framework to v22 and pin TypeScript to 6.0

* #269: address final review findings - fix npm ci ERESOLVE, remove dead deps, close DI bug class

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* #269: removed spec and plan

* #269: restore prestart native-module rebuild hook

Restores the prestart/prestart:once scripts (electron-builder
install-app-deps) that were dropped during an unrelated squash-merge.
Without them, better-sqlite3's native binary can drift out of sync
with Electron's bundled Node ABI whenever Electron floats to a newer
patch version, causing a NODE_MODULE_VERSION mismatch at startup.

* #269: fix deprecated Sass if() syntax in theme check-marker mixins

The Sass version bundled with Angular 22's build tooling deprecates
the comma-based if() function in favor of the semicolon keyword-arg
form, to avoid future collision with the native CSS if() function.
Updates all 16 theme files (light/dark per theme).

* #269: update 关于 modal tech stack versions for Angular v22 and TS 6.0

angular and typescript entries were left at their pre-upgrade versions
after the framework bump; brought them in line with the versions
declared in package.json.

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

项目

None yet

Development

Successfully merging this pull request may close these issues.

@angular/build:unit-test with Vitest test runner throws Failed to import test file error

1 participant