@ember-data/model 5.8.0-alpha.29 → 5.8.0-alpha.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,29 +1,36 @@
1
1
  <p align="center">
2
2
  <img
3
3
  class="project-logo"
4
- src="./logos/ember-data-logo-dark.svg#gh-dark-mode-only"
5
- alt="EmberData Model"
6
- width="240px"
7
- title="EmberData Model"
8
- />
9
- <img
10
- class="project-logo"
11
- src="./logos/ember-data-logo-light.svg#gh-light-mode-only"
12
- alt="EmberData Model"
13
- width="240px"
14
- title="EmberData Model"
4
+ src="./logos/logo-yellow-slab.svg"
5
+ alt="WarpDrive"
6
+ width="180px"
7
+ title="WarpDrive"
15
8
  />
16
9
  </p>
17
10
 
18
- <p align="center">Runtime Classes for use as a Schema Source and Reactive Object for EmberData</p>
11
+ ![NPM Stable Version](https://img.shields.io/npm/v/ember-data/latest?label=version&style=flat&color=fdb155)
12
+ ![NPM Downloads](https://img.shields.io/npm/dm/ember-data.svg?style=flat&color=fdb155)
13
+ ![License](https://img.shields.io/github/license/warp-drive-data/warp-drive.svg?style=flat&color=fdb155)
14
+ [![EmberJS Discord Community Server](https://img.shields.io/badge/EmberJS-grey?logo=discord&logoColor=fdb155)](https://discord.gg/zT3asNS
15
+ )
16
+ [![WarpDrive Discord Server](https://img.shields.io/badge/WarpDrive-grey?logo=discord&logoColor=fdb155)](https://discord.gg/PHBbnWJx5S
17
+ )
18
+
19
+ <p align="center">
20
+ <br>
21
+ <a href="https://warp-drive.io">WarpDrive</a> is the lightweight data library for web apps &mdash;
22
+ <br>
23
+ universal, typed, reactive, and ready to scale.
24
+ <br/><br/>
25
+ </p>
26
+
27
+ ---
19
28
 
20
- ## Installation
29
+ # @ember-data/model
21
30
 
22
- Install using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)
31
+ Runtime classes for use as a source of ResourceSchema and as a ReactiveResource for older "legacy" EmberData/WarpDrive configurations.
23
32
 
24
- ```sh
25
- pnpm add @ember-data/model
26
- ```
33
+ If using more recent versions of WarpDrive, install this via [@warp-drive/legacy](https://www.npmjs.com/package/@warp-drive/legacy) instead.
27
34
 
28
35
  **Tagged Releases**
29
36
 
@@ -33,8 +40,7 @@ pnpm add @ember-data/model
33
40
  - ![NPM LTS Version](https://img.shields.io/npm/v/%40ember-data/model/lts?label=%40lts&color=0096FF)
34
41
  - ![NPM LTS 4.12 Version](https://img.shields.io/npm/v/%40ember-data/model/lts-4-12?label=%40lts-4-12&color=bbbbbb)
35
42
 
36
-
37
- <p align="center">Provides a Presentation Model for resource data in an EmberData Cache</p>
43
+ ## About
38
44
 
39
45
  This package implements the EmberData Store's `instantiateRecord` and `teardownRecord` hooks
40
46
  as well as configures an associated `SchemaService` implementation.
@@ -52,23 +58,23 @@ specifically to the class definition and the static schema methods present on it
52
58
  When we refer to a `record` we refer to a specific class instance presenting
53
59
  the resource data for a given `type` and `id`.
54
60
 
55
- ### Defining a Model
61
+ ### Defining a Model
56
62
 
57
- *app/models/person.js*
58
- ```ts
59
- import Model, { attr, belongsTo, hasMany } from '@ember-data/model';
63
+ *app/models/person.js*
64
+ ```ts
65
+ import Model, { attr, belongsTo, hasMany } from '@ember-data/model';
60
66
 
61
- export default class PersonModel extends Model {
62
- @attr name;
67
+ export default class PersonModel extends Model {
68
+ @attr name;
63
69
 
64
- @belongsTo('pet', { inverse: 'owners', async: false }) dog;
70
+ @belongsTo('pet', { inverse: 'owners', async: false }) dog;
65
71
 
66
- @hasMany('person', { inverse: 'friends', async: true }) friends;
67
- }
68
- ```
72
+ @hasMany('person', { inverse: 'friends', async: true }) friends;
73
+ }
74
+ ```
69
75
 
70
- ### modelName convention
76
+ ### modelName convention
71
77
 
72
- By convention, the name of a given model (its `type`) matches the name
73
- of the file in the `app/models` folder and should be lowercase, singular
74
- and dasherized.
78
+ By convention, the name of a given model (its `type`) matches the name
79
+ of the file in the `app/models` folder and should be lowercase, singular
80
+ and dasherized.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-data/model",
3
- "version": "5.8.0-alpha.29",
3
+ "version": "5.8.0-alpha.30",
4
4
  "description": "A basic Ember implementation of a resource presentation layer for use with @ember-data/store",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -48,16 +48,16 @@
48
48
  "ember-cli-string-utils": "^1.1.0",
49
49
  "ember-cli-test-info": "^1.0.0",
50
50
  "inflection": "~3.0.2",
51
- "@warp-drive/core": "5.8.0-alpha.29",
52
- "@warp-drive/legacy": "5.8.0-alpha.29",
53
- "@warp-drive/utilities": "5.8.0-alpha.29"
51
+ "@warp-drive/core": "5.8.0-alpha.30",
52
+ "@warp-drive/legacy": "5.8.0-alpha.30",
53
+ "@warp-drive/utilities": "5.8.0-alpha.30"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@babel/core": "^7.28.3",
57
57
  "@babel/plugin-transform-typescript": "^7.28.0",
58
58
  "@babel/preset-env": "^7.28.3",
59
59
  "@babel/preset-typescript": "^7.27.1",
60
- "@warp-drive/internal-config": "5.8.0-alpha.29",
60
+ "@warp-drive/internal-config": "5.8.0-alpha.30",
61
61
  "expect-type": "^1.2.2",
62
62
  "typescript": "^5.9.2",
63
63
  "vite": "^7.1.3"
@@ -1,6 +1,6 @@
1
- /// <reference path="./hooks.d.ts" />
2
- /// <reference path="./migration-support.d.ts" />
3
1
  /// <reference path="./-private.d.ts" />
2
+ /// <reference path="./migration-support.d.ts" />
3
+ /// <reference path="./hooks.d.ts" />
4
4
  declare module '@ember-data/model' {
5
5
  /**
6
6
  * This package provides a Presentation Model for resource data in an EmberData Cache.