11import { LINT_MESSAGES } from '../constants.mjs' ;
2- import { valid } from 'semver' ;
2+ import { valid , parse } from 'semver' ;
33import { env } from 'node:process' ;
44
55const NODE_RELEASED_VERSIONS = env . NODE_RELEASED_VERSIONS ?. split ( ',' ) ;
@@ -14,6 +14,19 @@ const NODE_RELEASED_VERSIONS = env.NODE_RELEASED_VERSIONS?.split(',');
1414const isValidReplaceMe = ( version , length ) =>
1515 length === 1 && version === 'REPLACEME' ;
1616
17+ /**
18+ * Checks if a given semantic version should be ignored.
19+ * A version is considered ignored if its major version is 0 and minor version is less than 2.
20+ *
21+ * @param {string } version - The version to check.
22+ * @returns {boolean|undefined } Returns true if the version is ignored, false otherwise.
23+ */
24+ const isIgnoredVersion = version => {
25+ if ( version === 'v0.11.15' ) return true ;
26+ const { major, minor } = parse ( version ) || { } ;
27+ return major === 0 && minor < 2 ;
28+ } ;
29+
1730/**
1831 * Determines if a given version is invalid.
1932 *
@@ -26,6 +39,7 @@ const isInvalid = NODE_RELEASED_VERSIONS
2639 ? ( version , _ , { length } ) =>
2740 ! (
2841 isValidReplaceMe ( version , length ) ||
42+ isIgnoredVersion ( version ) ||
2943 NODE_RELEASED_VERSIONS . includes ( version . replace ( / ^ v / , '' ) )
3044 )
3145 : ( version , _ , { length } ) =>
0 commit comments