@warp-drive/build-config 5.6.0-alpha.1 → 5.6.0-alpha.12

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 (84) hide show
  1. package/declarations/-private/utils/deprecations.d.ts +10 -0
  2. package/declarations/-private/utils/features.d.ts +7 -0
  3. package/declarations/-private/utils/get-env.d.ts +9 -0
  4. package/declarations/-private/utils/get-env.d.ts.map +1 -0
  5. package/declarations/-private/utils/logging.d.ts +12 -0
  6. package/declarations/babel-macros.d.ts +14 -0
  7. package/declarations/babel-macros.d.ts.map +1 -0
  8. package/declarations/canary-features.d.ts +137 -0
  9. package/declarations/canary-features.d.ts.map +1 -0
  10. package/declarations/cjs-set-config.d.ts +2 -0
  11. package/declarations/debugging.d.ts +173 -0
  12. package/declarations/debugging.d.ts.map +1 -0
  13. package/declarations/deprecation-versions.d.ts +14 -0
  14. package/declarations/deprecation-versions.d.ts.map +1 -0
  15. package/declarations/deprecations.d.ts +517 -0
  16. package/declarations/deprecations.d.ts.map +1 -0
  17. package/declarations/env.d.ts +130 -0
  18. package/declarations/env.d.ts.map +1 -0
  19. package/declarations/index.d.ts +102 -0
  20. package/declarations/index.d.ts.map +1 -0
  21. package/declarations/macros.d.ts +19 -0
  22. package/declarations/macros.d.ts.map +1 -0
  23. package/declarations/validate-exports.type-test.d.ts +2 -0
  24. package/dist/babel-macros.js +45 -12
  25. package/dist/babel-macros.js.map +1 -1
  26. package/dist/babel-plugin-transform-asserts.cjs +2 -2
  27. package/dist/babel-plugin-transform-asserts.cjs.map +1 -1
  28. package/dist/babel-plugin-transform-deprecations.cjs +2 -2
  29. package/dist/babel-plugin-transform-deprecations.cjs.map +1 -1
  30. package/dist/babel-plugin-transform-features.cjs +2 -2
  31. package/dist/babel-plugin-transform-features.cjs.map +1 -1
  32. package/dist/babel-plugin-transform-logging.cjs +2 -2
  33. package/dist/babel-plugin-transform-logging.cjs.map +1 -1
  34. package/dist/canary-features-CuKgaVtX.js +147 -0
  35. package/dist/canary-features-CuKgaVtX.js.map +1 -0
  36. package/dist/canary-features.js +1 -1
  37. package/dist/cjs-set-config.cjs +160 -608
  38. package/dist/cjs-set-config.cjs.map +1 -1
  39. package/dist/{debugging-BtpYr1v0.js → debugging-VdsvkNjX.js} +80 -62
  40. package/dist/debugging-VdsvkNjX.js.map +1 -0
  41. package/dist/debugging.js +1 -1
  42. package/dist/deprecations-BNNGFAiG.js +549 -0
  43. package/dist/deprecations-BNNGFAiG.js.map +1 -0
  44. package/dist/deprecations.js +1 -1
  45. package/dist/env.js +124 -0
  46. package/dist/env.js.map +1 -1
  47. package/dist/index.js +20 -520
  48. package/dist/index.js.map +1 -1
  49. package/dist/macros.js +18 -0
  50. package/dist/macros.js.map +1 -1
  51. package/package.json +6 -18
  52. package/dist/canary-features-D1wplYmb.js +0 -113
  53. package/dist/canary-features-D1wplYmb.js.map +0 -1
  54. package/dist/debugging-BtpYr1v0.js.map +0 -1
  55. package/dist/deprecations-D_dBAPC9.js +0 -34
  56. package/dist/deprecations-D_dBAPC9.js.map +0 -1
  57. package/unstable-preview-types/-private/utils/deprecations.d.ts +0 -12
  58. package/unstable-preview-types/-private/utils/features.d.ts +0 -9
  59. package/unstable-preview-types/-private/utils/get-env.d.ts +0 -11
  60. package/unstable-preview-types/-private/utils/get-env.d.ts.map +0 -1
  61. package/unstable-preview-types/-private/utils/logging.d.ts +0 -14
  62. package/unstable-preview-types/babel-macros.d.ts +0 -6
  63. package/unstable-preview-types/babel-macros.d.ts.map +0 -1
  64. package/unstable-preview-types/canary-features.d.ts +0 -105
  65. package/unstable-preview-types/canary-features.d.ts.map +0 -1
  66. package/unstable-preview-types/cjs-set-config.d.ts +0 -4
  67. package/unstable-preview-types/debugging.d.ts +0 -164
  68. package/unstable-preview-types/debugging.d.ts.map +0 -1
  69. package/unstable-preview-types/deprecation-versions.d.ts +0 -485
  70. package/unstable-preview-types/deprecation-versions.d.ts.map +0 -1
  71. package/unstable-preview-types/deprecations.d.ts +0 -16
  72. package/unstable-preview-types/deprecations.d.ts.map +0 -1
  73. package/unstable-preview-types/env.d.ts +0 -9
  74. package/unstable-preview-types/env.d.ts.map +0 -1
  75. package/unstable-preview-types/index.d.ts +0 -49
  76. package/unstable-preview-types/index.d.ts.map +0 -1
  77. package/unstable-preview-types/macros.d.ts +0 -5
  78. package/unstable-preview-types/macros.d.ts.map +0 -1
  79. package/unstable-preview-types/validate-exports.type-test.d.ts +0 -4
  80. /package/{unstable-preview-types → declarations}/-private/utils/deprecations.d.ts.map +0 -0
  81. /package/{unstable-preview-types → declarations}/-private/utils/features.d.ts.map +0 -0
  82. /package/{unstable-preview-types → declarations}/-private/utils/logging.d.ts.map +0 -0
  83. /package/{unstable-preview-types → declarations}/cjs-set-config.d.ts.map +0 -0
  84. /package/{unstable-preview-types → declarations}/validate-exports.type-test.d.ts.map +0 -0
@@ -0,0 +1,147 @@
1
+ /**
2
+ *
3
+ * # Canary Features <Badge type="warning" text="requires canary" />
4
+ *
5
+ * ***Warp*Drive** allows users to test upcoming features that are implemented
6
+ * but not yet activated in canary builds.
7
+ *
8
+ * Typically these features represent work that carries higher risk of breaking
9
+ * changes, or are not yet fully ready for production use.
10
+ *
11
+ * Such features have their implementations guarded by a "feature flag", and the
12
+ * flag is only activated once the core-data team is prepared to ship the work
13
+ * in a canary release, beginning the process of it landing in a stable release.
14
+ *
15
+ * ### Installing Canary
16
+ *
17
+ * ::: warning To test a feature guarded behind a flag, you MUST be using a canary build.
18
+ * :::
19
+ *
20
+ * Canary builds are published to `npm` and can be installed using a precise tag
21
+ * (such as `@warp-drive/core@5.6.0-alpha.1`) or by installing the latest dist-tag
22
+ * published to the `canary` channel.
23
+ *
24
+ * Because ***Warp*Drive** packages operate on a strict lockstep policy with each other,
25
+ * you must install the matching canary version of all ***Warp*Drive** packages.
26
+ *
27
+ * Below is an example of installing the latest canary version of all the core
28
+ * packages that are part of the ***Warp*Drive** project when using EmberJS.
29
+ *
30
+ * Add/remove packages from this list to match your project.
31
+ *
32
+ * ::: code-group
33
+ *
34
+ * ```sh [pnpm]
35
+ * pnpm add -E @warp-drive/core@canary \
36
+ * @warp-drive/json-api@canary \
37
+ * @warp-drive/ember@canary;
38
+ * ```
39
+ *
40
+ * ```sh [npm]
41
+ * npm add -E @warp-drive/core@canary \
42
+ * @warp-drive/json-api@canary \
43
+ * @warp-drive/ember@canary;
44
+ * ```
45
+ *
46
+ * ```sh [yarn]
47
+ * yarn add -E @warp-drive/core@canary \
48
+ * @warp-drive/json-api@canary \
49
+ * @warp-drive/ember@canary;
50
+ * ```
51
+ *
52
+ * ```sh [bun]
53
+ * bun add --exact @warp-drive/core@canary \
54
+ * @warp-drive/json-api@canary \
55
+ * @warp-drive/ember@canary;
56
+ * ```
57
+ *
58
+ * :::
59
+ *
60
+ * ### Activating a Feature
61
+ *
62
+ * Once you have installed canary, feature-flags can be activated at build-time
63
+ *
64
+ * ```ts
65
+ * setConfig(app, __dirname, {
66
+ * features: {
67
+ * FEATURE_A: false, // utilize existing behavior
68
+ * FEATURE_B: true // utilize the new behavior
69
+ * }
70
+ * })
71
+ * ```
72
+ *
73
+ * by setting an environment variable:
74
+ *
75
+ * ```sh
76
+ * # Activate a single flag
77
+ * export WARP_DRIVE_FEATURE_OVERRIDE=SOME_FLAG;
78
+ *
79
+ * # Activate multiple flags by separating with commas
80
+ * export WARP_DRIVE_FEATURE_OVERRIDE=SOME_FLAG,OTHER_FLAG;
81
+ *
82
+ * # Activate all flags
83
+ * export WARP_DRIVE_FEATURE_OVERRIDE=ENABLE_ALL_OPTIONAL;
84
+ * ```
85
+ *
86
+ * ::: warning To test a feature guarded behind a flag, you MUST be running a development build.
87
+ * :::
88
+ *
89
+ *
90
+ * ### Preparing a Project to use a Canary Feature
91
+ *
92
+ * For most projects and features, simple version detection should be enough.
93
+ *
94
+ * Using the provided version compatibility helpers from [embroider-macros](https://github.com/embroider-build/embroider/tree/main/packages/macros#readme)
95
+ * the following can be done:
96
+ *
97
+ * ```js
98
+ * if (macroCondition(dependencySatisfies('@warp-drive/core', '5.6'))) {
99
+ * // do thing
100
+ * }
101
+ * ```
102
+ *
103
+ * For more complex projects and migrations, configure [@warp-drive/build-config/babel-macros](./babel-macros)
104
+ *
105
+ * The current list of features used at build time for canary releases is defined below.
106
+ *
107
+ * ::: tip 💡 If empty there are no features currently gated by feature flags.
108
+ * :::
109
+ *
110
+ * The valid values are:
111
+ *
112
+ * - `true` | The feature is **enabled** at all times, and cannot be disabled.
113
+ * - `false` | The feature is **disabled** at all times, and cannot be enabled.
114
+ * - `null` | The feature is **disabled by default**, but can be enabled via configuration.
115
+ *
116
+ * @module
117
+ * @public
118
+ */
119
+
120
+ /**
121
+ * We use this for some tests etc.
122
+ *
123
+ * @internal
124
+ */
125
+ const SAMPLE_FEATURE_FLAG = null;
126
+
127
+ /**
128
+ * This upcoming feature adds a validation step to payloads received
129
+ * by the JSONAPICache implementation.
130
+ *
131
+ * When a request completes and the result is given to the cache via
132
+ * `cache.put`, the cache will validate the payload against registered
133
+ * schemas as well as the JSON:API spec.
134
+ *
135
+ * @since 5.4
136
+ * @public
137
+ */
138
+ const JSON_API_CACHE_VALIDATION_ERRORS = false;
139
+
140
+ const CURRENT_FEATURES = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
141
+ __proto__: null,
142
+ JSON_API_CACHE_VALIDATION_ERRORS,
143
+ SAMPLE_FEATURE_FLAG
144
+ }, Symbol.toStringTag, { value: 'Module' }));
145
+
146
+ export { CURRENT_FEATURES as C, JSON_API_CACHE_VALIDATION_ERRORS as J, SAMPLE_FEATURE_FLAG as S };
147
+ //# sourceMappingURL=canary-features-CuKgaVtX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canary-features-CuKgaVtX.js","sources":["../src/canary-features.ts"],"sourcesContent":["/**\n *\n * # Canary Features <Badge type=\"warning\" text=\"requires canary\" />\n *\n * ***Warp*Drive** allows users to test upcoming features that are implemented\n * but not yet activated in canary builds.\n *\n * Typically these features represent work that carries higher risk of breaking\n * changes, or are not yet fully ready for production use.\n *\n * Such features have their implementations guarded by a \"feature flag\", and the\n * flag is only activated once the core-data team is prepared to ship the work\n * in a canary release, beginning the process of it landing in a stable release.\n *\n * ### Installing Canary\n *\n * ::: warning To test a feature guarded behind a flag, you MUST be using a canary build.\n * :::\n *\n * Canary builds are published to `npm` and can be installed using a precise tag\n * (such as `@warp-drive/core@5.6.0-alpha.1`) or by installing the latest dist-tag\n * published to the `canary` channel.\n *\n * Because ***Warp*Drive** packages operate on a strict lockstep policy with each other,\n * you must install the matching canary version of all ***Warp*Drive** packages.\n *\n * Below is an example of installing the latest canary version of all the core\n * packages that are part of the ***Warp*Drive** project when using EmberJS.\n *\n * Add/remove packages from this list to match your project.\n *\n * ::: code-group\n *\n * ```sh [pnpm]\n * pnpm add -E @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * ```sh [npm]\n * npm add -E @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * ```sh [yarn]\n * yarn add -E @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * ```sh [bun]\n * bun add --exact @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * :::\n *\n * ### Activating a Feature\n *\n * Once you have installed canary, feature-flags can be activated at build-time\n *\n * ```ts\n * setConfig(app, __dirname, {\n * features: {\n * FEATURE_A: false, // utilize existing behavior\n * FEATURE_B: true // utilize the new behavior\n * }\n * })\n * ```\n *\n * by setting an environment variable:\n *\n * ```sh\n * # Activate a single flag\n * export WARP_DRIVE_FEATURE_OVERRIDE=SOME_FLAG;\n *\n * # Activate multiple flags by separating with commas\n * export WARP_DRIVE_FEATURE_OVERRIDE=SOME_FLAG,OTHER_FLAG;\n *\n * # Activate all flags\n * export WARP_DRIVE_FEATURE_OVERRIDE=ENABLE_ALL_OPTIONAL;\n * ```\n *\n * ::: warning To test a feature guarded behind a flag, you MUST be running a development build.\n * :::\n *\n *\n * ### Preparing a Project to use a Canary Feature\n *\n * For most projects and features, simple version detection should be enough.\n *\n * Using the provided version compatibility helpers from [embroider-macros](https://github.com/embroider-build/embroider/tree/main/packages/macros#readme)\n * the following can be done:\n *\n * ```js\n * if (macroCondition(dependencySatisfies('@warp-drive/core', '5.6'))) {\n * // do thing\n * }\n * ```\n *\n * For more complex projects and migrations, configure [@warp-drive/build-config/babel-macros](./babel-macros)\n *\n * The current list of features used at build time for canary releases is defined below.\n *\n * ::: tip 💡 If empty there are no features currently gated by feature flags.\n * :::\n *\n * The valid values are:\n *\n * - `true` | The feature is **enabled** at all times, and cannot be disabled.\n * - `false` | The feature is **disabled** at all times, and cannot be enabled.\n * - `null` | The feature is **disabled by default**, but can be enabled via configuration.\n *\n * @module\n * @public\n */\n\n/**\n * We use this for some tests etc.\n *\n * @internal\n */\nexport const SAMPLE_FEATURE_FLAG: boolean | null = null;\n\n/**\n * This upcoming feature adds a validation step to payloads received\n * by the JSONAPICache implementation.\n *\n * When a request completes and the result is given to the cache via\n * `cache.put`, the cache will validate the payload against registered\n * schemas as well as the JSON:API spec.\n *\n * @since 5.4\n * @public\n */\nexport const JSON_API_CACHE_VALIDATION_ERRORS: boolean | null = false;\n"],"names":["SAMPLE_FEATURE_FLAG","JSON_API_CACHE_VALIDATION_ERRORS"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMA,mBAAmC,GAAG;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,gCAAgD,GAAG;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- export { J as JSON_API_CACHE_VALIDATION_ERRORS, S as SAMPLE_FEATURE_FLAG } from './canary-features-D1wplYmb.js';
1
+ export { J as JSON_API_CACHE_VALIDATION_ERRORS, S as SAMPLE_FEATURE_FLAG } from './canary-features-CuKgaVtX.js';
2
2
  //# sourceMappingURL=canary-features.js.map