@warp-drive-mirror/build-config 5.6.0-alpha.3 → 5.6.0-alpha.5

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