From 059b9b8cc8251fe5a136f2f8c10ca9599fb5f7d1 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Wed, 8 Nov 2023 22:05:30 +0000 Subject: [PATCH 1/2] update @embroider/test-setup to fix CI --- .github/workflows/ci.yml | 4 ++-- package.json | 2 +- pnpm-lock.yaml | 19 +++++++++++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 399076b7..f5d08993 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,8 @@ jobs: - ember-release - ember-beta - ember-canary - # - embroider-safe - # - embroider-optimized + - embroider-safe + - embroider-optimized steps: - uses: actions/checkout@v4 diff --git a/package.json b/package.json index 3f46dafe..a3d48583 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "@ember/optional-features": "^2.0.0", "@ember/string": "^3.0.1", "@ember/test-helpers": "^2.9.3", - "@embroider/test-setup": "^2.1.1", + "@embroider/test-setup": "^3.0.2", "@fortawesome/ember-fontawesome": "^1.0.0", "@fortawesome/fontawesome-svg-core": "^6.5.1", "@fortawesome/free-brands-svg-icons": "^6.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 14886a57..e16c531b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,8 +32,8 @@ devDependencies: specifier: ^2.9.3 version: 2.9.4(ember-source@4.12.4) '@embroider/test-setup': - specifier: ^2.1.1 - version: 2.1.1 + specifier: ^3.0.2 + version: 3.0.3 '@fortawesome/ember-fontawesome': specifier: ^1.0.0 version: 1.0.3(webpack@5.90.3) @@ -1832,9 +1832,20 @@ packages: transitivePeerDependencies: - supports-color - /@embroider/test-setup@2.1.1: - resolution: {integrity: sha512-t81a2z2OEFAOZVbV7wkgiDuCyZ3ajD7J7J+keaTfNSRiXoQgeFFASEECYq1TCsH8m/R+xHMRiY59apF2FIeFhw==} + /@embroider/test-setup@3.0.3: + resolution: {integrity: sha512-3K5KSyTdnxAkZQill6+TdC/XTRr6226LNwZMsrhRbBM0FFZXw2D8qmJSHPvZLheQx3A1jnF9t1lyrAzrKlg6Yw==} engines: {node: 12.* || 14.* || >= 16} + peerDependencies: + '@embroider/compat': ^3.3.0 + '@embroider/core': ^3.4.0 + '@embroider/webpack': ^3.2.1 + peerDependenciesMeta: + '@embroider/compat': + optional: true + '@embroider/core': + optional: true + '@embroider/webpack': + optional: true dependencies: lodash: 4.17.21 resolve: 1.22.8 From f06525a57f299c10ef97272117a057e8ea862f96 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Thu, 9 Nov 2023 16:23:25 +0000 Subject: [PATCH 2/2] always use extend for Internal OptionsObject --- addon/-private/options.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/addon/-private/options.js b/addon/-private/options.js index dfa9a77c..3402a0ee 100644 --- a/addon/-private/options.js +++ b/addon/-private/options.js @@ -1,5 +1,4 @@ import EmberObject, { get } from '@ember/object'; -import { isDescriptor } from '../utils/utils'; const { keys } = Object; const OPTION_KEYS = '__option_keys__'; @@ -18,11 +17,7 @@ export default class Options { const optionKeys = keys(options); const createParams = { [OPTION_KEYS]: optionKeys, model, attribute }; - // If any of the options is a CP, we need to create a custom class for it - if (optionKeys.some((key) => isDescriptor(options[key]))) { - return OptionsObject.extend(options).create(createParams); - } - - return OptionsObject.create(createParams, options); + // we have to extend here in case anyone passes options that have computedProperties. + return OptionsObject.extend(options).create(createParams); } }