mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: handle prerelease versions in deletion target rule (#10101)
This commit is contained in:
committed by
Joey Perrott
parent
c15e307405
commit
01ec602b0b
@@ -9,7 +9,8 @@ import * as path from 'path';
|
||||
*/
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
const packageVersion = require(path.join(process.cwd(), 'package.json')).version;
|
||||
// Split it on the dash to ignore `-beta.x` suffixes.
|
||||
const packageVersion = require(path.join(process.cwd(), 'package.json')).version.split('-')[0];
|
||||
|
||||
return this.applyWithFunction(sourceFile, (ctx: Lint.WalkContext<any>) => {
|
||||
utils.forEachComment(ctx.sourceFile, (file, {pos, end}) => {
|
||||
|
||||
Reference in New Issue
Block a user