@warp-drive-mirror/build-config 5.6.0-beta.0 → 5.6.0-beta.1
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/declarations/-private/utils/deprecations.d.ts +5 -0
- package/declarations/-private/utils/features.d.ts +4 -0
- package/declarations/-private/utils/get-env.d.ts +8 -0
- package/declarations/-private/utils/logging.d.ts +9 -0
- package/declarations/babel-macros.d.ts +13 -0
- package/declarations/canary-features.d.ts +136 -0
- package/declarations/debugging.d.ts +172 -0
- package/declarations/deprecation-versions.d.ts +30 -0
- package/declarations/deprecations.d.ts +516 -0
- package/declarations/env.d.ts +129 -0
- package/declarations/index.d.ts +101 -0
- package/declarations/macros.d.ts +18 -0
- package/dist/addon-shim.cjs +0 -1
- package/dist/babel-macros.js +45 -13
- package/dist/babel-plugin-transform-asserts.cjs +5 -7
- package/dist/babel-plugin-transform-deprecations.cjs +2 -3
- package/dist/babel-plugin-transform-features.cjs +2 -3
- package/dist/babel-plugin-transform-logging.cjs +2 -3
- package/dist/canary-features-CuKgaVtX.js +146 -0
- package/dist/canary-features.js +1 -2
- package/dist/cjs-set-config.cjs +160 -609
- package/dist/{debugging-BtpYr1v0.js → debugging-VdsvkNjX.js} +79 -62
- package/dist/debugging.js +1 -2
- package/dist/deprecations-BNNGFAiG.js +548 -0
- package/dist/deprecations.js +1 -2
- package/dist/env.js +124 -1
- package/dist/index.js +20 -521
- package/dist/macros.js +18 -1
- package/package.json +7 -19
- package/dist/addon-shim.cjs.map +0 -1
- package/dist/babel-macros.js.map +0 -1
- package/dist/babel-plugin-transform-asserts.cjs.map +0 -1
- package/dist/babel-plugin-transform-deprecations.cjs.map +0 -1
- package/dist/babel-plugin-transform-features.cjs.map +0 -1
- package/dist/babel-plugin-transform-logging.cjs.map +0 -1
- package/dist/canary-features-D1wplYmb.js +0 -113
- package/dist/canary-features-D1wplYmb.js.map +0 -1
- package/dist/canary-features.js.map +0 -1
- package/dist/cjs-set-config.cjs.map +0 -1
- package/dist/debugging-BtpYr1v0.js.map +0 -1
- package/dist/debugging.js.map +0 -1
- package/dist/deprecations-D_dBAPC9.js +0 -34
- package/dist/deprecations-D_dBAPC9.js.map +0 -1
- package/dist/deprecations.js.map +0 -1
- package/dist/env.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/macros.js.map +0 -1
- package/unstable-preview-types/-private/utils/deprecations.d.ts +0 -12
- package/unstable-preview-types/-private/utils/deprecations.d.ts.map +0 -1
- package/unstable-preview-types/-private/utils/features.d.ts +0 -9
- package/unstable-preview-types/-private/utils/features.d.ts.map +0 -1
- package/unstable-preview-types/-private/utils/get-env.d.ts +0 -11
- package/unstable-preview-types/-private/utils/get-env.d.ts.map +0 -1
- package/unstable-preview-types/-private/utils/logging.d.ts +0 -14
- package/unstable-preview-types/-private/utils/logging.d.ts.map +0 -1
- package/unstable-preview-types/babel-macros.d.ts +0 -6
- package/unstable-preview-types/babel-macros.d.ts.map +0 -1
- package/unstable-preview-types/canary-features.d.ts +0 -105
- package/unstable-preview-types/canary-features.d.ts.map +0 -1
- package/unstable-preview-types/cjs-set-config.d.ts +0 -4
- package/unstable-preview-types/cjs-set-config.d.ts.map +0 -1
- package/unstable-preview-types/debugging.d.ts +0 -164
- package/unstable-preview-types/debugging.d.ts.map +0 -1
- package/unstable-preview-types/deprecation-versions.d.ts +0 -485
- package/unstable-preview-types/deprecation-versions.d.ts.map +0 -1
- package/unstable-preview-types/deprecations.d.ts +0 -16
- package/unstable-preview-types/deprecations.d.ts.map +0 -1
- package/unstable-preview-types/env.d.ts +0 -9
- package/unstable-preview-types/env.d.ts.map +0 -1
- package/unstable-preview-types/index.d.ts +0 -49
- package/unstable-preview-types/index.d.ts.map +0 -1
- package/unstable-preview-types/macros.d.ts +0 -5
- package/unstable-preview-types/macros.d.ts.map +0 -1
- package/unstable-preview-types/validate-exports.type-test.d.ts +0 -4
- package/unstable-preview-types/validate-exports.type-test.d.ts.map +0 -1
|
@@ -1,485 +0,0 @@
|
|
|
1
|
-
declare module '@warp-drive-mirror/build-config/deprecation-versions' {
|
|
2
|
-
/**
|
|
3
|
-
* @module @warp-drive-mirror/build-config
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* ## Deprecation Management
|
|
7
|
-
*
|
|
8
|
-
* EmberData allows users to opt-in and remove code that exists to support deprecated
|
|
9
|
-
* behaviors.
|
|
10
|
-
*
|
|
11
|
-
* If your app has resolved all deprecations present in a given version,
|
|
12
|
-
* you may specify that version as your "compatibility" version to remove
|
|
13
|
-
* the code that supported the deprecated behavior from your app.
|
|
14
|
-
*
|
|
15
|
-
* For instance, if a deprecation was introduced in 3.13, and the app specifies
|
|
16
|
-
* 3.13 as its minimum version compatibility, any deprecations introduced before
|
|
17
|
-
* or during 3.13 would be stripped away.
|
|
18
|
-
*
|
|
19
|
-
* An app can use a different version than what it specifies as it's compatibility
|
|
20
|
-
* version. For instance, an App could be using `3.16` while specifying compatibility
|
|
21
|
-
* with `3.12`. This would remove any deprecations that were present in or before `3.12`
|
|
22
|
-
* but keep support for anything deprecated in or above `3.13`.
|
|
23
|
-
*
|
|
24
|
-
* You may also specify that specific deprecations are resolved. These approaches
|
|
25
|
-
* may be used together.
|
|
26
|
-
*
|
|
27
|
-
* ```ts
|
|
28
|
-
* setConfig(app, __dirname, {
|
|
29
|
-
* // that all deprecations through "5.0" have been fully resolved
|
|
30
|
-
* compatWith: '5.0',
|
|
31
|
-
*
|
|
32
|
-
* // mark individual deprecations as resolved by setting them to `false`
|
|
33
|
-
* deprecations: {
|
|
34
|
-
* // resolve individual deprecations here
|
|
35
|
-
* },
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* > [!TIP]
|
|
40
|
-
* > EmberData does not test against permutations of deprecations
|
|
41
|
-
* > being stripped, our tests run against "all deprecated code included"
|
|
42
|
-
* > and "all deprecated code removed". Unspecified behavior may sometimes occur
|
|
43
|
-
* > when removing code for only some deprecations associated to a version number.
|
|
44
|
-
*
|
|
45
|
-
* @class CurrentDeprecations
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
export const DEPRECATE_CATCH_ALL = "99.0";
|
|
49
|
-
/**
|
|
50
|
-
* **id: ember-data:deprecate-non-strict-types**
|
|
51
|
-
*
|
|
52
|
-
* Currently, EmberData expects that the `type` property associated with
|
|
53
|
-
* a resource follows several conventions.
|
|
54
|
-
*
|
|
55
|
-
* - The `type` property must be a non-empty string
|
|
56
|
-
* - The `type` property must be singular
|
|
57
|
-
* - The `type` property must be dasherized
|
|
58
|
-
*
|
|
59
|
-
* We are deprecating support for types that do not match this pattern
|
|
60
|
-
* in order to unlock future improvements in which we can support `type`
|
|
61
|
-
* being any string of your choosing.
|
|
62
|
-
*
|
|
63
|
-
* The goal is that in the future, you will be able to use any string
|
|
64
|
-
* so long as it matches what your configured cache, identifier generation,
|
|
65
|
-
* and schemas expect.
|
|
66
|
-
*
|
|
67
|
-
* E.G. It will matter not that your string is in a specific format like
|
|
68
|
-
* singular, dasherized, etc. so long as everywhere you refer to the type
|
|
69
|
-
* you use the same string.
|
|
70
|
-
*
|
|
71
|
-
* If using @ember-data-mirror/model, there will always be a restriction that the
|
|
72
|
-
* `type` must match the path on disk where the model is defined.
|
|
73
|
-
*
|
|
74
|
-
* e.g. `app/models/foo/bar-bem.js` must have a type of `foo/bar-bem`
|
|
75
|
-
*
|
|
76
|
-
* @property DEPRECATE_NON_STRICT_TYPES
|
|
77
|
-
* @type {Boolean}
|
|
78
|
-
* @since 5.3
|
|
79
|
-
* @until 6.0
|
|
80
|
-
* @public
|
|
81
|
-
*/
|
|
82
|
-
export const DEPRECATE_NON_STRICT_TYPES = "5.3";
|
|
83
|
-
/**
|
|
84
|
-
* **id: ember-data:deprecate-non-strict-id**
|
|
85
|
-
*
|
|
86
|
-
* Currently, EmberData expects that the `id` property associated with
|
|
87
|
-
* a resource is a string.
|
|
88
|
-
*
|
|
89
|
-
* However, for legacy support in many locations we would accept a number
|
|
90
|
-
* which would then immediately be coerced into a string.
|
|
91
|
-
*
|
|
92
|
-
* We are deprecating this legacy support for numeric IDs.
|
|
93
|
-
*
|
|
94
|
-
* The goal is that in the future, you will be able to use any ID format
|
|
95
|
-
* so long as everywhere you refer to the ID you use the same format.
|
|
96
|
-
*
|
|
97
|
-
* However, for identifiers we will always use string IDs and so any
|
|
98
|
-
* custom identifier configuration should provide a string ID.
|
|
99
|
-
*
|
|
100
|
-
* @property DEPRECATE_NON_STRICT_ID
|
|
101
|
-
* @type {Boolean}
|
|
102
|
-
* @since 5.3
|
|
103
|
-
* @until 6.0
|
|
104
|
-
* @public
|
|
105
|
-
*/
|
|
106
|
-
export const DEPRECATE_NON_STRICT_ID = "5.3";
|
|
107
|
-
/**
|
|
108
|
-
* **id: <none yet assigned>**
|
|
109
|
-
*
|
|
110
|
-
* This is a planned deprecation which will trigger when observer or computed
|
|
111
|
-
* chains are used to watch for changes on any EmberData LiveArray, CollectionRecordArray,
|
|
112
|
-
* ManyArray or PromiseManyArray.
|
|
113
|
-
*
|
|
114
|
-
* Support for these chains is currently guarded by the deprecation flag
|
|
115
|
-
* listed here, enabling removal of the behavior if desired.
|
|
116
|
-
*
|
|
117
|
-
* The instrumentation was added in 5.0 but the version number
|
|
118
|
-
* is set to 7.0 as we do not want to strip support without
|
|
119
|
-
* adding a deprecation message.
|
|
120
|
-
*
|
|
121
|
-
* Once we've added the deprecation message, we will
|
|
122
|
-
* update this version number to the proper version.
|
|
123
|
-
*
|
|
124
|
-
* @property DEPRECATE_COMPUTED_CHAINS
|
|
125
|
-
* @type {Boolean}
|
|
126
|
-
* @since 5.0
|
|
127
|
-
* @until 8.0
|
|
128
|
-
* @public
|
|
129
|
-
*/
|
|
130
|
-
export const DEPRECATE_COMPUTED_CHAINS = "7.0";
|
|
131
|
-
/**
|
|
132
|
-
* **id: ember-data:deprecate-legacy-imports**
|
|
133
|
-
*
|
|
134
|
-
* Deprecates when importing from `ember-data/*` instead of `@ember-data/*`
|
|
135
|
-
* in order to prepare for the eventual removal of the legacy `ember-data/*`
|
|
136
|
-
*
|
|
137
|
-
* All imports from `ember-data/*` should be updated to `@ember-data/*`
|
|
138
|
-
* except for `ember-data/store`. When you are using `ember-data` (as opposed to
|
|
139
|
-
* installing the indivudal packages) you should import from `ember-data/store`
|
|
140
|
-
* instead of `@ember-data-mirror/store` in order to receive the appropriate configuration
|
|
141
|
-
* of defaults.
|
|
142
|
-
*
|
|
143
|
-
* @property DEPRECATE_LEGACY_IMPORTS
|
|
144
|
-
* @type {Boolean}
|
|
145
|
-
* @since 5.3
|
|
146
|
-
* @until 6.0
|
|
147
|
-
* @public
|
|
148
|
-
*/
|
|
149
|
-
export const DEPRECATE_LEGACY_IMPORTS = "5.3";
|
|
150
|
-
/**
|
|
151
|
-
* **id: ember-data:deprecate-non-unique-collection-payloads**
|
|
152
|
-
*
|
|
153
|
-
* Deprecates when the data for a hasMany relationship contains
|
|
154
|
-
* duplicate identifiers.
|
|
155
|
-
*
|
|
156
|
-
* Previously, relationships would silently de-dupe the data
|
|
157
|
-
* when received, but this behavior is being removed in favor
|
|
158
|
-
* of erroring if the same related record is included multiple
|
|
159
|
-
* times.
|
|
160
|
-
*
|
|
161
|
-
* For instance, in JSON:API the below relationship data would
|
|
162
|
-
* be considered invalid:
|
|
163
|
-
*
|
|
164
|
-
* ```json
|
|
165
|
-
* {
|
|
166
|
-
* "data": {
|
|
167
|
-
* "type": "article",
|
|
168
|
-
* "id": "1",
|
|
169
|
-
* "relationships": {
|
|
170
|
-
* "comments": {
|
|
171
|
-
* "data": [
|
|
172
|
-
* { "type": "comment", "id": "1" },
|
|
173
|
-
* { "type": "comment", "id": "2" },
|
|
174
|
-
* { "type": "comment", "id": "1" } // duplicate
|
|
175
|
-
* ]
|
|
176
|
-
* }
|
|
177
|
-
* }
|
|
178
|
-
* }
|
|
179
|
-
* ```
|
|
180
|
-
*
|
|
181
|
-
* To resolve this deprecation, either update your server to
|
|
182
|
-
* not include duplicate data, or implement normalization logic
|
|
183
|
-
* in either a request handler or serializer which removes
|
|
184
|
-
* duplicate data from relationship payloads.
|
|
185
|
-
*
|
|
186
|
-
* @property DEPRECATE_NON_UNIQUE_PAYLOADS
|
|
187
|
-
* @type {Boolean}
|
|
188
|
-
* @since 5.3
|
|
189
|
-
* @until 6.0
|
|
190
|
-
* @public
|
|
191
|
-
*/
|
|
192
|
-
export const DEPRECATE_NON_UNIQUE_PAYLOADS = "5.3";
|
|
193
|
-
/**
|
|
194
|
-
* **id: ember-data:deprecate-relationship-remote-update-clearing-local-state**
|
|
195
|
-
*
|
|
196
|
-
* Deprecates when a relationship is updated remotely and the local state
|
|
197
|
-
* is cleared of all changes except for "new" records.
|
|
198
|
-
*
|
|
199
|
-
* Instead, any records not present in the new payload will be considered
|
|
200
|
-
* "removed" while any records present in the new payload will be considered "added".
|
|
201
|
-
*
|
|
202
|
-
* This allows us to "commit" local additions and removals, preserving any additions
|
|
203
|
-
* or removals that are not yet reflected in the remote state.
|
|
204
|
-
*
|
|
205
|
-
* For instance, given the following initial state:
|
|
206
|
-
*
|
|
207
|
-
* remote: A, B, C
|
|
208
|
-
* local: add D, E
|
|
209
|
-
* remove B, C
|
|
210
|
-
* => A, D, E
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
* If after an update, the remote state is now A, B, D, F then the new state will be
|
|
214
|
-
*
|
|
215
|
-
* remote: A, B, D, F
|
|
216
|
-
* local: add E
|
|
217
|
-
* remove B
|
|
218
|
-
* => A, D, E, F
|
|
219
|
-
*
|
|
220
|
-
* Under the old behavior the updated local state would instead have been
|
|
221
|
-
* => A, B, D, F
|
|
222
|
-
*
|
|
223
|
-
* Similarly, if a belongsTo remote State was A while its local state was B,
|
|
224
|
-
* then under the old behavior if the remote state changed to C, the local state
|
|
225
|
-
* would be updated to C. Under the new behavior, the local state would remain B.
|
|
226
|
-
*
|
|
227
|
-
* If the remote state was A while its local state was `null`, then under the old
|
|
228
|
-
* behavior if the remote state changed to C, the local state would be updated to C.
|
|
229
|
-
* Under the new behavior, the local state would remain `null`.
|
|
230
|
-
*
|
|
231
|
-
* Thus the new correct mental model is that the state of the relationship at any point
|
|
232
|
-
* in time is whatever the most recent remote state is, plus any local additions or removals
|
|
233
|
-
* you have made that have not yet been reflected by the remote state.
|
|
234
|
-
*
|
|
235
|
-
* > Note: The old behavior extended to modifying the inverse of a relationship. So if
|
|
236
|
-
* > you had local state not reflected in the new remote state, inverses would be notified
|
|
237
|
-
* > and their state reverted as well when "resetting" the relationship.
|
|
238
|
-
* > Under the new behavior, since the local state is preserved the inverses will also
|
|
239
|
-
* > not be reverted.
|
|
240
|
-
*
|
|
241
|
-
* ### Resolving this deprecation
|
|
242
|
-
*
|
|
243
|
-
* Resolving this deprecation can be done individually for each relationship
|
|
244
|
-
* or globally for all relationships.
|
|
245
|
-
*
|
|
246
|
-
* To resolve it globally, set the `DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE`
|
|
247
|
-
* to `false` in ember-cli-build.js
|
|
248
|
-
*
|
|
249
|
-
* ```js
|
|
250
|
-
* const { setConfig } = await import('@warp-drive-mirror/build-config');
|
|
251
|
-
*
|
|
252
|
-
* let app = new EmberApp(defaults, {});
|
|
253
|
-
*
|
|
254
|
-
* setConfig(app, __dirname, {
|
|
255
|
-
* deprecations: {
|
|
256
|
-
* // set to false to strip the deprecated code (thereby opting into the new behavior)
|
|
257
|
-
* DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE: false
|
|
258
|
-
* }
|
|
259
|
-
* });
|
|
260
|
-
* ```
|
|
261
|
-
*
|
|
262
|
-
* To resolve this deprecation on an individual relationship, adjust the `options` passed to
|
|
263
|
-
* the relationship. For relationships with inverses, both sides MUST be migrated to the new
|
|
264
|
-
* behavior at the same time.
|
|
265
|
-
*
|
|
266
|
-
* ```js
|
|
267
|
-
* class Person extends Model {
|
|
268
|
-
* @hasMany('person', {
|
|
269
|
-
* async: false,
|
|
270
|
-
* inverse: null,
|
|
271
|
-
* resetOnRemoteUpdate: false
|
|
272
|
-
* }) children;
|
|
273
|
-
*
|
|
274
|
-
* @belongsTo('person', {
|
|
275
|
-
* async: false,
|
|
276
|
-
* inverse: null,
|
|
277
|
-
* resetOnRemoteUpdate: false
|
|
278
|
-
* }) parent;
|
|
279
|
-
* }
|
|
280
|
-
* ```
|
|
281
|
-
*
|
|
282
|
-
* > Note: false is the only valid value here, all other values (including missing)
|
|
283
|
-
* > will be treated as true, where `true` is the legacy behavior that is now deprecated.
|
|
284
|
-
*
|
|
285
|
-
* Once you have migrated all relationships, you can remove the the resetOnRemoteUpdate
|
|
286
|
-
* option and set the deprecation flag to false in ember-cli-build.
|
|
287
|
-
*
|
|
288
|
-
* ### What if I don't want the new behavior?
|
|
289
|
-
*
|
|
290
|
-
* EmberData's philosophy is to not make assumptions about your application. Where possible
|
|
291
|
-
* we seek out "100%" solutions – solutions that work for all use cases - and where that is
|
|
292
|
-
* not possible we default to "90%" solutions – solutions that work for the vast majority of use
|
|
293
|
-
* cases. In the case of "90%" solutions we look for primitives that allow you to resolve the
|
|
294
|
-
* 10% case in your application. If no such primitives exist, we provide an escape hatch that
|
|
295
|
-
* ensures you can build the behavior you need without adopting the cost of the default solution.
|
|
296
|
-
*
|
|
297
|
-
* In this case, the old behavior was a "40%" solution. The inability for an application developer
|
|
298
|
-
* to determine what changes were made locally, and thus what changes should be preserved, made
|
|
299
|
-
* it impossible to build certain features easily, or in some cases at all. The proliferation of
|
|
300
|
-
* feature requests, bug reports (from folks surprised by the prior behavior) and addon attempts
|
|
301
|
-
* in this space are all evidence of this.
|
|
302
|
-
*
|
|
303
|
-
* We believe the new behavior is a "90%" solution. It works for the vast majority of use cases,
|
|
304
|
-
* often without noticeable changes to existing application behavior, and provides primitives that
|
|
305
|
-
* allow you to build the behavior you need for the remaining 10%.
|
|
306
|
-
*
|
|
307
|
-
* The great news is that this behavior defaults to trusting your API similar to the old behavior.
|
|
308
|
-
* If your API is correct, you will not need to make any changes to your application to adopt
|
|
309
|
-
* the new behavior.
|
|
310
|
-
*
|
|
311
|
-
* This means the 10% cases are those where you can't trust your API to provide the correct
|
|
312
|
-
* information. In these cases, because you now have cheap access to a diff of the relationship
|
|
313
|
-
* state, there are a few options that weren't available before:
|
|
314
|
-
*
|
|
315
|
-
* - you can adjust returned API payloads to contain the expected changes that it doesn't include
|
|
316
|
-
* - you can modify local state by adding or removing records on the HasMany record array to remove
|
|
317
|
-
* any local changes that were not returned by the API.
|
|
318
|
-
* - you can use `<Cache>.mutate(mutation)` to directly modify the local cache state of the relationship
|
|
319
|
-
* to match the expected state.
|
|
320
|
-
*
|
|
321
|
-
* What this version (5.3) does not yet provide is a way to directly modify the cache's remote state
|
|
322
|
-
* for the relationship via public APIs other than via the broader action of upserting a response via
|
|
323
|
-
* `<Cache>.put(document)`. However, such an API was sketched in the Cache 2.1 RFC
|
|
324
|
-
* `<Cache>.patch(operation)` and is likely to be added in a future 5.x release of EmberData.
|
|
325
|
-
*
|
|
326
|
-
* This version (5.3) also does not yet provide a way to directly modify the graph (a general purpose
|
|
327
|
-
* subset of cache behaviors specific to relationships) via public APIs. However, during the
|
|
328
|
-
* 5.x release series we will be working on finalizing the Graph API and making it public.
|
|
329
|
-
*
|
|
330
|
-
* If none of these options work for you, you can always opt-out more broadly by implementing
|
|
331
|
-
* a custom Cache with the relationship behaviors you need.
|
|
332
|
-
*
|
|
333
|
-
* @property DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE
|
|
334
|
-
* @type {Boolean}
|
|
335
|
-
* @since 5.3
|
|
336
|
-
* @until 6.0
|
|
337
|
-
* @public
|
|
338
|
-
*/
|
|
339
|
-
export const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE = "5.3";
|
|
340
|
-
/**
|
|
341
|
-
* **id: ember-data:deprecate-many-array-duplicates**
|
|
342
|
-
*
|
|
343
|
-
* When the flag is `true` (default), adding duplicate records to a `ManyArray`
|
|
344
|
-
* is deprecated in non-production environments. In production environments,
|
|
345
|
-
* duplicate records added to a `ManyArray` will be deduped and no error will
|
|
346
|
-
* be thrown.
|
|
347
|
-
*
|
|
348
|
-
* When the flag is `false`, an error will be thrown when duplicates are added.
|
|
349
|
-
*
|
|
350
|
-
* @property DEPRECATE_MANY_ARRAY_DUPLICATES
|
|
351
|
-
* @type {Boolean}
|
|
352
|
-
* @since 5.3
|
|
353
|
-
* @until 6.0
|
|
354
|
-
* @public
|
|
355
|
-
*/
|
|
356
|
-
export const DEPRECATE_MANY_ARRAY_DUPLICATES = "5.3";
|
|
357
|
-
/**
|
|
358
|
-
* **id: ember-data:deprecate-store-extends-ember-object**
|
|
359
|
-
*
|
|
360
|
-
* When the flag is `true` (default), the Store class will extend from `@ember/object`.
|
|
361
|
-
* When the flag is `false` or `ember-source` is not present, the Store will not extend
|
|
362
|
-
* from EmberObject.
|
|
363
|
-
*
|
|
364
|
-
* @property DEPRECATE_STORE_EXTENDS_EMBER_OBJECT
|
|
365
|
-
* @type {Boolean}
|
|
366
|
-
* @since 5.4
|
|
367
|
-
* @until 6.0
|
|
368
|
-
* @public
|
|
369
|
-
*/
|
|
370
|
-
export const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT = "5.4";
|
|
371
|
-
/**
|
|
372
|
-
* **id: ember-data:schema-service-updates**
|
|
373
|
-
*
|
|
374
|
-
* When the flag is `true` (default), the legacy schema
|
|
375
|
-
* service features will be enabled on the store and
|
|
376
|
-
* the service, and deprecations will be thrown when
|
|
377
|
-
* they are used.
|
|
378
|
-
*
|
|
379
|
-
* Deprecated features include:
|
|
380
|
-
*
|
|
381
|
-
* - `Store.registerSchema` method is deprecated in favor of the `Store.createSchemaService` hook
|
|
382
|
-
* - `Store.registerSchemaDefinitionService` method is deprecated in favor of the `Store.createSchemaService` hook
|
|
383
|
-
* - `Store.getSchemaDefinitionService` method is deprecated in favor of `Store.schema` property
|
|
384
|
-
* - `SchemaService.doesTypeExist` method is deprecated in favor of the `SchemaService.hasResource` method
|
|
385
|
-
* - `SchemaService.attributesDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method
|
|
386
|
-
* - `SchemaService.relationshipsDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method
|
|
387
|
-
*
|
|
388
|
-
* @property ENABLE_LEGACY_SCHEMA_SERVICE
|
|
389
|
-
* @type {Boolean}
|
|
390
|
-
* @since 5.4
|
|
391
|
-
* @until 6.0
|
|
392
|
-
* @public
|
|
393
|
-
*/
|
|
394
|
-
export const ENABLE_LEGACY_SCHEMA_SERVICE = "5.4";
|
|
395
|
-
/**
|
|
396
|
-
* **id: warp-drive.ember-inflector**
|
|
397
|
-
*
|
|
398
|
-
* Deprecates the use of ember-inflector for pluralization and singularization in favor
|
|
399
|
-
* of the `@ember-data-mirror/request-utils` package.
|
|
400
|
-
*
|
|
401
|
-
* Rule configuration methods (singular, plural, uncountable, irregular) and
|
|
402
|
-
* usage methods (singularize, pluralize) are are available as imports from
|
|
403
|
-
* `@ember-data-mirror/request-utils/string`
|
|
404
|
-
*
|
|
405
|
-
* Notable differences with ember-inflector:
|
|
406
|
-
* - there cannot be multiple inflector instances with separate rules
|
|
407
|
-
* - pluralization does not support a count argument
|
|
408
|
-
* - string caches now default to 10k entries instead of 1k, and this
|
|
409
|
-
* size is now configurable. Additionally, the cache is now a LRU cache
|
|
410
|
-
* instead of a first-N cache.
|
|
411
|
-
*
|
|
412
|
-
* This deprecation can be resolved by removing usage of ember-inflector or by using
|
|
413
|
-
* both ember-inflector and @ember-data-mirror/request-utils in parallel and updating your
|
|
414
|
-
* EmberData/WarpDrive build config to mark the deprecation as resolved
|
|
415
|
-
* in ember-cli-build
|
|
416
|
-
*
|
|
417
|
-
* ```js
|
|
418
|
-
* setConfig(app, __dirname, { deprecations: { DEPRECATE_EMBER_INFLECTOR: false }});
|
|
419
|
-
* ```
|
|
420
|
-
*
|
|
421
|
-
* @property DEPRECATE_EMBER_INFLECTOR
|
|
422
|
-
* @type {Boolean}
|
|
423
|
-
* @since 5.3
|
|
424
|
-
* @until 6.0
|
|
425
|
-
* @public
|
|
426
|
-
*/
|
|
427
|
-
export const DEPRECATE_EMBER_INFLECTOR = "5.3";
|
|
428
|
-
/**
|
|
429
|
-
* This is a special flag that can be used to opt-in early to receiving deprecations introduced in 6.x
|
|
430
|
-
* which have had their infra backported to 5.x versions of EmberData.
|
|
431
|
-
*
|
|
432
|
-
* When this flag is not present or set to `true`, the deprecations from the 6.x branch
|
|
433
|
-
* will not print their messages and the deprecation cannot be resolved.
|
|
434
|
-
*
|
|
435
|
-
* When this flag is present and set to `false`, the deprecations from the 6.x branch will
|
|
436
|
-
* print and can be resolved.
|
|
437
|
-
*
|
|
438
|
-
* @property DISABLE_7X_DEPRECATIONS
|
|
439
|
-
* @type {Boolean}
|
|
440
|
-
* @since 5.3
|
|
441
|
-
* @until 7.0
|
|
442
|
-
* @public
|
|
443
|
-
*/
|
|
444
|
-
export const DISABLE_7X_DEPRECATIONS = "7.0";
|
|
445
|
-
/**
|
|
446
|
-
* **id: warp-drive:deprecate-tracking-package**
|
|
447
|
-
*
|
|
448
|
-
* Deprecates the use of the @ember-data-mirror/tracking package which
|
|
449
|
-
* historically provided bindings into Ember's reactivity system.
|
|
450
|
-
*
|
|
451
|
-
* This package is no longer needed as the configuration is now
|
|
452
|
-
* provided by the @warp-drive-mirror/ember package.
|
|
453
|
-
*
|
|
454
|
-
* This deprecation can be resolved by removing the
|
|
455
|
-
* @ember-data-mirror/tracking package from your project and ensuring
|
|
456
|
-
* that your app.js file has the following import:
|
|
457
|
-
*
|
|
458
|
-
* ```js
|
|
459
|
-
* import '@warp-drive-mirror/ember/install';
|
|
460
|
-
* ```
|
|
461
|
-
*
|
|
462
|
-
* Once this import is present, you can remove the deprecation
|
|
463
|
-
* by setting the deprecation to `false` in your build config:
|
|
464
|
-
*
|
|
465
|
-
* ```js
|
|
466
|
-
* // inside of ember-cli-build.js
|
|
467
|
-
*
|
|
468
|
-
* const { setConfig } = await import('@warp-drive-mirror/build-config');
|
|
469
|
-
*
|
|
470
|
-
* setConfig(app, __dirname, {
|
|
471
|
-
* deprecations: {
|
|
472
|
-
* DEPRECATE_TRACKING_PACKAGE: false
|
|
473
|
-
* }
|
|
474
|
-
* });
|
|
475
|
-
* ```
|
|
476
|
-
*
|
|
477
|
-
* @property DEPRECATE_TRACKING_PACKAGE
|
|
478
|
-
* @type {Boolean}
|
|
479
|
-
* @since 5.5
|
|
480
|
-
* @until 6.0
|
|
481
|
-
* @public
|
|
482
|
-
*/
|
|
483
|
-
export const DEPRECATE_TRACKING_PACKAGE = "5.5";
|
|
484
|
-
}
|
|
485
|
-
//# sourceMappingURL=deprecation-versions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecation-versions.d.ts","sourceRoot":"","sources":["../src/deprecation-versions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAmBH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,0BAA0B,QAAQ,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,uBAAuB,QAAQ,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAE/C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,6BAA6B,QAAQ,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiJG;AACH,eAAO,MAAM,yDAAyD,QAAQ,CAAC;AAE/E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,+BAA+B,QAAQ,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oCAAoC,QAAQ,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,4BAA4B,QAAQ,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,QAAQ,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,0BAA0B,QAAQ,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare module '@warp-drive-mirror/build-config/deprecations' {
|
|
2
|
-
export const DEPRECATE_CATCH_ALL: boolean;
|
|
3
|
-
export const DEPRECATE_COMPUTED_CHAINS: boolean;
|
|
4
|
-
export const DEPRECATE_NON_STRICT_TYPES: boolean;
|
|
5
|
-
export const DEPRECATE_NON_STRICT_ID: boolean;
|
|
6
|
-
export const DEPRECATE_LEGACY_IMPORTS: boolean;
|
|
7
|
-
export const DEPRECATE_NON_UNIQUE_PAYLOADS: boolean;
|
|
8
|
-
export const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE: boolean;
|
|
9
|
-
export const DEPRECATE_MANY_ARRAY_DUPLICATES: boolean;
|
|
10
|
-
export const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT: boolean;
|
|
11
|
-
export const ENABLE_LEGACY_SCHEMA_SERVICE: boolean;
|
|
12
|
-
export const DEPRECATE_EMBER_INFLECTOR: boolean;
|
|
13
|
-
export const DISABLE_7X_DEPRECATIONS: boolean;
|
|
14
|
-
export const DEPRECATE_TRACKING_PACKAGE: boolean;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=deprecations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecations.d.ts","sourceRoot":"","sources":["../src/deprecations.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,EAAE,OAAc,CAAC;AACjD,eAAO,MAAM,yBAAyB,EAAE,OAAc,CAAC;AACvD,eAAO,MAAM,0BAA0B,EAAE,OAAc,CAAC;AACxD,eAAO,MAAM,uBAAuB,EAAE,OAAc,CAAC;AACrD,eAAO,MAAM,wBAAwB,EAAE,OAAc,CAAC;AACtD,eAAO,MAAM,6BAA6B,EAAE,OAAc,CAAC;AAC3D,eAAO,MAAM,yDAAyD,EAAE,OAAc,CAAC;AACvF,eAAO,MAAM,+BAA+B,EAAE,OAAc,CAAC;AAC7D,eAAO,MAAM,oCAAoC,EAAE,OAAc,CAAC;AAClE,eAAO,MAAM,4BAA4B,EAAE,OAAc,CAAC;AAC1D,eAAO,MAAM,yBAAyB,EAAE,OAAc,CAAC;AACvD,eAAO,MAAM,uBAAuB,EAAE,OAAc,CAAC;AACrD,eAAO,MAAM,0BAA0B,EAAE,OAAc,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare module '@warp-drive-mirror/build-config/env' {
|
|
2
|
-
export const DEBUG: boolean;
|
|
3
|
-
export const PRODUCTION: boolean;
|
|
4
|
-
export const TESTING: boolean;
|
|
5
|
-
export const IS_RECORDING: boolean;
|
|
6
|
-
export const IS_CI: boolean;
|
|
7
|
-
export const SHOULD_RECORD: boolean;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=env.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,EAAE,OAAc,CAAC;AACnC,eAAO,MAAM,UAAU,EAAE,OAAc,CAAC;AACxC,eAAO,MAAM,OAAO,EAAE,OAAc,CAAC;AACrC,eAAO,MAAM,YAAY,EAAE,OAAc,CAAC;AAC1C,eAAO,MAAM,KAAK,EAAE,OAAc,CAAC;AACnC,eAAO,MAAM,aAAa,EAAE,OAAc,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/// <reference path="./deprecations.d.ts" />
|
|
2
|
-
/// <reference path="./babel-macros.d.ts" />
|
|
3
|
-
/// <reference path="./canary-features.d.ts" />
|
|
4
|
-
/// <reference path="./env.d.ts" />
|
|
5
|
-
/// <reference path="./cjs-set-config.d.ts" />
|
|
6
|
-
/// <reference path="./deprecation-versions.d.ts" />
|
|
7
|
-
/// <reference path="./validate-exports.type-test.d.ts" />
|
|
8
|
-
/// <reference path="./debugging.d.ts" />
|
|
9
|
-
/// <reference path="./macros.d.ts" />
|
|
10
|
-
/// <reference path="./-private/utils/deprecations.d.ts" />
|
|
11
|
-
/// <reference path="./-private/utils/get-env.d.ts" />
|
|
12
|
-
/// <reference path="./-private/utils/features.d.ts" />
|
|
13
|
-
/// <reference path="./-private/utils/logging.d.ts" />
|
|
14
|
-
declare module '@warp-drive-mirror/build-config' {
|
|
15
|
-
import { getDeprecations } from '@warp-drive-mirror/build-config/-private/utils/deprecations.ts';
|
|
16
|
-
import { getFeatures } from '@warp-drive-mirror/build-config/-private/utils/features.ts';
|
|
17
|
-
import * as LOGGING from '@warp-drive-mirror/build-config/debugging.ts';
|
|
18
|
-
type LOG_CONFIG_KEY = keyof typeof LOGGING;
|
|
19
|
-
export type WarpDriveConfig = {
|
|
20
|
-
debug?: Partial<InternalWarpDriveConfig['debug']>;
|
|
21
|
-
polyfillUUID?: boolean;
|
|
22
|
-
includeDataAdapterInProduction?: boolean;
|
|
23
|
-
compatWith?: `${number}.${number}`;
|
|
24
|
-
deprecations?: Partial<InternalWarpDriveConfig['deprecations']>;
|
|
25
|
-
features?: Partial<InternalWarpDriveConfig['features']>;
|
|
26
|
-
};
|
|
27
|
-
type InternalWarpDriveConfig = {
|
|
28
|
-
debug: {
|
|
29
|
-
[key in LOG_CONFIG_KEY]: boolean;
|
|
30
|
-
};
|
|
31
|
-
polyfillUUID: boolean;
|
|
32
|
-
includeDataAdapter: boolean;
|
|
33
|
-
compatWith: `${number}.${number}` | null;
|
|
34
|
-
deprecations: ReturnType<typeof getDeprecations>;
|
|
35
|
-
features: ReturnType<typeof getFeatures>;
|
|
36
|
-
activeLogging: {
|
|
37
|
-
[key in LOG_CONFIG_KEY]: boolean;
|
|
38
|
-
};
|
|
39
|
-
env: {
|
|
40
|
-
TESTING: boolean;
|
|
41
|
-
PRODUCTION: boolean;
|
|
42
|
-
DEBUG: boolean;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
export function setConfig(macros: object, config: WarpDriveConfig): void;
|
|
46
|
-
export function setConfig(context: object, appRoot: string, config: WarpDriveConfig): void;
|
|
47
|
-
export {};
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA+DA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAM1C,KAAK,cAAc,GAAG,MAAM,OAAO,OAAO,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,UAAU,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAC,CAAC;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAC;CACzD,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE;SAAG,GAAG,IAAI,cAAc,GAAG,OAAO;KAAE,CAAC;IAC5C,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,GAAG,IAAI,CAAC;IACzC,YAAY,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IACjD,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IACzC,aAAa,EAAE;SAAG,GAAG,IAAI,cAAc,GAAG,OAAO;KAAE,CAAC;IACpD,GAAG,EAAE;QACH,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,CAAC;KAChB,CAAC;CACH,CAAC;AAWF,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;AACzE,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"macros.d.ts","sourceRoot":"","sources":["../src/macros.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAC/E,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-exports.type-test.d.ts","sourceRoot":"","sources":["../src/validate-exports.type-test.ts"],"names":[],"mappings":""}
|