Skip to content

Commit 5d3bd1e

Browse files
authored
Merge pull request #1401 from ember-learn/fix-build
enforce the right type for since and until in frontmatter
2 parents 368e702 + 38f2b45 commit 5d3bd1e

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

content/ember-data/v5/ember-data-deprecate-store-extends-ember-object.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Store will no longer extend EmberObject in 6.0
3-
until: 6.0
4-
since: 5.4
3+
until: '6.0'
4+
since: '5.4'
55
displayId: ember-data:deprecate-store-extends-ember-object
66
---
77

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

31-
This deprecation is from RFC [#1026](https://rfcs.emberjs.com/id/1026-ember-data-deprecate-store-extends-ember-object).
31+
This deprecation is from RFC [#1026](https://rfcs.emberjs.com/id/1026-ember-data-deprecate-store-extends-ember-object).

node-tests/index.mjs

+10
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ describe('Json Tests', function () {
2424
`You don't need to define a displayId if it's the same as the file name`
2525
);
2626
}
27+
28+
// since is manditory and must be a string
29+
if (typeof contents.since !== 'string') {
30+
throw new Error('since frontmatter must be a string');
31+
}
32+
33+
// if you define an until then it must be a string
34+
if (contents.until && typeof contents.until !== 'string') {
35+
throw new Error('until frontmatter must be a string');
36+
}
2737
});
2838
});
2939
});

0 commit comments

Comments
 (0)