@living-architecture/riviere-extract-ts 0.4.2 → 0.4.3

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.
@@ -86,11 +86,7 @@ function evaluateClassRule(rule, classDecl) {
86
86
  if ('fromClassName' in rule) {
87
87
  return evaluateFromClassNameRule(rule, classDecl);
88
88
  }
89
- /* istanbul ignore next -- @preserve: only fromProperty reaches here; defensive guard */
90
- if (!('fromProperty' in rule)) {
91
- throw new ExtractionError('Unsupported extraction rule type for class-based component', classDecl.getSourceFile().getFilePath(), classDecl.getStartLineNumber());
92
- }
93
- return evaluateFromPropertyRule(rule, classDecl);
89
+ throw new ExtractionError('Unsupported extraction rule type for class-based component', classDecl.getSourceFile().getFilePath(), classDecl.getStartLineNumber());
94
90
  }
95
91
  function evaluateRule(rule, draft, project) {
96
92
  if ('literal' in rule) {
@@ -107,6 +103,10 @@ function evaluateRule(rule, draft, project) {
107
103
  const classDecl = findContainingClass(project, draft);
108
104
  return evaluateFromGenericArgRule(rule, classDecl);
109
105
  }
106
+ if ('fromProperty' in rule) {
107
+ const classDecl = findContainingClass(project, draft);
108
+ return evaluateFromPropertyRule(rule, classDecl);
109
+ }
110
110
  if ('fromParameterType' in rule) {
111
111
  const methodDecl = findMethodAtLine(project, draft);
112
112
  const params = methodDecl.getParameters();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@living-architecture/riviere-extract-ts",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"