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 store.createRecordDataFor for embroider #8403

Closed
wants to merge 2 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
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/json-api/-private',
'@ember-data/json-api',
'ember-data/version',
'@ember-data/store/-private',
'@ember-data/store',
Expand Down
Empty file added packages/json-api/src/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions packages/json-api/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
@module @ember-data/json-api
*/

export { Cache } from './-private';
4 changes: 2 additions & 2 deletions packages/store/src/-private/store-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { DEBUG } from '@glimmer/env';
import { importSync } from '@embroider/macros';
import { reject, resolve } from 'rsvp';

import type { Cache as CacheClass } from '@ember-data/json-api/-private';
import type { Cache as CacheClass } from '@ember-data/json-api';
import type DSModelClass from '@ember-data/model';
import { HAS_GRAPH_PACKAGE, HAS_JSON_API_PACKAGE, HAS_MODEL_PACKAGE } from '@ember-data/private-build-infra';
import { LOG_PAYLOADS } from '@ember-data/private-build-infra/debugging';
Expand Down Expand Up @@ -2416,7 +2416,7 @@ class Store {
// it can be reproduced in partner tests by running
// node ./scripts/packages-for-commit.js && pnpm test-external:ember-observer
if (_Cache === undefined) {
_Cache = (importSync('@ember-data/json-api/-private') as typeof import('@ember-data/json-api/-private')).Cache;
_Cache = (importSync('@ember-data/json-api') as typeof import('@ember-data/json-api')).Cache;
}

if (DEPRECATE_V1CACHE_STORE_APIS) {
Expand Down
2 changes: 1 addition & 1 deletion tests/adapter-encapsulation/app/services/store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Cache } from '@ember-data/json-api/-private';
import { Cache } from '@ember-data/json-api';
import Store from '@ember-data/store';

export default class DefaultStore extends Store {
Expand Down
2 changes: 1 addition & 1 deletion tests/embroider-basic-compat/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = function (defaults) {
package: '@ember-data/store',
addonModules: {
'-private.js': {
dependsOnModules: ['@ember-data/json-api/-private'],
dependsOnModules: ['@ember-data/json-api'],
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion tests/serializer-encapsulation/app/services/store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Cache } from '@ember-data/json-api/-private';
import { Cache } from '@ember-data/json-api';
import Store from '@ember-data/store';

export default class DefaultStore extends Store {
Expand Down