Skip to content

enforce the right type for since and until in frontmatter #1401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 7, 2025
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Store will no longer extend EmberObject in 6.0
until: 6.0
since: 5.4
until: '6.0'
since: '5.4'
displayId: ember-data:deprecate-store-extends-ember-object
---

Expand All @@ -28,4 +28,4 @@ If you are unsure whether your Store class uses EmberObject APIs, set this
config and uses of those APIs will throw exceptions. The most common API that
may have been used is `Store.extend({...`.

This deprecation is from RFC [#1026](https://rfcs.emberjs.com/id/1026-ember-data-deprecate-store-extends-ember-object).
This deprecation is from RFC [#1026](https://rfcs.emberjs.com/id/1026-ember-data-deprecate-store-extends-ember-object).
10 changes: 10 additions & 0 deletions node-tests/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ describe('Json Tests', function () {
`You don't need to define a displayId if it's the same as the file name`
);
}

// since is manditory and must be a string
if (typeof contents.since !== 'string') {
throw new Error('since frontmatter must be a string');
}

// if you define an until then it must be a string
if (contents.until && typeof contents.until !== 'string') {
throw new Error('until frontmatter must be a string');
}
});
});
});