chore(ngx-env): add compatibility with Angular 22 - #158
Merged
Merged
Conversation
Bump @ngx-env/builder to 22.0.0 and move the Angular toolchain to v22.
- packages/angular: peer + dev deps to @angular/build ^22, architect
^0.2201.0, TypeScript ~6.0.0, webpack 5.109.2 (aligns with
@angular-devkit/build-angular@22); resync application/unit-test builder
schemas from Angular v22.
- Add rootDir + ignoreDeprecations("6.0") to the package tsconfig and switch
the schema tooling to `import cpy = require("cpy")` for TypeScript 6.
- Ship runtime.d.ts so the side-effect `@ngx-env/builder/runtime` import
type-checks under bundler/CJS resolution.
- Align @dotenv-run/webpack and the example workspace on webpack 5.109.2 so
the DotenvRunPlugin runs against a single webpack instance.
- Upgrade the ng-app-cli example to Angular 22 / TypeScript 6.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chihab
force-pushed
the
claude/ngx-env-angular-22-fbkago
branch
from
August 8, 2026 18:13
e1ce179 to
f9c2f78
Compare
Add a `smoke-pack` CI job that packs @ngx-env/builder with `pnpm pack` (rewriting the `workspace:^` internal deps to concrete, registry-resolvable ranges), generates a fresh Angular 22 app outside the workspace, installs the tarball, runs `ng add`, and asserts an `NG_APP_` variable is injected into the production bundle. This validates the real consumer install graph -- peer-dep resolution and a single deduped webpack/Angular instance -- which the in-repo examples cannot, since they resolve the builder through the pnpm workspace. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The builders import `@dotenv-run/core` as a value (`env`, `DotenvRunPlugin` config, `Dict`) in every code path, but it was only a devDependency. At runtime it was reachable solely through the OPTIONAL `@dotenv-run/webpack` dependency, so `npm i --omit=optional` or a strict/isolated (pnpm/PnP) install of `@ngx-env/builder` would fail to resolve it -- notably on the default esbuild/application path, which does not use webpack at all. Declare `@dotenv-run/core` as a direct `dependency`. Harden the pack smoke test to assert the installed builder declares it (a plain `--omit=optional` install can't express this because esbuild itself relies on optionalDependencies for its platform binary). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bump @ngx-env/builder to 22.0.0 and move the Angular toolchain to v22.
^0.2201.0, TypeScript ~6.0.0, webpack 5.109.2 (aligns with
@angular-devkit/build-angular@22); resync application/unit-test builder
schemas from Angular v22.
the schema tooling to
import cpy = require("cpy")for TypeScript 6.@ngx-env/builder/runtimeimporttype-checks under bundler/CJS resolution.
the DotenvRunPlugin runs against a single webpack instance.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_0181uWSuY7aymLgS4gMnCJAv