@ember-data/serializer 4.8.0-alpha.3 → 4.8.0-alpha.6

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/addon/json-api.js CHANGED
@@ -374,7 +374,6 @@ const JSONAPISerializer = JSONSerializer.extend({
374
374
  @param {String} modelName
375
375
  @return {String}
376
376
  */
377
- // TODO @deprecated Use payloadTypeFromModelName instead
378
377
  payloadKeyFromModelName(modelName) {
379
378
  return pluralize(modelName);
380
379
  },
@@ -413,7 +412,7 @@ const JSONAPISerializer = JSONSerializer.extend({
413
412
 
414
413
  ```app/serializers/application.js
415
414
  import JSONAPISerializer from '@ember-data/serializer/json-api';
416
- import { dasherize } from '@ember/string';
415
+ import { dasherize } from '<app-name>/utils/string-utils';
417
416
 
418
417
  export default class ApplicationSerializer extends JSONAPISerializer {
419
418
  keyForAttribute(attr, method) {
@@ -445,7 +444,7 @@ const JSONAPISerializer = JSONSerializer.extend({
445
444
 
446
445
  ```app/serializers/post.js
447
446
  import JSONAPISerializer from '@ember-data/serializer/json-api';
448
- import { underscore } from '@ember/string';
447
+ import { underscore } from '<app-name>/utils/string-utils';
449
448
 
450
449
  export default class ApplicationSerializer extends JSONAPISerializer {
451
450
  keyForRelationship(key, relationship, method) {
@@ -563,8 +562,7 @@ const JSONAPISerializer = JSONSerializer.extend({
563
562
 
564
563
  ```app/serializers/application.js
565
564
  import JSONAPISerializer from '@ember-data/serializer/json-api';
566
- import { singularize } from 'ember-inflector';
567
- import { underscore } from '@ember/string';
565
+ import { underscore, singularize } from '<app-name>/utils/string-utils';
568
566
 
569
567
  export default class ApplicationSerializer extends JSONAPISerializer {
570
568
  serialize(snapshot, options) {
package/addon/json.js CHANGED
@@ -568,7 +568,7 @@ const JSONSerializer = Serializer.extend({
568
568
 
569
569
  ```app/serializers/application.js
570
570
  import JSONSerializer from '@ember-data/serializer/json';
571
- import { underscore } from '@ember/string';
571
+ import { underscore } from '<app-name>/utils/string-utils';
572
572
  import { get } from '@ember/object';
573
573
 
574
574
  export default class ApplicationSerializer extends JSONSerializer {
@@ -1031,7 +1031,7 @@ const JSONSerializer = Serializer.extend({
1031
1031
 
1032
1032
  ```app/serializers/application.js
1033
1033
  import JSONSerializer from '@ember-data/serializer/json';
1034
- import { singularize } from 'ember-inflector';
1034
+ import { singularize } from '<app-name>/utils/string-utils';
1035
1035
 
1036
1036
  export default class ApplicationSerializer extends JSONSerializer {
1037
1037
  serialize(snapshot, options) {
@@ -1138,7 +1138,7 @@ const JSONSerializer = Serializer.extend({
1138
1138
 
1139
1139
  ```app/serializers/application.js
1140
1140
  import RESTSerializer from '@ember-data/serializer/rest';
1141
- import { decamelize } from '@ember/string';
1141
+ import { decamelize } from '<app-name>/utils/string-utils';
1142
1142
 
1143
1143
  export default class ApplicationSerializer extends RESTSerializer {
1144
1144
  serializeIntoHash(data, type, snapshot, options) {
@@ -1523,7 +1523,7 @@ const JSONSerializer = Serializer.extend({
1523
1523
 
1524
1524
  ```app/serializers/application.js
1525
1525
  import JSONSerializer from '@ember-data/serializer/json';
1526
- import { underscore } from '@ember/string';
1526
+ import { underscore } from '<app-name>/utils/string-utils';
1527
1527
 
1528
1528
  export default class ApplicationSerializer extends JSONSerializer {
1529
1529
  keyForAttribute(attr, method) {
@@ -1551,7 +1551,7 @@ const JSONSerializer = Serializer.extend({
1551
1551
 
1552
1552
  ```app/serializers/post.js
1553
1553
  import JSONSerializer from '@ember-data/serializer/json';
1554
- import { underscore } from '@ember/string';
1554
+ import { underscore } from '<app-name>/utils/string-utils';
1555
1555
 
1556
1556
  export default class PostSerializer extends JSONSerializer {
1557
1557
  keyForRelationship(key, relationship, method) {
package/addon/rest.js CHANGED
@@ -40,7 +40,7 @@ function makeArray(value) {
40
40
 
41
41
  ```app/serializers/application.js
42
42
  import RESTSerializer from '@ember-data/serializer/rest';
43
- import { underscore } from '@ember/string';
43
+ import { underscore } from '<app-name>/utils/string-utils';
44
44
 
45
45
  export default class ApplicationSerializer extends RESTSerializer {
46
46
  keyForAttribute(attr, method) {
@@ -561,7 +561,7 @@ const RESTSerializer = JSONSerializer.extend({
561
561
 
562
562
  ```app/serializers/application.js
563
563
  import RESTSerializer from '@ember-data/serializer/rest';
564
- import { pluralize } from 'ember-inflector';
564
+ import { pluralize } from '<app-name>/utils/string-utils';
565
565
 
566
566
  export default class ApplicationSerializer extends RESTSerializer {
567
567
  serialize(snapshot, options) {
@@ -645,7 +645,7 @@ const RESTSerializer = JSONSerializer.extend({
645
645
 
646
646
  ```app/serializers/application.js
647
647
  import RESTSerializer from '@ember-data/serializer/rest';
648
- import { decamelize } from '@ember/string';
648
+ import { decamelize } from '<app-name>/utils/string-utils';
649
649
 
650
650
  export default class ApplicationSerializer extends RESTSerializer {
651
651
  serializeIntoHash(data, type, record, options) {
@@ -688,7 +688,7 @@ const RESTSerializer = JSONSerializer.extend({
688
688
 
689
689
  ```app/serializers/application.js
690
690
  import RESTSerializer from '@ember-data/serializer/rest';
691
- import { dasherize } from '@ember/string';
691
+ import { dasherize } from '<app-name>/utils/string-utils';
692
692
 
693
693
  export default class ApplicationSerializer extends RESTSerializer {
694
694
  payloadKeyFromModelName(modelName) {
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@ember-data/serializer",
3
- "version": "4.8.0-alpha.3",
4
- "description": "The default blueprint for ember-cli addons.",
3
+ "version": "4.8.0-alpha.6",
4
+ "description": "Provides reference Serializer implementations for use with @ember-data/store",
5
5
  "keywords": [
6
6
  "ember-addon"
7
7
  ],
8
- "repository": "https://github.com/emberjs/data/tree/master/packages/serializer",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+ssh://git@github.com:emberjs/data.git",
11
+ "directory": "packages/serializer"
12
+ },
9
13
  "license": "MIT",
10
14
  "author": "",
11
15
  "directories": {
@@ -18,15 +22,15 @@
18
22
  "test:node": "mocha"
19
23
  },
20
24
  "dependencies": {
21
- "@ember-data/private-build-infra": "4.8.0-alpha.3",
22
- "@ember-data/store": "4.8.0-alpha.3",
25
+ "@ember-data/private-build-infra": "4.8.0-alpha.6",
26
+ "@ember-data/store": "4.8.0-alpha.6",
23
27
  "ember-auto-import": "^2.4.2",
24
28
  "ember-cli-babel": "^7.26.11",
25
29
  "ember-cli-test-info": "^1.0.0",
26
30
  "ember-cli-typescript": "^5.1.0"
27
31
  },
28
32
  "devDependencies": {
29
- "@ember-data/unpublished-test-infra": "4.8.0-alpha.3",
33
+ "@ember-data/unpublished-test-infra": "4.8.0-alpha.6",
30
34
  "@ember/optional-features": "^2.0.0",
31
35
  "@ember/string": "^3.0.0",
32
36
  "@ember/test-helpers": "~2.7.0",
@@ -60,7 +64,7 @@
60
64
  "configPath": "tests/dummy/config"
61
65
  },
62
66
  "volta": {
63
- "node": "16.16.0",
67
+ "node": "16.17.0",
64
68
  "yarn": "1.22.19"
65
69
  }
66
70
  }