File tree 1 file changed +6
-11
lines changed
1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change 1
1
import fs from 'fs-extra'
2
- import semverUtils from 'semver-utils '
2
+ import semverCompare from 'semver-compare '
3
3
import { normalizeYuiDocClassItem } from './yuidoc-fixer/normalize-yui-doc-class-item'
4
4
import { yuiDocClassItemKeys } from './yuidoc-fixer/yui-doc-class-item-keys'
5
5
import { normalizeYuiDocClass } from './yuidoc-fixer/normalize-yui-doc-class'
@@ -18,17 +18,12 @@ export default async function fixBorkedYuidocFiles(file) {
18
18
return
19
19
}
20
20
21
- const version = semverUtils . parse (
22
- file
23
- . replace ( 'tmp/s3-docs/v' , '' )
24
- . replace ( '/ember-docs.json' , '' )
25
- . replace ( '/ember-data-docs.json' , '' )
26
- )
21
+ const version = file
22
+ . replace ( 'tmp/s3-docs/v' , '' )
23
+ . replace ( '/ember-docs.json' , '' )
24
+ . replace ( '/ember-data-docs.json' , '' )
27
25
28
- if (
29
- parseInt ( version [ 'major' ] ) < 3 ||
30
- ! ( parseInt ( version [ 'major' ] ) === 3 && parseInt ( version [ 'minor' ] ) >= 10 )
31
- ) {
26
+ if ( semverCompare ( version , '3.10.0' ) === - 1 ) {
32
27
return file
33
28
}
34
29
You can’t perform that action at this time.
0 commit comments