@warp-drive-mirror/build-config 5.6.0-beta.0 → 5.6.0-beta.2

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