Skip to content

Commit b7d15ce

Browse files
committed
refactor: . rename field to includes (Settings)
1 parent c3575f2 commit b7d15ce

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Config/Settings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const TASK_FORMATS = {
6161
export type TASK_FORMATS = typeof TASK_FORMATS; // For convenience to make some typing easier
6262

6363
export interface Settings {
64-
include: Record<string, string>;
64+
includes: Record<string, string>;
6565
globalQuery: string;
6666
globalFilter: string;
6767
removeGlobalFilter: boolean;
@@ -97,7 +97,7 @@ export interface Settings {
9797
}
9898

9999
const defaultSettings: Settings = {
100-
include: {},
100+
includes: {},
101101
globalQuery: '',
102102
globalFilter: '',
103103
removeGlobalFilter: false,

src/Scripting/QueryContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ export function makeQueryContextWithTasks(tasksFile: TasksFile, allTasks: Readon
5959
allTasks: allTasks,
6060
searchCache: {}, // Added for caching
6161
},
62-
includes: { ...getSettings().include },
62+
includes: { ...getSettings().includes },
6363
};
6464
}

tests/Scripting/Includes.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ afterEach(() => {
88

99
describe('include tests', () => {
1010
it('should accept whole-line include placeholder', () => {
11-
updateSettings({ include: { not_done: 'not done' } });
11+
updateSettings({ includes: { not_done: 'not done' } });
1212

1313
const source = '{{includes.not_done}}';
1414
const query = new Query(source, new TasksFile('stuff.md'));
@@ -23,6 +23,6 @@ describe('include settings tests', () => {
2323
it('should have an empty include field', () => {
2424
const settings = getSettings();
2525

26-
expect(settings.include).toEqual({});
26+
expect(settings.includes).toEqual({});
2727
});
2828
});

0 commit comments

Comments
 (0)