Skip to content

Use useRecommendedStore and drop @warp-drive/legacy - #338

Open
NullVoxPopuli-ai-agent wants to merge 1 commit into
ember-cli:mainfrom
NullVoxPopuli-ai-agent:nvp/warp-drive-polaris-store
Open

NullVoxPopuli-ai-agent wants to merge 1 commit into
ember-cli:mainfrom
NullVoxPopuli-ai-agent:nvp/warp-drive-polaris-store

Conversation

@NullVoxPopuli-ai-agent

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

New apps now get their store from useRecommendedStore in @warp-drive/core, so records use PolarisMode. The blueprint no longer installs @warp-drive/legacy.

import { useRecommendedStore } from '@warp-drive/core';
import { JSONAPICache } from '@warp-drive/json-api';

const Store = useRecommendedStore({
  cache: JSONAPICache,
  handlers: [],
  schemas: [],
});

Why now: with ember-source main, a new app that sets RAISE_ON_DEPRECATION: true fails at boot. The blueprint store imports @warp-drive/legacy, and its Errors class uses mapBy and not from @ember/object/computed at module scope. main deprecates those macros. The super-rentals tutorial hits this in chapter 1. warp-drive-data/warp-drive#11540 (merged) fixes those macros, but new apps must not depend on the legacy package.

The warpdrive-js and warpdrive-ts fixtures now use useRecommendedStore and withDefaults from @warp-drive/core/reactive.

Tests: CI=true pnpm vitest run tests/warpdrive.test.mjs tests/tests.test.mjs passes, 11 of 11. This covers app tests, lint and glint for JS and TS.

PolarisMode tutorial PRs

Merge in this order:

  1. Build the tutorial against ember-source main ember-learn/super-rentals-tutorial#294: builds the tutorial against ember-source main.
  2. [BUGFIX beta] LinkTo: do not read unknown properties from models emberjs/ember.js#21771: fixes <LinkTo @model={{record}}> with PolarisMode records.
  3. Use useRecommendedStore and drop @warp-drive/legacy #338 (this PR): new apps use useRecommendedStore without @warp-drive/legacy.
  4. Teach WarpDrive schemas in PolarisMode in chapter 11 ember-learn/super-rentals-tutorial#296: chapter 11 teaches WarpDrive schemas in PolarisMode.

Related:

🤖 Generated with Claude Code

New apps get a store from `useRecommendedStore` in `@warp-drive/core`,
so records use PolarisMode. The blueprint no longer installs
`@warp-drive/legacy`.

On ember-source main, importing `@warp-drive/legacy` fails in apps that
raise on deprecations, because its Errors class uses deprecated
computed macros at module scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants