@final-hill/decorator-contracts 0.24.2 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -107
- package/dist/{AssertionError.d.ts → AssertionError.d.mts} +10 -10
- package/dist/Contract.d.mts +39 -0
- package/dist/Contracted.d.mts +21 -0
- package/dist/Messages.d.mts +16 -0
- package/dist/{assert.d.ts → assert.d.mts} +8 -8
- package/dist/{iff.d.ts → iff.d.mts} +7 -7
- package/dist/{implies.d.ts → implies.d.mts} +7 -7
- package/dist/index.d.mts +13 -0
- package/dist/index.mjs +3 -0
- package/dist/{index.js.LICENSE.txt → index.mjs.LICENSE.txt} +1 -1
- package/dist/index.mjs.map +1 -0
- package/dist/lib/{CLASS_REGISTRY.d.ts → CLASS_REGISTRY.d.mts} +12 -12
- package/dist/lib/{ClassRegistration.d.ts → ClassRegistration.d.mts} +23 -24
- package/dist/lib/ClassType.d.mts +10 -0
- package/dist/lib/{Feature.d.ts → Feature.d.mts} +26 -29
- package/dist/lib/{assertDemands.d.ts → assertDemands.d.mts} +9 -9
- package/dist/lib/{assertEnsures.d.ts → assertEnsures.d.mts} +10 -10
- package/dist/lib/{assertInvariants.d.ts → assertInvariants.d.mts} +9 -9
- package/dist/lib/{deepFreeze.d.ts → deepFreeze.d.mts} +8 -8
- package/dist/lib/index.d.mts +18 -0
- package/dist/lib/{takeWhile.d.ts → takeWhile.d.mts} +8 -8
- package/dist/lib/{unChecked.d.ts → unChecked.d.mts} +9 -9
- package/dist/tests/{deepFreeze.test.d.ts → Contract.test.d.mts} +7 -7
- package/dist/tests/{Contract.test.d.ts → Stack.test.d.mts} +7 -7
- package/dist/tests/{assert.test.d.ts → assert.test.d.mts} +7 -7
- package/dist/tests/{Stack.test.d.ts → deepFreeze.test.d.mts} +7 -7
- package/dist/tests/demands.test.d.mts +7 -0
- package/dist/tests/ensures.test.d.mts +7 -0
- package/dist/tests/factoryPattern.test.d.mts +7 -0
- package/dist/tests/iff.test.d.mts +7 -0
- package/dist/tests/implies.test.d.mts +7 -0
- package/dist/tests/invariant.test.d.mts +7 -0
- package/dist/tests/public-properties.test.d.mts +7 -0
- package/dist/tests/rescue.test.d.mts +7 -0
- package/dist/tests/within.test.d.mts +7 -0
- package/package.json +26 -46
- package/CHANGELOG.md +0 -289
- package/dist/Contract.d.ts +0 -39
- package/dist/Contracted.d.ts +0 -12
- package/dist/Messages.d.ts +0 -18
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/dist/lib/ClassType.d.ts +0 -10
- package/dist/lib/index.d.ts +0 -18
- package/dist/override.d.ts +0 -8
- package/dist/tests/demands.test.d.ts +0 -7
- package/dist/tests/ensures.test.d.ts +0 -7
- package/dist/tests/factoryPattern.test.d.ts +0 -7
- package/dist/tests/iff.test.d.ts +0 -7
- package/dist/tests/implies.test.d.ts +0 -7
- package/dist/tests/invariant.test.d.ts +0 -7
- package/dist/tests/override.test.d.ts +0 -7
- package/dist/tests/public-properties.test.d.ts +0 -7
- package/dist/tests/rescue.test.d.ts +0 -7
- package/dist/tests/within.test.d.ts +0 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
import { Contract } from '../';
|
|
8
|
-
declare function assertDemands<U extends object>(ctx: U, contract: Contract<U>, className: string, featureName: PropertyKey, args: any[]): void;
|
|
9
|
-
export default assertDemands;
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
import { Contract } from '../index.mjs';
|
|
8
|
+
declare function assertDemands<U extends object>(ctx: U, contract: Contract<U>, className: string, featureName: PropertyKey, args: any[]): void;
|
|
9
|
+
export default assertDemands;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
import { Properties } from '../Contract';
|
|
8
|
-
import { Contract } from '../';
|
|
9
|
-
declare function assertEnsures<U extends Properties<any>>(ctx: U, contract: Contract<any>, className: string, featureName: PropertyKey, old: U, args: any[]): void;
|
|
10
|
-
export default assertEnsures;
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
import { Properties } from '../Contract.mjs';
|
|
8
|
+
import { Contract } from '../index.mjs';
|
|
9
|
+
declare function assertEnsures<U extends Properties<any>>(ctx: U, contract: Contract<any>, className: string, featureName: PropertyKey, old: U, args: any[]): void;
|
|
10
|
+
export default assertEnsures;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
import { Contract } from '../';
|
|
8
|
-
declare function assertInvariants<U>(ctx: U, contract: Contract<any>): void;
|
|
9
|
-
export default assertInvariants;
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
import { Contract } from '../index.mjs';
|
|
8
|
+
declare function assertInvariants<U>(ctx: U, contract: Contract<any>): void;
|
|
9
|
+
export default assertInvariants;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
declare function deepFreeze(object: Record<PropertyKey, any>): void;
|
|
8
|
-
export default deepFreeze;
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
declare function deepFreeze(object: Record<PropertyKey, any>): void;
|
|
8
|
+
export default deepFreeze;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
import assertDemands from './assertDemands.mjs';
|
|
8
|
+
import assertEnsures from './assertEnsures.mjs';
|
|
9
|
+
import assertInvariants from './assertInvariants.mjs';
|
|
10
|
+
import CLASS_REGISTRY from './CLASS_REGISTRY.mjs';
|
|
11
|
+
import ClassRegistration from './ClassRegistration.mjs';
|
|
12
|
+
import { ClassType } from './ClassType.mjs';
|
|
13
|
+
import deepFreeze from './deepFreeze.mjs';
|
|
14
|
+
import Feature from './Feature.mjs';
|
|
15
|
+
import takeWhile from './takeWhile.mjs';
|
|
16
|
+
import unChecked from './unChecked.mjs';
|
|
17
|
+
declare const fnTrue: () => boolean;
|
|
18
|
+
export { assertDemands, assertEnsures, assertInvariants, CLASS_REGISTRY, ClassRegistration, ClassType, deepFreeze, Feature, fnTrue, takeWhile, unChecked };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
export declare function takeWhile<T>(xs: T[], pred: (x: T) => boolean): T[];
|
|
8
|
-
export default takeWhile;
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
export declare function takeWhile<T>(xs: T[], pred: (x: T) => boolean): T[];
|
|
8
|
+
export default takeWhile;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
import { Contract } from '../';
|
|
8
|
-
declare const unChecked: (contract: Contract<any>, fn: () => any) => void;
|
|
9
|
-
export default unChecked;
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
import { Contract } from '../index.mjs';
|
|
8
|
+
declare const unChecked: (contract: Contract<any>, fn: () => any) => void;
|
|
9
|
+
export default unChecked;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
export {};
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
export {};
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
export {};
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C)
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
export {};
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) 2023 Final Hill LLC
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@final-hill/decorator-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Code Contracts for TypeScript and ECMAScript classes",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.mjs"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
7
12
|
"scripts": {
|
|
8
|
-
"prebuild": "npm run
|
|
13
|
+
"prebuild": "npm run lint",
|
|
9
14
|
"build": "webpack",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"clean": "rimraf ./dist ./coverage",
|
|
13
|
-
"clean-full": "rimraf ./dist, ./coverage, ./.cache, ./node_modules",
|
|
14
|
-
"debug": "node --inspect-brk --expose-gc ./node_modules/.bin/jest --runInBand --logHeapUsage",
|
|
15
|
-
"prelint": "npm run type-check",
|
|
16
|
-
"lint": "eslint src/ --ext .ts --fix",
|
|
17
|
-
"prelint-nofix": "npm run type-check",
|
|
18
|
-
"lint-nofix": "eslint src/ --ext .ts",
|
|
19
|
-
"test": "jest --coverage",
|
|
20
|
-
"type-check": "tsc -p tsconfig.json --noEmit"
|
|
15
|
+
"lint": "eslint src/ --ext .mts --fix",
|
|
16
|
+
"test": "jest --coverage"
|
|
21
17
|
},
|
|
22
18
|
"repository": {
|
|
23
19
|
"type": "git",
|
|
@@ -26,21 +22,6 @@
|
|
|
26
22
|
"bugs": {
|
|
27
23
|
"url": "https://github.com/final-hill/decorator-contracts/issues"
|
|
28
24
|
},
|
|
29
|
-
"jest": {
|
|
30
|
-
"reporters": [
|
|
31
|
-
"default",
|
|
32
|
-
[
|
|
33
|
-
"jest-junit",
|
|
34
|
-
{
|
|
35
|
-
"outputDirectory": "./coverage"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
],
|
|
39
|
-
"testEnvironment": "node",
|
|
40
|
-
"transform": {
|
|
41
|
-
"^.+\\.ts$": "ts-jest"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
25
|
"keywords": [
|
|
45
26
|
"assertion",
|
|
46
27
|
"biconditional",
|
|
@@ -57,7 +38,6 @@
|
|
|
57
38
|
"LSP",
|
|
58
39
|
"material-implication",
|
|
59
40
|
"organized-panic",
|
|
60
|
-
"overrides",
|
|
61
41
|
"precondition",
|
|
62
42
|
"postcondition",
|
|
63
43
|
"rescue",
|
|
@@ -67,23 +47,23 @@
|
|
|
67
47
|
"author": "Michael L Haufe <michael.haufe@final-hill.com> (https://final-hill.com)",
|
|
68
48
|
"license": "AGPL-3.0-only",
|
|
69
49
|
"devDependencies": {
|
|
70
|
-
"@types/jest": "^
|
|
71
|
-
"@types/node": "^
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
73
|
-
"@typescript-eslint/parser": "^
|
|
74
|
-
"eslint": "^8.
|
|
50
|
+
"@types/jest": "^29.5.4",
|
|
51
|
+
"@types/node": "^20.5.6",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
53
|
+
"@typescript-eslint/parser": "^6.4.1",
|
|
54
|
+
"eslint": "^8.48.0",
|
|
75
55
|
"eslint-plugin-header": "^3.1.1",
|
|
76
|
-
"eslint-plugin-import": "^2.
|
|
77
|
-
"
|
|
78
|
-
"jest
|
|
79
|
-
"
|
|
80
|
-
"ts-jest": "^
|
|
81
|
-
"ts-loader": "^9.
|
|
82
|
-
"typescript": "^
|
|
83
|
-
"webpack": "^5.
|
|
84
|
-
"webpack-cli": "^
|
|
56
|
+
"eslint-plugin-import": "^2.28.1",
|
|
57
|
+
"eslint-webpack-plugin": "^4.0.1",
|
|
58
|
+
"jest": "^29.6.4",
|
|
59
|
+
"jest-junit": "^16.0.0",
|
|
60
|
+
"ts-jest": "^29.1.1",
|
|
61
|
+
"ts-loader": "^9.4.4",
|
|
62
|
+
"typescript": "^5.2.2",
|
|
63
|
+
"webpack": "^5.88.2",
|
|
64
|
+
"webpack-cli": "^5.1.4"
|
|
85
65
|
},
|
|
86
66
|
"files": [
|
|
87
67
|
"dist"
|
|
88
68
|
]
|
|
89
|
-
}
|
|
69
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## v0.24.2
|
|
4
|
-
|
|
5
|
-
* Updated README to use images instead of mermaid diagrams
|
|
6
|
-
* Updated dependencies
|
|
7
|
-
* Improved error messaging of MSG_INVALID_CONTEXT
|
|
8
|
-
* Grammar + spelling fix of `CHANGELOG.md`
|
|
9
|
-
|
|
10
|
-
## v0.24.1
|
|
11
|
-
|
|
12
|
-
* Bugfix of generated type declaration (#238)
|
|
13
|
-
* Updated README to reflect current features (#239)
|
|
14
|
-
* Updated README to use mermaid diagram
|
|
15
|
-
|
|
16
|
-
## v0.24.0
|
|
17
|
-
|
|
18
|
-
* Updated debugger settings to leverage modern VSCode
|
|
19
|
-
* Fixed a subtle issue with subcontracting resolution (breaking change) ([#236](https://github.com/final-hill/decorator-contracts/issues/236))
|
|
20
|
-
* Updated VSCode debug settings to support the modern IDE
|
|
21
|
-
* Updated npm dependencies
|
|
22
|
-
|
|
23
|
-
## v0.23.1
|
|
24
|
-
|
|
25
|
-
* Updated dependencies
|
|
26
|
-
* Refactored code to leverage new TypeScript features
|
|
27
|
-
|
|
28
|
-
## v0.23.0
|
|
29
|
-
|
|
30
|
-
* Fixed bug in README Stack example
|
|
31
|
-
* Updated README instructions on webpage installation
|
|
32
|
-
* Updated dependencies
|
|
33
|
-
* Updated headers for 2022
|
|
34
|
-
* Linting fixes
|
|
35
|
-
* Added better error messaging for `@override` issues
|
|
36
|
-
|
|
37
|
-
## v0.22.0
|
|
38
|
-
|
|
39
|
-
* Added `implies` function
|
|
40
|
-
* Added `iff` function
|
|
41
|
-
* Added topic tags to GitHub repo
|
|
42
|
-
* Updated `package.json` keywords
|
|
43
|
-
|
|
44
|
-
## v0.21.2
|
|
45
|
-
|
|
46
|
-
* Audit fix of dependencies
|
|
47
|
-
* Updated dependencies
|
|
48
|
-
* Upgraded implementation to TypeScript 4.4.4
|
|
49
|
-
|
|
50
|
-
## v0.21.1
|
|
51
|
-
|
|
52
|
-
* Audit fix of dependencies
|
|
53
|
-
* Updated dependencies
|
|
54
|
-
* Upgraded implementation to TypeScript 4.3.5
|
|
55
|
-
|
|
56
|
-
## v0.21.0
|
|
57
|
-
|
|
58
|
-
* Audit fix of dependencies
|
|
59
|
-
* Updated dependencies
|
|
60
|
-
* Added support for contracting an abstract class
|
|
61
|
-
* Fixed bug [#210](https://github.com/final-hill/decorator-contracts/issues/210) for supporting subcontract private fields
|
|
62
|
-
* Added `within` feature for declaring timing requirements
|
|
63
|
-
* Updated documentation
|
|
64
|
-
* Third party features are subject to a class's `invariant` when apply/call is used
|
|
65
|
-
* A contracted feature can not be applied to objects of a different base class
|
|
66
|
-
* Subcontract `extends` are now enforced
|
|
67
|
-
* Updated `retry` type declaration to support accessors.
|
|
68
|
-
|
|
69
|
-
## v0.20.5
|
|
70
|
-
|
|
71
|
-
* Features named with a symbol now support `@override`
|
|
72
|
-
|
|
73
|
-
## v0.20.4
|
|
74
|
-
|
|
75
|
-
* Improved error messaging with `@override` when feature is missing
|
|
76
|
-
* Fixed source code typos
|
|
77
|
-
|
|
78
|
-
## v0.20.3
|
|
79
|
-
|
|
80
|
-
* Fixed bug [#202](https://github.com/final-hill/decorator-contracts/issues/202)
|
|
81
|
-
|
|
82
|
-
## v0.20.2
|
|
83
|
-
|
|
84
|
-
* Additional usability fix for [#197](https://github.com/final-hill/decorator-contracts/issues/197)
|
|
85
|
-
* Updated README
|
|
86
|
-
|
|
87
|
-
## v0.20.1
|
|
88
|
-
|
|
89
|
-
* Fixed bug [#197](https://github.com/final-hill/decorator-contracts/issues/197)
|
|
90
|
-
|
|
91
|
-
## v0.20.0
|
|
92
|
-
|
|
93
|
-
* Updated license headers to reference Final Hill LLC
|
|
94
|
-
* BREAKING CHANGE: contracts now managed separate from the class
|
|
95
|
-
* Rewrote README to reflect the new architecture
|
|
96
|
-
* Updated dependencies
|
|
97
|
-
* Merged `jest.config.js` into `package.json`
|
|
98
|
-
* Updated linting rules
|
|
99
|
-
* Moved unit tests to separate folder
|
|
100
|
-
* Public property definitions are now illegal
|
|
101
|
-
* Fixed `package.json` debug command
|
|
102
|
-
* Bugfix of invariant inheritance
|
|
103
|
-
|
|
104
|
-
## v0.19.0
|
|
105
|
-
|
|
106
|
-
* Updated README to include unpkg reference
|
|
107
|
-
* Enabled sourcemaps
|
|
108
|
-
* `npm audit fix`
|
|
109
|
-
* Updated dependencies
|
|
110
|
-
* Linting fixes
|
|
111
|
-
* Updated contact info in README and `package.json`
|
|
112
|
-
* BREAKING CHANGE: Decorators now accept arrow functions instead of traditional functions. The first parameter is `self`.
|
|
113
|
-
* BREAKING CHANGE: `@ensures` now provides `old` as a parameter to access instance property values before feature execution
|
|
114
|
-
|
|
115
|
-
## v0.18.1
|
|
116
|
-
|
|
117
|
-
* Fixed webpack configuration issue
|
|
118
|
-
|
|
119
|
-
## v0.18.0
|
|
120
|
-
|
|
121
|
-
* Fixed missing `PredicateType` issue
|
|
122
|
-
* Reorganized README
|
|
123
|
-
* Added NPM badges to README
|
|
124
|
-
* Added `package.json` reference to GitHub issues
|
|
125
|
-
* Added licensing info to README
|
|
126
|
-
* Removed extraneous build dependency
|
|
127
|
-
|
|
128
|
-
## v0.17.4
|
|
129
|
-
|
|
130
|
-
* Additional fixes for Release configuration
|
|
131
|
-
|
|
132
|
-
## v0.17.3
|
|
133
|
-
|
|
134
|
-
* Additional fixes for Release configuration
|
|
135
|
-
|
|
136
|
-
## v0.17.2
|
|
137
|
-
|
|
138
|
-
* Bugfixed Release Configuration
|
|
139
|
-
|
|
140
|
-
## v0.17.1
|
|
141
|
-
|
|
142
|
-
* Updated CI/CD configuration
|
|
143
|
-
|
|
144
|
-
## v0.17.0
|
|
145
|
-
|
|
146
|
-
* Migrated repository from Azure DevOps to GitHub
|
|
147
|
-
* Migrated Azure DevOps CI/CD workflows to GitHub actions
|
|
148
|
-
* Created CHANGELOG.md and removed related build script
|
|
149
|
-
* Replaced `#{YEAR}#` token with literal year. Removed related build script
|
|
150
|
-
* Removed VSCode Azure DevOps suggested extensions
|
|
151
|
-
* Changed license to AGPL-3.0-only
|
|
152
|
-
* Updated repository URL to point to GitHub URL
|
|
153
|
-
* Changed library namespace: `@thenewobjective` → `@final-hill`
|
|
154
|
-
* Updated README Dependencies table
|
|
155
|
-
* Updated `@rescue` documentation
|
|
156
|
-
* Replaced build versioning with explicit versioning
|
|
157
|
-
* Enabled `@rescue` inheritance
|
|
158
|
-
* Created CONTRIBUTING.md
|
|
159
|
-
|
|
160
|
-
## v0.16.0
|
|
161
|
-
|
|
162
|
-
* If an exception is thrown in a class feature without a `@rescue` defined, then the exception is raised to its caller after the `@invariant` is checked
|
|
163
|
-
* If an error is thrown in `@demands`, the error is raised to the caller
|
|
164
|
-
* If an error is raised in a `@ensures` then the associated `@rescue` is executed
|
|
165
|
-
* Updated README examples
|
|
166
|
-
* Updated implementation to consolidate error messages
|
|
167
|
-
|
|
168
|
-
## v0.15.0
|
|
169
|
-
|
|
170
|
-
* Switched from `tslint` to `eslint`
|
|
171
|
-
* Updated assertions to support assertion types from TypeScript 3.7
|
|
172
|
-
* Removed Babel dependency
|
|
173
|
-
* Refactoring improvements
|
|
174
|
-
* Private properties now work with contract inheritance
|
|
175
|
-
|
|
176
|
-
## v0.14.0
|
|
177
|
-
|
|
178
|
-
* Updated YAML scripts to reference new Azure vm image
|
|
179
|
-
* Refactored Unit Tests
|
|
180
|
-
* Refactored implementation to prefer `const` declarations
|
|
181
|
-
* Refactored README examples
|
|
182
|
-
* Refactored `RescueType` to separate file
|
|
183
|
-
* Refactored Rescue Decorator
|
|
184
|
-
* `@rescue` now preserves the invariant after execution
|
|
185
|
-
* If a `@rescue` is executed and the retry argument is not called, then an error is thrown
|
|
186
|
-
|
|
187
|
-
## v0.13.0
|
|
188
|
-
|
|
189
|
-
* Automated creation of CHANGELOG.md
|
|
190
|
-
|
|
191
|
-
## v0.12.0
|
|
192
|
-
|
|
193
|
-
* Updated dependencies including TypeScript to 3.8.2
|
|
194
|
-
* Refactored codebase to utilize new TypeScript features
|
|
195
|
-
* Added Introduction to README
|
|
196
|
-
* Updated package keywords
|
|
197
|
-
* `@invariant` changed to accept functions directly instead of a record factory
|
|
198
|
-
* Multiple `@invariant` declarations can be assigned to a class
|
|
199
|
-
|
|
200
|
-
## v0.11.0
|
|
201
|
-
|
|
202
|
-
* Renamed `@requires` to `@demands`
|
|
203
|
-
* `npm audit fix`
|
|
204
|
-
* Multiple `@demands` can be assigned to a class feature
|
|
205
|
-
* Implementation of `@ensures` decorator
|
|
206
|
-
* Reorganized README
|
|
207
|
-
|
|
208
|
-
## v0.10.0
|
|
209
|
-
|
|
210
|
-
* Significant refactoring and efficiency improvements
|
|
211
|
-
* `@requires` can not be strengthened in a subtype
|
|
212
|
-
|
|
213
|
-
## v0.9.0
|
|
214
|
-
|
|
215
|
-
* Refactoring and efficiency improvements
|
|
216
|
-
* `@override` requires `@invariant` declaration in class ancestry
|
|
217
|
-
* Updated Jest configuration for reporting and VSCode debug support
|
|
218
|
-
* Cleanup of documentation
|
|
219
|
-
* Added `checkMode` support to `@rescue`
|
|
220
|
-
* Added Babel compilation
|
|
221
|
-
* `@requires` now works with inheritance
|
|
222
|
-
|
|
223
|
-
## v0.8.0
|
|
224
|
-
|
|
225
|
-
* Implementation of `@rescue` decorator
|
|
226
|
-
* Renamed `debugMode` to `checkMode`
|
|
227
|
-
* Refactoring and efficiency improvements
|
|
228
|
-
* `@requires` restricted to instance class features
|
|
229
|
-
* Added linting rule to validate file license header
|
|
230
|
-
* Updated TypeScript to 3.7.2
|
|
231
|
-
|
|
232
|
-
## v0.7.0
|
|
233
|
-
|
|
234
|
-
* `@invariant` restricted to only one declaration per class
|
|
235
|
-
* `@override` now supports accessors
|
|
236
|
-
* Updated `package.json` metadata for discoverability
|
|
237
|
-
* Added Further Reading section to README
|
|
238
|
-
|
|
239
|
-
## v0.6.0
|
|
240
|
-
|
|
241
|
-
* `@invariant` signature changed to accept a function that returns a record of assertions
|
|
242
|
-
* `@override` restricted to instance class features
|
|
243
|
-
* `@override` extended with additional checks to support Substitutability
|
|
244
|
-
* Added linting checks to the project
|
|
245
|
-
|
|
246
|
-
## v0.5.0
|
|
247
|
-
|
|
248
|
-
* `@override` decorator implemented
|
|
249
|
-
|
|
250
|
-
## v0.4.0
|
|
251
|
-
|
|
252
|
-
* License changed to AGPL-1.0-only
|
|
253
|
-
|
|
254
|
-
## v0.3.0
|
|
255
|
-
|
|
256
|
-
* Table of Contents added to README
|
|
257
|
-
* `@invariant` supports no arguments
|
|
258
|
-
|
|
259
|
-
## v0.2.0
|
|
260
|
-
|
|
261
|
-
* Added assertion documentation to README
|
|
262
|
-
* Assertions support `debugMode` flag
|
|
263
|
-
* Assertions return a boolean
|
|
264
|
-
* Assertions support throwing custom error types
|
|
265
|
-
|
|
266
|
-
## v0.1.0
|
|
267
|
-
|
|
268
|
-
* Added installation instructions to README
|
|
269
|
-
* Enabled project debugging
|
|
270
|
-
* `@invariant` can accept multiple assertions
|
|
271
|
-
* `@invariant` supports message : assertion pairs
|
|
272
|
-
* Ancestor `@invariant` enforced in subclasses
|
|
273
|
-
* Subclasses support additional `@invariant` declarations
|
|
274
|
-
* Added built-types to `tasks.json`
|
|
275
|
-
* Refactoring and typing improvements
|
|
276
|
-
|
|
277
|
-
## v0.0.2
|
|
278
|
-
|
|
279
|
-
Updated `package.json` namespace to `@thenewobjective` prefix
|
|
280
|
-
|
|
281
|
-
## v0.0.1
|
|
282
|
-
|
|
283
|
-
* Initial implementation
|
|
284
|
-
* Initial Project Setup
|
|
285
|
-
* Initial Branch configuration
|
|
286
|
-
* Initial Release configuration
|
|
287
|
-
* Build tokenization
|
|
288
|
-
* Initial `@invariant` implementation
|
|
289
|
-
* Initial Documentation
|