@ember-data/request-utils 5.4.0-alpha.14 → 5.4.0-alpha.140

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ember-data/request-utils",
3
3
  "description": "Request Building Utilities for use with EmberData",
4
- "version": "5.4.0-alpha.14",
4
+ "version": "5.4.0-alpha.140",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "author": "Chris Thoburn <runspired@users.noreply.github.com>",
@@ -13,7 +13,7 @@
13
13
  "homepage": "https://github.com/emberjs/data",
14
14
  "bugs": "https://github.com/emberjs/data/issues",
15
15
  "engines": {
16
- "node": "16.* || >= 18"
16
+ "node": ">= 18.20.4"
17
17
  },
18
18
  "keywords": [
19
19
  "ember-addon"
@@ -21,45 +21,85 @@
21
21
  "volta": {
22
22
  "extends": "../../package.json"
23
23
  },
24
- "dependencies": {
25
- "ember-cli-babel": "^8.0.0"
26
- },
27
24
  "files": [
28
- "addon-main.js",
29
- "addon",
25
+ "unstable-preview-types",
26
+ "addon-main.cjs",
27
+ "dist",
30
28
  "README.md",
31
29
  "LICENSE.md",
32
30
  "ember-data-logo-dark.svg",
33
31
  "ember-data-logo-light.svg"
34
32
  ],
33
+ "exports": {
34
+ ".": {
35
+ "default": "./dist/index.js"
36
+ },
37
+ "./*": {
38
+ "default": "./dist/*.js"
39
+ },
40
+ "./unstable-preview-types": {
41
+ "types": "./unstable-preview-types/index.d.ts"
42
+ }
43
+ },
35
44
  "ember-addon": {
36
- "main": "addon-main.js",
45
+ "main": "addon-main.cjs",
37
46
  "type": "addon",
38
- "version": 1
47
+ "version": 2
48
+ },
49
+ "peerDependencies": {
50
+ "ember-source": "3.28.12 || ^4.0.4 || ^5.0.0 || ^6.0.0",
51
+ "@ember/string": "^3.1.1 || ^4.0.0",
52
+ "@warp-drive/core-types": "5.4.0-alpha.140",
53
+ "ember-inflector": "^4.0.2 || ^5.0.0"
54
+ },
55
+ "peerDependenciesMeta": {
56
+ "ember-inflector": {
57
+ "optional": true
58
+ },
59
+ "@ember/string": {
60
+ "optional": true
61
+ }
62
+ },
63
+ "dependencies": {
64
+ "@embroider/macros": "^1.16.10",
65
+ "@warp-drive/build-config": "5.4.0-alpha.140"
39
66
  },
40
67
  "devDependencies": {
41
- "@babel/cli": "^7.22.15",
42
- "@babel/core": "^7.22.17",
43
- "@babel/plugin-proposal-decorators": "^7.22.15",
44
- "@babel/plugin-transform-class-properties": "^7.22.5",
45
- "@babel/plugin-transform-runtime": "^7.22.15",
46
- "@babel/plugin-transform-typescript": "^7.22.15",
47
- "@babel/preset-env": "^7.22.15",
48
- "@babel/preset-typescript": "^7.22.15",
49
- "@babel/runtime": "^7.22.15",
50
- "@embroider/addon-dev": "^4.1.0",
51
- "@rollup/plugin-babel": "^6.0.3",
52
- "@rollup/plugin-node-resolve": "^15.2.1",
53
- "rollup": "^3.29.0",
54
- "tslib": "^2.6.2",
55
- "typescript": "^5.2.2",
56
- "walk-sync": "^3.0.0"
68
+ "@babel/core": "^7.24.5",
69
+ "@babel/plugin-transform-typescript": "^7.24.5",
70
+ "@babel/preset-env": "^7.24.5",
71
+ "@babel/preset-typescript": "^7.24.1",
72
+ "@glimmer/component": "^1.1.2",
73
+ "@ember/string": "3.1.1",
74
+ "@warp-drive/core-types": "5.4.0-alpha.140",
75
+ "@warp-drive/internal-config": "5.4.0-alpha.140",
76
+ "ember-source": "~5.12.0",
77
+ "ember-inflector": "4.0.3",
78
+ "pnpm-sync-dependencies-meta-injected": "0.0.14",
79
+ "typescript": "^5.7.2",
80
+ "vite": "^5.2.11"
57
81
  },
58
82
  "ember": {
59
83
  "edition": "octane"
60
84
  },
85
+ "dependenciesMeta": {
86
+ "@warp-drive/core-types": {
87
+ "injected": true
88
+ },
89
+ "@warp-drive/build-config": {
90
+ "injected": true
91
+ }
92
+ },
93
+ "typesVersions": {
94
+ "*": {
95
+ "unstable-preview-types": [
96
+ "./unstable-preview-types"
97
+ ]
98
+ }
99
+ },
61
100
  "scripts": {
62
- "build": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
63
- "start": "rollup --config --watch"
101
+ "lint": "eslint . --quiet --cache --cache-strategy=content",
102
+ "build:pkg": "vite build;",
103
+ "sync-hardlinks": "bun run sync-dependencies-meta-injected"
64
104
  }
65
105
  }
@@ -0,0 +1,14 @@
1
+ declare module '@ember-data/request-utils/-private/string/inflect' {
2
+ export function uncountable(word: string): void;
3
+ export function loadUncountable(uncountables: string[]): void;
4
+ export function irregular(single: string, plur: string): void;
5
+ export function loadIrregular(irregularPairs: Array<[string, string]>): void;
6
+ export function clear(): void;
7
+ export function resetToDefaults(): void;
8
+ export function clearRules(): void;
9
+ export function singularize(word: string): string;
10
+ export function pluralize(word: string): string;
11
+ export function plural(regex: RegExp, string: string): void;
12
+ export function singular(regex: RegExp, string: string): void;
13
+ }
14
+ //# sourceMappingURL=inflect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inflect.d.ts","sourceRoot":"","sources":["../../../src/-private/string/inflect.ts"],"names":[],"mappings":"AAsBA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,QAEvC;AAED,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,QAIrD;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAQrD;AAED,wBAAgB,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,QAUpE;AAGD,wBAAgB,KAAK,SAGpB;AAED,wBAAgB,eAAe,SAM9B;AAED,wBAAgB,UAAU,SAQzB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,UAIvC;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,UAIrC;AAWD,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAQnD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAQrD"}
@@ -0,0 +1,12 @@
1
+ declare module '@ember-data/request-utils/-private/string/inflections' {
2
+ export type RulesArray = Array<[RegExp, string]>;
3
+ type DefaultRulesType = {
4
+ plurals: RulesArray;
5
+ singular: RulesArray;
6
+ irregularPairs: Array<[string, string]>;
7
+ uncountable: string[];
8
+ };
9
+ export const defaultRules: DefaultRulesType;
10
+ export {};
11
+ }
12
+ //# sourceMappingURL=inflections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inflections.d.ts","sourceRoot":"","sources":["../../../src/-private/string/inflections.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACjD,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,UAAU,CAAC;IACrB,cAAc,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxC,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,gBAkE1B,CAAC"}
@@ -0,0 +1,81 @@
1
+ declare module '@ember-data/request-utils/-private/string/transform' {
2
+ export class LRUCache<T, V> {
3
+ size: number;
4
+ state: Map<T, V>;
5
+ doWork: (k: T) => V;
6
+ _hits: number;
7
+ _misses: number;
8
+ _ejected: number;
9
+ constructor(doWork: (k: T) => V, size?: number);
10
+ get(key: T): V;
11
+ set(key: T, value: V): void;
12
+ clear(): void;
13
+ }
14
+ /**
15
+ Replaces underscores, spaces, or camelCase with dashes.
16
+
17
+ ```js
18
+ import { dasherize } from '@ember-data/request-utils/string';
19
+
20
+ dasherize('innerHTML'); // 'inner-html'
21
+ dasherize('action_name'); // 'action-name'
22
+ dasherize('css-class-name'); // 'css-class-name'
23
+ dasherize('my favorite items'); // 'my-favorite-items'
24
+ dasherize('privateDocs/ownerInvoice'; // 'private-docs/owner-invoice'
25
+ ```
26
+
27
+ @typedoc
28
+ */
29
+ export function dasherize(str: string): string;
30
+ /**
31
+ Returns the lowerCamelCase form of a string.
32
+
33
+ ```js
34
+ import { camelize } from '@ember-data/request-utils/string';
35
+
36
+ camelize('innerHTML'); // 'innerHTML'
37
+ camelize('action_name'); // 'actionName'
38
+ camelize('css-class-name'); // 'cssClassName'
39
+ camelize('my favorite items'); // 'myFavoriteItems'
40
+ camelize('My Favorite Items'); // 'myFavoriteItems'
41
+ camelize('private-docs/owner-invoice'); // 'privateDocs/ownerInvoice'
42
+ ```
43
+
44
+ @typedoc
45
+ */
46
+ export function camelize(str: string): string;
47
+ /**
48
+ Returns the lower\_case\_and\_underscored form of a string.
49
+
50
+ ```js
51
+ import { underscore } from '@ember-data/request-utils/string';
52
+
53
+ underscore('innerHTML'); // 'inner_html'
54
+ underscore('action_name'); // 'action_name'
55
+ underscore('css-class-name'); // 'css_class_name'
56
+ underscore('my favorite items'); // 'my_favorite_items'
57
+ underscore('privateDocs/ownerInvoice'); // 'private_docs/owner_invoice'
58
+ ```
59
+
60
+ @typedoc
61
+ */
62
+ export function underscore(str: string): string;
63
+ /**
64
+ Returns the Capitalized form of a string
65
+
66
+ ```js
67
+ import { capitalize } from '@ember-data/request-utils/string';
68
+
69
+ capitalize('innerHTML') // 'InnerHTML'
70
+ capitalize('action_name') // 'Action_name'
71
+ capitalize('css-class-name') // 'Css-class-name'
72
+ capitalize('my favorite items') // 'My favorite items'
73
+ capitalize('privateDocs/ownerInvoice'); // 'PrivateDocs/ownerInvoice'
74
+ ```
75
+
76
+ @typedoc
77
+ */
78
+ export function capitalize(str: string): string;
79
+ export function setMaxLRUCacheSize(size: number): void;
80
+ }
81
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/-private/string/transform.ts"],"names":[],"mappings":"AAGA,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAGpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;gBAEb,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM;IAW9C,GAAG,CAAC,GAAG,EAAE,CAAC;IAmBV,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;IAapB,KAAK;CAQN;AA6BD;;;;;;;;;;;;;;EAcE;AACF,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;;;;;;;;;;;;;EAeE;AACF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;;;;;;;;;;;EAcE;AACF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;;;;;;;;EAcE;AACF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,QAK9C"}
@@ -0,0 +1,4 @@
1
+ declare module '@ember-data/request-utils/deprecation-support' {
2
+ export {};
3
+ }
4
+ //# sourceMappingURL=deprecation-support.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecation-support.d.ts","sourceRoot":"","sources":["../src/deprecation-support.ts"],"names":[],"mappings":""}