componentsjs 5.0.0-beta.5 → 5.0.0-beta.6
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
<a name="v5.0.0-beta.6"></a>
|
|
5
|
+
## [v5.0.0-beta.6](https://github.com/LinkedSoftwareDependencies/Components.js/compare/v5.0.0-beta.5...v5.0.0-beta.6) - 2022-02-09
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
* [Fix generic errors still throwing during ignored type checking](https://github.com/LinkedSoftwareDependencies/Components.js/commit/c14adcf4757e5194db22c0f0285407bd03bf5635)
|
|
9
|
+
|
|
4
10
|
<a name="v5.0.0-beta.5"></a>
|
|
5
11
|
## [v5.0.0-beta.5](https://github.com/LinkedSoftwareDependencies/Components.js/compare/v5.0.0-beta.4...v5.0.0-beta.5) - 2022-02-08
|
|
6
12
|
|
|
@@ -97,8 +97,11 @@ class ConfigPreprocessorComponent {
|
|
|
97
97
|
// ParameterPropertyHandlerRange#hasParamValueValidType)
|
|
98
98
|
if (config.property.genericTypeInstancesComponentScope &&
|
|
99
99
|
handleResponse.component.value === config.property.genericTypeInstancesComponentScope.value) {
|
|
100
|
-
genericsContext.bindComponentGenericTypes(handleResponse.component, config.properties.genericTypeInstances, { config }, (subType, superType) => this.parameterHandler.parameterPropertyHandlerRange
|
|
100
|
+
const conflict = genericsContext.bindComponentGenericTypes(handleResponse.component, config.properties.genericTypeInstances, { config }, (subType, superType) => this.parameterHandler.parameterPropertyHandlerRange
|
|
101
101
|
.hasType(subType, superType, genericsContext, config.property.genericTypeInstancesComponentScope, config.properties.genericTypeInstances, { config }));
|
|
102
|
+
if (conflict) {
|
|
103
|
+
throw new ErrorResourcesContext_1.ErrorResourcesContext(conflict.description, conflict.context);
|
|
104
|
+
}
|
|
102
105
|
}
|
|
103
106
|
return genericsContext;
|
|
104
107
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GenericsContext = void 0;
|
|
4
|
-
const ErrorResourcesContext_1 = require("../util/ErrorResourcesContext");
|
|
5
4
|
const ParameterPropertyHandlerRange_1 = require("./parameterproperty/ParameterPropertyHandlerRange");
|
|
6
5
|
/**
|
|
7
6
|
* Context for binding generic types to a concrete range value.
|
|
@@ -270,7 +269,10 @@ class GenericsContext {
|
|
|
270
269
|
}
|
|
271
270
|
// Throw if an unexpected number of generic type instances are passed.
|
|
272
271
|
if (genericTypeParameters.length !== genericTypeInstances.length) {
|
|
273
|
-
|
|
272
|
+
return {
|
|
273
|
+
description: `Invalid generic type instantiation: a different amount of generic types are passed (${genericTypeInstances.length}) than are defined on the component (${genericTypeParameters.length}).`,
|
|
274
|
+
context: Object.assign({ passedGenerics: genericTypeInstances, definedGenerics: genericTypeParameters, component }, errorContext),
|
|
275
|
+
};
|
|
274
276
|
}
|
|
275
277
|
// Populate with manually defined generic type bindings
|
|
276
278
|
for (const [i, genericTypeInstance] of genericTypeInstances.entries()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "componentsjs",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.6",
|
|
4
4
|
"description": "A semantic dependency injection framework",
|
|
5
5
|
"lsd:contexts": {
|
|
6
6
|
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld": "components/context.jsonld"
|