You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: regenerate Angular base project and update dependencies - #1854
The Angular project templates (packages/igx-templates/igx-ts/projects/_base and friends) carried a hand-written copy of what ng new generates: angular.json, package.json, the tsconfigs, src/main.ts, .vscode/, .editorconfig, .gitignore, the favicon. Every Angular release meant diffing that copy against a fresh ng new and porting the changes by hand, and the copies drifted (side-nav-auth was still on vitest 4 and pinned an angular-auth-oidc-client version that was never published).
This PR stops keeping that copy. ig new and the ng-new schematic now create Angular projects with Angular's own CLI, when the project is created:
ng new (scss, routing, no SSR, zone.js kept), run in a temp folder and copied into place
ng add angular-eslint@<Angular major>
ng add igniteui-angular@<IGNITEUI_ANGULAR_PACKAGE range>
The project's files/ are laid over the result, placeholders substituted
Our deviations are applied as patches to the generated angular.json, package.json and tsconfigs
npm install adds playwright and the packages the project declares in its extras
The Angular major is resolved with npm view from the peerDependencies of the IGNITEUI_ANGULAR_PACKAGE range, so constants.ts is the only place Angular project versions are set.
angular.json: adds src/assets, the theme, our budgets, the environment file replacement, runnerConfig for tests and extract-i18n.
package.json: our start/test scripts, igniteui-angular at the IGNITEUI_ANGULAR_PACKAGE range instead of the ^<version>ng add saves, @angular/animations, vitest in a real browser through @vitest/browser-playwright instead of jsdom, and the CLI package as a devDependency (igniteui-cli for ig new, @igniteui/angular-schematics for the schematic).
The AI config files that ng add igniteui-angular writes are skipped (IGNITEUI_SKIP_AI_CONFIG) and removed, because ig new and the schematic run their own ai-config with prompts. Without this, AI tooling was added twice.
_base/index.ts: BaseIgxProject.scaffold runs the steps above. If creation fails before the project is complete, the folder is removed. If only the final installs fail, the project is kept and the remaining npm install command is printed.
Project files/ are now an overlay: the files ng new generates are deleted from _base and side-nav-auth. A project's extra packages and global types go in extras; side-nav-auth and side-nav-mini-auth share authExtras, which pins angular-auth-oidc-client and @angular/language-service to the project's Angular major.
ng-new schematic: calls the same scaffold instead of the app-projects schematic, which is removed. ai-config and the guided add loop run in a tree scoped to the new project.
cli-config schematic: skips queuing ai-config when IGNITEUI_SKIP_AI_CONFIG is set.
ig new: marks Angular projects' packages as installed, so ig add installs what it adds right away. It also prints the ig add / ig start next steps for every non-Blazor scaffold, and the namespace warning only for Blazor.
core/util/ai-skills.ts: package skills are read through the App FS that found them, which in the schematic is a tree rooted at the new project, not the cwd.
scripts/versionScript.ts: reads the igniteui-angular version from IGNITEUI_ANGULAR_PACKAGE, since _base/files/package.json no longer exists.
scripts/smoke-test.sh: calls this checkout's packages/cli/lib/cli.js directly instead of bin/execute.js. Angular projects now get a project-local igniteui-cli during new, and the wrapper would hand list/add off to that published CLI.
Removed the duplicate _base_with_home/files/src/favicon.ico.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The network-dependent generator and major tooling upgrades need final human validation before approval.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Avoid overwriting compatible angular-eslint pins during normalization
scripts/generate-angular-base.mjs:125
This normalization overrides the pin preserved above. If the current angular-eslint pin is ~22.6.2 or exactly 22.6.2 and the installed version satisfies it, these lines still rewrite it to ~22.6.0. That admits previously excluded versions and makes --check report drift even though the existing pin is compatible. Only normalize angular-eslint when its existing pin was not retained.
…ates
- Deleted package.json, tsconfig.app.json, and tsconfig.spec.json from side-nav-auth project.
- Updated index.ts files in side-nav-auth and side-nav-mini-auth to share authentication extras.
- Removed ng-schematics app-projects related files and schema.
- Updated ng-new schematic to streamline project creation and remove unnecessary complexity.
- Removed generate-angular-base script and upstream tracking for Angular base files.
- Updated versionScript to utilize constants for igniteui-angular package versioning.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Smoke tests can exercise published templates instead of the checkout, and schematic AI skill copying resolves physical sources from the wrong directory.
ScopedTree roots virtual reads at the new project, but it does not change the physical paths used to copy AI skills. In packages/core/util/ai-skills.ts, resolveSkillsRoots() detects the installed skills through that tree and returns a relative node_modules/igniteui-angular/skills path. copyAISkillsToProject() then reads that path through FsFileSystem relative to the unchanged parent working directory. When an agent is selected, this copies no package skills if the parent lacks them, or copies the parent's version instead of the new project's. The scaffold has already deleted the initial AI config. Resolve physical skill sources against the new project's directory as well, and add a disk-backed schematic regression test.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The PR description references missing generator and fingerprint files, leaving documented commands unusable and validation claims inconsistent with the runtime-generation design.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The new disk-to-tree boundary lacks a disk-backed regression test verifying that scoped AI-config and guided-add rules can read scaffolded files and persist their changes after workflow commit.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The licensed-feed upgrade still runs against the parent tree instead of the new project root, leaving the generated project's trial dependencies unchanged.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Out-of-transaction filesystem writes, package installs, and private Angular APIs require maintainer validation of real Angular CLI creation, failure cleanup, and dry-run behavior beyond the stubbed tests and reported ig new smoke runs.
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
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.
Description
The Angular project templates (
packages/igx-templates/igx-ts/projects/_baseand friends) carried a hand-written copy of whatng newgenerates:angular.json,package.json, the tsconfigs,src/main.ts,.vscode/,.editorconfig,.gitignore, the favicon. Every Angular release meant diffing that copy against a freshng newand porting the changes by hand, and the copies drifted (side-nav-authwas still on vitest 4 and pinned anangular-auth-oidc-clientversion that was never published).This PR stops keeping that copy.
ig newand theng-newschematic now create Angular projects with Angular's own CLI, when the project is created:ng new(scss, routing, no SSR, zone.js kept), run in a temp folder and copied into placeng add angular-eslint@<Angular major>ng add igniteui-angular@<IGNITEUI_ANGULAR_PACKAGE range>files/are laid over the result, placeholders substitutedangular.json,package.jsonand tsconfigsnpm installaddsplaywrightand the packages the project declares in itsextrasThe Angular major is resolved with
npm viewfrom thepeerDependenciesof theIGNITEUI_ANGULAR_PACKAGErange, soconstants.tsis the only place Angular project versions are set.What changed
_base/scaffold.ts(new):generateProject(steps 1–3),patchAngularJson,patchPackageJson,updateJson,npmInstall.angular.json: addssrc/assets, the theme, our budgets, the environment file replacement,runnerConfigfor tests andextract-i18n.package.json: ourstart/testscripts,igniteui-angularat theIGNITEUI_ANGULAR_PACKAGErange instead of the^<version>ng addsaves,@angular/animations, vitest in a real browser through@vitest/browser-playwrightinstead of jsdom, and the CLI package as a devDependency (igniteui-cliforig new,@igniteui/angular-schematicsfor the schematic).ng add igniteui-angularwrites are skipped (IGNITEUI_SKIP_AI_CONFIG) and removed, becauseig newand the schematic run their ownai-configwith prompts. Without this, AI tooling was added twice._base/index.ts:BaseIgxProject.scaffoldruns the steps above. If creation fails before the project is complete, the folder is removed. If only the final installs fail, the project is kept and the remainingnpm installcommand is printed.files/are now an overlay: the filesng newgenerates are deleted from_baseandside-nav-auth. A project's extra packages and global types go inextras;side-nav-authandside-nav-mini-authshareauthExtras, which pinsangular-auth-oidc-clientand@angular/language-serviceto the project's Angular major.ng-newschematic: calls the samescaffoldinstead of theapp-projectsschematic, which is removed.ai-configand the guided add loop run in a tree scoped to the new project.cli-configschematic: skips queuingai-configwhenIGNITEUI_SKIP_AI_CONFIGis set.ig new: marks Angular projects' packages as installed, soig addinstalls what it adds right away. It also prints theig add/ig startnext steps for every non-Blazor scaffold, and the namespace warning only for Blazor.core/util/ai-skills.ts: package skills are read through the App FS that found them, which in the schematic is a tree rooted at the new project, not the cwd.scripts/versionScript.ts: reads theigniteui-angularversion fromIGNITEUI_ANGULAR_PACKAGE, since_base/files/package.jsonno longer exists.scripts/smoke-test.sh: calls this checkout'spackages/cli/lib/cli.jsdirectly instead ofbin/execute.js. Angular projects now get a project-localigniteui-cliduringnew, and the wrapper would handlist/addoff to that published CLI._base_with_home/files/src/favicon.ico.Related Issue
Closes #1527
Type of Change
Affected Packages
igniteui-cli(packages/cli)@igniteui/cli-core(packages/core)@igniteui/angular-templates(packages/igx-templates)@igniteui/angular-schematics(packages/ng-schematics)@igniteui/mcp-server(packages/igniteui-mcp)Checklist
npm run test)npm run build)npm run lint)Additional Context
spec/templates/angular-specpasses. The fullnpm run testwas not run.scripts/smoke-test.sh): every Angular project, plusbase,side-nav-authandside-nav-mini-auth, installs and builds.baseproject,npm test(vitest 5) andnpm run lintpass.--checkexits 0.