Skip to content

Commit b56342b

Browse files
authored
Merge branch 'master' into hhristov/update-igx-ts-legacy-templates
2 parents 62cdd6b + f1c97a8 commit b56342b

File tree

10 files changed

+213
-72
lines changed

10 files changed

+213
-72
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## [14.9.2](https://github.com/IgniteUI/igniteui-cli/compare/14.9.1...14.9.2) (2026-03-11)
2+
3+
### What's Changed
4+
* fix(igx-ts): update igniteui-angular versions and remove overrides by @Hristo313 in https://github.com/IgniteUI/igniteui-cli/pull/1508
5+
* fix(igx-ts): fix eslint configurations by @Hristo313 in https://github.com/IgniteUI/igniteui-cli/pull/1509
6+
* fix(upgrade-packages): correctly glob files on windows by @damyanpetev in https://github.com/IgniteUI/igniteui-cli/pull/1511
7+
* fix(igx-ts-legacy): fix grid type import and add missing override by @Hristo313 in https://github.com/IgniteUI/igniteui-cli/pull/1519
8+
* Fix start and other npm exec commands by @damyanpetev in https://github.com/IgniteUI/igniteui-cli/pull/1520
9+
* fix(schematics): fs writeFile create check by @damyanpetev in https://github.com/IgniteUI/igniteui-cli/pull/1526
10+
* fix(packages): disable non-functional registry login attempt on upgrade by @damyanpetev in https://github.com/IgniteUI/igniteui-cli/pull/1528
11+
12+
**Full Changelog**: https://github.com/IgniteUI/igniteui-cli/compare/14.9.1...14.9.2
13+
114
## [14.9.1](https://github.com/IgniteUI/igniteui-cli/compare/14.9.0...14.9.1) (2026-02-25)
215

316
### What's Changed
@@ -6,7 +19,6 @@
619

720
**Full Changelog**: https://github.com/IgniteUI/igniteui-cli/compare/14.9.0...14.9.1
821

9-
1022
# [14.9.0](https://github.com/IgniteUI/igniteui-cli/compare/v14.8.5...14.9.0) (2026-02-25)
1123

1224
🎉 This update includes:

packages/cli/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "igniteui-cli",
3-
"version": "14.9.1",
3+
"version": "14.9.2",
44
"description": "CLI tool for creating Ignite UI projects",
55
"keywords": [
66
"CLI",
@@ -76,8 +76,8 @@
7676
"all": true
7777
},
7878
"dependencies": {
79-
"@igniteui/angular-templates": "~21.1.1491",
80-
"@igniteui/cli-core": "~14.9.1",
79+
"@igniteui/angular-templates": "~21.1.1492",
80+
"@igniteui/cli-core": "~14.9.2",
8181
"@inquirer/prompts": "^7.9.0",
8282
"@types/yargs": "^17.0.33",
8383
"chalk": "^5.3.0",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@igniteui/cli-core",
3-
"version": "14.9.1",
3+
"version": "14.9.2",
44
"description": "Base types and functionality for Ignite UI CLI",
55
"repository": {
66
"type": "git",

packages/core/packages/PackageManager.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import { App, ProjectConfig, Util } from "../util";
66

77
import componentsConfig = require("./components");
88

9+
/** @internal */
10+
export const REGISTRY_ATTEMPT_LOGIN = false;
11+
912
export class PackageManager {
1013
private static ossPackage: string = "ignite-ui";
1114
private static fullPackage: string = "@infragistics/ignite-ui-full";
@@ -45,6 +48,10 @@ export class PackageManager {
4548
const version = ossVersion ? `@"${ossVersion}"` : "";
4649
const errorMsg = "Something went wrong, " +
4750
"please follow the steps in this guide: https://www.igniteui.com/help/using-ignite-ui-npm-packages";
51+
Util.log(
52+
"The project you've created requires the full version of Ignite UI from Infragistics private feed.",
53+
"gray"
54+
);
4855
// fallback to @latest, in case when igniteui-full does not have a matching version to ossVersion
4956
// ex: "ignite-ui": "^21.1.13" BUT --> ignite-ui-full": "^21.1.11" (no 21.1.13 released).
5057
// TODO: update temp fix - only working in 21.1.11 without errors
@@ -229,11 +236,12 @@ export class PackageManager {
229236
// tslint:disable-next-line:object-literal-sort-keys
230237
Util.execSync(`npm whoami --registry=${fullPackageRegistry}`, { stdio: "pipe", encoding: "utf8" });
231238
} catch (error) {
239+
if (!REGISTRY_ATTEMPT_LOGIN) {
240+
Util.log(message, "gray");
241+
return true;
242+
}
243+
232244
// try registering the user:
233-
Util.log(
234-
"The project you've created requires the full version of Ignite UI from Infragistics private feed.",
235-
"gray"
236-
);
237245
Util.log(
238246
"We are initiating the login process for you. This will be required only once per environment.",
239247
"gray"

packages/core/update/Update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export async function updateWorkspace(rootPath: string): Promise<boolean> {
5555
}
5656
const pkgJSON = JSON.parse(fileString);
5757

58-
const errorMsg = "Something went wrong, please follow the steps in this guide: " + guideLink;
58+
const errorMsg = "Can't detect/setup Infragistics feed login required for licensed packages.\nSee: " + guideLink;
5959
if (!PackageManager.ensureRegistryUser(config, errorMsg)) {
6060
return false;
6161
}

packages/igx-templates/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@igniteui/angular-templates",
3-
"version": "21.1.1491",
3+
"version": "21.1.1492",
44
"description": "Templates for Ignite UI for Angular projects and components",
55
"repository": {
66
"type": "git",
@@ -12,7 +12,7 @@
1212
"author": "Infragistics",
1313
"license": "MIT",
1414
"dependencies": {
15-
"@igniteui/cli-core": "~14.9.1",
15+
"@igniteui/cli-core": "~14.9.2",
1616
"typescript": "~5.5.4"
1717
}
1818
}

packages/ng-schematics/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@igniteui/angular-schematics",
3-
"version": "21.1.1491",
3+
"version": "21.1.1492",
44
"description": "Ignite UI for Angular Schematics for ng new and ng generate",
55
"repository": {
66
"type": "git",
@@ -20,8 +20,8 @@
2020
"dependencies": {
2121
"@angular-devkit/core": "^21.0.0",
2222
"@angular-devkit/schematics": "^21.0.0",
23-
"@igniteui/angular-templates": "~21.1.1491",
24-
"@igniteui/cli-core": "~14.9.1",
23+
"@igniteui/angular-templates": "~21.1.1492",
24+
"@igniteui/cli-core": "~14.9.2",
2525
"@schematics/angular": "^21.0.0",
2626
"minimatch": "^10.0.1",
2727
"rxjs": "~7.8.1"
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
import { EmptyTree } from "@angular-devkit/schematics";
2+
import { UnitTestTree } from "@angular-devkit/schematics/testing";
3+
import { NgTreeFileSystem } from "./NgFileSystem";
4+
5+
describe("NgTreeFileSystem", () => {
6+
let tree: UnitTestTree;
7+
let fs: NgTreeFileSystem;
8+
9+
beforeEach(() => {
10+
tree = new UnitTestTree(new EmptyTree());
11+
fs = new NgTreeFileSystem(tree);
12+
});
13+
14+
describe("fileExists", () => {
15+
it("should return true when the file exists in the tree", () => {
16+
tree.create("/src/app/app.component.ts", "content");
17+
expect(fs.fileExists("/src/app/app.component.ts")).toBeTrue();
18+
});
19+
20+
it("should return false when the file does not exist in the tree", () => {
21+
expect(fs.fileExists("/src/missing.ts")).toBeFalse();
22+
});
23+
});
24+
25+
describe("readFile", () => {
26+
it("should return the file content as a string", () => {
27+
tree.create("/src/app/app.component.ts", "export class AppComponent {}");
28+
expect(fs.readFile("/src/app/app.component.ts")).toBe("export class AppComponent {}");
29+
});
30+
31+
it("should return an empty string when the file does not exist", () => {
32+
expect(fs.readFile("/src/nonexistent.ts")).toBe("");
33+
});
34+
35+
it("should ignore the encoding parameter and still return the content", () => {
36+
tree.create("/src/file.txt", "hello");
37+
expect(fs.readFile("/src/file.txt", "utf-8")).toBe("hello");
38+
});
39+
});
40+
41+
describe("writeFile", () => {
42+
it("should create a new file when it does not exist", () => {
43+
fs.writeFile("/src/new-file.ts", "new content");
44+
expect(tree.readContent("/src/new-file.ts")).toBe("new content");
45+
});
46+
47+
it("should overwrite an existing file", () => {
48+
tree.create("/src/existing.ts", "original content");
49+
fs.writeFile("/src/existing.ts", "updated content");
50+
expect(tree.readContent("/src/existing.ts")).toBe("updated content");
51+
});
52+
});
53+
54+
describe("directoryExists", () => {
55+
it("should return true when the directory contains files", () => {
56+
tree.create("/src/app/app.component.ts", "");
57+
expect(fs.directoryExists("/src/app")).toBeTrue();
58+
});
59+
60+
it("should return true when the directory contains subdirectories", () => {
61+
tree.create("/src/app/nested/file.ts", "");
62+
expect(fs.directoryExists("/src/app")).toBeTrue();
63+
});
64+
65+
it("should return false for an empty or non-existent directory", () => {
66+
expect(fs.directoryExists("/src/nonexistent")).toBeFalse();
67+
});
68+
});
69+
70+
describe("glob", () => {
71+
beforeEach(() => {
72+
tree.create("/src/app/app.component.ts", "");
73+
tree.create("/src/app/app.module.ts", "");
74+
tree.create("/src/app/shared/shared.component.ts", "");
75+
tree.create("/src/environments/environment.ts", "");
76+
tree.create("/src/environments/environment.prod.ts", "");
77+
});
78+
79+
it("should return all files matching the pattern", () => {
80+
const results = fs.glob("/src", "**/*.ts");
81+
expect(results).toContain("/src/app/app.component.ts");
82+
expect(results).toContain("/src/app/app.module.ts");
83+
expect(results).toContain("/src/app/shared/shared.component.ts");
84+
expect(results).toContain("/src/environments/environment.ts");
85+
expect(results).toContain("/src/environments/environment.prod.ts");
86+
});
87+
88+
it("should return only files matching a specific pattern", () => {
89+
const results = fs.glob("/src", "**/environment*.ts");
90+
expect(results).toContain("/src/environments/environment.ts");
91+
expect(results).toContain("/src/environments/environment.prod.ts");
92+
expect(results).not.toContain("/src/app/app.component.ts");
93+
});
94+
95+
it("should return an empty array when no files match the pattern", () => {
96+
const results = fs.glob("/src", "**/*.html");
97+
expect(results).toEqual([]);
98+
});
99+
100+
it("should skip subdirectories matching ignorePatterns", () => {
101+
tree.create("/src/node_modules/lib/index.ts", "");
102+
103+
const results = fs.glob("/src", "**/*.ts", ["node_modules"]);
104+
expect(results.some(r => r.includes("node_modules"))).toBeFalse();
105+
});
106+
107+
it("should return an empty array when dirPath does not exist", () => {
108+
const results = fs.glob("/nonexistent", "**/*.ts");
109+
expect(results).toEqual([]);
110+
});
111+
});
112+
});

packages/ng-schematics/src/utils/NgFileSystem.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ export class NgTreeFileSystem implements IFileSystem {
1414
}
1515

1616
public writeFile(filePath: string, text: string): void {
17-
return this.tree.overwrite(filePath, text);
17+
this.tree.exists(filePath)
18+
? this.tree.overwrite(filePath, text)
19+
: this.tree.create(filePath, text);
1820
}
1921

2022
public directoryExists(dirPath: string): boolean {

0 commit comments

Comments
 (0)