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
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.

2 changes: 1 addition & 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.8",
"version": "0.3.0-rc.9",
"description": "TaskNotes model, mapping, validation, recurrence, and operation-planning reference implementation.",
"license": "MIT",
"type": "module",
Expand Down
6 changes: 3 additions & 3 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.2 record contract.",
"description": "The storage-neutral record view exposed by the tasknotes.task 0.3.0-rc.3 record contract.",
"type": "object",
"required": [
"status",
Expand Down Expand Up @@ -189,7 +189,7 @@ export const TASKNOTES_TASK_SCHEMA = {
}
},
"sortOrder": {
"type": "number"
"type": "string"
}
}
} as const;
Expand All @@ -198,7 +198,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.2.",
"description": "Semantic configuration supplied by an mdbase type that implements tasknotes.task 0.3.0-rc.3.",
"type": "object",
"required": [
"profiles",
Expand Down
2 changes: 1 addition & 1 deletion src/mdbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ export function buildTaskNotesMdbaseResources(
mapping.googleCalendarMovedOriginalDates,
arraySchema(dateSchema(legacyCompatibility), legacyCompatibility)
);
addField("sortOrder", mapping.sortOrder, numberSchema({}, legacyCompatibility));
addField("sortOrder", mapping.sortOrder, stringSchema({}, legacyCompatibility));

for (const userField of modelConfig.userFields) {
properties[userField.key] = userFieldSchema(userField, legacyCompatibility);
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const TASKNOTES_SPEC_VERSION = "0.3.0-rc.2";
export const TASKNOTES_SPEC_VERSION = "0.3.0-rc.3";

export type JsonPrimitive = string | number | boolean | null;
export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
Expand Down
11 changes: 7 additions & 4 deletions test/mdbase.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
function implementation(type) {
return type.implements.find(
(entry) =>
entry.contract === "tasknotes.task" && entry.version === "0.3.0-rc.2"
entry.contract === "tasknotes.task" && entry.version === "0.3.0-rc.3"
);
}

Expand All @@ -30,10 +30,10 @@ test("builds one canonical TaskNotes and mdbase collection contract", () => {
assert.equal(resources.config.settings.contracts_folder, "_contracts");
assert.equal(resources.contract.id, "tasknotes.task");
assert.equal(resources.contract.contract_type, "record");
assert.equal(resources.contract.version, "0.3.0-rc.2");
assert.equal(resources.contract.version, "0.3.0-rc.3");
assert.ok(resources.contract.record_schema);
assert.equal(taskImplementation.contract, "tasknotes.task");
assert.equal(taskImplementation.version, "0.3.0-rc.2");
assert.equal(taskImplementation.version, "0.3.0-rc.3");
assert.deepEqual(extension.profiles, [
"core-lite",
"recurrence",
Expand All @@ -59,6 +59,9 @@ test("builds one canonical TaskNotes and mdbase collection contract", () => {
items: { type: "string", minLength: 1 },
uniqueItems: true,
});
assert.deepEqual(schema.properties[taskImplementation.fields.sortOrder], {
type: "string",
});
assert.deepEqual(type.collection.links["attachments[]"], {
validate_exists: false,
});
Expand Down Expand Up @@ -97,7 +100,7 @@ test("packages the contract, implementation, and schemas as one digest-pinned ty
const pack = await buildTaskNotesMdbaseTypePack(resources);

assert.deepEqual(pack.provides, [
{ id: "tasknotes.task", version: "0.3.0-rc.2" },
{ id: "tasknotes.task", version: "0.3.0-rc.3" },
]);
assert.equal(pack.manifest.kind, "mdbase.type-pack");
assert.equal(pack.manifest.id, "tasknotes.task");
Expand Down