File tree Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ function extractMethodsFromClasses(classes) {
162
162
currentClass . data . attributes . methods
163
163
. reduce ( ( classMethods , currentMethod ) => {
164
164
// Transform the current method and push on to methods.
165
- classMethods . push ( schemas . methodSchema ( currentMethod ) )
165
+ classMethods . push ( schemas . methodSchema ( currentMethod , currentClass ) )
166
166
return classMethods
167
167
} , [ ] )
168
168
// Merge all methods of all classes into a single array
@@ -187,7 +187,7 @@ function extractStaticFunctionsFromModules(modules) {
187
187
188
188
return moduleStaticFunctions
189
189
. reduce ( ( moduleStaticFunctions , currentStaticFunction ) => {
190
- moduleStaticFunctions . push ( schemas . methodSchema ( currentStaticFunction ) )
190
+ moduleStaticFunctions . push ( schemas . methodSchema ( currentStaticFunction , currentModule ) )
191
191
return moduleStaticFunctions
192
192
} , [ ] )
193
193
. concat ( methods )
Original file line number Diff line number Diff line change 6
6
export default function classSchema ( classObj ) {
7
7
const data = classObj . data
8
8
const attributes = data . attributes
9
+ const versionId = data . relationships [ 'project-version' ] . data . id ;
10
+ const version = versionId . substring ( versionId . lastIndexOf ( '-' ) + 1 ) ;
9
11
10
12
return {
11
13
id : data . id ,
@@ -14,8 +16,7 @@ export default function classSchema(classObj) {
14
16
namespace : attributes . namespace ,
15
17
_tags : [
16
18
`module:${ attributes . module } ` ,
17
- `version:${ attributes . version } ` ,
18
- `since:${ attributes . since } `
19
+ `version:${ version } `
19
20
]
20
21
}
21
22
}
Original file line number Diff line number Diff line change 3
3
* @param {Object } method - An object with the method information.
4
4
* @returns {Object } - Transformed object
5
5
*/
6
- export default function methodSchema ( method ) {
6
+ export default function methodSchema ( method , versioned ) {
7
+ let versionId = versioned . data . relationships [ 'project-version' ] . data . id ;
8
+ let version = versionId . substring ( versionId . lastIndexOf ( '-' ) + 1 ) ;
9
+
7
10
return {
8
11
file : method . file ,
9
12
line : method . line ,
@@ -17,8 +20,7 @@ export default function methodSchema(method) {
17
20
18
21
_tags : [
19
22
`module:${ method . module } ` ,
20
- `version:${ method . version } ` ,
21
- `since:${ method . since } `
23
+ `version:${ version } `
22
24
] ,
23
25
24
26
hierarchy : {
Original file line number Diff line number Diff line change 6
6
export default function moduleSchema ( module ) {
7
7
const data = module . data
8
8
const attributes = data . attributes
9
-
9
+ let versionId = data . relationships [ 'project-version' ] . data . id ;
10
+ let version = versionId . substring ( versionId . lastIndexOf ( '-' ) + 1 ) ;
10
11
return {
11
12
id : data . id ,
12
13
name : attributes . name ,
13
14
submodules : attributes . submodules ,
14
15
namespaces : attributes . namespaces ,
15
- _tags : [ `module:${ attributes . name } ` , `version:${ attributes . version } ` ]
16
+ _tags : [
17
+ `module:${ attributes . name } ` ,
18
+ `version:${ version } `
19
+ ]
16
20
}
17
21
}
You can’t perform that action at this time.
0 commit comments