From 00f9e54fc73a906784579076d95ebe67744d8568 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 26 Mar 2024 14:47:21 -0400 Subject: [PATCH] Update test scripts --- packages/class-name-updater/package.json | 3 ++- packages/class-name-updater/src/classNameUpdate.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/class-name-updater/package.json b/packages/class-name-updater/package.json index 5e21fc29f..edf486fb2 100644 --- a/packages/class-name-updater/package.json +++ b/packages/class-name-updater/package.json @@ -16,7 +16,8 @@ "scripts": { "build": "tsc --build --verbose ./tsconfig.json", "clean": "rimraf ./dist", - "test": "node ./dist/cli.js test --exclude test/largeFile.js" + "test": "node ./dist/cli.js test --exclude test/largeFile.js", + "test:v6": "node ./dist/cli.js test --exclude test/largeFile.js --pfVersion 6" }, "dependencies": { "colors": "^1.4.0", diff --git a/packages/class-name-updater/src/classNameUpdate.ts b/packages/class-name-updater/src/classNameUpdate.ts index 3735fe39c..957f79026 100644 --- a/packages/class-name-updater/src/classNameUpdate.ts +++ b/packages/class-name-updater/src/classNameUpdate.ts @@ -6,7 +6,6 @@ import { printDiff } from "./printDiff"; export async function classNameUpdate(globTarget: string, makeChange: boolean, fileTypesRegex: RegExp, excludeFiles: string[] = [], pfVersion: number) { const acceptedFileTypesRegex = fileTypesRegex || /\.(s?css|less|(t|j)sx?|md)$/; - // const changeNeededRegex = /(\b|\$)pf-([cul]|global|theme|color)-/g; const previousVersion = pfVersion ? "-v" + (pfVersion - 1) : ""; const changeNeededRegex = new RegExp( "(\\b|\\$)pf" + previousVersion + "-([cul]|global|theme|color)-",