Skip to content

DRAFT: backport blueprints from release branch I just merged #10444

Open
Baltazore wants to merge 7 commits intomainfrom
release
Open

DRAFT: backport blueprints from release branch I just merged #10444
Baltazore wants to merge 7 commits intomainfrom
release

Conversation

@Baltazore
Copy link
Copy Markdown
Contributor

If this PR updates API docs, preview them by:

  • install bun (if needed)
  • install volta and configure it for pnpm (if needed)
  • run pnpm install in the root (if needed)
  • run pnpm preview in the root

  • Read the full contributing documentation
  • If you do not have permission to add labels or run the test-suite in CI, a team member will do this for you.

runspired and others added 4 commits October 20, 2025 15:27
* update embroider/addon-shim everywher
* add model and model-test blueprints to legacy
runspired and others added 3 commits January 12, 2026 11:13
* remove all `import Ember from 'ember'` to unblock Ember 7.0

Replace the barrel `ember` import in two locations:

- `extensions.ts`: Replace `Ember[method](this, ...args)` dispatch with
  specific imports from `@ember/object` and `@ember/object/observers`.
  Implement `decrementProperty`, `incrementProperty`, and `toggleProperty`
  inline using `get`/`set` since they are EmberObject instance methods
  without standalone function equivalents. Throw for `cacheFor` which has
  been removed with no replacement.

- `core.ts`: Remove `Ember.libraries.registerCoreLibrary()` call entirely
  as `Ember.libraries` is deprecated with no replacement (RFC 1003).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* trigger CI

* match upstream Ember implementations for incrementProperty/decrementProperty

Use `|| 0` fallback for undefined/non-numeric properties, and
`parseFloat()` in incrementProperty, matching the behavior in
ember.js/packages/@ember/object/observable.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* add parseFloat to decrementProperty for consistency with incrementProperty

Both methods now coerce string values to numbers via parseFloat,
matching the upstream Ember behavior for string increment-properties.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* copy upstream Ember implementations of incrementProperty/decrementProperty exactly

Include assert() validation and parseFloat coercion matching
ember.js/packages/@ember/object/observable.ts verbatim.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

---------

Co-authored-by: NullVoxPopuli <[email protected]>
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings April 13, 2026 17:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR backports blueprint-related changes from a release branch and aligns the monorepo with a 5.8.1 release, including removing remaining ember package usage and updating dependencies/lockfile.

Changes:

  • Bump many package/test app versions from *-alpha.42 to stable 5.8.1 (and related 0.x package version updates).
  • Backport Ember Data model and model-test blueprints into @warp-drive/legacy and ensure they’re published.
  • Remove import Ember from 'ember' usage and update Vite externals; bump @embroider/addon-shim to ^1.10.2 (plus lockfile updates).

Reviewed changes

Copilot reviewed 72 out of 73 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
warp-drive-packages/vue/package.json Version bump to 5.8.1.
warp-drive-packages/utilities/package.json Version bump to 5.8.1.
warp-drive-packages/tc39-proposal-signals/package.json Version bump to 5.8.1.
warp-drive-packages/svelte/package.json Version bump to 5.8.1.
warp-drive-packages/react/package.json Version bump to 5.8.1.
warp-drive-packages/legacy/vite.config.mjs Remove ember external; add @ember/object/observers external.
warp-drive-packages/legacy/src/compat/extensions.ts Replace Ember.* delegation with direct Ember module imports.
warp-drive-packages/legacy/package.json Version bump; include blueprints in published files; add blueprint runtime deps.
warp-drive-packages/legacy/blueprints/model/native-files/root/path/name.js Add Octane/native model blueprint template.
warp-drive-packages/legacy/blueprints/model/index.js Add model generator blueprint implementation.
warp-drive-packages/legacy/blueprints/model/files/root/path/name.js Add classic model blueprint template.
warp-drive-packages/legacy/blueprints/model/HELP.md Add blueprint usage/help docs.
warp-drive-packages/legacy/blueprints/model-test/qunit-files/root/path/test.js Add model unit test blueprint template.
warp-drive-packages/legacy/blueprints/model-test/index.js Add model-test generator blueprint implementation.
warp-drive-packages/json-api/package.json Version bump to 5.8.1.
warp-drive-packages/experiments/package.json Version bump to 0.2.7.
warp-drive-packages/ember/package.json Version bump to 5.8.1.
warp-drive-packages/core/package.json Version bump to 5.8.1.
warp-drive-packages/build-config/package.json Version bump; bump @embroider/addon-shim to ^1.10.2; dependency ordering tweaks.
tools/release/package.json Version bump to 5.8.1.
tools/internal-tooling/package.json Version bump to 5.8.1.
tools/internal-config/package.json Version bump to 5.8.1.
tests/warp-drive__schema/package.json Version bump to 5.8.1.
tests/vite-basic-compat/package.json Version bump to 0.4.1.
tests/utilities/package.json Version bump; bump @embroider/addon-shim to ^1.10.2.
tests/performance/package.json Version bump to 5.8.1.
tests/legacy/package.json Version changed to 5.7.1.
tests/json-api/package.json Version bump; bump @embroider/addon-shim to ^1.10.2.
tests/framework-vue/package.json Version bump to 5.8.1.
tests/framework-svelte/package.json Version bump to 5.8.1.
tests/framework-react/package.json Version bump to 5.8.1.
tests/framework-ember/package.json Version bump to 5.8.1.
tests/fastboot/package.json Version bump to 5.8.1.
tests/experiments/package.json Version bump to 5.8.1.
tests/example-app-ember/package.json Version bump to 5.8.1.
tests/ember-data__request/package.json Version bump; bump @embroider/addon-shim to ^1.10.2.
tests/ember-data__model/package.json Version bump; bump @embroider/addon-shim to ^1.10.2.
tests/ember-data__graph/package.json Version bump; bump @embroider/addon-shim to ^1.10.2.
tests/ember-data__adapter/package.json Version bump; bump @embroider/addon-shim to ^1.10.2.
tests/dont-write-new-tests-here/package.json Version bump to 5.8.1.
tests/core/package.json Version bump to 5.8.1.
tests/codemods/package.json Version bump to 5.8.1.
tests/blueprints/package.json Version bump to 5.8.1.
pnpm-lock.yaml Lockfile updates for version bumps and dependency upgrades (notably @embroider/addon-shim, volar services, etc.).
packages/unpublished-test-infra/package.json Version bump to 5.8.1.
packages/unpublished-eslint-rules/package.json Version bump to 5.8.1.
packages/tracking/package.json Version bump to 5.8.1.
packages/store/package.json Version bump to 5.8.1.
packages/serializer/package.json Version bump to 5.8.1.
packages/schema/package.json Version bump to 0.0.4.
packages/schema-record/package.json Version bump to 5.8.1.
packages/rest/package.json Version bump to 5.8.1.
packages/request/package.json Version bump to 5.8.1.
packages/request-utils/package.json Version bump to 5.8.1.
packages/model/package.json Version bump to 5.8.1.
packages/legacy-compat/package.json Version bump to 5.8.1.
packages/json-api/package.json Version bump to 5.8.1.
packages/holodeck/package.json Version bump to 0.0.4.
packages/graph/package.json Version bump to 5.8.1.
packages/eslint-plugin-warp-drive/package.json Version bump to 5.8.1.
packages/diagnostic/package.json Version bump to 0.0.4.
packages/debug/package.json Version bump to 5.8.1.
packages/core-types/package.json Version bump to 5.8.1.
packages/codemods/package.json Version bump to 5.8.1.
packages/adapter/package.json Version bump to 5.8.1.
packages/active-record/package.json Version bump to 5.8.1.
packages/-warp-drive/package.json Version bump to 0.1.4.
packages/-ember-data/vite.config.mjs Remove ember external.
packages/-ember-data/src/-private/core.ts Remove ember import and Ember.libraries registration.
packages/-ember-data/package.json Version bump to 5.8.1.
package.json Root version bump to 5.8.1.
docs-viewer/package.json Version bump to 5.8.1.
CHANGELOG.md Add v5.8.1 changelog header.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +49 to +56
case 'incrementProperty': {
const keyName = args[0] as string;
const increment = (args[1] as number) ?? 1;
assert(
'Must pass a numeric value to incrementProperty',
!isNaN(parseFloat(String(increment))) && isFinite(increment)
);
return set(this, keyName, (parseFloat(get(this, keyName) as string) || 0) + increment);
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incrementProperty can produce incorrect results if callers pass a numeric string (the assert allows it): (number) + increment will concatenate when increment is a string. Coerce increment to a number (e.g., Number(increment) / parseFloat(String(increment))) and use that numeric value for the addition (and ideally for the set value as well).

Copilot uses AI. Check for mistakes.
{
"name": "@warp-drive/legacy-tests",
"version": "5.8.0-alpha.42",
"version": "5.7.1",
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package version is set to 5.7.1 while the rest of the repo (including other test apps) is being bumped to 5.8.1. This looks like an accidental downgrade and will make versioning inconsistent across the monorepo; align it with the intended release version.

Copilot uses AI. Check for mistakes.
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.

5 participants