Skip to content

Commit

Permalink
Merge pull request #1172 from IgniteUI/mvenkov/path-to-pascal-or-came…
Browse files Browse the repository at this point in the history
…l-case-view-12

fix: update Utils.LowerDashed function
  • Loading branch information
Lipata authored Nov 14, 2023
2 parents 839afe9 + 08dbd38 commit be47951
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [12.0.7](https://github.com/IgniteUI/igniteui-cli/compare/v12.0.6...v12.0.7) (2023-11-14)

## What's Changed

* Update Utils.LowerDashed function by @wnvko in https://github.com/IgniteUI/igniteui-cli/pull/1171

# [12.0.6](https://github.com/IgniteUI/igniteui-cli/compare/v12.0.5...v12.0.6) (2023-10-02)

## What's Changed
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "igniteui-cli",
"version": "12.0.6",
"version": "12.0.7",
"description": "CLI tool for creating Ignite UI projects",
"keywords": [
"CLI",
Expand Down Expand Up @@ -78,8 +78,8 @@
"all": true
},
"dependencies": {
"@igniteui/angular-templates": "~16.0.1206",
"@igniteui/cli-core": "~12.0.6",
"@igniteui/angular-templates": "~16.0.1207",
"@igniteui/cli-core": "~12.0.7",
"chalk": "^2.3.2",
"fs-extra": "^3.0.1",
"glob": "^7.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igniteui/cli-core",
"version": "12.0.6",
"version": "12.0.7",
"description": "Base types and functionality for Ignite UI CLI",
"repository": {
"type": "git",
Expand Down
6 changes: 5 additions & 1 deletion packages/core/util/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ export class Util {
* lower-dashed string
*/
public static lowerDashed(text: string) {
return text.replace(/\s+/g, "-").toLowerCase();
const regex = new RegExp("[\\s]+|([\\p{Ll}](?=[\\p{Lu}\\p{Nd}]))", "gu");
const result = text.trim()
.replace(regex, "$1-")
.toLowerCase();
return result;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/igx-templates/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igniteui/angular-templates",
"version": "16.0.1206",
"version": "16.0.1207",
"description": "Templates for Ignite UI for Angular projects and components",
"repository": {
"type": "git",
Expand All @@ -12,7 +12,7 @@
"author": "Infragistics",
"license": "MIT",
"dependencies": {
"@igniteui/cli-core": "~12.0.6",
"@igniteui/cli-core": "~12.0.7",
"typescript": "~4.7.2"
}
}
6 changes: 3 additions & 3 deletions packages/ng-schematics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igniteui/angular-schematics",
"version": "16.0.1206",
"version": "16.0.1207",
"description": "Ignite UI for Angular Schematics for ng new and ng generate",
"repository": {
"type": "git",
Expand All @@ -20,8 +20,8 @@
"dependencies": {
"@angular-devkit/core": "~14.0.0",
"@angular-devkit/schematics": "~14.0.0",
"@igniteui/angular-templates": "~16.0.1206",
"@igniteui/cli-core": "~12.0.6",
"@igniteui/angular-templates": "~16.0.1207",
"@igniteui/cli-core": "~12.0.7",
"@schematics/angular": "~14.0.0",
"rxjs": "^6.6.3"
},
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/new-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("New command", () => {
expect(fs.existsSync("./jQuery Proj")).toBeTruthy();
expect(filesDiff("../templates/jquery/js/projects/empty/files", "./jQuery Proj")).toEqual([]);
const packageText = fs.readFileSync("./jQuery Proj/package.json", "utf-8");
expect(JSON.parse(packageText).name).toEqual("jquery-proj");
expect(JSON.parse(packageText).name).toEqual("j-query-proj");
expect(fs.existsSync("./jQuery Proj/.gitignore")).toBeTruthy();
testFolder = "./jQuery Proj";

Expand Down

0 comments on commit be47951

Please sign in to comment.