@ember-data/tracking 5.9.0-beta.1 → 5.9.0-beta.3
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/CHANGELOG.md +94 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +145 -144
- package/dist/index.js.map +1 -0
- package/package.json +17 -25
- package/unstable-preview-types/index.d.ts +28 -88
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# @ember-data/tracking Changelog
|
|
2
|
+
|
|
3
|
+
For the full project changelog see [https://github.com/warp-drive-data/warp-drive/blob/main/CHANGELOG.md](https://github.com/warp-drive-data/warp-drive/blob/main/CHANGELOG.md)
|
|
4
|
+
|
|
5
|
+
## v5.8.0 (2025-10-07)
|
|
6
|
+
|
|
7
|
+
#### :house: Internal
|
|
8
|
+
|
|
9
|
+
* [#10349](https://github.com/warp-drive-data/warp-drive/pull/10349) chore: update all emberjs/data links to warp-drive-data/warp-drive ([@runspired](https://github.com/runspired))
|
|
10
|
+
|
|
11
|
+
#### Committers: (1)
|
|
12
|
+
|
|
13
|
+
Chris Thoburn ([@runspired](https://github.com/runspired))
|
|
14
|
+
|
|
15
|
+
## v5.7.0 (2025-08-26)
|
|
16
|
+
|
|
17
|
+
#### :house: Internal
|
|
18
|
+
|
|
19
|
+
* [#10129](https://github.com/warp-drive-data/warp-drive/pull/10129) chore: bump typescript to 5.9 ([@runspired](https://github.com/runspired))
|
|
20
|
+
* [#10124](https://github.com/warp-drive-data/warp-drive/pull/10124) chore: mark a few types as private ([@runspired](https://github.com/runspired))
|
|
21
|
+
|
|
22
|
+
#### Committers: (1)
|
|
23
|
+
|
|
24
|
+
Chris Thoburn ([@runspired](https://github.com/runspired))
|
|
25
|
+
|
|
26
|
+
## v5.6.0 (2025-07-01)
|
|
27
|
+
|
|
28
|
+
#### :memo: Documentation
|
|
29
|
+
|
|
30
|
+
* [#9989](https://github.com/warp-drive-data/warp-drive/pull/9989) [BREAKING] docs: integrate API docs to the new docs site ([@runspired](https://github.com/runspired))
|
|
31
|
+
|
|
32
|
+
#### :rocket: Enhancement
|
|
33
|
+
|
|
34
|
+
* [#10011](https://github.com/warp-drive-data/warp-drive/pull/10011) feat: @warp-drive/core/build-config ([@runspired](https://github.com/runspired))
|
|
35
|
+
* [#10004](https://github.com/warp-drive-data/warp-drive/pull/10004) feat: @warp-drive/ember ([@runspired](https://github.com/runspired))
|
|
36
|
+
|
|
37
|
+
#### :bug: Bug Fix
|
|
38
|
+
|
|
39
|
+
* [#9982](https://github.com/warp-drive-data/warp-drive/pull/9982) fix: simplify peer configuration to avoid bringing extra copies of glimmer/validator ([@runspired](https://github.com/runspired))
|
|
40
|
+
|
|
41
|
+
#### :house: Internal
|
|
42
|
+
|
|
43
|
+
* [#10042](https://github.com/warp-drive-data/warp-drive/pull/10042) chore: upgrade to vite7 ([@runspired](https://github.com/runspired))
|
|
44
|
+
* [#10040](https://github.com/warp-drive-data/warp-drive/pull/10040) chore: isolated declarations ([@runspired](https://github.com/runspired))
|
|
45
|
+
|
|
46
|
+
#### Committers: (1)
|
|
47
|
+
|
|
48
|
+
Chris Thoburn ([@runspired](https://github.com/runspired))
|
|
49
|
+
|
|
50
|
+
## v5.5.0 (2025-05-08)
|
|
51
|
+
|
|
52
|
+
#### :rocket: Enhancement
|
|
53
|
+
|
|
54
|
+
* [#9968](https://github.com/warp-drive-data/warp-drive/pull/9968) feat: unlock universal 🌌 ([@runspired](https://github.com/runspired))
|
|
55
|
+
* [#9965](https://github.com/warp-drive-data/warp-drive/pull/9965) feat: universal reactivity hooks ([@runspired](https://github.com/runspired))
|
|
56
|
+
|
|
57
|
+
#### :house: Internal
|
|
58
|
+
|
|
59
|
+
* [#9965](https://github.com/warp-drive-data/warp-drive/pull/9965) feat: universal reactivity hooks ([@runspired](https://github.com/runspired))
|
|
60
|
+
|
|
61
|
+
#### Committers: (1)
|
|
62
|
+
|
|
63
|
+
Chris Thoburn ([@runspired](https://github.com/runspired))
|
|
64
|
+
|
|
65
|
+
## v5.4.0 (2025-04-11)
|
|
66
|
+
|
|
67
|
+
#### :rocket: Enhancement
|
|
68
|
+
|
|
69
|
+
* [#9883](https://github.com/warp-drive-data/warp-drive/pull/9883) feat: make documents react to cache updates ([@runspired](https://github.com/runspired))
|
|
70
|
+
* [#9541](https://github.com/warp-drive-data/warp-drive/pull/9541) feat: eslint-plugin-(ember-data|warp-drive) ([@runspired](https://github.com/runspired))
|
|
71
|
+
|
|
72
|
+
#### :bug: Bug Fix
|
|
73
|
+
|
|
74
|
+
* [#9592](https://github.com/warp-drive-data/warp-drive/pull/9592) fix: add ember-source as explicit peer-dep for use of @ember/debug ([@runspired](https://github.com/runspired))
|
|
75
|
+
|
|
76
|
+
#### :house: Internal
|
|
77
|
+
|
|
78
|
+
* [#9780](https://github.com/warp-drive-data/warp-drive/pull/9780) chore: bump @glimmer/component ([@runspired](https://github.com/runspired))
|
|
79
|
+
* [#9759](https://github.com/warp-drive-data/warp-drive/pull/9759) chore: Improve contributing experience ([@runspired](https://github.com/runspired))
|
|
80
|
+
* [#9752](https://github.com/warp-drive-data/warp-drive/pull/9752) chore: tooling upgrades to support WarpDrive package unification ([@runspired](https://github.com/runspired))
|
|
81
|
+
* [#9705](https://github.com/warp-drive-data/warp-drive/pull/9705) chore: make diagnostic shutdown safer, use bun for holodeck server ([@runspired](https://github.com/runspired))
|
|
82
|
+
* [#9699](https://github.com/warp-drive-data/warp-drive/pull/9699) chore: update to pnpm 10 ([@runspired](https://github.com/runspired))
|
|
83
|
+
* [#9629](https://github.com/warp-drive-data/warp-drive/pull/9629) fix: restore * versions and setup publish to not overwrite them ([@runspired](https://github.com/runspired))
|
|
84
|
+
* [#9623](https://github.com/warp-drive-data/warp-drive/pull/9623) chore: updates to match v4 main ([@runspired](https://github.com/runspired))
|
|
85
|
+
* [#9620](https://github.com/warp-drive-data/warp-drive/pull/9620) Starwars ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
86
|
+
* [#9596](https://github.com/warp-drive-data/warp-drive/pull/9596) chore: Remove unused `--report-unused-disable-directives` flag ([@gitKrystan](https://github.com/gitKrystan))
|
|
87
|
+
* [#9486](https://github.com/warp-drive-data/warp-drive/pull/9486) chore: fixup dev deps ([@runspired](https://github.com/runspired))
|
|
88
|
+
|
|
89
|
+
#### Committers: (3)
|
|
90
|
+
|
|
91
|
+
Chris Thoburn ([@runspired](https://github.com/runspired))
|
|
92
|
+
[@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
93
|
+
Krystan HuffMenne ([@gitKrystan](https://github.com/gitKrystan))
|
|
94
|
+
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { tagForProperty } from "@ember/-internals/metal";
|
|
2
|
+
//#region src/index.d.ts
|
|
3
|
+
type Tag = ReturnType<typeof tagForProperty>;
|
|
4
|
+
/**
|
|
5
|
+
* <Badge type="warning" text="deprecated" />
|
|
6
|
+
*
|
|
7
|
+
* Creates a signal configuration object for WarpDrive that integrates with Ember's
|
|
8
|
+
* reactivity system. This will be automatically imported and registered by
|
|
9
|
+
* `@ember-data/store` if the deprecation has not been resolved.
|
|
10
|
+
*
|
|
11
|
+
* This function should not be called directly in your application code
|
|
12
|
+
* and this package is deprecated entirely. Use {@link @warp-drive/ember! | @warp-drive/ember}
|
|
13
|
+
* instead.
|
|
14
|
+
*
|
|
15
|
+
* @deprecated
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
declare function buildSignalConfig(options: {
|
|
19
|
+
wellknown: {
|
|
20
|
+
Array: symbol | string;
|
|
21
|
+
};
|
|
22
|
+
}): {
|
|
23
|
+
createSignal(obj: object, key: string | symbol): Tag | [Tag, Tag, Tag];
|
|
24
|
+
consumeSignal(signal: Tag | [Tag, Tag, Tag]): void;
|
|
25
|
+
notifySignal(signal: Tag | [Tag, Tag, Tag]): void;
|
|
26
|
+
createMemo: <F>(object: object, key: string | symbol, fn: () => F) => (() => F);
|
|
27
|
+
willSyncFlushWatchers: () => boolean;
|
|
28
|
+
waitFor: <K>(promise: Promise<K>) => Promise<K>;
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { buildSignalConfig };
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;KAwEK,MAAM,kBAAkB;;;;;;;;;;;;;;;iBAiBb,kBAAkB;EAChC;IACE;;;EAMA,aAAa,aAAa,uBAAuB,OAAO,KAAK,KAAK;EAQlE,cAAc,QAAQ,OAAO,KAAK,KAAK;EAWvC,aAAa,QAAQ,OAAO,KAAK,KAAK;EAYtC,aAAa,GAAG,gBAAgB,sBAAsB,UAAU,aAAW;EAmB3E;EAIA,UAAgB,GAAG,SAAS,QAAQ,OAAK,QAAQ"}
|
package/dist/index.js
CHANGED
|
@@ -1,152 +1,153 @@
|
|
|
1
|
-
import { tagForProperty } from
|
|
2
|
-
import { _backburner } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { tagForProperty } from "@ember/-internals/metal";
|
|
2
|
+
import { _backburner } from "@ember/runloop";
|
|
3
|
+
import { consumeTag, createCache, dirtyTag, getValue, track, updateTag } from "@glimmer/validator";
|
|
4
|
+
import { getGlobalConfig, importSync, macroCondition } from "@embroider/macros";
|
|
5
5
|
|
|
6
|
+
//#region src/index.ts
|
|
6
7
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
8
|
+
* # ~~@ember-data/tracking~~ <Badge type="warning" text="deprecated v5.5" />
|
|
9
|
+
*
|
|
10
|
+
* Using ***Warp*Drive** with EmberJS requires configuring it to use Ember's reactivity system.
|
|
11
|
+
*
|
|
12
|
+
* ::: warning
|
|
13
|
+
* The use of the package **@ember-data/tracking** is now deprecated. It
|
|
14
|
+
* historically provided the bindings into Ember's reactivity system.
|
|
15
|
+
*
|
|
16
|
+
* This package is no longer needed as the configuration is now
|
|
17
|
+
* provided by the package {@link @warp-drive/ember! | @warp-drive/ember}.
|
|
18
|
+
*
|
|
19
|
+
* :::
|
|
20
|
+
*
|
|
21
|
+
* To resolve this deprecation, follow these steps:
|
|
22
|
+
*
|
|
23
|
+
* ## 1. Remove @ember-data/tracking
|
|
24
|
+
*
|
|
25
|
+
* - Remove `@ember-data/tracking` from package.json (if using `ember-data` this may not be present)
|
|
26
|
+
* - Remove type imports for `@ember-data/tracking` from tsconfig.json
|
|
27
|
+
* - If using `untracked`, change to using `untrack` from `@glimmer/validator`
|
|
28
|
+
*
|
|
29
|
+
* ## 2. Add @warp-drive/ember
|
|
30
|
+
*
|
|
31
|
+
* - Add `@warp-drive/ember` to package.json - the version to install should match the version of `ember-data` or `@ember-data/store`
|
|
32
|
+
* - Do NOT add `@warp-drive/ember` to tsconfig.json - the types in this package install automatically, you can remove any entry for this if it is there
|
|
33
|
+
* - Add `import '@warp-drive/ember/install';` to the top of your `app.js` or `app.ts` file
|
|
34
|
+
*
|
|
35
|
+
* ## 3. Clear the deprecation
|
|
36
|
+
*
|
|
37
|
+
* Once the above steps are complete, the deprecation can be silenced and the automatic fallback
|
|
38
|
+
* registration of reactivity from `@ember-data/tracking` can be removed by updating your
|
|
39
|
+
* {@link @warp-drive/build-config! | WarpDrive Build Config} in your `ember-cli-build` file.
|
|
40
|
+
*
|
|
41
|
+
* ```js [ember-cli-build.js]
|
|
42
|
+
* 'use strict';
|
|
43
|
+
* const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
|
44
|
+
* const { compatBuild } = require('@embroider/compat');
|
|
45
|
+
*
|
|
46
|
+
* module.exports = async function (defaults) {
|
|
47
|
+
* const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]
|
|
48
|
+
* const { buildOnce } = await import('@embroider/vite');
|
|
49
|
+
* const app = new EmberApp(defaults, {});
|
|
50
|
+
*
|
|
51
|
+
* setConfig(app, __dirname, { // [!code focus:9]
|
|
52
|
+
* // this should be the most recent <major>.<minor> version for
|
|
53
|
+
* // which all deprecations have been fully resolved
|
|
54
|
+
* // and should be updated when that changes
|
|
55
|
+
* compatWith: '4.12'
|
|
56
|
+
* deprecations: {
|
|
57
|
+
* // ... list individual deprecations that have been resolved here
|
|
58
|
+
* DEPRECATE_TRACKING_PACKAGE: false // [!code highlight]
|
|
59
|
+
* }
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* return compatBuild(app, buildOnce);
|
|
63
|
+
* };
|
|
64
|
+
*```
|
|
65
|
+
*
|
|
66
|
+
* @deprecated in version 5.5.0
|
|
67
|
+
* @module
|
|
68
|
+
*/
|
|
68
69
|
const emberDirtyTag = dirtyTag;
|
|
69
|
-
|
|
70
70
|
/**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
71
|
+
* <Badge type="warning" text="deprecated" />
|
|
72
|
+
*
|
|
73
|
+
* Creates a signal configuration object for WarpDrive that integrates with Ember's
|
|
74
|
+
* reactivity system. This will be automatically imported and registered by
|
|
75
|
+
* `@ember-data/store` if the deprecation has not been resolved.
|
|
76
|
+
*
|
|
77
|
+
* This function should not be called directly in your application code
|
|
78
|
+
* and this package is deprecated entirely. Use {@link @warp-drive/ember! | @warp-drive/ember}
|
|
79
|
+
* instead.
|
|
80
|
+
*
|
|
81
|
+
* @deprecated
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
84
|
function buildSignalConfig(options) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
};
|
|
85
|
+
const ARRAY_SIGNAL = options.wellknown.Array;
|
|
86
|
+
return {
|
|
87
|
+
createSignal(obj, key) {
|
|
88
|
+
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {
|
|
89
|
+
if (key === ARRAY_SIGNAL) return [
|
|
90
|
+
tagForProperty(obj, key),
|
|
91
|
+
tagForProperty(obj, "length"),
|
|
92
|
+
tagForProperty(obj, "[]")
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
return tagForProperty(obj, key);
|
|
96
|
+
},
|
|
97
|
+
consumeSignal(signal) {
|
|
98
|
+
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {
|
|
99
|
+
if (Array.isArray(signal)) {
|
|
100
|
+
consumeTag(signal[0]);
|
|
101
|
+
consumeTag(signal[1]);
|
|
102
|
+
consumeTag(signal[2]);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
consumeTag(signal);
|
|
107
|
+
},
|
|
108
|
+
notifySignal(signal) {
|
|
109
|
+
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {
|
|
110
|
+
if (Array.isArray(signal)) {
|
|
111
|
+
emberDirtyTag(signal[0]);
|
|
112
|
+
emberDirtyTag(signal[1]);
|
|
113
|
+
emberDirtyTag(signal[2]);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
emberDirtyTag(signal);
|
|
118
|
+
},
|
|
119
|
+
createMemo: (object, key, fn) => {
|
|
120
|
+
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {
|
|
121
|
+
const propertyTag = tagForProperty(object, key);
|
|
122
|
+
const memo = createCache(fn);
|
|
123
|
+
let ret;
|
|
124
|
+
const wrappedFn = () => {
|
|
125
|
+
ret = getValue(memo);
|
|
126
|
+
};
|
|
127
|
+
return () => {
|
|
128
|
+
const tag = track(wrappedFn);
|
|
129
|
+
updateTag(propertyTag, tag);
|
|
130
|
+
consumeTag(tag);
|
|
131
|
+
return ret;
|
|
132
|
+
};
|
|
133
|
+
} else {
|
|
134
|
+
const memo = createCache(fn);
|
|
135
|
+
return () => getValue(memo);
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
willSyncFlushWatchers: () => {
|
|
139
|
+
return !!_backburner.currentInstance && _backburner._autorun !== true;
|
|
140
|
+
},
|
|
141
|
+
waitFor: async (promise) => {
|
|
142
|
+
if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {
|
|
143
|
+
const { waitForPromise } = importSync("@ember/test-waiters");
|
|
144
|
+
return waitForPromise(promise);
|
|
145
|
+
}
|
|
146
|
+
return promise;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
150
149
|
}
|
|
151
150
|
|
|
151
|
+
//#endregion
|
|
152
152
|
export { buildSignalConfig };
|
|
153
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["tagForProperty","_backburner","consumeTag","createCache","dirtyTag","getValue","track","updateTag","importSync","getGlobalConfig","macroCondition","emberDirtyTag","buildSignalConfig","options","ARRAY_SIGNAL","wellknown","Array","createSignal","obj","key","WarpDrive","deprecations","DEPRECATE_COMPUTED_CHAINS","consumeSignal","signal","isArray","notifySignal","createMemo","object","fn","propertyTag","memo","ret","wrappedFn","tag","willSyncFlushWatchers","currentInstance","_autorun","waitFor","promise","env","TESTING","waitForPromise"],"sources":["../src/index.ts"],"sourcesContent":["/**\n * # ~~@ember-data/tracking~~ <Badge type=\"warning\" text=\"deprecated v5.5\" />\n *\n * Using ***Warp*Drive** with EmberJS requires configuring it to use Ember's reactivity system.\n *\n * ::: warning\n * The use of the package **@ember-data/tracking** is now deprecated. It\n * historically provided the bindings into Ember's reactivity system.\n *\n * This package is no longer needed as the configuration is now\n * provided by the package {@link @warp-drive/ember! | @warp-drive/ember}.\n *\n * :::\n *\n * To resolve this deprecation, follow these steps:\n *\n * ## 1. Remove @ember-data/tracking\n *\n * - Remove `@ember-data/tracking` from package.json (if using `ember-data` this may not be present)\n * - Remove type imports for `@ember-data/tracking` from tsconfig.json\n * - If using `untracked`, change to using `untrack` from `@glimmer/validator`\n *\n * ## 2. Add @warp-drive/ember\n *\n * - Add `@warp-drive/ember` to package.json - the version to install should match the version of `ember-data` or `@ember-data/store`\n * - Do NOT add `@warp-drive/ember` to tsconfig.json - the types in this package install automatically, you can remove any entry for this if it is there\n * - Add `import '@warp-drive/ember/install';` to the top of your `app.js` or `app.ts` file\n *\n * ## 3. Clear the deprecation\n *\n * Once the above steps are complete, the deprecation can be silenced and the automatic fallback\n * registration of reactivity from `@ember-data/tracking` can be removed by updating your\n * {@link @warp-drive/build-config! | WarpDrive Build Config} in your `ember-cli-build` file.\n *\n * ```js [ember-cli-build.js]\n * 'use strict';\n * const EmberApp = require('ember-cli/lib/broccoli/ember-app');\n * const { compatBuild } = require('@embroider/compat');\n *\n * module.exports = async function (defaults) {\n * const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]\n * const { buildOnce } = await import('@embroider/vite');\n * const app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, { // [!code focus:9]\n * // this should be the most recent <major>.<minor> version for\n * // which all deprecations have been fully resolved\n * // and should be updated when that changes\n * compatWith: '4.12'\n * deprecations: {\n * // ... list individual deprecations that have been resolved here\n * DEPRECATE_TRACKING_PACKAGE: false // [!code highlight]\n * }\n * });\n *\n * return compatBuild(app, buildOnce);\n * };\n *```\n *\n * @deprecated in version 5.5.0\n * @module\n */\nimport { tagForProperty } from '@ember/-internals/metal';\nimport { _backburner } from '@ember/runloop';\nimport type { UpdatableTag } from '@glimmer/validator';\nimport { consumeTag, createCache, dirtyTag, getValue, track, updateTag } from '@glimmer/validator';\n\nimport { importSync } from '@embroider/macros';\n\nimport { DEPRECATE_COMPUTED_CHAINS } from '@warp-drive/core/build-config/deprecations';\nimport { TESTING } from '@warp-drive/core/build-config/env';\n\ntype Tag = ReturnType<typeof tagForProperty>;\nconst emberDirtyTag = dirtyTag as unknown as (tag: Tag) => void;\n\n/**\n * <Badge type=\"warning\" text=\"deprecated\" />\n *\n * Creates a signal configuration object for WarpDrive that integrates with Ember's\n * reactivity system. This will be automatically imported and registered by\n * `@ember-data/store` if the deprecation has not been resolved.\n *\n * This function should not be called directly in your application code\n * and this package is deprecated entirely. Use {@link @warp-drive/ember! | @warp-drive/ember}\n * instead.\n *\n * @deprecated\n * @public\n */\nexport function buildSignalConfig(options: {\n wellknown: {\n Array: symbol | string;\n };\n}) {\n const ARRAY_SIGNAL = options.wellknown.Array;\n\n return {\n createSignal(obj: object, key: string | symbol): Tag | [Tag, Tag, Tag] {\n if (DEPRECATE_COMPUTED_CHAINS) {\n if (key === ARRAY_SIGNAL) {\n return [tagForProperty(obj, key), tagForProperty(obj, 'length'), tagForProperty(obj, '[]')] as const;\n }\n }\n return tagForProperty(obj, key);\n },\n consumeSignal(signal: Tag | [Tag, Tag, Tag]): void {\n if (DEPRECATE_COMPUTED_CHAINS) {\n if (Array.isArray(signal)) {\n consumeTag(signal[0]);\n consumeTag(signal[1]);\n consumeTag(signal[2]);\n return;\n }\n }\n consumeTag(signal as Tag);\n },\n notifySignal(signal: Tag | [Tag, Tag, Tag]): void {\n if (DEPRECATE_COMPUTED_CHAINS) {\n if (Array.isArray(signal)) {\n emberDirtyTag(signal[0]);\n emberDirtyTag(signal[1]);\n emberDirtyTag(signal[2]);\n return;\n }\n }\n\n emberDirtyTag(signal as Tag);\n },\n createMemo: <F>(object: object, key: string | symbol, fn: () => F): (() => F) => {\n if (DEPRECATE_COMPUTED_CHAINS) {\n const propertyTag = tagForProperty(object, key);\n const memo = createCache(fn);\n let ret: F | undefined;\n const wrappedFn = () => {\n ret = getValue(memo);\n };\n return () => {\n const tag = track(wrappedFn);\n updateTag(propertyTag as UpdatableTag, tag);\n consumeTag(tag);\n return ret!;\n };\n } else {\n const memo = createCache(fn);\n return () => getValue(memo) as F;\n }\n },\n willSyncFlushWatchers: (): boolean => {\n //@ts-expect-error\n return !!_backburner.currentInstance && _backburner._autorun !== true;\n },\n waitFor: async <K>(promise: Promise<K>): Promise<K> => {\n if (TESTING) {\n const { waitForPromise } = importSync('@ember/test-waiters') as typeof import('@ember/test-waiters');\n return waitForPromise(promise);\n }\n return promise;\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,MAAMW,gBAAgBP;;;;;;;;;;;;;;;AAgBtB,SAAgBQ,kBAAkBC,SAI/B;CACD,MAAMC,eAAeD,QAAQE,UAAUC;CAEvC,OAAO;EACLC,aAAaC,KAAaC,KAA6C;GACrE,IAAAT,eAAAD,gBAAA,CAAA,CAAAW,UAAAC,aAAAC,yBAAA,GACE;QAAIH,QAAQL,cACV,OAAO;KAACd,eAAekB,KAAKC,GAAG;KAAGnB,eAAekB,KAAK,QAAQ;KAAGlB,eAAekB,KAAK,IAAI;IAAC;GAC5F;GAEF,OAAOlB,eAAekB,KAAKC,GAAG;EAChC;EACAI,cAAcC,QAAqC;GACjD,IAAAd,eAAAD,gBAAA,CAAA,CAAAW,UAAAC,aAAAC,yBAAA,GACE;QAAIN,MAAMS,QAAQD,MAAM,GAAG;KACzBtB,WAAWsB,OAAO,EAAE;KACpBtB,WAAWsB,OAAO,EAAE;KACpBtB,WAAWsB,OAAO,EAAE;KACpB;IACF;;GAEFtB,WAAWsB,MAAa;EAC1B;EACAE,aAAaF,QAAqC;GAChD,IAAAd,eAAAD,gBAAA,CAAA,CAAAW,UAAAC,aAAAC,yBAAA,GACE;QAAIN,MAAMS,QAAQD,MAAM,GAAG;KACzBb,cAAca,OAAO,EAAE;KACvBb,cAAca,OAAO,EAAE;KACvBb,cAAca,OAAO,EAAE;KACvB;IACF;;GAGFb,cAAca,MAAa;EAC7B;EACAG,aAAgBC,QAAgBT,KAAsBU,OAA2B;GAC/E,IAAAnB,eAAAD,gBAAA,CAAA,CAAAW,UAAAC,aAAAC,yBAAA,GAA+B;IAC7B,MAAMQ,cAAc9B,eAAe4B,QAAQT,GAAG;IAC9C,MAAMY,OAAO5B,YAAY0B,EAAE;IAC3B,IAAIG;IACJ,MAAMC,kBAAkB;KACtBD,MAAM3B,SAAS0B,IAAI;IACrB;IACA,aAAa;KACX,MAAMG,MAAM5B,MAAM2B,SAAS;KAC3B1B,UAAUuB,aAA6BI,GAAG;KAC1ChC,WAAWgC,GAAG;KACd,OAAOF;IACT;GACF,OAAO;IACL,MAAMD,OAAO5B,YAAY0B,EAAE;IAC3B,aAAaxB,SAAS0B,IAAI;GAC5B;EACF;EACAI,6BAAsC;GAEpC,OAAO,CAAC,CAAClC,YAAYmC,mBAAmBnC,YAAYoC,aAAa;EACnE;EACAC,SAAS,OAAUC,YAAoC;GACrD,IAAA7B,eAAAD,gBAAA,CAAA,CAAAW,UAAAoB,IAAAC,OAAA,GAAa;IACX,MAAM,EAAEC,mBAAmBlC,WAAW,qBAAqB;IAC3D,OAAOkC,eAAeH,OAAO;GAC/B;GACA,OAAOA;EACT;CACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-data/tracking",
|
|
3
3
|
"description": "DEPRECATED - Use @warp-drive/ember",
|
|
4
|
-
"version": "5.9.0-beta.
|
|
4
|
+
"version": "5.9.0-beta.3",
|
|
5
5
|
"deprecated": "Use @warp-drive/ember",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "MIT",
|
|
@@ -16,23 +16,20 @@
|
|
|
16
16
|
"keywords": [
|
|
17
17
|
"ember-addon"
|
|
18
18
|
],
|
|
19
|
-
"volta": {
|
|
20
|
-
"extends": "../../package.json"
|
|
21
|
-
},
|
|
22
19
|
"dependencies": {
|
|
23
20
|
"@embroider/macros": "^1.20.6",
|
|
24
|
-
"@warp-drive/core": "5.9.0-beta.
|
|
21
|
+
"@warp-drive/core": "5.9.0-beta.3"
|
|
25
22
|
},
|
|
26
23
|
"peerDependencies": {
|
|
27
24
|
"@ember/test-waiters": "^3.1.0 || ^4.0.0"
|
|
28
25
|
},
|
|
29
26
|
"files": [
|
|
30
|
-
"unstable-preview-types",
|
|
31
27
|
"addon-main.cjs",
|
|
32
28
|
"dist",
|
|
33
29
|
"README.md",
|
|
34
30
|
"LICENSE.md",
|
|
35
|
-
"logos"
|
|
31
|
+
"logos",
|
|
32
|
+
"unstable-preview-types"
|
|
36
33
|
],
|
|
37
34
|
"exports": {
|
|
38
35
|
".": {
|
|
@@ -45,23 +42,18 @@
|
|
|
45
42
|
"ember-addon": {
|
|
46
43
|
"main": "addon-main.cjs",
|
|
47
44
|
"type": "addon",
|
|
48
|
-
"version": 2
|
|
49
|
-
"externals": [
|
|
50
|
-
"@ember/-internals",
|
|
51
|
-
"@ember/-internals/metal",
|
|
52
|
-
"@glimmer/validator"
|
|
53
|
-
]
|
|
45
|
+
"version": 2
|
|
54
46
|
},
|
|
55
47
|
"devDependencies": {
|
|
56
|
-
"@babel/core": "^7.
|
|
57
|
-
"@babel/plugin-transform-typescript": "^7.
|
|
58
|
-
"@babel/preset-env": "^7.
|
|
59
|
-
"@babel/preset-typescript": "^7.
|
|
60
|
-
"@ember/test-waiters": "^4.1.
|
|
61
|
-
"@warp-drive/internal-config": "5.9.0-beta.
|
|
62
|
-
"ember-source": "~
|
|
63
|
-
"
|
|
64
|
-
"
|
|
48
|
+
"@babel/core": "^7.29.7",
|
|
49
|
+
"@babel/plugin-transform-typescript": "^7.29.7",
|
|
50
|
+
"@babel/preset-env": "^7.29.7",
|
|
51
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
52
|
+
"@ember/test-waiters": "^4.1.2",
|
|
53
|
+
"@warp-drive/internal-config": "5.9.0-beta.3",
|
|
54
|
+
"ember-source": "~7.2.0",
|
|
55
|
+
"tsdown": "^0.22.14",
|
|
56
|
+
"typescript-7": "npm:typescript@7.1.0-dev.20260828.1"
|
|
65
57
|
},
|
|
66
58
|
"ember": {
|
|
67
59
|
"edition": "octane"
|
|
@@ -74,9 +66,9 @@
|
|
|
74
66
|
}
|
|
75
67
|
},
|
|
76
68
|
"scripts": {
|
|
77
|
-
"
|
|
78
|
-
"build:pkg": "
|
|
69
|
+
"check:types": "node ./node_modules/typescript-7/bin/tsc --noEmit",
|
|
70
|
+
"build:pkg": "node node_modules/tsdown/dist/run.mjs",
|
|
79
71
|
"sync": "echo \"syncing\"",
|
|
80
|
-
"start": "
|
|
72
|
+
"start": "node node_modules/tsdown/dist/run.mjs --watch"
|
|
81
73
|
}
|
|
82
74
|
}
|
|
@@ -1,95 +1,35 @@
|
|
|
1
1
|
|
|
2
2
|
declare module '@ember-data/tracking' {
|
|
3
|
-
/**
|
|
4
|
-
* # ~~@ember-data/tracking~~ <Badge type="warning" text="deprecated v5.5" />
|
|
5
|
-
*
|
|
6
|
-
* Using ***Warp*Drive** with EmberJS requires configuring it to use Ember's reactivity system.
|
|
7
|
-
*
|
|
8
|
-
* ::: warning
|
|
9
|
-
* The use of the package **@ember-data/tracking** is now deprecated. It
|
|
10
|
-
* historically provided the bindings into Ember's reactivity system.
|
|
11
|
-
*
|
|
12
|
-
* This package is no longer needed as the configuration is now
|
|
13
|
-
* provided by the package {@link @warp-drive/ember! | @warp-drive/ember}.
|
|
14
|
-
*
|
|
15
|
-
* :::
|
|
16
|
-
*
|
|
17
|
-
* To resolve this deprecation, follow these steps:
|
|
18
|
-
*
|
|
19
|
-
* ## 1. Remove @ember-data/tracking
|
|
20
|
-
*
|
|
21
|
-
* - Remove `@ember-data/tracking` from package.json (if using `ember-data` this may not be present)
|
|
22
|
-
* - Remove type imports for `@ember-data/tracking` from tsconfig.json
|
|
23
|
-
* - If using `untracked`, change to using `untrack` from `@glimmer/validator`
|
|
24
|
-
*
|
|
25
|
-
* ## 2. Add @warp-drive/ember
|
|
26
|
-
*
|
|
27
|
-
* - Add `@warp-drive/ember` to package.json - the version to install should match the version of `ember-data` or `@ember-data/store`
|
|
28
|
-
* - Do NOT add `@warp-drive/ember` to tsconfig.json - the types in this package install automatically, you can remove any entry for this if it is there
|
|
29
|
-
* - Add `import '@warp-drive/ember/install';` to the top of your `app.js` or `app.ts` file
|
|
30
|
-
*
|
|
31
|
-
* ## 3. Clear the deprecation
|
|
32
|
-
*
|
|
33
|
-
* Once the above steps are complete, the deprecation can be silenced and the automatic fallback
|
|
34
|
-
* registration of reactivity from `@ember-data/tracking` can be removed by updating your
|
|
35
|
-
* {@link @warp-drive/build-config! | WarpDrive Build Config} in your `ember-cli-build` file.
|
|
36
|
-
*
|
|
37
|
-
* ```js [ember-cli-build.js]
|
|
38
|
-
* 'use strict';
|
|
39
|
-
* const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
|
40
|
-
* const { compatBuild } = require('@embroider/compat');
|
|
41
|
-
*
|
|
42
|
-
* module.exports = async function (defaults) {
|
|
43
|
-
* const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]
|
|
44
|
-
* const { buildOnce } = await import('@embroider/vite');
|
|
45
|
-
* const app = new EmberApp(defaults, {});
|
|
46
|
-
*
|
|
47
|
-
* setConfig(app, __dirname, { // [!code focus:9]
|
|
48
|
-
* // this should be the most recent <major>.<minor> version for
|
|
49
|
-
* // which all deprecations have been fully resolved
|
|
50
|
-
* // and should be updated when that changes
|
|
51
|
-
* compatWith: '4.12'
|
|
52
|
-
* deprecations: {
|
|
53
|
-
* // ... list individual deprecations that have been resolved here
|
|
54
|
-
* DEPRECATE_TRACKING_PACKAGE: false // [!code highlight]
|
|
55
|
-
* }
|
|
56
|
-
* });
|
|
57
|
-
*
|
|
58
|
-
* return compatBuild(app, buildOnce);
|
|
59
|
-
* };
|
|
60
|
-
*```
|
|
61
|
-
*
|
|
62
|
-
* @deprecated in version 5.5.0
|
|
63
|
-
* @module
|
|
64
|
-
*/
|
|
65
3
|
import { tagForProperty } from "@ember/-internals/metal";
|
|
4
|
+
//#region src/index.d.ts
|
|
66
5
|
type Tag = ReturnType<typeof tagForProperty>;
|
|
67
6
|
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
7
|
+
* <Badge type="warning" text="deprecated" />
|
|
8
|
+
*
|
|
9
|
+
* Creates a signal configuration object for WarpDrive that integrates with Ember's
|
|
10
|
+
* reactivity system. This will be automatically imported and registered by
|
|
11
|
+
* `@ember-data/store` if the deprecation has not been resolved.
|
|
12
|
+
*
|
|
13
|
+
* This function should not be called directly in your application code
|
|
14
|
+
* and this package is deprecated entirely. Use {@link @warp-drive/ember! | @warp-drive/ember}
|
|
15
|
+
* instead.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
function buildSignalConfig(options: {
|
|
21
|
+
wellknown: {
|
|
22
|
+
Array: symbol | string;
|
|
23
|
+
};
|
|
85
24
|
}): {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
25
|
+
createSignal(obj: object, key: string | symbol): Tag | [Tag, Tag, Tag];
|
|
26
|
+
consumeSignal(signal: Tag | [Tag, Tag, Tag]): void;
|
|
27
|
+
notifySignal(signal: Tag | [Tag, Tag, Tag]): void;
|
|
28
|
+
createMemo: <F>(object: object, key: string | symbol, fn: () => F) => (() => F);
|
|
29
|
+
willSyncFlushWatchers: () => boolean;
|
|
30
|
+
waitFor: <K>(promise: Promise<K>) => Promise<K>;
|
|
92
31
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { buildSignalConfig };
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|