@warp-drive-mirror/build-config 5.6.0-alpha.5 → 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 +12 -13
- package/dist/babel-plugin-transform-asserts.cjs +3 -5
- package/dist/babel-plugin-transform-deprecations.cjs +0 -1
- package/dist/babel-plugin-transform-features.cjs +0 -1
- package/dist/babel-plugin-transform-logging.cjs +0 -1
- package/dist/{canary-features-DF5hbs2w.js → canary-features-CuKgaVtX.js} +18 -42
- package/dist/canary-features.js +1 -2
- package/dist/cjs-set-config.cjs +26 -47
- package/dist/debugging-VdsvkNjX.js +0 -1
- package/dist/debugging.js +0 -1
- package/dist/{deprecations-BVxAmwe9.js → deprecations-BNNGFAiG.js} +5 -6
- package/dist/deprecations.js +1 -2
- package/dist/env.js +0 -1
- package/dist/index.js +9 -7
- package/dist/macros.js +0 -1
- package/package.json +7 -16
- 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-DF5hbs2w.js.map +0 -1
- package/dist/canary-features.js.map +0 -1
- package/dist/cjs-set-config.cjs.map +0 -1
- package/dist/debugging-VdsvkNjX.js.map +0 -1
- package/dist/debugging.js.map +0 -1
- package/dist/deprecations-BVxAmwe9.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 -16
- package/unstable-preview-types/babel-macros.d.ts.map +0 -1
- package/unstable-preview-types/canary-features.d.ts +0 -162
- 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 -175
- package/unstable-preview-types/debugging.d.ts.map +0 -1
- package/unstable-preview-types/deprecation-versions.d.ts +0 -16
- package/unstable-preview-types/deprecation-versions.d.ts.map +0 -1
- package/unstable-preview-types/deprecations.d.ts +0 -519
- package/unstable-preview-types/deprecations.d.ts.map +0 -1
- package/unstable-preview-types/env.d.ts +0 -132
- package/unstable-preview-types/env.d.ts.map +0 -1
- package/unstable-preview-types/index.d.ts +0 -113
- package/unstable-preview-types/index.d.ts.map +0 -1
- package/unstable-preview-types/macros.d.ts +0 -21
- 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
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { getDeprecations } from "./-private/utils/deprecations.js";
|
|
2
|
+
import { getFeatures } from "./-private/utils/features.js";
|
|
3
|
+
import * as LOGGING from "./debugging.js";
|
|
4
|
+
export type WarpDriveConfig = {
|
|
5
|
+
/**
|
|
6
|
+
* An object of key/value pairs of logging flags
|
|
7
|
+
*
|
|
8
|
+
* see {@link LOGGING | debugging} for the available flags.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* {
|
|
12
|
+
* LOG_CACHE: true,
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
debug?: Partial<InternalWarpDriveConfig["debug"]>;
|
|
19
|
+
/**
|
|
20
|
+
* If you are using the library in an environment that does not
|
|
21
|
+
* support `window.crypto.randomUUID` you can enable a polyfill
|
|
22
|
+
* for it.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
polyfillUUID?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* By default, the integration required to support the ember-inspector
|
|
29
|
+
* browser extension is included in production builds only when using
|
|
30
|
+
* the `ember-data` package.
|
|
31
|
+
*
|
|
32
|
+
* Otherwise the default is to exclude it. This setting allows to explicitly
|
|
33
|
+
* enable/disable it in production builds.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
includeDataAdapterInProduction?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The most recent version of the library from which all
|
|
40
|
+
* deprecations have been resolved.
|
|
41
|
+
*
|
|
42
|
+
* For instance if all deprecations released prior to or
|
|
43
|
+
* within `5.3` have been resolved, then setting this to
|
|
44
|
+
* `5.3` will remove all the support for the deprecated
|
|
45
|
+
* features for associated deprecations.
|
|
46
|
+
*
|
|
47
|
+
* See {@link DEPRECATIONS | deprecations} for more details.
|
|
48
|
+
*/
|
|
49
|
+
compatWith?: `${number}.${number}`;
|
|
50
|
+
/**
|
|
51
|
+
* An object of key/value pairs of logging flags
|
|
52
|
+
*
|
|
53
|
+
* see {@link DEPRECATIONS | deprecations} for the available flags.
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* {
|
|
57
|
+
* DEPRECATE_THING: false,
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
deprecations?: Partial<InternalWarpDriveConfig["deprecations"]>;
|
|
64
|
+
/**
|
|
65
|
+
* An object of key/value pairs of canary feature flags
|
|
66
|
+
* for use when testing new features gated behind a flag
|
|
67
|
+
* in a canary release version.
|
|
68
|
+
*
|
|
69
|
+
* see {@link FEATURES | features} for the available flags.
|
|
70
|
+
*
|
|
71
|
+
* ```ts
|
|
72
|
+
* {
|
|
73
|
+
* FEATURE_A: true,
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
features?: Partial<InternalWarpDriveConfig["features"]>;
|
|
80
|
+
/**
|
|
81
|
+
* @private
|
|
82
|
+
*/
|
|
83
|
+
forceMode?: "testing" | "production" | "development";
|
|
84
|
+
};
|
|
85
|
+
type InternalWarpDriveConfig = {
|
|
86
|
+
debug: typeof LOGGING;
|
|
87
|
+
polyfillUUID: boolean;
|
|
88
|
+
includeDataAdapter: boolean;
|
|
89
|
+
compatWith: `${number}.${number}` | null;
|
|
90
|
+
deprecations: ReturnType<typeof getDeprecations>;
|
|
91
|
+
features: ReturnType<typeof getFeatures>;
|
|
92
|
+
activeLogging: typeof LOGGING;
|
|
93
|
+
env: {
|
|
94
|
+
TESTING: boolean;
|
|
95
|
+
PRODUCTION: boolean;
|
|
96
|
+
DEBUG: boolean;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
export declare function setConfig(macros: object, config: WarpDriveConfig): void;
|
|
100
|
+
export declare function setConfig(context: object, appRoot: string, config: WarpDriveConfig): void;
|
|
101
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal functions for instrumenting the library's code with behaviors
|
|
3
|
+
* that are removed from production builds.
|
|
4
|
+
*
|
|
5
|
+
* @hidden
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A type-narrowing assertion function that throws an error with the supplied
|
|
10
|
+
* message if the condition is falsy.
|
|
11
|
+
*
|
|
12
|
+
* Asserts are removed from production builds, making this a "zero cost abstraction"
|
|
13
|
+
* so liberal usage of this function to ensure runtime correctness is encouraged.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function assert(message: string, condition: unknown): asserts condition;
|
|
18
|
+
export declare function assert(message: string): never;
|
package/dist/addon-shim.cjs
CHANGED
package/dist/babel-macros.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { L as LOGGING } from './debugging-VdsvkNjX.js';
|
|
2
|
-
import { C as CURRENT_FEATURES } from './canary-features-
|
|
3
|
-
import { C as CURRENT_DEPRECATIONS } from './deprecations-
|
|
2
|
+
import { C as CURRENT_FEATURES } from './canary-features-CuKgaVtX.js';
|
|
3
|
+
import { C as CURRENT_DEPRECATIONS } from './deprecations-BNNGFAiG.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Babel plugins that convert constants and expressions into [macroConditions](https://www.npmjs.com/package/@embroider/macros#the-macros)
|
|
@@ -52,20 +52,20 @@ function macros() {
|
|
|
52
52
|
const TransformDebugLogging = import.meta.resolve('./babel-plugin-transform-logging.cjs').slice(7);
|
|
53
53
|
const TransformFeatures = import.meta.resolve('./babel-plugin-transform-features.cjs').slice(7);
|
|
54
54
|
let plugins = [[TransformAsserts, {
|
|
55
|
-
sources: ['@warp-drive-mirror/build-config/macros', '@warp-drive/core/build-config/macros']
|
|
56
|
-
}, '@warp-drive/core/build-config/asserts-stripping'], [TransformFeatures, {
|
|
57
|
-
sources: ['@warp-drive-mirror/build-config/canary-features', '@warp-drive/core/build-config/canary-features'],
|
|
55
|
+
sources: ['@warp-drive-mirror/build-config/macros', '@warp-drive-mirror/core/build-config/macros']
|
|
56
|
+
}, '@warp-drive-mirror/core/build-config/asserts-stripping'], [TransformFeatures, {
|
|
57
|
+
sources: ['@warp-drive-mirror/build-config/canary-features', '@warp-drive-mirror/core/build-config/canary-features'],
|
|
58
58
|
flags: config.features
|
|
59
|
-
}, '@warp-drive/core/build-config/canary-features-stripping'], [TransformDeprecations, {
|
|
60
|
-
sources: ['@warp-drive-mirror/build-config/deprecations', '@warp-drive/core/build-config/deprecations'],
|
|
59
|
+
}, '@warp-drive-mirror/core/build-config/canary-features-stripping'], [TransformDeprecations, {
|
|
60
|
+
sources: ['@warp-drive-mirror/build-config/deprecations', '@warp-drive-mirror/core/build-config/deprecations'],
|
|
61
61
|
flags: config.deprecations
|
|
62
|
-
}, '@warp-drive/core/build-config/deprecation-stripping'], [TransformDebugLogging, {
|
|
63
|
-
sources: ['@warp-drive-mirror/build-config/debugging', '@warp-drive/core/build-config/debugging'],
|
|
62
|
+
}, '@warp-drive-mirror/core/build-config/deprecation-stripping'], [TransformDebugLogging, {
|
|
63
|
+
sources: ['@warp-drive-mirror/build-config/debugging', '@warp-drive-mirror/core/build-config/debugging'],
|
|
64
64
|
configKey: 'debug',
|
|
65
65
|
runtimeKey: 'activeLogging',
|
|
66
66
|
flags: config.debug
|
|
67
|
-
}, '@warp-drive/core/build-config/debugging-stripping'], [TransformDebugLogging, {
|
|
68
|
-
sources: ['@warp-drive-mirror/build-config/env', '@warp-drive/core/build-config/env'],
|
|
67
|
+
}, '@warp-drive-mirror/core/build-config/debugging-stripping'], [TransformDebugLogging, {
|
|
68
|
+
sources: ['@warp-drive-mirror/build-config/env', '@warp-drive-mirror/core/build-config/env'],
|
|
69
69
|
configKey: 'env',
|
|
70
70
|
flags: {
|
|
71
71
|
TESTING: true,
|
|
@@ -75,9 +75,8 @@ function macros() {
|
|
|
75
75
|
IS_CI: true,
|
|
76
76
|
SHOULD_RECORD: true
|
|
77
77
|
}
|
|
78
|
-
}, '@warp-drive/core/build-config/env']];
|
|
78
|
+
}, '@warp-drive-mirror/core/build-config/env']];
|
|
79
79
|
return plugins;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export { macros };
|
|
83
|
-
//# sourceMappingURL=babel-macros.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
} = require('babel-import-util');
|
|
3
|
+
const babelImportUtil = require('babel-import-util');
|
|
4
|
+
|
|
6
5
|
const Utils = new Set(['assert']);
|
|
7
6
|
|
|
8
7
|
/*
|
|
@@ -89,11 +88,10 @@ function babelPluginTransformAsserts (babel) {
|
|
|
89
88
|
}
|
|
90
89
|
},
|
|
91
90
|
Program(path, state) {
|
|
92
|
-
state.importer = new ImportUtil(t, path);
|
|
91
|
+
state.importer = new babelImportUtil.ImportUtil(t, path);
|
|
93
92
|
}
|
|
94
93
|
}
|
|
95
94
|
};
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
module.exports = babelPluginTransformAsserts;
|
|
99
|
-
//# sourceMappingURL=babel-plugin-transform-asserts.cjs.map
|
|
@@ -18,64 +18,41 @@
|
|
|
18
18
|
* :::
|
|
19
19
|
*
|
|
20
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
|
|
21
|
+
* (such as `@warp-drive-mirror/core@5.6.0-alpha.1`) or by installing the latest dist-tag
|
|
22
22
|
* published to the `canary` channel.
|
|
23
23
|
*
|
|
24
24
|
* Because ***Warp*Drive** packages operate on a strict lockstep policy with each other,
|
|
25
25
|
* you must install the matching canary version of all ***Warp*Drive** packages.
|
|
26
26
|
*
|
|
27
|
-
* Below is an example of installing the latest canary version of all the
|
|
28
|
-
* packages that are part of the ***Warp*Drive** project
|
|
29
|
-
*
|
|
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.
|
|
30
31
|
*
|
|
31
32
|
* ::: code-group
|
|
32
33
|
*
|
|
33
34
|
* ```sh [pnpm]
|
|
34
|
-
* pnpm add -E @
|
|
35
|
-
* @
|
|
36
|
-
* @
|
|
37
|
-
* @ember-data-mirror/graph@canary \
|
|
38
|
-
* @ember-data-mirror/request@canary \
|
|
39
|
-
* @ember-data-mirror/request-utils@canary \
|
|
40
|
-
* @warp-drive-mirror/schema-record@canary \
|
|
41
|
-
* @warp-drive-mirror/build-config@canary \
|
|
42
|
-
* @warp-drive-mirror/core-types@canary;
|
|
35
|
+
* pnpm add -E @warp-drive-mirror/core@canary \
|
|
36
|
+
* @warp-drive-mirror/json-api@canary \
|
|
37
|
+
* @warp-drive-mirror/ember@canary;
|
|
43
38
|
* ```
|
|
44
39
|
*
|
|
45
40
|
* ```sh [npm]
|
|
46
|
-
* npm add -E @
|
|
47
|
-
* @
|
|
48
|
-
* @
|
|
49
|
-
* @ember-data-mirror/graph@canary \
|
|
50
|
-
* @ember-data-mirror/request@canary \
|
|
51
|
-
* @ember-data-mirror/request-utils@canary \
|
|
52
|
-
* @warp-drive-mirror/schema-record@canary \
|
|
53
|
-
* @warp-drive-mirror/build-config@canary \
|
|
54
|
-
* @warp-drive-mirror/core-types@canary;
|
|
41
|
+
* npm add -E @warp-drive-mirror/core@canary \
|
|
42
|
+
* @warp-drive-mirror/json-api@canary \
|
|
43
|
+
* @warp-drive-mirror/ember@canary;
|
|
55
44
|
* ```
|
|
56
45
|
*
|
|
57
46
|
* ```sh [yarn]
|
|
58
|
-
* yarn add -E @
|
|
59
|
-
* @
|
|
60
|
-
* @
|
|
61
|
-
* @ember-data-mirror/graph@canary \
|
|
62
|
-
* @ember-data-mirror/request@canary \
|
|
63
|
-
* @ember-data-mirror/request-utils@canary \
|
|
64
|
-
* @warp-drive-mirror/schema-record@canary \
|
|
65
|
-
* @warp-drive-mirror/build-config@canary \
|
|
66
|
-
* @warp-drive-mirror/core-types@canary;
|
|
47
|
+
* yarn add -E @warp-drive-mirror/core@canary \
|
|
48
|
+
* @warp-drive-mirror/json-api@canary \
|
|
49
|
+
* @warp-drive-mirror/ember@canary;
|
|
67
50
|
* ```
|
|
68
51
|
*
|
|
69
52
|
* ```sh [bun]
|
|
70
|
-
* bun add --exact @
|
|
71
|
-
* @
|
|
72
|
-
* @
|
|
73
|
-
* @ember-data-mirror/graph@canary \
|
|
74
|
-
* @ember-data-mirror/request@canary \
|
|
75
|
-
* @ember-data-mirror/request-utils@canary \
|
|
76
|
-
* @warp-drive-mirror/schema-record@canary \
|
|
77
|
-
* @warp-drive-mirror/build-config@canary \
|
|
78
|
-
* @warp-drive-mirror/core-types@canary;
|
|
53
|
+
* bun add --exact @warp-drive-mirror/core@canary \
|
|
54
|
+
* @warp-drive-mirror/json-api@canary \
|
|
55
|
+
* @warp-drive-mirror/ember@canary;
|
|
79
56
|
* ```
|
|
80
57
|
*
|
|
81
58
|
* :::
|
|
@@ -118,7 +95,7 @@
|
|
|
118
95
|
* the following can be done:
|
|
119
96
|
*
|
|
120
97
|
* ```js
|
|
121
|
-
* if (macroCondition(dependencySatisfies('@
|
|
98
|
+
* if (macroCondition(dependencySatisfies('@warp-drive-mirror/core', '5.6'))) {
|
|
122
99
|
* // do thing
|
|
123
100
|
* }
|
|
124
101
|
* ```
|
|
@@ -167,4 +144,3 @@ const CURRENT_FEATURES = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePr
|
|
|
167
144
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
168
145
|
|
|
169
146
|
export { CURRENT_FEATURES as C, JSON_API_CACHE_VALIDATION_ERRORS as J, SAMPLE_FEATURE_FLAG as S };
|
|
170
|
-
//# sourceMappingURL=canary-features-DF5hbs2w.js.map
|
package/dist/canary-features.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { J as JSON_API_CACHE_VALIDATION_ERRORS, S as SAMPLE_FEATURE_FLAG } from './canary-features-
|
|
2
|
-
//# sourceMappingURL=canary-features.js.map
|
|
1
|
+
export { J as JSON_API_CACHE_VALIDATION_ERRORS, S as SAMPLE_FEATURE_FLAG } from './canary-features-CuKgaVtX.js';
|
package/dist/cjs-set-config.cjs
CHANGED
|
@@ -9,7 +9,10 @@ const path = require('path');
|
|
|
9
9
|
const url = require('url');
|
|
10
10
|
|
|
11
11
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
12
|
-
function getEnv() {
|
|
12
|
+
function getEnv(forceMode) {
|
|
13
|
+
const FORCE_TESTING = forceMode === 'testing' || forceMode === 'development' || forceMode === 'debug';
|
|
14
|
+
const FORCE_DEBUG = forceMode === 'development' || forceMode === 'debug';
|
|
15
|
+
const FORCE_PRODUCTION = forceMode === 'production';
|
|
13
16
|
const {
|
|
14
17
|
EMBER_ENV,
|
|
15
18
|
IS_TESTING,
|
|
@@ -18,9 +21,9 @@ function getEnv() {
|
|
|
18
21
|
CI,
|
|
19
22
|
IS_RECORDING
|
|
20
23
|
} = process.env;
|
|
21
|
-
const PRODUCTION = EMBER_ENV === 'production' || !EMBER_ENV && NODE_ENV === 'production';
|
|
22
|
-
const DEBUG = !PRODUCTION;
|
|
23
|
-
const TESTING = DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);
|
|
24
|
+
const PRODUCTION = FORCE_PRODUCTION || EMBER_ENV === 'production' || !EMBER_ENV && NODE_ENV === 'production';
|
|
25
|
+
const DEBUG = FORCE_DEBUG || !PRODUCTION;
|
|
26
|
+
const TESTING = FORCE_TESTING || DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);
|
|
24
27
|
const SHOULD_RECORD = Boolean(!CI || IS_RECORDING);
|
|
25
28
|
return {
|
|
26
29
|
TESTING,
|
|
@@ -142,64 +145,41 @@ function getDeprecations(compatVersion, deprecations) {
|
|
|
142
145
|
* :::
|
|
143
146
|
*
|
|
144
147
|
* Canary builds are published to `npm` and can be installed using a precise tag
|
|
145
|
-
* (such as `@warp-drive/core@5.6.0-alpha.1`) or by installing the latest dist-tag
|
|
148
|
+
* (such as `@warp-drive-mirror/core@5.6.0-alpha.1`) or by installing the latest dist-tag
|
|
146
149
|
* published to the `canary` channel.
|
|
147
150
|
*
|
|
148
151
|
* Because ***Warp*Drive** packages operate on a strict lockstep policy with each other,
|
|
149
152
|
* you must install the matching canary version of all ***Warp*Drive** packages.
|
|
150
153
|
*
|
|
151
|
-
* Below is an example of installing the latest canary version of all the
|
|
152
|
-
* packages that are part of the ***Warp*Drive** project
|
|
153
|
-
*
|
|
154
|
+
* Below is an example of installing the latest canary version of all the core
|
|
155
|
+
* packages that are part of the ***Warp*Drive** project when using EmberJS.
|
|
156
|
+
*
|
|
157
|
+
* Add/remove packages from this list to match your project.
|
|
154
158
|
*
|
|
155
159
|
* ::: code-group
|
|
156
160
|
*
|
|
157
161
|
* ```sh [pnpm]
|
|
158
|
-
* pnpm add -E @
|
|
159
|
-
* @
|
|
160
|
-
* @
|
|
161
|
-
* @ember-data-mirror/graph@canary \
|
|
162
|
-
* @ember-data-mirror/request@canary \
|
|
163
|
-
* @ember-data-mirror/request-utils@canary \
|
|
164
|
-
* @warp-drive-mirror/schema-record@canary \
|
|
165
|
-
* @warp-drive-mirror/build-config@canary \
|
|
166
|
-
* @warp-drive-mirror/core-types@canary;
|
|
162
|
+
* pnpm add -E @warp-drive-mirror/core@canary \
|
|
163
|
+
* @warp-drive-mirror/json-api@canary \
|
|
164
|
+
* @warp-drive-mirror/ember@canary;
|
|
167
165
|
* ```
|
|
168
166
|
*
|
|
169
167
|
* ```sh [npm]
|
|
170
|
-
* npm add -E @
|
|
171
|
-
* @
|
|
172
|
-
* @
|
|
173
|
-
* @ember-data-mirror/graph@canary \
|
|
174
|
-
* @ember-data-mirror/request@canary \
|
|
175
|
-
* @ember-data-mirror/request-utils@canary \
|
|
176
|
-
* @warp-drive-mirror/schema-record@canary \
|
|
177
|
-
* @warp-drive-mirror/build-config@canary \
|
|
178
|
-
* @warp-drive-mirror/core-types@canary;
|
|
168
|
+
* npm add -E @warp-drive-mirror/core@canary \
|
|
169
|
+
* @warp-drive-mirror/json-api@canary \
|
|
170
|
+
* @warp-drive-mirror/ember@canary;
|
|
179
171
|
* ```
|
|
180
172
|
*
|
|
181
173
|
* ```sh [yarn]
|
|
182
|
-
* yarn add -E @
|
|
183
|
-
* @
|
|
184
|
-
* @
|
|
185
|
-
* @ember-data-mirror/graph@canary \
|
|
186
|
-
* @ember-data-mirror/request@canary \
|
|
187
|
-
* @ember-data-mirror/request-utils@canary \
|
|
188
|
-
* @warp-drive-mirror/schema-record@canary \
|
|
189
|
-
* @warp-drive-mirror/build-config@canary \
|
|
190
|
-
* @warp-drive-mirror/core-types@canary;
|
|
174
|
+
* yarn add -E @warp-drive-mirror/core@canary \
|
|
175
|
+
* @warp-drive-mirror/json-api@canary \
|
|
176
|
+
* @warp-drive-mirror/ember@canary;
|
|
191
177
|
* ```
|
|
192
178
|
*
|
|
193
179
|
* ```sh [bun]
|
|
194
|
-
* bun add --exact @
|
|
195
|
-
* @
|
|
196
|
-
* @
|
|
197
|
-
* @ember-data-mirror/graph@canary \
|
|
198
|
-
* @ember-data-mirror/request@canary \
|
|
199
|
-
* @ember-data-mirror/request-utils@canary \
|
|
200
|
-
* @warp-drive-mirror/schema-record@canary \
|
|
201
|
-
* @warp-drive-mirror/build-config@canary \
|
|
202
|
-
* @warp-drive-mirror/core-types@canary;
|
|
180
|
+
* bun add --exact @warp-drive-mirror/core@canary \
|
|
181
|
+
* @warp-drive-mirror/json-api@canary \
|
|
182
|
+
* @warp-drive-mirror/ember@canary;
|
|
203
183
|
* ```
|
|
204
184
|
*
|
|
205
185
|
* :::
|
|
@@ -242,7 +222,7 @@ function getDeprecations(compatVersion, deprecations) {
|
|
|
242
222
|
* the following can be done:
|
|
243
223
|
*
|
|
244
224
|
* ```js
|
|
245
|
-
* if (macroCondition(dependencySatisfies('@
|
|
225
|
+
* if (macroCondition(dependencySatisfies('@warp-drive-mirror/core', '5.6'))) {
|
|
246
226
|
* // do thing
|
|
247
227
|
* }
|
|
248
228
|
* ```
|
|
@@ -627,7 +607,7 @@ function setConfig(context, appRootOrConfig, config) {
|
|
|
627
607
|
// }
|
|
628
608
|
|
|
629
609
|
const debugOptions = Object.assign({}, LOGGING, userConfig.debug);
|
|
630
|
-
const env = getEnv();
|
|
610
|
+
const env = getEnv(userConfig.forceMode);
|
|
631
611
|
const DEPRECATIONS = getDeprecations(userConfig.compatWith || null, userConfig.deprecations);
|
|
632
612
|
const FEATURES = getFeatures(env.PRODUCTION);
|
|
633
613
|
const includeDataAdapterInProduction = typeof userConfig.includeDataAdapterInProduction === 'boolean' ? userConfig.includeDataAdapterInProduction : true;
|
|
@@ -646,4 +626,3 @@ function setConfig(context, appRootOrConfig, config) {
|
|
|
646
626
|
}
|
|
647
627
|
|
|
648
628
|
exports.setConfig = setConfig;
|
|
649
|
-
//# sourceMappingURL=cjs-set-config.cjs.map
|
|
@@ -196,4 +196,3 @@ const LOGGING = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
196
196
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
197
197
|
|
|
198
198
|
export { DEBUG_RELATIONSHIP_NOTIFICATIONS as D, LOGGING as L, __INTERNAL_LOG_NATIVE_MAP_SET_COUNTS as _, LOG_CACHE as a, LOG_PAYLOADS as b, LOG_OPERATIONS as c, LOG_MUTATIONS as d, LOG_CACHE_POLICY as e, LOG_NOTIFICATIONS as f, LOG_REQUESTS as g, LOG_REQUEST_STATUS as h, LOG_IDENTIFIERS as i, LOG_GRAPH as j, LOG_INSTANCE_CACHE as k, LOG_METRIC_COUNTS as l };
|
|
199
|
-
//# sourceMappingURL=debugging-VdsvkNjX.js.map
|
package/dist/debugging.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
1
|
export { D as DEBUG_RELATIONSHIP_NOTIFICATIONS, a as LOG_CACHE, e as LOG_CACHE_POLICY, j as LOG_GRAPH, i as LOG_IDENTIFIERS, k as LOG_INSTANCE_CACHE, l as LOG_METRIC_COUNTS, d as LOG_MUTATIONS, f as LOG_NOTIFICATIONS, c as LOG_OPERATIONS, b as LOG_PAYLOADS, g as LOG_REQUESTS, h as LOG_REQUEST_STATUS, _ as __INTERNAL_LOG_NATIVE_MAP_SET_COUNTS } from './debugging-VdsvkNjX.js';
|
|
2
|
-
//# sourceMappingURL=debugging.js.map
|
|
@@ -109,7 +109,7 @@ const DEPRECATE_CATCH_ALL = true;
|
|
|
109
109
|
* <Badge type="danger" text="no-id-assigned" />
|
|
110
110
|
*
|
|
111
111
|
* This is a planned deprecation which will trigger when observer or computed
|
|
112
|
-
* chains are used to watch for changes on any
|
|
112
|
+
* chains are used to watch for changes on any WarpDrive LiveArray, CollectionRecordArray,
|
|
113
113
|
* ManyArray or PromiseManyArray.
|
|
114
114
|
*
|
|
115
115
|
* Support for these chains is currently guarded by the deprecation flag
|
|
@@ -150,7 +150,7 @@ const DEPRECATE_COMPUTED_CHAINS = true;
|
|
|
150
150
|
* singular, dasherized, etc. so long as everywhere you refer to the type
|
|
151
151
|
* you use the same string.
|
|
152
152
|
*
|
|
153
|
-
* If using @
|
|
153
|
+
* If using @warp-drive-mirror/legacy/model, there will always be a restriction that the
|
|
154
154
|
* `type` must match the path on disk where the model is defined.
|
|
155
155
|
*
|
|
156
156
|
* e.g. `app/models/foo/bar-bem.js` must have a type of `foo/bar-bem`
|
|
@@ -164,7 +164,7 @@ const DEPRECATE_NON_STRICT_TYPES = true;
|
|
|
164
164
|
/**
|
|
165
165
|
* <Badge type="warning" text="ember-data-mirror:deprecate-non-strict-id" />
|
|
166
166
|
*
|
|
167
|
-
* Currently,
|
|
167
|
+
* Currently, WarpDrive expects that the `id` property associated with
|
|
168
168
|
* a resource is a string.
|
|
169
169
|
*
|
|
170
170
|
* However, for legacy support in many locations we would accept a number
|
|
@@ -341,7 +341,7 @@ const DEPRECATE_NON_UNIQUE_PAYLOADS = true;
|
|
|
341
341
|
*
|
|
342
342
|
* ### What if I don't want the new behavior?
|
|
343
343
|
*
|
|
344
|
-
*
|
|
344
|
+
* WarpDrive's philosophy is to not make assumptions about your application. Where possible
|
|
345
345
|
* we seek out "100%" solutions – solutions that work for all use cases - and where that is
|
|
346
346
|
* not possible we default to "90%" solutions – solutions that work for the vast majority of use
|
|
347
347
|
* cases. In the case of "90%" solutions we look for primitives that allow you to resolve the
|
|
@@ -375,7 +375,7 @@ const DEPRECATE_NON_UNIQUE_PAYLOADS = true;
|
|
|
375
375
|
* What this version (5.3) does not yet provide is a way to directly modify the cache's remote state
|
|
376
376
|
* for the relationship via public APIs other than via the broader action of upserting a response via
|
|
377
377
|
* `<Cache>.put(document)`. However, such an API was sketched in the Cache 2.1 RFC
|
|
378
|
-
* `<Cache>.patch(operation)` and is likely to be added in a future 5.x release of
|
|
378
|
+
* `<Cache>.patch(operation)` and is likely to be added in a future 5.x release of WarpDrive.
|
|
379
379
|
*
|
|
380
380
|
* This version (5.3) also does not yet provide a way to directly modify the graph (a general purpose
|
|
381
381
|
* subset of cache behaviors specific to relationships) via public APIs. However, during the
|
|
@@ -546,4 +546,3 @@ const CURRENT_DEPRECATIONS = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defi
|
|
|
546
546
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
547
547
|
|
|
548
548
|
export { CURRENT_DEPRECATIONS as C, DEPRECATE_CATCH_ALL as D, ENABLE_LEGACY_SCHEMA_SERVICE as E, DEPRECATE_COMPUTED_CHAINS as a, DEPRECATE_NON_STRICT_TYPES as b, DEPRECATE_NON_STRICT_ID as c, DEPRECATE_LEGACY_IMPORTS as d, DEPRECATE_NON_UNIQUE_PAYLOADS as e, DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE as f, DEPRECATE_MANY_ARRAY_DUPLICATES as g, DEPRECATE_STORE_EXTENDS_EMBER_OBJECT as h, DEPRECATE_EMBER_INFLECTOR as i, DEPRECATE_TRACKING_PACKAGE as j, DISABLE_7X_DEPRECATIONS as k };
|
|
549
|
-
//# sourceMappingURL=deprecations-BVxAmwe9.js.map
|
package/dist/deprecations.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { D as DEPRECATE_CATCH_ALL, a as DEPRECATE_COMPUTED_CHAINS, i as DEPRECATE_EMBER_INFLECTOR, d as DEPRECATE_LEGACY_IMPORTS, g as DEPRECATE_MANY_ARRAY_DUPLICATES, c as DEPRECATE_NON_STRICT_ID, b as DEPRECATE_NON_STRICT_TYPES, e as DEPRECATE_NON_UNIQUE_PAYLOADS, f as DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE, h as DEPRECATE_STORE_EXTENDS_EMBER_OBJECT, j as DEPRECATE_TRACKING_PACKAGE, k as DISABLE_7X_DEPRECATIONS, E as ENABLE_LEGACY_SCHEMA_SERVICE } from './deprecations-
|
|
2
|
-
//# sourceMappingURL=deprecations.js.map
|
|
1
|
+
export { D as DEPRECATE_CATCH_ALL, a as DEPRECATE_COMPUTED_CHAINS, i as DEPRECATE_EMBER_INFLECTOR, d as DEPRECATE_LEGACY_IMPORTS, g as DEPRECATE_MANY_ARRAY_DUPLICATES, c as DEPRECATE_NON_STRICT_ID, b as DEPRECATE_NON_STRICT_TYPES, e as DEPRECATE_NON_UNIQUE_PAYLOADS, f as DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE, h as DEPRECATE_STORE_EXTENDS_EMBER_OBJECT, j as DEPRECATE_TRACKING_PACKAGE, k as DISABLE_7X_DEPRECATIONS, E as ENABLE_LEGACY_SCHEMA_SERVICE } from './deprecations-BNNGFAiG.js';
|
package/dist/env.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -3,10 +3,13 @@ import semver from 'semver';
|
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
|
-
import { C as CURRENT_FEATURES } from './canary-features-
|
|
6
|
+
import { C as CURRENT_FEATURES } from './canary-features-CuKgaVtX.js';
|
|
7
7
|
import { L as LOGGING } from './debugging-VdsvkNjX.js';
|
|
8
8
|
|
|
9
|
-
function getEnv() {
|
|
9
|
+
function getEnv(forceMode) {
|
|
10
|
+
const FORCE_TESTING = forceMode === 'testing' || forceMode === 'development' || forceMode === 'debug';
|
|
11
|
+
const FORCE_DEBUG = forceMode === 'development' || forceMode === 'debug';
|
|
12
|
+
const FORCE_PRODUCTION = forceMode === 'production';
|
|
10
13
|
const {
|
|
11
14
|
EMBER_ENV,
|
|
12
15
|
IS_TESTING,
|
|
@@ -15,9 +18,9 @@ function getEnv() {
|
|
|
15
18
|
CI,
|
|
16
19
|
IS_RECORDING
|
|
17
20
|
} = process.env;
|
|
18
|
-
const PRODUCTION = EMBER_ENV === 'production' || !EMBER_ENV && NODE_ENV === 'production';
|
|
19
|
-
const DEBUG = !PRODUCTION;
|
|
20
|
-
const TESTING = DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);
|
|
21
|
+
const PRODUCTION = FORCE_PRODUCTION || EMBER_ENV === 'production' || !EMBER_ENV && NODE_ENV === 'production';
|
|
22
|
+
const DEBUG = FORCE_DEBUG || !PRODUCTION;
|
|
23
|
+
const TESTING = FORCE_TESTING || DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);
|
|
21
24
|
const SHOULD_RECORD = Boolean(!CI || IS_RECORDING);
|
|
22
25
|
return {
|
|
23
26
|
TESTING,
|
|
@@ -259,7 +262,7 @@ function setConfig(context, appRootOrConfig, config) {
|
|
|
259
262
|
// }
|
|
260
263
|
|
|
261
264
|
const debugOptions = Object.assign({}, LOGGING, userConfig.debug);
|
|
262
|
-
const env = getEnv();
|
|
265
|
+
const env = getEnv(userConfig.forceMode);
|
|
263
266
|
const DEPRECATIONS = getDeprecations(userConfig.compatWith || null, userConfig.deprecations);
|
|
264
267
|
const FEATURES = getFeatures(env.PRODUCTION);
|
|
265
268
|
const includeDataAdapterInProduction = typeof userConfig.includeDataAdapterInProduction === 'boolean' ? userConfig.includeDataAdapterInProduction : true;
|
|
@@ -278,4 +281,3 @@ function setConfig(context, appRootOrConfig, config) {
|
|
|
278
281
|
}
|
|
279
282
|
|
|
280
283
|
export { setConfig };
|
|
281
|
-
//# sourceMappingURL=index.js.map
|
package/dist/macros.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-drive-mirror/build-config",
|
|
3
|
-
"version": "5.6.0-
|
|
3
|
+
"version": "5.6.0-beta.1",
|
|
4
4
|
"description": "Provides Build Configuration for projects using WarpDrive or EmberData",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-data-mirror",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+ssh://git@github.com:emberjs/data.git",
|
|
12
|
-
"directory": "packages/build-config"
|
|
12
|
+
"directory": "warp-drive-packages/build-config"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"author": "Chris Thoburn <runspired@users.noreply.github.com>",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
19
|
-
"
|
|
19
|
+
"declarations",
|
|
20
20
|
"CHANGELOG.md",
|
|
21
21
|
"README.md",
|
|
22
22
|
"LICENSE.md",
|
|
@@ -24,16 +24,15 @@
|
|
|
24
24
|
],
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
|
+
"types": "./declarations/index.d.ts",
|
|
27
28
|
"default": "./dist/index.js"
|
|
28
29
|
},
|
|
29
30
|
"./*.cjs": {
|
|
30
31
|
"default": "./dist/*.cjs"
|
|
31
32
|
},
|
|
32
33
|
"./*": {
|
|
34
|
+
"types": "./declarations/*.d.ts",
|
|
33
35
|
"default": "./dist/*.js"
|
|
34
|
-
},
|
|
35
|
-
"./unstable-preview-types": {
|
|
36
|
-
"types": "./unstable-preview-types/index.d.ts"
|
|
37
36
|
}
|
|
38
37
|
},
|
|
39
38
|
"dependencies": {
|
|
@@ -43,26 +42,18 @@
|
|
|
43
42
|
"semver": "^7.7.1"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
|
-
"@warp-drive/internal-config": "5.6.0-
|
|
45
|
+
"@warp-drive/internal-config": "5.6.0-beta.1",
|
|
47
46
|
"@types/babel__core": "^7.20.5",
|
|
48
47
|
"@types/node": "^20.17.32",
|
|
49
48
|
"@babel/plugin-transform-typescript": "^7.27.0",
|
|
50
49
|
"@babel/preset-typescript": "^7.27.0",
|
|
51
50
|
"@babel/core": "^7.26.10",
|
|
52
51
|
"typescript": "^5.8.3",
|
|
53
|
-
"
|
|
54
|
-
"vite": "^5.4.15"
|
|
52
|
+
"vite": "^7.0.0"
|
|
55
53
|
},
|
|
56
54
|
"volta": {
|
|
57
55
|
"extends": "../../../../../../package.json"
|
|
58
56
|
},
|
|
59
|
-
"typesVersions": {
|
|
60
|
-
"*": {
|
|
61
|
-
"unstable-preview-types": [
|
|
62
|
-
"./unstable-preview-types"
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
57
|
"scripts": {
|
|
67
58
|
"build:pkg": "vite build; vite build -c ./vite.config-cjs.mjs;",
|
|
68
59
|
"sync": "echo \"syncing\"",
|
package/dist/addon-shim.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addon-shim.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|