Skip to content

Commit 65244f2

Browse files
bmiddhaCopilot
andcommitted
refactor: convert SassProcessor _cache accessor pair to # syntax
Manually convert the get/set _cache accessor pair the codemod left as private, since both declarations and all 2 usages are plain 'this._cache' property access within SassProcessor's own instance methods, with no subclassing, bracket/reflection access, or external test references in the package. The tool's skip was a limitation of its per-declaration reference tracking (shared accessor symbol), not a real semantic hazard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
1 parent 946d39a commit 65244f2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

heft-plugins/heft-sass-plugin/src/SassProcessor.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export class SassProcessor {
282282

283283
try {
284284
const serializedConfig: string = await FileSystem.readFileAsync(this.#configFilePath);
285-
this._cache = serializedConfig;
285+
this.#cache = serializedConfig;
286286
} catch (err) {
287287
if (!FileSystem.isNotExistError(err)) {
288288
this.#options.logger.terminal.writeVerboseLine(`Error reading cache file: ${err}`);
@@ -404,7 +404,7 @@ export class SassProcessor {
404404
);
405405

406406
if (this.#configFilePath) {
407-
const serializedConfig: string = this._cache;
407+
const serializedConfig: string = this.#cache;
408408
try {
409409
await FileSystem.writeFileAsync(this.#configFilePath, serializedConfig, {
410410
ensureFolderExists: true
@@ -610,7 +610,7 @@ export class SassProcessor {
610610
return null;
611611
}
612612

613-
private get _cache(): string {
613+
get #cache(): string {
614614
const serializedRecords: ISerializedFileRecord[] = Array.from(this.#fileInfo.values(), (record) => {
615615
return {
616616
relativePath: record.relativePath,
@@ -627,7 +627,7 @@ export class SassProcessor {
627627
* Configures the state of this processor using the specified cache file content.
628628
* @param cacheFileContent - The contents of the cache file
629629
*/
630-
private set _cache(cacheFileContent: string) {
630+
set #cache(cacheFileContent: string) {
631631
this.#fileInfo.clear();
632632

633633
const serializedRecords: ISerializedFileRecord[] = JSON.parse(cacheFileContent);

0 commit comments

Comments
 (0)