@ember-data/store 5.7.0-alpha.3 → 5.7.0-alpha.31
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/dist/index.js +30 -17
- package/package.json +13 -13
- package/unstable-preview-types/index.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { deprecate } from '@ember/debug';
|
|
2
2
|
import { macroCondition, getGlobalConfig, dependencySatisfies, importSync } from '@embroider/macros';
|
|
3
3
|
import { setupSignals } from '@warp-drive/core/configure';
|
|
4
|
+
import { peekTransient } from '@warp-drive/core/types/-private';
|
|
4
5
|
export { CacheHandler, Store as default, recordIdentifierFor, setIdentifierForgetMethod, setIdentifierGenerationMethod, setIdentifierResetMethod, setIdentifierUpdateMethod, setKeyInfoForResource, storeFor } from '@warp-drive/core';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -185,24 +186,36 @@ export { CacheHandler, Store as default, recordIdentifierFor, setIdentifierForge
|
|
|
185
186
|
*/
|
|
186
187
|
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_TRACKING_PACKAGE)) {
|
|
187
188
|
let hasEmberDataTracking = false;
|
|
189
|
+
let hasWarpDriveEmber = false;
|
|
190
|
+
let hasRegisteredFromEmberPackage = false;
|
|
191
|
+
if (macroCondition(dependencySatisfies('@warp-drive/ember', '*'))) {
|
|
192
|
+
hasWarpDriveEmber = true;
|
|
193
|
+
hasRegisteredFromEmberPackage = peekTransient('signalHooks') !== null;
|
|
194
|
+
}
|
|
188
195
|
if (macroCondition(dependencySatisfies('@ember-data/tracking', '*'))) {
|
|
189
196
|
hasEmberDataTracking = true;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
197
|
+
if (!hasRegisteredFromEmberPackage) {
|
|
198
|
+
// @ts-expect-error
|
|
199
|
+
const {
|
|
200
|
+
buildSignalConfig
|
|
201
|
+
} = importSync('@ember-data/tracking');
|
|
202
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
203
|
+
setupSignals(buildSignalConfig);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// we should probably still print here if @ember-data/tracking is present
|
|
208
|
+
if (!hasRegisteredFromEmberPackage) {
|
|
209
|
+
const message = [`Using WarpDrive with EmberJS requires configuring it to use Ember's reactivity system.`, `Previously this was provided by installing the package '@ember-data/tracking', but this package is now deprecated.`, ``, `To resolve this deprecation, follow these steps:`, hasEmberDataTracking ? `- remove "@ember-data/tracking" and (if needed) "@ember-data-types/tracking" from your project in both your package.json and tsconfig.json` : false, hasWarpDriveEmber ? false : `- add "@warp-drive/ember" to your project in your package.json (and run install)`, '- add the following import to your app.js file:', '', '\t```', `\timport '@warp-drive/ember/install';`, '\t```', ``, '- mark this deprecation as resolved in your project by adding the following to your WarpDrive config in ember-cli-build.js:', '', '\t```', '\tconst { setConfig } = await import("@warp-drive/build-config");', '\tsetConfig(app, __dirname, {', '\t deprecations: {', '\t DEPRECATE_TRACKING_PACKAGE: false,', '\t },', '\t});', '\t```', ``, `For more information, see the Package Unification RFC: https://rfcs.emberjs.com/id/1075-warp-drive-package-unification/`].filter(l => l !== false).join('\n');
|
|
210
|
+
deprecate(message, false, {
|
|
211
|
+
id: 'warp-drive.deprecate-tracking-package',
|
|
212
|
+
until: '6.0.0',
|
|
213
|
+
for: 'warp-drive',
|
|
214
|
+
since: {
|
|
215
|
+
enabled: '5.3.4',
|
|
216
|
+
available: '4.13'
|
|
217
|
+
},
|
|
218
|
+
url: 'https://deprecations.emberjs.com/id/warp-drive.deprecate-tracking-package'
|
|
219
|
+
});
|
|
196
220
|
}
|
|
197
|
-
const message = [`Using WarpDrive with EmberJS requires configuring it to use Ember's reactivity system.`, `Previously this was provided by installing the package '@ember-data/tracking', but this package is now deprecated.`, ``, `To resolve this deprecation, follow these steps:`, hasEmberDataTracking ? `- remove "@ember-data/tracking" and (if needed) "@ember-data-types/tracking" from your project in both your package.json and tsconfig.json` : false, `- add "@warp-drive/ember" to your project in both your package.json and tsconfig.json`, '- add the following import to your app.js file:', '', '\t```', `\timport '@warp-drive/ember/install';`, '\t```', ``, '- mark this deprecation as resolved in your project by adding the following to your WarpDrive config in ember-cli-build.js:', '', '\t```', '\tconst { setConfig } = await import("@warp-drive/build-config");', '\tsetConfig(app, __dirname, {', '\t deprecations: {', '\t DEPRECATE_TRACKING_PACKAGE: false,', '\t },', '\t});', '\t```', ``, `For more information, see the Package Unification RFC: https://rfcs.emberjs.com/id/1075-warp-drive-package-unification/`].filter(l => l !== false).join('\n');
|
|
198
|
-
deprecate(message, false, {
|
|
199
|
-
id: 'warp-drive.deprecate-tracking-package',
|
|
200
|
-
until: '6.0.0',
|
|
201
|
-
for: 'warp-drive',
|
|
202
|
-
since: {
|
|
203
|
-
enabled: '5.3.4',
|
|
204
|
-
available: '4.13'
|
|
205
|
-
},
|
|
206
|
-
url: 'https://deprecations.emberjs.com/id/warp-drive.deprecate-tracking-package'
|
|
207
|
-
});
|
|
208
221
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-data/store",
|
|
3
|
-
"version": "5.7.0-alpha.
|
|
3
|
+
"version": "5.7.0-alpha.31",
|
|
4
4
|
"description": "The core of EmberData. Provides the Store service which coordinates the cache with the network and presentation layers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@embroider/macros": "^1.
|
|
36
|
-
"@warp-drive/core": "5.7.0-alpha.
|
|
35
|
+
"@embroider/macros": "^1.18.1",
|
|
36
|
+
"@warp-drive/core": "5.7.0-alpha.31"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@ember-data/tracking": "5.7.0-alpha.
|
|
39
|
+
"@ember-data/tracking": "5.7.0-alpha.31",
|
|
40
40
|
"@ember/test-waiters": "^3.1.0 || ^4.0.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependenciesMeta": {
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@babel/core": "^7.
|
|
52
|
-
"@babel/plugin-transform-typescript": "^7.
|
|
53
|
-
"@babel/preset-env": "^7.
|
|
54
|
-
"@babel/preset-typescript": "^7.27.
|
|
55
|
-
"@warp-drive/internal-config": "5.7.0-alpha.
|
|
56
|
-
"@ember-data/tracking": "5.7.0-alpha.
|
|
51
|
+
"@babel/core": "^7.28.0",
|
|
52
|
+
"@babel/plugin-transform-typescript": "^7.28.0",
|
|
53
|
+
"@babel/preset-env": "^7.28.0",
|
|
54
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
55
|
+
"@warp-drive/internal-config": "5.7.0-alpha.31",
|
|
56
|
+
"@ember-data/tracking": "5.7.0-alpha.31",
|
|
57
57
|
"@ember/test-waiters": "^4.1.0",
|
|
58
|
-
"ember-source": "~6.
|
|
59
|
-
"typescript": "^5.
|
|
60
|
-
"vite": "^7.
|
|
58
|
+
"ember-source": "~6.6.0",
|
|
59
|
+
"typescript": "^5.9.2",
|
|
60
|
+
"vite": "^7.1.2"
|
|
61
61
|
},
|
|
62
62
|
"volta": {
|
|
63
63
|
"extends": "../../package.json"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
/// <reference path="./types.d.ts" />
|
|
1
2
|
/// <reference path="./configure.d.ts" />
|
|
2
3
|
/// <reference path="./-private.d.ts" />
|
|
3
|
-
/// <reference path="./types.d.ts" />
|
|
4
4
|
declare module '@ember-data/store' {
|
|
5
5
|
export { Store as default, type StoreRequestContext, CacheHandler, type Document, type CachePolicy, type StoreRequestInput, recordIdentifierFor, storeFor, type DocumentCacheOperation, type CacheOperation, type NotificationType, setIdentifierGenerationMethod, setIdentifierUpdateMethod, setIdentifierForgetMethod, setIdentifierResetMethod, setKeyInfoForResource } from "@warp-drive/core";
|
|
6
6
|
|