From 6138141a351b7f11314dd2131c741a616c916185 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:39:42 -0500 Subject: [PATCH] A runtime test failed, that's unexpected --- packages/-warp-drive/package.json | 4 ++-- scripts/test-package-manager.mjs | 2 +- tests/vite-basic-compat/ember-cli-build.js | 12 +++++++++++- tests/vite-basic-compat/package.json | 4 ++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/packages/-warp-drive/package.json b/packages/-warp-drive/package.json index bc1150ce628..385cf2ec589 100644 --- a/packages/-warp-drive/package.json +++ b/packages/-warp-drive/package.json @@ -52,7 +52,7 @@ "dependencies": { "@embroider/macros": "^1.16.6", "@manypkg/get-packages": "^2.2.2", - "@warp-drive/build-config": "workspace:0.0.0-alpha.59", + "@warp-drive/build-config": "0.0.0-alpha.59", "semver": "^7.6.3", "debug": "^4.3.7", "chalk": "^5.3.0", @@ -62,7 +62,7 @@ "@babel/core": "^7.24.5", "@babel/plugin-transform-typescript": "^7.24.5", "@babel/preset-typescript": "^7.24.1", - "@warp-drive/internal-config": "workspace:5.4.0-alpha.122", + "@warp-drive/internal-config": "5.4.0-alpha.122", "pnpm-sync-dependencies-meta-injected": "0.0.14", "typescript": "^5.4.5", "vite": "^5.2.11" diff --git a/scripts/test-package-manager.mjs b/scripts/test-package-manager.mjs index 3a149019687..a656276bfd7 100644 --- a/scripts/test-package-manager.mjs +++ b/scripts/test-package-manager.mjs @@ -15,7 +15,7 @@ const CWD = process.cwd(); * We don't test types for these packages * (they also don't end up in the browser) */ -const IGNORED_PACKAGES = new Set(['@ember-data/codemods', 'eslint-plugin-warp-drive']); +const IGNORED_PACKAGES = new Set(['@ember-data/codemods', 'eslint-plugin-warp-drive', 'warp-drive']); const PROJECT_TO_USE = join(import.meta.dirname, '../tests/vite-basic-compat'); diff --git a/tests/vite-basic-compat/ember-cli-build.js b/tests/vite-basic-compat/ember-cli-build.js index ebb76e53a57..0ae3693febd 100644 --- a/tests/vite-basic-compat/ember-cli-build.js +++ b/tests/vite-basic-compat/ember-cli-build.js @@ -3,8 +3,18 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); const { maybeEmbroider } = require('@embroider/test-setup'); -module.exports = function (defaults) { +module.exports = async function (defaults) { + const { setConfig } = await import('@warp-drive/build-config'); + let app = new EmberApp(defaults, {}); + /** + * TODO: find another way to set this config, + * because the most modern of apps will not have a compat build + */ + setConfig(app, __dirname, { + compatWith: process.env.EMBER_DATA_FULL_COMPAT ? '99.0' : null, + }); + return maybeEmbroider(app); }; diff --git a/tests/vite-basic-compat/package.json b/tests/vite-basic-compat/package.json index ae873acfbf4..3d0e3df5195 100644 --- a/tests/vite-basic-compat/package.json +++ b/tests/vite-basic-compat/package.json @@ -50,6 +50,9 @@ "@ember-data/json-api": { "injected": true }, + "@ember-data/rest": { + "injected": true + }, "@ember-data/request-utils": { "injected": true }, @@ -81,6 +84,7 @@ "@ember-data/json-api": "workspace:5.4.0-alpha.122", "@ember-data/legacy-compat": "workspace:5.4.0-alpha.122", "@ember-data/model": "workspace:5.4.0-alpha.122", + "@ember-data/rest": "workspace:5.4.0-alpha.122", "@ember-data/request": "workspace:5.4.0-alpha.122", "@ember-data/request-utils": "workspace:5.4.0-alpha.122", "@ember-data/serializer": "workspace:5.4.0-alpha.122",