Skip to content

Commit

Permalink
Merge branch 'main' into add-storybook-ng18
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	package.json
#	projects/date-picker/CHANGELOG.md
#	projects/date-picker/package.json
#	projects/demo-app/src/app/date-picker/date-picker-demo.component.html
#	projects/demo-app/src/app/message-box/message-box-demo.component.html
#	projects/demo-app/src/app/numeric-stepper/numeric-stepper-demo.component.html
#	projects/demo-app/src/app/snackbar/snackbar-demo.component.html
#	projects/demo-app/src/app/time-picker/time-picker-demo.component.html
#	projects/message-box-dialog/src/message-box-dialog.component.html
#	projects/overlay/src/overlay.component.html
#	projects/status/src/status-detail/status-detail.component.html
#	projects/time-picker/src/time-picker.component.html
#	projects/time-picker/src/time-picker.component.ts
#	projects/user-card/src/user-card.component.html
  • Loading branch information
Badisi committed Sep 3, 2024
2 parents 2aa36f0 + 6ce3362 commit 3a0acd1
Show file tree
Hide file tree
Showing 52 changed files with 881 additions and 1,140 deletions.
4 changes: 0 additions & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
printf "> Validating commit message... "
npx --no -- commitlint --edit "$1"
printf "OK\n"

printf "> Linting staged files... "
npx --no -- lint-staged --quiet
printf "OK\n"
61 changes: 42 additions & 19 deletions README.md

Large diffs are not rendered by default.

92 changes: 31 additions & 61 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,67 +198,6 @@
}
}
},
"numeric-stepper": {
"projectType": "library",
"root": "projects/numeric-stepper",
"sourceRoot": "projects/numeric-stepper/src",
"prefix": "numeric-stepper",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/numeric-stepper/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/numeric-stepper/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/numeric-stepper/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/numeric-stepper/src/test.ts",
"tsConfig": "projects/numeric-stepper/tsconfig.spec.json",
"karmaConfig": "projects/numeric-stepper/karma.conf.js"
}
},
"storybook": {
"builder": "@storybook/angular:start-storybook",
"options": {
"configDir": "projects/numeric-stepper/.storybook",
"browserTarget": "numeric-stepper:build",
"compodoc": true,
"compodocArgs": [
"-e",
"json",
"-d",
"projects/numeric-stepper"
],
"port": 6006
}
},
"build-storybook": {
"builder": "@storybook/angular:build-storybook",
"options": {
"configDir": "projects/numeric-stepper/.storybook",
"browserTarget": "numeric-stepper:build",
"compodoc": true,
"compodocArgs": [
"-e",
"json",
"-d",
"projects/numeric-stepper"
],
"outputDir": "dist/storybook/numeric-stepper"
}
}
}
},
"core": {
"projectType": "library",
"root": "projects/core",
Expand Down Expand Up @@ -352,6 +291,37 @@
}
}
},
"numeric-stepper": {
"projectType": "library",
"root": "projects/numeric-stepper",
"sourceRoot": "projects/numeric-stepper/src",
"prefix": "numeric-stepper",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/numeric-stepper/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/numeric-stepper/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/numeric-stepper/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/numeric-stepper/src/test.ts",
"tsConfig": "projects/numeric-stepper/tsconfig.spec.json",
"karmaConfig": "projects/numeric-stepper/karma.conf.js"
}
}
}
},
"overlay": {
"projectType": "library",
"root": "projects/overlay",
Expand Down
File renamed without changes.
80 changes: 22 additions & 58 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
{
"private": true,
"scripts": {
"ncu": "npx npm-check-updates -i --target=minor --dep=dev,peer,optional,prod --format=group --packageFile='{,projects/**/}package.json'",
"ncu": "npx npm-check-updates -i --dep=dev,peer,optional,prod --format=group --packageFile='{,projects/**/}package.json'",
"prepare": "husky || true",
"new-package": "ng g .:new-package",
"lint": "nx run-many -t lint",
"prettier": "prettier . --write",
"test:ci": "nx run-many -t test:ci",
"build": "nx run-many -t build:ng --verbose",
"release": "node -r @swc-node/register ./scripts/release.ts --verbose",
"release:dry-run": "npm run release -- --dry-run",
"postinstall": "patch-package",
"start": "ng serve",
"prettier": "npx prettier . --write",
"demo": "ng run storybook:storybook",
"nx": "nx"
"postinstall": "patch-package"
},
"workspaces": [
"projects/core",
"projects/date-picker",
"projects/demo-app",
"projects/layout",
"projects/list-loader",
"projects/message-box",
Expand All @@ -34,68 +32,34 @@
"projects/user-card",
"projects/user-tooltip"
],
"dependencies": {
"@angular/animations": "~18.1.3",
"@angular/cdk": "~18.1.3",
"@angular/common": "~18.1.3",
"@angular/compiler": "~18.1.3",
"@angular/core": "~18.1.3",
"@angular/forms": "~18.1.3",
"@angular/material": "~18.1.3",
"@angular/material-date-fns-adapter": "18.1.3",
"@angular/platform-browser": "~18.1.3",
"@angular/platform-browser-dynamic": "~18.1.3",
"@angular/router": "~18.1.3",
"@fontsource-variable/material-symbols-outlined": "~5.0.19",
"@fontsource/material-icons": "4.5.4",
"@fontsource/roboto": "4.5.8",
"date-fns": "~2.30.0",
"lodash-es": "~4.17.21",
"rxjs": "~7.8.1",
"tslib": "~2.6.3",
"zone.js": "~0.14.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "~18.1.3",
"@angular/cli": "~18.1.3",
"@angular/compiler-cli": "~18.1.3",
"@chromatic-com/storybook": "^1.6.1",
"@commitlint/cli": "~18.6.1",
"@commitlint/config-conventional": "~18.6.3",
"@compodoc/compodoc": "^1.1.25",
"@hug/eslint-config": "~17.0.3",
"@angular-devkit/build-angular": "~14.2.13",
"@angular/cli": "~14.2.13",
"@angular/compiler-cli": "~14.3.0",
"@commitlint/cli": "~19.4.1",
"@commitlint/config-conventional": "~19.4.1",
"@hug/eslint-config": "~20.2.1",
"@hug/ngx-schematics-utilities": "^7.0.0",
"@nx/js": "^19.3.2",
"@storybook/addon-docs": "^8.2.8",
"@storybook/addon-essentials": "^8.2.8",
"@storybook/addon-interactions": "^8.2.8",
"@storybook/addon-knobs": "^8.0.1",
"@storybook/addon-links": "^8.2.8",
"@storybook/angular": "^8.2.8",
"@storybook/blocks": "^8.2.8",
"@storybook/test": "^8.2.8",
"@swc-node/register": "^1.9.2",
"@swc/core": "^1.6.5",
"@nx/js": "^19.6.4",
"@swc-node/register": "^1.10.9",
"@swc/core": "^1.7.22",
"@types/jasmine": "~5.1.4",
"@types/lodash-es": "^4.17.12",
"detect-indent": "^7.0.1",
"eslint-plugin-deprecation": "~1.5.0",
"eslint-plugin-storybook": "^0.8.0",
"husky": "~9.0.11",
"husky": "~9.1.5",
"jasmine-core": "~4.6.1",
"karma": "~6.4.3",
"karma": "~6.4.4",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.1",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"lint-staged": "~15.2.7",
"ng-packagr": "~18.1.0",
"nx": "^19.3.2",
"lint-staged": "~15.2.10",
"ng-packagr": "~14.2.2",
"nx": "^19.6.4",
"patch-package": "^8.0.0",
"prettier": "3.3.3",
"prettier-plugin-multiline-arrays": "^3.0.6",
"storybook": "^8.2.8",
"typescript": "~5.4.5"
"typescript": "~4.7.4"
},
"schematics": "./scripts/new-package/collection.json",
"commitlint": {
Expand Down Expand Up @@ -124,11 +88,11 @@
}
},
"lint-staged": {
"**/*.{js,json,ts,html}": [
"**/*.{js,ts,html,json}": [
"eslint --fix"
],
"**/*.{html,scss,json}": [
"npx prettier . --check"
"**/*.{scss,html,json}": [
"prettier . --check"
]
}
}
56 changes: 30 additions & 26 deletions patches/nx+19.3.2.patch → patches/nx+19.6.4.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
diff --git a/node_modules/nx/.DS_Store b/node_modules/nx/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/node_modules/nx/.DS_Store differ
diff --git a/node_modules/nx/bin/nx-cloud.js b/node_modules/nx/bin/nx-cloud.js
old mode 100755
new mode 100644
diff --git a/node_modules/nx/src/command-line/release/changelog.js b/node_modules/nx/src/command-line/release/changelog.js
index 13e2e34..5dc0610 100644
index 8200613..1505b5e 100644
--- a/node_modules/nx/src/command-line/release/changelog.js
+++ b/node_modules/nx/src/command-line/release/changelog.js
@@ -310,6 +310,7 @@ async function releaseChangelog(args) {
}
if (!commits) {
commits = await getCommits(fromRef, toSHA);
+ commits = commits.filter((c) => c.affectedFiles.find((f) => f.startsWith(project.data.root)));
}
const { fileMap } = await (0, file_map_utils_1.createFileMapUsingProjectGraph)(projectGraph);
const fileToProjectMap = createFileToProjectMap(fileMap.projectFileMap);
@@ -335,6 +335,7 @@ function createAPI(overrideReleaseConfig) {
}
if (!commits) {
commits = await getCommits(fromRef, toSHA);
+ commits = commits.filter((c) => c.affectedFiles.find((f) => f.startsWith(project.data.root)));
}
const { fileMap } = await (0, file_map_utils_1.createFileMapUsingProjectGraph)(projectGraph);
const fileToProjectMap = createFileToProjectMap(fileMap.projectFileMap);
diff --git a/node_modules/nx/src/command-line/release/utils/git.js b/node_modules/nx/src/command-line/release/utils/git.js
index c5c7d90..bb882ad 100644
index 4beeea0..1c8a2af 100644
--- a/node_modules/nx/src/command-line/release/utils/git.js
+++ b/node_modules/nx/src/command-line/release/utils/git.js
@@ -281,7 +281,8 @@ function parseConventionalCommitsMessage(message) {
exports.parseConventionalCommitsMessage = parseConventionalCommitsMessage;
@@ -283,7 +283,8 @@ function parseConventionalCommitsMessage(message) {
}
// https://www.conventionalcommits.org/en/v1.0.0/
// https://regex101.com/r/FSfNvA/1
-const ConventionalCommitRegex = /(?<type>[a-z]+)(\((?<scope>.+)\))?(?<breaking>!)?: (?<description>.+)/i;
Expand All @@ -25,10 +32,10 @@ index c5c7d90..bb882ad 100644
const PullRequestRE = /\([ a-z]*(#\d+)\s*\)/gm;
const IssueRE = /(#\d+)/gm;
diff --git a/node_modules/nx/src/command-line/release/utils/shared.js b/node_modules/nx/src/command-line/release/utils/shared.js
index e08aff8..de3cdc7 100644
index 0cfae24..7ba3b15 100644
--- a/node_modules/nx/src/command-line/release/utils/shared.js
+++ b/node_modules/nx/src/command-line/release/utils/shared.js
@@ -209,8 +209,9 @@ async function getCommitsRelevantToProjects(projectGraph, commits, projects) {
@@ -213,7 +213,8 @@ async function getCommitsRelevantToProjects(projectGraph, commits, projects) {
* - touch project files which are contained within the list of projects directly
* - touch non-project files and the commit is not scoped
*/
Expand All @@ -40,42 +47,39 @@ index e08aff8..de3cdc7 100644
+ // fileMap.nonProjectFiles.some((nonProjectFile) => nonProjectFile.file === f))));
+ return commits.filter((c) => c.affectedFiles.some((f) => filesInReleaseGroup.has(f)));
}
exports.getCommitsRelevantToProjects = getCommitsRelevantToProjects;
diff --git a/node_modules/nx/src/generators/utils/json.js b/node_modules/nx/src/generators/utils/json.js
index 7db40ce..5e69931 100644
index a59bc2c..a8387f4 100644
--- a/node_modules/nx/src/generators/utils/json.js
+++ b/node_modules/nx/src/generators/utils/json.js
@@ -1,6 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateJson = exports.writeJson = exports.readJson = void 0;
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.readJson = readJson;
exports.writeJson = writeJson;
exports.updateJson = updateJson;
+let detectIndent_1;
+(async () => detectIndent_1 = ((await import('detect-indent')).default))();
const json_1 = require("../../utils/json");
/**
* Reads a json file, removes all comments and parses JSON.
@@ -30,7 +32,10 @@ exports.readJson = readJson;
@@ -31,7 +33,9 @@ function readJson(tree, path, options) {
* @param options Optional JSON Serialize Options
*/
function writeJson(tree, path, value, options) {
- const serialized = (0, json_1.serializeJson)(value, options);
+ // const serialized = (0, json_1.serializeJson)(value, options);
+ // tree.write(path, `${serialized}\n`);
+ const indent = options?.indent ?? detectIndent_1(tree.read(path, 'utf-8')).indent;
+ const serialized = (0, json_1.serializeJson)(value, { ...options, indent });
tree.write(path, `${serialized}\n`);
}
exports.writeJson = writeJson;
/**
diff --git a/node_modules/nx/src/utils/json.js b/node_modules/nx/src/utils/json.js
index 9ea1345..7b1be5b 100644
index 2ace40e..c415390 100644
--- a/node_modules/nx/src/utils/json.js
+++ b/node_modules/nx/src/utils/json.js
@@ -57,6 +57,7 @@ function formatParseError(input, parseError) {
@@ -58,5 +58,6 @@ function formatParseError(input, parseError) {
* @returns the formatted JSON representation of the object
*/
function serializeJson(input, options) {
- return JSON.stringify(input, null, options?.spaces ?? 2);
+ // return JSON.stringify(input, null, options?.spaces ?? 2);
+ return JSON.stringify(input, null, options?.indent ?? 2);
}
exports.serializeJson = serializeJson;
Loading

0 comments on commit 3a0acd1

Please sign in to comment.