Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ember data v4.9 for embroider & package.json version #8402

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "root",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"private": true,
"repository": {
"type": "git",
Expand Down Expand Up @@ -168,4 +168,4 @@
"@embroider/[email protected]": "patches/@[email protected]"
}
}
}
}
2 changes: 1 addition & 1 deletion packages/-ember-data/addon/-private/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export { Snapshot } from '@ember-data/store/-private';
// `ember-data-model-fragments' and `ember-data-change-tracker` rely on `normalizeModelName`
export { RecordArrayManager, SnapshotRecordArray, normalizeModelName, coerceId } from '@ember-data/store/-private';
export { ManyArray, PromiseManyArray } from '@ember-data/model/-private';
export { RecordData } from '@ember-data/record-data/-private';
export { RecordData } from '@ember-data/record-data';

export const PromiseArray = ArrayProxy.extend(PromiseProxyMixin);
export const PromiseObject = ObjectProxy.extend(PromiseProxyMixin);
1 change: 1 addition & 0 deletions packages/-ember-data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = Object.assign({}, addonBaseConfig, {
'ember',
'@ember/application/namespace',
'@ember-data/record-data/-private',
'@ember-data/record-data',
'ember-data/version',
'@ember-data/store/-private',
'@ember-data/store',
Expand Down
18 changes: 9 additions & 9 deletions packages/-ember-data/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-data",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"description": "A data layer for your Ember applications.",
"repository": {
"type": "git",
Expand All @@ -17,14 +17,14 @@
"author": "",
"license": "MIT",
"dependencies": {
"@ember-data/adapter": "workspace:4.9.0-alpha.14",
"@ember-data/debug": "workspace:4.9.0-alpha.14",
"@ember-data/model": "workspace:4.9.0-alpha.14",
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.14",
"@ember-data/record-data": "workspace:4.9.0-alpha.14",
"@ember-data/serializer": "workspace:4.9.0-alpha.14",
"@ember-data/store": "workspace:4.9.0-alpha.14",
"@ember-data/tracking": "workspace:4.9.0-alpha.14",
"@ember-data/adapter": "workspace:4.9.1",
"@ember-data/debug": "workspace:4.9.1",
"@ember-data/model": "workspace:4.9.1",
"@ember-data/private-build-infra": "workspace:4.9.1",
"@ember-data/record-data": "workspace:4.9.1",
"@ember-data/serializer": "workspace:4.9.1",
"@ember-data/store": "workspace:4.9.1",
"@ember-data/tracking": "workspace:4.9.1",
"@ember/edition-utils": "^1.2.0",
"@ember/string": "^3.0.0",
"@embroider/macros": "^1.10.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ember-data/adapter",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"description": "Reference Adapter Implementations for use with @ember-data/store",
"keywords": [
"ember-addon"
Expand All @@ -15,7 +15,7 @@
"directories": {},
"scripts": {},
"peerDependencies": {
"@ember-data/store": "workspace:4.9.0-alpha.14",
"@ember-data/store": "workspace:4.9.1",
"@ember/string": "^3.0.0",
"ember-inflector": "^4.0.2"
},
Expand All @@ -25,7 +25,7 @@
}
},
"dependencies": {
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.14",
"@ember-data/private-build-infra": "workspace:4.9.1",
"@ember/edition-utils": "^1.2.0",
"@embroider/macros": "^1.10.0",
"ember-auto-import": "^2.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/canary-features/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ember-data/canary-features",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"description": "Canary features",
"keywords": [
"ember-addon"
Expand Down
4 changes: 2 additions & 2 deletions packages/debug/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ember-data/debug",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"description": "Provides developer ergonomics and dev-mode enhancements for apps built with ember-data",
"keywords": [
"ember-addon"
Expand All @@ -23,7 +23,7 @@
}
},
"dependencies": {
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.14",
"@ember-data/private-build-infra": "workspace:4.9.1",
"@ember/edition-utils": "^1.2.0",
"@embroider/macros": "^1.10.0",
"ember-auto-import": "^2.4.3",
Expand Down
12 changes: 6 additions & 6 deletions packages/model/addon/-private/legacy-relationships-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class LegacySupport {
}

const graphFor = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).graphFor;
const relationship = graphFor(this.store).get(this.identifier, key);
assert(`Expected ${key} to be a belongs-to relationship`, isBelongsTo(relationship));
Expand All @@ -131,7 +131,7 @@ export class LegacySupport {

const store = this.store;
const graphFor = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).graphFor;
const relationship = graphFor(store).get(this.identifier, key);
assert(`Expected ${key} to be a belongs-to relationship`, isBelongsTo(relationship));
Expand Down Expand Up @@ -215,7 +215,7 @@ export class LegacySupport {
let manyArray: RelatedCollection | undefined = this._manyArrayCache[key];
if (!definition) {
const graphFor = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).graphFor;
definition = graphFor(this.store).get(this.identifier, key).definition;
}
Expand Down Expand Up @@ -284,7 +284,7 @@ export class LegacySupport {
return loadingPromise;
}
const graphFor = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).graphFor;
const relationship = graphFor(this.store).get(this.identifier, key) as ManyRelationship;
const { definition, state } = relationship;
Expand All @@ -306,7 +306,7 @@ export class LegacySupport {
getHasMany(key: string, options?: FindOptions): PromiseManyArray | RelatedCollection {
if (HAS_RECORD_DATA_PACKAGE) {
const graphFor = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).graphFor;
const relationship = graphFor(this.store).get(this.identifier, key) as ManyRelationship;
const { definition, state } = relationship;
Expand Down Expand Up @@ -384,7 +384,7 @@ export class LegacySupport {
assert(`snapshot.belongsTo only supported for @ember-data/record-data`);
}
const graphFor = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).graphFor;
const graph = graphFor(this.store);
const relationship = graph.get(this.identifier, name);
Expand Down
12 changes: 6 additions & 6 deletions packages/model/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ember-data/model",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"description": "A presentation layer for apps built with @ember-data/store",
"keywords": [
"ember-addon"
Expand All @@ -15,9 +15,9 @@
"directories": {},
"scripts": {},
"peerDependencies": {
"@ember-data/record-data": "workspace:4.9.0-alpha.14",
"@ember-data/store": "workspace:4.9.0-alpha.14",
"@ember-data/tracking": "workspace:4.9.0-alpha.14",
"@ember-data/record-data": "workspace:4.9.1",
"@ember-data/store": "workspace:4.9.1",
"@ember-data/tracking": "workspace:4.9.1",
"@ember/string": "^3.0.0",
"ember-inflector": "^4.0.2"
},
Expand All @@ -35,8 +35,8 @@
}
},
"dependencies": {
"@ember-data/canary-features": "workspace:4.9.0-alpha.14",
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.14",
"@ember-data/canary-features": "workspace:4.9.1",
"@ember-data/private-build-infra": "workspace:4.9.1",
"@ember/edition-utils": "^1.2.0",
"@embroider/macros": "^1.10.0",
"ember-auto-import": "^2.4.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/private-build-infra/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ember-data/private-build-infra",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"description": "The default blueprint for ember-data private packages.",
"keywords": [
"ember-addon"
Expand All @@ -23,7 +23,7 @@
"@babel/core": "^7.20.2",
"@babel/plugin-transform-block-scoping": "^7.20.2",
"@babel/runtime": "^7.20.1",
"@ember-data/canary-features": "workspace:4.9.0-alpha.14",
"@ember-data/canary-features": "workspace:4.9.1",
"@ember/edition-utils": "^1.2.0",
"@embroider/macros": "^1.10.0",
"babel-import-util": "^1.3.0",
Expand Down
Empty file.
5 changes: 5 additions & 0 deletions packages/record-data/addon/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
@module @ember-data/record-data
*/

export { RecordData, graphFor, peekGraph } from './-private';
8 changes: 4 additions & 4 deletions packages/record-data/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ember-data/record-data",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"description": "Provides the default resource cache (RecordData) implementation for ember-data",
"keywords": [
"ember-addon"
Expand All @@ -13,7 +13,7 @@
"license": "MIT",
"author": "",
"peerDependencies": {
"@ember-data/store": "workspace:4.9.0-alpha.14"
"@ember-data/store": "workspace:4.9.1"
},
"dependenciesMeta": {
"@ember-data/canary-features": {
Expand All @@ -24,8 +24,8 @@
}
},
"dependencies": {
"@ember-data/canary-features": "workspace:4.9.0-alpha.14",
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.14",
"@ember-data/canary-features": "workspace:4.9.1",
"@ember-data/private-build-infra": "workspace:4.9.1",
"@ember/edition-utils": "^1.2.0",
"@embroider/macros": "^1.10.0",
"ember-auto-import": "^2.4.3",
Expand Down
10 changes: 6 additions & 4 deletions packages/request/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ember-data/request",
"description": "⚡️ A simple, small and fast framework-agnostic library to make `fetch` happen",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"private": true,
"license": "MIT",
"author": "Chris Thoburn <[email protected]>",
Expand All @@ -15,7 +15,9 @@
"engines": {
"node": "14.* || 16.* || >= 18"
},
"keywords": ["ember-addon"],
"keywords": [
"ember-addon"
],
"volta": {
"extends": "../../package.json"
},
Expand Down Expand Up @@ -50,7 +52,7 @@
"@babel/preset-typescript": "^7.18.6",
"@babel/preset-env": "^7.20.2",
"@babel/runtime": "^7.20.1",
"@rollup/plugin-babel":"^6.0.3",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-node-resolve": "^15.0.1",
"tslib": "^2.4.0",
"walk-sync": "^3.0.0",
Expand All @@ -59,4 +61,4 @@
"ember": {
"edition": "octane"
}
}
}
6 changes: 3 additions & 3 deletions packages/serializer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ember-data/serializer",
"version": "4.9.0-alpha.14",
"version": "4.9.1",
"description": "Provides reference Serializer implementations for use with @ember-data/store",
"keywords": [
"ember-addon"
Expand All @@ -15,7 +15,7 @@
"directories": {},
"scripts": {},
"peerDependencies": {
"@ember-data/store": "workspace:4.9.0-alpha.14",
"@ember-data/store": "workspace:4.9.1",
"@ember/string": "^3.0.0",
"ember-inflector": "^4.0.2"
},
Expand All @@ -25,7 +25,7 @@
}
},
"dependencies": {
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.14",
"@ember-data/private-build-infra": "workspace:4.9.1",
"@embroider/macros": "^1.10.0",
"ember-auto-import": "^2.4.3",
"ember-cli-babel": "^7.26.11",
Expand Down
4 changes: 2 additions & 2 deletions packages/store/addon/-private/caches/instance-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let _peekGraph: peekGraph;
if (HAS_RECORD_DATA_PACKAGE) {
let __peekGraph: peekGraph;
_peekGraph = (wrapper: Store | StoreWrapper): Graph | undefined => {
let a = (importSync('@ember-data/record-data/-private') as { peekGraph: peekGraph }).peekGraph;
let a = (importSync('@ember-data/record-data') as { peekGraph: peekGraph }).peekGraph;
__peekGraph = __peekGraph || a;
return __peekGraph(wrapper);
};
Expand Down Expand Up @@ -210,7 +210,7 @@ export class InstanceCache {
TODO @runspired consider adding this to make polymorphism even nicer
if (HAS_RECORD_DATA_PACKAGE) {
if (identifier.type !== matchedIdentifier.type) {
const graphFor = importSync('@ember-data/record-data/-private').graphFor;
const graphFor = importSync('@ember-data/record-data').graphFor;
graphFor(this).registerPolymorphicType(identifier.type, matchedIdentifier.type);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/store/addon/-private/network/fetch-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export default class FetchManager {
let isReleasable = true;
if (!recordData && HAS_RECORD_DATA_PACKAGE) {
const graphFor = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).graphFor;
const graph = graphFor(store);
isReleasable = graph.isReleasable(identifier);
Expand Down
4 changes: 2 additions & 2 deletions packages/store/addon/-private/network/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export default class Snapshot implements Snapshot {
}

const graphFor = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).graphFor;
const { identifier } = this;
const relationship = graphFor(this._store).get(identifier, keyName) as BelongsToRelationship;
Expand Down Expand Up @@ -423,7 +423,7 @@ export default class Snapshot implements Snapshot {
}

const graphFor = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).graphFor;
const { identifier } = this;
const relationship = graphFor(this._store).get(identifier, keyName) as ManyRelationship;
Expand Down
8 changes: 4 additions & 4 deletions packages/store/addon/-private/store-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
DEPRECATE_STORE_FIND,
DEPRECATE_V1CACHE_STORE_APIS,
} from '@ember-data/private-build-infra/deprecations';
import type { RecordData as RecordDataClass } from '@ember-data/record-data/-private';
import type { RecordData as RecordDataClass } from '@ember-data/record-data';
import type { DSModel } from '@ember-data/types/q/ds-model';
import type {
CollectionResourceDocument,
Expand Down Expand Up @@ -1918,7 +1918,7 @@ class Store extends Service {
// during unload
if (HAS_RECORD_DATA_PACKAGE) {
const peekGraph = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).peekGraph;
let graph = peekGraph(this);
if (graph) {
Expand Down Expand Up @@ -2401,7 +2401,7 @@ class Store extends Service {
// node ./scripts/packages-for-commit.js && pnpm test-external:ember-observer
if (_RecordData === undefined) {
_RecordData = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).RecordData;
}

Expand Down Expand Up @@ -2621,7 +2621,7 @@ class Store extends Service {

if (HAS_RECORD_DATA_PACKAGE) {
const peekGraph = (
importSync('@ember-data/record-data/-private') as typeof import('@ember-data/record-data/-private')
importSync('@ember-data/record-data') as typeof import('@ember-data/record-data')
).peekGraph;
let graph = peekGraph(this);
if (graph) {
Expand Down
Loading