Fix formatting once and for all
This commit is contained in:
committed by
Ralph Khreish
parent
3fa0c7f7af
commit
33208388bd
@@ -346,10 +346,9 @@ function readJSON(filepath, projectRoot = null, tag = null) {
|
|||||||
console.log(`File is in legacy format, performing migration...`);
|
console.log(`File is in legacy format, performing migration...`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is legacy format - migrate it to tagged format
|
|
||||||
// Normalize task IDs before migration
|
|
||||||
normalizeTaskIds(data.tasks);
|
normalizeTaskIds(data.tasks);
|
||||||
|
|
||||||
|
// This is legacy format - migrate it to tagged format
|
||||||
const migratedData = {
|
const migratedData = {
|
||||||
master: {
|
master: {
|
||||||
tasks: data.tasks,
|
tasks: data.tasks,
|
||||||
@@ -475,8 +474,7 @@ function readJSON(filepath, projectRoot = null, tag = null) {
|
|||||||
// Get the data for the resolved tag
|
// Get the data for the resolved tag
|
||||||
const tagData = data[resolvedTag];
|
const tagData = data[resolvedTag];
|
||||||
if (tagData && tagData.tasks) {
|
if (tagData && tagData.tasks) {
|
||||||
// Normalize task IDs for the resolved tag
|
normalizeTaskIds(data.tasks);
|
||||||
normalizeTaskIds(tagData.tasks);
|
|
||||||
|
|
||||||
// Add the _rawTaggedData property and the resolved tag to the returned data
|
// Add the _rawTaggedData property and the resolved tag to the returned data
|
||||||
const result = {
|
const result = {
|
||||||
@@ -494,8 +492,7 @@ function readJSON(filepath, projectRoot = null, tag = null) {
|
|||||||
// If the resolved tag doesn't exist, fall back to master
|
// If the resolved tag doesn't exist, fall back to master
|
||||||
const masterData = data.master;
|
const masterData = data.master;
|
||||||
if (masterData && masterData.tasks) {
|
if (masterData && masterData.tasks) {
|
||||||
// Normalize task IDs for master fallback
|
normalizeTaskIds(data.tasks);
|
||||||
normalizeTaskIds(masterData.tasks);
|
|
||||||
|
|
||||||
if (isDebug) {
|
if (isDebug) {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
Reference in New Issue
Block a user