@fuzzle/opencode-accountant 0.0.14-next.1 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17931,13 +17931,7 @@ function ensureYearJournalExists(directory, year) {
|
|
|
17931
17931
|
}
|
|
17932
17932
|
const mainJournalContent = fs7.readFileSync(mainJournalPath, "utf-8");
|
|
17933
17933
|
const includeDirective = `include ledger/${year}.journal`;
|
|
17934
|
-
|
|
17935
|
-
`);
|
|
17936
|
-
const includeExists = lines.some((line) => {
|
|
17937
|
-
const trimmed = line.trim();
|
|
17938
|
-
return trimmed === includeDirective || trimmed.startsWith(includeDirective + " ");
|
|
17939
|
-
});
|
|
17940
|
-
if (!includeExists) {
|
|
17934
|
+
if (!mainJournalContent.includes(includeDirective)) {
|
|
17941
17935
|
const newContent = mainJournalContent.trimEnd() + `
|
|
17942
17936
|
` + includeDirective + `
|
|
17943
17937
|
`;
|