From 3b24753c530c27438ceded109029fa6d0e6c827c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 18:15:34 +0200 Subject: [PATCH 01/14] docs(MessageBuilderTemplate): update --- src/message-builder/src/message-builder-template.class.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/message-builder/src/message-builder-template.class.ts b/src/message-builder/src/message-builder-template.class.ts index 64022cb..3ea7a3d 100644 --- a/src/message-builder/src/message-builder-template.class.ts +++ b/src/message-builder/src/message-builder-template.class.ts @@ -3,11 +3,13 @@ import { is } from '@angular-package/type'; // Interface. import { MessageTemplate } from '../interface/message-template.interface'; /** - * + * MessageBuilderTemplate. */ export class MessageBuilderTemplate { + // argument value is [value.type] type, must be [param.type] type + #template: MessageTemplate = { - class: `[class][method]([param.name][param.type])[return]`, // argument value is [value.type] type, must be [param.type] type + class: `[class][method]([param.name][param.type])[return]`, function: `[function]([param.name][param.type])[return]`, method: `[method]([param.name][param.type])[return]` }; From 17ce5e0f2059f2b82da281be900d36ff0a228737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 18:16:00 +0200 Subject: [PATCH 02/14] refactor(MessageClassBuilder): remove --- .../src/message-class-builder.class.ts | 83 ------------------- 1 file changed, 83 deletions(-) delete mode 100644 src/message-builder/src/message-class-builder.class.ts diff --git a/src/message-builder/src/message-class-builder.class.ts b/src/message-builder/src/message-class-builder.class.ts deleted file mode 100644 index dcde20f..0000000 --- a/src/message-builder/src/message-class-builder.class.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { is, guard } from '@angular-package/type'; -import { MessageBuilderTemplate } from './message-builder-template.class'; -import { MessageBuilder } from './message-builder.class'; - -// export class MessageClassBuilder extends MessageBuilder { -// private class$$: string; -// private param$$: { -// name?: string; -// type?: string; -// } = {}; -// private method$$: string; - -// constructor() { -// super('class'); -// } - -// /** -// * Build class message. -// */ -// public build(): this { -// // class. -// // this.replace('class', this.class$$); -// // // method. -// // this.replace('method', is.string(this.method$$) && is.string(this.class$$) ? `.${this.method$$}` : this.method$$); -// // // param. -// // const param = `${this.param$$.name}${this.param$$.type}`; -// // this -// // .replace('param.type', this.param$$.type) -// // .replace('param.name', this.param$$.name) -// // .replace(param, `(${param})`) -// // .replace(this.param$$.type, `: ${this.param$$.type}`); -// return this; -// } - -// /** -// * Set class name to build message. -// * @param name Class name. -// * @returns this. -// */ -// public class(name: string): this { -// if (guard.is.string(name)) { -// this.class$$ = name; -// } -// return this; -// } - -// /** -// * Set class method name to build message. -// * @param name Class method name. -// * @returns this. -// */ -// public method(name: string): this { -// if (guard.is.string(name)) { -// this.method$$ = name; -// } -// return this; -// } - -// /** -// * Set method param name with type to build message. -// * @param name Method param name. -// * @param type Method param type. -// * @returns this. -// */ -// public param(name: string, type?: string): this { -// if (guard.is.string(name)) { -// this.param$$.name = name; -// } -// if (guard.is.string(type)) { -// this.param$$.type = type; -// } -// return this; -// } -// } - -// const messageBuilderClass: MessageClassBuilder = new MessageClassBuilder() -// .class('NameProperty') -// .method('set') -// .param('name', 'Array') -// .build(); - -// console.log(`messageBuilderClass`, messageBuilderClass.get); - From ae721975b7d3faedacc2f62ed2781d23d174d9f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 18:16:22 +0200 Subject: [PATCH 03/14] docs(MessageFunctionBuilder): update. --- .../src/message-function-builder.class.ts | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/src/message-builder/src/message-function-builder.class.ts b/src/message-builder/src/message-function-builder.class.ts index e0d2451..2afad1a 100644 --- a/src/message-builder/src/message-function-builder.class.ts +++ b/src/message-builder/src/message-function-builder.class.ts @@ -4,7 +4,8 @@ import { MessageBuilder } from './message-builder.class'; // Interface. import { Parameter } from '../interface/parameter.interface'; /** - * + * Message function builder for error message of a string type. + * @version Experimental This `object` is an experimental version of the message function builder that is using `MessageBuilder`. */ export class MessageFunctionBuilder { #messageBuilder: MessageBuilder; @@ -15,16 +16,22 @@ export class MessageFunctionBuilder { }; #return = ''; + /** + * Gets the build function of a `string` type. + */ get get(): string { return this.#messageBuilder.get; } + /** + * Creates an instance of `MessageFunctionBuilder`. + */ constructor() { this.#messageBuilder = new MessageBuilder('function'); } /** - * Build function message. + * Builds string-type function from the privately stored `name`, `param`, and `return`. */ public build(): this { this @@ -36,24 +43,26 @@ export class MessageFunctionBuilder { } /** - * Sets the function name to build message. + * Sets the function name to build function of a `string` type. * @param name Function name of a `string` type. - * @param callback - * @returns The return value is an instance of `MessageBuilderFunction`. + * @param callback An optional callback function of `ResultCallback` to handle the result of the check whether the provided `name` + * is a `string` type. + * @returns The return value is an instance of `MessageFunctionBuilder`. */ public setName(name: string, callback?: ResultCallback): this { if (guard.string(name, callback)) { this.#name = name; } - // this.setFunction(name); return this; } /** - * Set method param name with type to build message. - * @param name Method param name. - * @param type Method param type. - * @returns this. + * Sets param name with an optional type of `function` to build function of a `string` type. + * @param name Parameter name of a function guarded by string. + * @param type An optional parameter type of function guarded by string. + * @param callback An optional callback function of `ResultCallback` to handle the result of the check whether the provided `name` + * is a `string` type. + * @returns The return value is an instance of `MessageFunctionBuilder`. */ public setParam(name: string, type?: string, callback?: ResultCallback): this { if (guard.string(name, callback)) { @@ -65,6 +74,13 @@ export class MessageFunctionBuilder { return this; } + /** + * Sets return type to build the function of a `string` type. + * @param returns A return type of `function` guarded by `string`. + * @param callback An optional callback function of `ResultCallback` to handle the result of the check whether the provided `returns` + * is a `string` type. + * @returns The return value is an instance of `MessageFunctionBuilder`. + */ public setReturn(returns: string, callback?: ResultCallback): this { if (guard.string(returns, callback)) { this.#return = returns; @@ -72,11 +88,3 @@ export class MessageFunctionBuilder { return this; } } - -const messageBuilderFunction = new MessageFunctionBuilder(); -messageBuilderFunction - .setName('isString') - .setParam('one', 'string') - .setReturn('this') - .build(); -console.log(messageBuilderFunction.get); From 5bd6a2bf8dc98db6666f8d84bb28771357f17105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 18:16:41 +0200 Subject: [PATCH 04/14] docs(MessageBuilder): update --- .../src/message-builder.class.ts | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/message-builder/src/message-builder.class.ts b/src/message-builder/src/message-builder.class.ts index 42d9a5d..0facfdb 100644 --- a/src/message-builder/src/message-builder.class.ts +++ b/src/message-builder/src/message-builder.class.ts @@ -2,9 +2,10 @@ import { is, guard, ResultCallback } from '@angular-package/type'; // Class. import { MessageBuilderTemplate } from './message-builder-template.class'; - -// export type RegExpPreDefined = 'class' | 'function' | 'method' | 'param.name' | 'param.type'; - +/** + * Message builder for error message of a string type. + * @version Experimental This `object` is an experimental version of the message builder. + */ export class MessageBuilder { #regExp = { class: /\[class\]/i, @@ -64,10 +65,7 @@ export class MessageBuilder { public setReturn(returns: string, callback?: ResultCallback): this { if (guard.string(returns, callback)) { - this.replace(this.#regExp.return, returns); - if (returns.length > 0) { - this.replace(returns, `: ${returns}`); - } + this.replace(this.#regExp.return, returns.length > 0 ? `: ${returns}` : returns); } return this; } @@ -82,10 +80,3 @@ export class MessageBuilder { return this; } } - -// console.log( -// new MessageBuilder('function') -// .param('firstName?', 'string') -// .function('isComponentLoader') -// .get -// ); From 488270d4c88f8575c8289022559e4f8ce1de828b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 18:16:55 +0200 Subject: [PATCH 05/14] test(MessageBuilder): add. --- .../test/message-builder.spec.ts | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/message-builder/test/message-builder.spec.ts diff --git a/src/message-builder/test/message-builder.spec.ts b/src/message-builder/test/message-builder.spec.ts new file mode 100644 index 0000000..7274e94 --- /dev/null +++ b/src/message-builder/test/message-builder.spec.ts @@ -0,0 +1,63 @@ +// External class. +import { Testing, TestingToBeMatchers } from '@angular-package/testing'; +// Class. +import { MessageBuilder } from '../src/message-builder.class'; +/** + * Initialize `Testing`. + */ +const testing = new Testing(true, true); +const toBe = new TestingToBeMatchers(); +/** + * Tests. + */ +testing.describe(MessageBuilder.name, () => { + let messageClassBuilder = new MessageBuilder('class'); + let messageFunctionBuilder = new MessageBuilder('function'); + let messageMethodBuilder = new MessageBuilder('method'); + + beforeEach(() => (messageClassBuilder = new MessageBuilder('class'))); + beforeEach(() => (messageFunctionBuilder = new MessageBuilder('function'))); + beforeEach(() => (messageMethodBuilder = new MessageBuilder('method'))); + + // Basic testing. + testing + .it(`defined`, () => + toBe + .defined(MessageBuilder) + .defined(messageFunctionBuilder) + .instance(messageFunctionBuilder, MessageBuilder) + ) + .toBeClass(MessageBuilder); + + testing.it(`build function`, () => { + messageFunctionBuilder + .setFunctionName('guardString') + .setParam('value', 'string') + .setReturn('boolean'); + + toBe.string(messageFunctionBuilder.get); + expect(messageFunctionBuilder.get).toEqual('guardString(value: string): boolean'); + }); + + testing.it(`build class`, () => { + messageClassBuilder + .setClassName('Person.prototype.') + .setMethodName('setPerson') + .setParam('value?', 'object') + .setReturn('object'); + + toBe.string(messageClassBuilder.get); + expect(messageClassBuilder.get).toEqual('Person.prototype.setPerson(value?: object): object'); + }); + + testing.it(`build method`, () => { + messageMethodBuilder + .setMethodName('setPerson') + .setParam('value', 'string') + .setReturn('this'); + + console.log(messageMethodBuilder.get); + toBe.string(messageMethodBuilder.get); + expect(messageMethodBuilder.get).toEqual('setPerson(value: string): this'); + }); +}); From 5427c6585ddebe01bc6e3733425e07b924ec0ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 18:17:30 +0200 Subject: [PATCH 06/14] fix(api): add message builder as experimental to api --- src/message-builder/index.ts | 3 +++ src/public-api.ts | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/message-builder/index.ts b/src/message-builder/index.ts index e69de29..6a9974f 100644 --- a/src/message-builder/index.ts +++ b/src/message-builder/index.ts @@ -0,0 +1,3 @@ +export { MessageBuilder } from './src/message-builder.class'; +export { MessageBuilderTemplate } from './src/message-builder-template.class'; +export { MessageFunctionBuilder } from './src/message-function-builder.class'; diff --git a/src/public-api.ts b/src/public-api.ts index b43a6fd..83f99bb 100644 --- a/src/public-api.ts +++ b/src/public-api.ts @@ -5,3 +5,13 @@ export { ValidationError } from './lib/validation-error.class'; // Interface. export { ErrorMessage } from './interface/error-message.interface'; + +/* + * Experimental + */ +export { + // Class. + MessageBuilder, + MessageFunctionBuilder, + MessageBuilderTemplate, +} from './message-builder/'; From 69699b5d8af372ea4e71244d9ade4b18015d3136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 18:36:33 +0200 Subject: [PATCH 07/14] test(MessageBuilder): update. --- src/message-builder/test/message-builder.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/message-builder/test/message-builder.spec.ts b/src/message-builder/test/message-builder.spec.ts index 7274e94..a643d7d 100644 --- a/src/message-builder/test/message-builder.spec.ts +++ b/src/message-builder/test/message-builder.spec.ts @@ -24,8 +24,12 @@ testing.describe(MessageBuilder.name, () => { .it(`defined`, () => toBe .defined(MessageBuilder) + .defined(messageClassBuilder) .defined(messageFunctionBuilder) + .defined(messageMethodBuilder) + .instance(messageClassBuilder, MessageBuilder) .instance(messageFunctionBuilder, MessageBuilder) + .instance(messageMethodBuilder, MessageBuilder) ) .toBeClass(MessageBuilder); @@ -36,6 +40,7 @@ testing.describe(MessageBuilder.name, () => { .setReturn('boolean'); toBe.string(messageFunctionBuilder.get); + console.log(messageFunctionBuilder.get); expect(messageFunctionBuilder.get).toEqual('guardString(value: string): boolean'); }); From 5752d9e7b3631dcca0d6945e25a92d1fdfb9eee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 18:36:45 +0200 Subject: [PATCH 08/14] test(MessageFunctionBuilder): add. --- .../test/message-function-builder.spec.ts | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/message-builder/test/message-function-builder.spec.ts diff --git a/src/message-builder/test/message-function-builder.spec.ts b/src/message-builder/test/message-function-builder.spec.ts new file mode 100644 index 0000000..74c2222 --- /dev/null +++ b/src/message-builder/test/message-function-builder.spec.ts @@ -0,0 +1,38 @@ +// External class. +import { Testing, TestingToBeMatchers } from '@angular-package/testing'; +// Class. +import { MessageFunctionBuilder } from '../src/message-function-builder.class'; +/** + * Initialize `Testing`. + */ +const testing = new Testing(true, true); +const toBe = new TestingToBeMatchers(); +/** + * Tests. + */ +testing.describe(MessageFunctionBuilder.name, () => { + let messageFunctionBuilder = new MessageFunctionBuilder(); + + beforeEach(() => (messageFunctionBuilder = new MessageFunctionBuilder())); + + // Basic testing. + testing + .it(`defined`, () => + toBe + .defined(messageFunctionBuilder) + .defined(messageFunctionBuilder) + .instance(messageFunctionBuilder, MessageFunctionBuilder) + ) + .toBeClass(MessageFunctionBuilder); + + testing.it(`build function`, () => { + messageFunctionBuilder + .setName('guardString') + .setParam('value', 'string') + .setReturn('boolean') + .build(); + + toBe.string(messageFunctionBuilder.get); + expect(messageFunctionBuilder.get).toEqual('guardString(value: string): boolean'); + }); +}); From 1dffd31ab4db736a4f583ac4d3c1994c92da92ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 18:37:28 +0200 Subject: [PATCH 09/14] docs(README.md): fix examples, add experimental, update basic concepts. --- README.md | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 116 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index aa83fbf..3121e03 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Manages an [`Error`][js-error]. * [Api](#api) * [`ValidationError`](#validationerror) * [Interface](#interface) +* [Experimental](#experimental) * [Git](#git) * [Commit](#commit) * [Versioning](#versioning) @@ -63,13 +64,15 @@ Type guard (constrain) Guards > It's a **combination** of both above, **constrains** the type of the parameter in the **code editor**, and checks its provided argument. -Sets -> Sets the existing given value in the `object`. - Defines -> Returns defined value from the method of the `object`. -> Defines the new value in the `object`. -> Both above at the same time. +> Returns defined value from a method of an object. +> Defines new value in an object and returns a defined value. + +Gets +> Returns a value from an object. + +Sets +> Adds or updates an element with a specified key and a value to an object and returns an object.
@@ -110,6 +113,18 @@ import { } from '@angular-package/error'; ``` +```typescript +/* + * Experimental + */ +import { + // Class. + MessageBuilder, + MessageBuilderTemplate, + MessageFunctionBuilder, +} from '@angular-package/error'; +``` +
## `ValidationError` @@ -219,7 +234,7 @@ The **return value** is a message of a `string` type created from the provided ` ```typescript // Example usage. -import { ValidationError } from '@angular-package/core'; +import { ValidationError } from '@angular-package/error'; const fix = 'There is no solution to the described problem.'; const problem = 'The problem has no solution.'; @@ -270,7 +285,7 @@ The **return value** is an instance of [`ValidationError`](#validationerror). ```typescript // Example usage. -import { ValidationError } from '@angular-package/core'; +import { ValidationError } from '@angular-package/error'; const fix = 'There is no solution to the described problem.'; const problem = 'The problem has no solution.'; @@ -302,6 +317,98 @@ interface ErrorMessage {
+## Experimental + +![experimental] + +### Message builder + +#### `MessageBuilder` + +Message builder for error message of a [`string`][js-string] type. + +```typescript +// Example usage of building a function. +import { MessageBuilder } from '@angular-package/error'; + +/** + * Initialize `MessageBuilder`. + */ +const messageFunctionBuilder = new MessageBuilder('function'); + +messageFunctionBuilder + .setFunctionName('guardString') + .setParam('value', 'string') + .setReturn('boolean'); + +// Console returns `guardString(value: string): boolean` +console.log(messageFunctionBuilder.get); +``` + +```typescript +// Example usage of building a method. +import { MessageBuilder } from '@angular-package/error'; + +/** + * Initialize `MessageBuilder`. + */ +const messageMethodBuilder = new MessageBuilder('method'); + +// Build the class method. +messageMethodBuilder + .setMethodName('setPerson') + .setParam('value', 'string') + .setReturn('this'); + +// Console returns `setPerson(value: string): this` +console.log(messageMethodBuilder.get); +``` + +```typescript +// Example usage of building a class. +import { MessageBuilder } from '@angular-package/error'; + +/** + * Initialize `MessageBuilder`. + */ +const messageClassBuilder = new MessageBuilder('class'); + +// Build the class. +messageClassBuilder + .setClassName('Person.prototype.') + .setMethodName('setPerson') + .setParam('value?', 'object') + .setReturn('object'); + +// Console returns `Person.prototype.setPerson(value?: object): object` +console.log(messageClassBuilder.get); +``` + +#### `MessageFunctionBuilder` + +Message function builder for error message of a [`string`][js-string] type. + +```typescript +// Example usage of building a function. +import { MessageFunctionBuilder } from '@angular-package/error'; + +/** + * Initialize `MessageFunctionBuilder`. + */ +const messageFunctionBuilder = new MessageFunctionBuilder(); + +messageFunctionBuilder + .setName('guardString') + .setParam('value', 'string') + .setReturn('boolean') + .build(); + +// Console returns `guardString(value: string): boolean` +console.log(messageFunctionBuilder.get); +``` + +
+ ## GIT ### Commit @@ -345,6 +452,7 @@ MIT © angular-package ([license][error-license]) [skeleton]: https://github.com/angular-package/skeleton +[experimental]: https://img.shields.io/badge/-experimental-orange [fix]: https://img.shields.io/badge/-fix-red [new]: https://img.shields.io/badge/-new-green [update]: https://img.shields.io/badge/-update-red From a82628d3ac64fde2988de0bba962ffadbee9f900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 23:19:35 +0200 Subject: [PATCH 10/14] docs(CHANGELOG.md): update --- CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb22391..5d37e3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,37 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.0.3] - 2021-08-06 + +### 1.0.3 Added + +- [`5752d9e`][5752d9e] + Tests for the `MessageFunctionBuilder`. +- [`488270d`][5752d9e] + Tests for the `MessageBuilder`. + +[5752d9e]: https://github.com/angular-package/error/commit/5752d9e7b3631dcca0d6945e25a92d1fdfb9eee3 +[488270d]: https://github.com/angular-package/error/commit/488270d4c88f8575c8289022559e4f8ce1de828b + +### 1.0.3 Changed + +- [`5bd6a2b`][5bd6a2b] + jsdoc description of the `MessageBuilder`. +- [`1dffd31`][1dffd31] + Updated `README.md`. + +[5bd6a2b]: https://github.com/angular-package/error/commit/5bd6a2bf8dc98db6666f8d84bb28771357f17105 +[1dffd31]: https://github.com/angular-package/error/commit/1dffd31ab4db736a4f583ac4d3c1994c92da92ea + +### 1.0.3 Fixed + +- [`5427c65`][5427c65] + Added message builder to api. + +[5427c65]: https://github.com/angular-package/error/commit/5427c6585ddebe01bc6e3733425e07b924ec0ca6 + +---- + ## [1.0.2] - 2021-08-04 ### 1.0.2 Update From 23dec7a3c62afb8a5314a486d188afe2f7450d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 23:19:59 +0200 Subject: [PATCH 11/14] 1.0.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a257880..c7d3964 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "error", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 2, "requires": true, "packages": { @@ -17,7 +17,7 @@ "@angular/common": "^12.1.1", "@angular/core": "^12.1.1" }, - "version": "1.0.2" + "version": "1.0.3" }, "node_modules/@angular-package/testing": { "version": "1.1.0", diff --git a/package.json b/package.json index da91d8f..2f4661c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@angular-package/error", - "version": "1.0.2", + "version": "1.0.3", "description": "Manages the callback function.", "author": "Angular Package (https://wvvw.dev)", "homepage": "https://github.com/angular-package/error#readme", From 9a94f999d4464c5e7a8e10188b46ca0d620f09ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 23:32:56 +0200 Subject: [PATCH 12/14] docs(CHANGELOG): fix + update. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d37e3e..25e75e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,7 +48,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - [`253dda9`][253dda9] Fixes the `homepage` link in the `package.json`. -[77f326a]: https://github.com/angular-package/error/commit/253dda9b0cd14d7766f7ac3da33e4aaf35af1193 +[253dda9]: https://github.com/angular-package/error/commit/253dda9b0cd14d7766f7ac3da33e4aaf35af1193 ## [1.0.1] - 2021-08-04 @@ -57,4 +57,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - [`ab8729f`][ab8729f] Remove unnecessary peer dependencies. -[77f326a]: https://github.com/angular-package/error/commit/ab8729f3627d63729326ddfd354296c2ae800c33 +[ab8729f]: https://github.com/angular-package/error/commit/ab8729f3627d63729326ddfd354296c2ae800c33 From 2e0a2c26a8310ec91d8bbcabb2ddc601e046426d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 23:33:08 +0200 Subject: [PATCH 13/14] docs(README.md): add changelog. --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3121e03..802223b 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Manages an [`Error`][js-error]. * [`ValidationError`](#validationerror) * [Interface](#interface) * [Experimental](#experimental) +* [Changelog](#changelog) * [Git](#git) * [Commit](#commit) * [Versioning](#versioning) @@ -115,7 +116,7 @@ import { ```typescript /* - * Experimental + * Experimental. */ import { // Class. @@ -384,6 +385,8 @@ messageClassBuilder console.log(messageClassBuilder.get); ``` +
+ #### `MessageFunctionBuilder` Message function builder for error message of a [`string`][js-string] type. @@ -409,6 +412,14 @@ console.log(messageFunctionBuilder.get);
+## Changelog + +The **changelog** of this package is based on [*keep a changelog*](https://keepachangelog.com/en/1.0.0/). To read it, click on the [CHANGELOG.md](https://github.com/angular-package/error/blob/main/CHANGELOG.md) link. + +> A changelog is a file which contains a curated, chronologically ordered list of notable changes for each version of a project. - [*keep a changelog*](https://keepachangelog.com/en/1.0.0/) + +
+ ## GIT ### Commit From 99e9b9a0dfca702ef8fbd02e1bffff2c19292403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Aeebor=20Rudnicki?= Date: Fri, 6 Aug 2021 23:34:36 +0200 Subject: [PATCH 14/14] docs(CHANGELOG): fix. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25e75e9..a5e49bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - [`5752d9e`][5752d9e] Tests for the `MessageFunctionBuilder`. -- [`488270d`][5752d9e] +- [`488270d`][488270d] Tests for the `MessageBuilder`. [5752d9e]: https://github.com/angular-package/error/commit/5752d9e7b3631dcca0d6945e25a92d1fdfb9eee3