Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.3.0-rc.20

Implements tasknotes-spec 0.3.0-rc.6 (`tasknotes.task` 0.3.0-rc.6).

### Changed

- App behaviour moved out of the `tasknotes.task` binding into a TaskNotes settings record (`_settings/dev.tasknotes.md`, `tasknotes.settings` 1.0.0, which also implements `mdbase.app-settings` 1.0.0). The rc.6 binding no longer holds `nlp`, `templating`, `time_tracking`, `archive.move_on_archive`/`archive.folder`, `recurrence.reset_body_checkboxes`, `links.write_format`, or the per-status `next_status`, `exclude_from_cycle`, `auto_archive` and `auto_archive_delay_minutes`.
- `buildTaskNotesMdbaseResources` returns those settings as `appSettings`, writes the contract to `_contracts/tasknotes.task/0.3.0-rc.6.md` (so the rc.5 contract at `_contracts/tasknotes.task.md` can stay for types that still implement it), and generates type version 5. The starter is revision 6; `TASKNOTES_MDBASE_PACK_VERSION` is 0.3.0-rc.19.
- `patchTaskNotesMdbaseTypeSettings` no longer accepts `recurrence.resetCheckboxesOnRecurrence`, `timeTracking`, `links`, `archive`, `templating` or `statusAutomation`; write them with `buildTaskNotesSettingsPatch`.
- Types implementing rc.5 or rc.3 are still read. `resolveTaskNotesModelConfigFromMdbaseType(type, fallback, { settings })` reads each moved setting from the record, then the binding, then the fallback. A status without behaviour anywhere is out of the cycle exactly when it is skipped.

### Added

- `@tasknotes/model/settings`: the app-settings logic from mdbase Reader (resolve with defaults and warnings, patch only changed fields, conflicts, read-only on a newer `settings_version` or another app's record, new-record frontmatter, in-place Markdown writes that keep unknown fields, comments and the body) and the TaskNotes definition: `resolveTaskNotesAppSettings` (record, then legacy binding, then fallback), `taskNotesAppSettingsFromLegacyBinding`, `withoutTaskNotesAppSettings`, `absentTaskNotesSettingsPatch` (what a migration adds to a record another device created), `taskNotesAppSettingsFromModelConfig`, `applyTaskNotesAppSettingsToModelConfig`, and `buildTaskNotesSettingsResources` (contract, schema and `tasknotes-settings` type).
- `upgradeTaskNotesMdbaseTypeContract` lifts an rc.5/rc.3 type to rc.6 and returns the settings it removed. `TASKNOTES_ACCEPTED_CONTRACT_VERSIONS`, `TASKNOTES_LEGACY_CONTRACT_VERSIONS`, `TASKNOTES_LEGACY_CONTRACT_DIGESTS` and `taskNotesContractVersion` are exported.

## 0.3.0-rc.19

### Added
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tasknotes/model",
"version": "0.3.0-rc.19",
"version": "0.3.0-rc.20",
"description": "TaskNotes model, mapping, validation, recurrence, and operation-planning reference implementation.",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -99,6 +99,11 @@
"import": "./dist/esm/mdbase.js",
"require": "./dist/cjs/mdbase.cjs"
},
"./settings": {
"types": "./dist/types/settings.d.ts",
"import": "./dist/esm/settings.js",
"require": "./dist/cjs/settings.cjs"
},
"./starter": {
"types": "./dist/types/starter.d.ts",
"import": "./dist/esm/starter.js",
Expand Down
1 change: 1 addition & 0 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const entries = [
"frontmatter",
"mdbase",
"starter",
"settings",
"conformance",
"calendar",
"calendar-fixtures",
Expand Down
140 changes: 7 additions & 133 deletions src/generated/tasknotes-data-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const TASKNOTES_TASK_SCHEMA = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tasknotes.dev/schemas/tasknotes-task.schema.json",
"title": "TaskNotes portable task view",
"description": "The storage-neutral record view exposed by the tasknotes.task 0.3.0-rc.5 record contract.",
"description": "The storage-neutral record view exposed by the tasknotes.task 0.3.0-rc.6 record contract.",
"type": "object",
"required": [
"status",
Expand Down Expand Up @@ -208,7 +208,7 @@ export const TASKNOTES_TASK_BINDING_SCHEMA = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tasknotes.dev/schemas/tasknotes-task-binding.schema.json",
"title": "TaskNotes task data-contract binding",
"description": "Semantic configuration supplied by an mdbase type that implements tasknotes.task 0.3.0-rc.3.",
"description": "Semantic configuration supplied by an mdbase type that implements tasknotes.task 0.3.0-rc.6. App behaviour, such as templates, archive moves, status cycling and natural-language triggers, lives in the app's tasknotes.settings record instead.",
"type": "object",
"required": [
"profiles",
Expand All @@ -219,9 +219,7 @@ export const TASKNOTES_TASK_BINDING_SCHEMA = {
"recurrence",
"occurrences",
"links",
"archive",
"time_tracking",
"templating"
"archive"
],
"properties": {
"profiles": {
Expand Down Expand Up @@ -279,15 +277,6 @@ export const TASKNOTES_TASK_BINDING_SCHEMA = {
},
"archive": {
"$ref": "#/$defs/archivePolicy"
},
"time_tracking": {
"$ref": "#/$defs/timeTrackingPolicy"
},
"templating": {
"$ref": "#/$defs/templatingPolicy"
},
"nlp": {
"$ref": "#/$defs/nlpPolicy"
}
},
"additionalProperties": false,
Expand Down Expand Up @@ -362,10 +351,7 @@ export const TASKNOTES_TASK_BINDING_SCHEMA = {
"color",
"is_completed",
"is_skipped",
"exclude_from_cycle",
"order",
"auto_archive",
"auto_archive_delay_minutes"
"order"
],
"properties": {
"value": {
Expand All @@ -386,21 +372,8 @@ export const TASKNOTES_TASK_BINDING_SCHEMA = {
"is_skipped": {
"type": "boolean"
},
"exclude_from_cycle": {
"type": "boolean"
},
"next_status": {
"$ref": "#/$defs/nonEmptyString"
},
"order": {
"type": "number"
},
"auto_archive": {
"type": "boolean"
},
"auto_archive_delay_minutes": {
"type": "number",
"minimum": 0
}
},
"additionalProperties": true
Expand Down Expand Up @@ -492,18 +465,14 @@ export const TASKNOTES_TASK_BINDING_SCHEMA = {
"type": "object",
"required": [
"syntax",
"maintain_due_date_offset",
"reset_body_checkboxes"
"maintain_due_date_offset"
],
"properties": {
"syntax": {
"const": "tasknotes"
},
"maintain_due_date_offset": {
"type": "boolean"
},
"reset_body_checkboxes": {
"type": "boolean"
}
},
"additionalProperties": false
Expand Down Expand Up @@ -547,8 +516,7 @@ export const TASKNOTES_TASK_BINDING_SCHEMA = {
"linkPolicy": {
"type": "object",
"required": [
"accepted_formats",
"write_format"
"accepted_formats"
],
"properties": {
"accepted_formats": {
Expand All @@ -561,112 +529,18 @@ export const TASKNOTES_TASK_BINDING_SCHEMA = {
"markdown"
]
}
},
"write_format": {
"enum": [
"wikilink",
"markdown"
]
}
},
"additionalProperties": false
},
"archivePolicy": {
"type": "object",
"required": [
"archived_tag",
"move_on_archive"
"archived_tag"
],
"properties": {
"archived_tag": {
"$ref": "#/$defs/nonEmptyString"
},
"move_on_archive": {
"type": "boolean"
},
"folder": {
"$ref": "#/$defs/nonEmptyString"
}
},
"additionalProperties": false
},
"timeTrackingPolicy": {
"type": "object",
"required": [
"auto_stop_on_complete"
],
"properties": {
"auto_stop_on_complete": {
"type": "boolean"
}
},
"additionalProperties": false
},
"templatingPolicy": {
"type": "object",
"required": [
"enabled",
"occurrence_enabled"
],
"properties": {
"enabled": {
"type": "boolean"
},
"template_path": {
"$ref": "#/$defs/nonEmptyString"
},
"occurrence_enabled": {
"type": "boolean"
},
"occurrence_template_path": {
"$ref": "#/$defs/nonEmptyString"
},
"failure_mode": {
"enum": [
"error",
"warning_fallback"
]
},
"unknown_variable_policy": {
"enum": [
"preserve",
"empty"
]
}
},
"additionalProperties": false
},
"nlpTrigger": {
"type": "object",
"required": [
"property_id",
"trigger",
"enabled"
],
"properties": {
"property_id": {
"$ref": "#/$defs/nonEmptyString"
},
"trigger": {
"$ref": "#/$defs/nonEmptyString"
},
"enabled": {
"type": "boolean"
}
},
"additionalProperties": false
},
"nlpPolicy": {
"type": "object",
"required": [
"triggers"
],
"properties": {
"triggers": {
"type": "array",
"items": {
"$ref": "#/$defs/nlpTrigger"
}
}
},
"additionalProperties": false
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ export * from "./operations";
export * from "./frontmatter";
export * from "./mdbase";
export * from "./starter";
export * from "./settings";
export * from "./conformance";
export * from "./calendar";
Loading
Loading