-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
ember-try scenarios failed after installing @ember/test-helpers@4.0.2 #1489
Comments
Do you have multiple copies of |
Related issue, but I filed it separately so this ticket can focus on the setResolver bug: #1490 |
Do your tests happen to run against embroider optimized? |
I'm encountering this error with ember-intl in my project when i upgrade to v4 ember test helpers. |
I believe we're waiting on: #1486 |
Hi, @NullVoxPopuli .
I already use Output❯ pnpm why @ember/test-helpers -r
Legend: production dependency, optional only, dev only
docs-app-for-ember-intl@1.3.12 /ember-intl/docs/ember-intl
devDependencies:
@ember/test-helpers 4.0.2
ember-cli-addon-docs 7.0.1
├─┬ ember-data 5.3.8 peer
│ └── @ember/test-helpers 4.0.2 peer
└─┬ ember-keyboard 8.2.1
└── @ember/test-helpers 4.0.2 peer
ember-data 5.3.8
└── @ember/test-helpers 4.0.2 peer
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
my-app@1.0.11 /ember-intl/docs/my-app
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
my-app-with-fallbacks@1.0.3 /ember-intl/docs/my-app-with-fallbacks
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
my-app-with-lazy-loaded-translations@1.1.0 /ember-intl/docs/my-app-with-lazy-loaded-translations
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
my-app-with-namespace-from-folders@1.0.8 /ember-intl/docs/my-app-with-namespace-from-folders
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
my-classic-app@1.1.7 /ember-intl/docs/my-classic-app
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
my-classic-app-with-lazy-loaded-translations@1.0.0 /ember-intl/docs/my-classic-app-with-lazy-loaded-translations
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
my-v1-addon@1.0.10 /ember-intl/docs/my-v1-addon
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
my-v1-engine@1.0.8 /ember-intl/docs/my-v1-engine
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
my-v2-addon@1.0.11 /ember-intl/docs/my-v2-addon
devDependencies:
@ember/test-helpers 4.0.2
ember-intl@7.0.5 /ember-intl/packages/ember-intl
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
test-app-for-ember-intl@1.3.18 /ember-intl/tests/ember-intl
devDependencies:
@ember/test-helpers 4.0.2
ember-qunit 8.1.0
└── @ember/test-helpers 4.0.2 peer
In the aforementioned CI run, the following had failed:
( I tried downgrading |
@ijlee2 embroider fix is published... maybe your issue is now resolved |
@mkszepp Thanks for letting me know. I'm still getting issues after updating https://github.com/ember-intl/ember-intl/actions/runs/10662230469 |
@ijlee2 yes i haven seen the same issue in ember-power-select... I have tested today using strict v4.0.0 (instead of 4.0.2) see In this case my issue for ember v3.28 is still present, but for 4.4... it was solved... It looks like the adding |
You'll want to upgrade your
test-helpers does not support TS < 5 -- which versions are you using?
test-helpers v3.2.1 can still be used Related -- I find that when I'm in a bit of a dependency snaffu, I'll try out pnpm's slower
which better isolates dependencies from the different packages in your repo. Additionally, with wide-peer-support in libraries comes some fun problems -- we often need to use injected dependencies to get peers resolving correctly (ie: not resolving dev deps). |
@NullVoxPopuli What fixed the I'm not sure yet if we should be encouraging people to use an opt-in feature in Anyway, I can close this issue now. I appreciate your help. ✨ |
I can across the same error message, when migrating our huge monorepo from yarn -> pnpm:
I'm posting the solution here, as this is the first result, when googling for the error message. The reason for the error is, that two (or more) copies of The solution requires one copy of
I still needed to get rid of one copy for + '@ember/test-helpers@4.0.4(@babel/core@7.25.7)(@glint/template@1.4.0)(ember-source@5.12.0(@glimmer/component@1.1.2(@babel/core@7.25.7))(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.95.0(@swc/core@1.7.35)))':
- '@ember/test-helpers@4.0.4(@babel/core@7.25.7)(@glint/template@1.4.0)(ember-source@5.12.0(@glimmer/component@1.1.2(@babel/core@7.25.7))(@glint/template@1.4.0)(rsvp@4.8.5))':
dependencies:
'@ember/test-waiters': 3.1.0(@babel/core@7.25.7)
'@embroider/addon-shim': 1.8.9
'@embroider/macros': 1.16.9(@babel/core@7.25.7)(@glint/template@1.4.0)
'@simple-dom/interface': 1.4.0
decorator-transforms: 2.2.2(@babel/core@7.25.7)
dom-element-descriptors: 0.5.1
+ ember-source: 5.12.0(@glimmer/component@1.1.2(@babel/core@7.25.7))(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.95.0(@swc/core@1.7.35))
- ember-source: 5.12.0(@glimmer/component@1.1.2(@babel/core@7.25.7))(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.95.0)
transitivePeerDependencies:
- '@babel/core'
- '@glint/template'
- supports-color I used diffchecker to help me copy these snippets over to see the difference between the instances. you might notice the addition of I traced this down, - terser-webpack-plugin@5.3.10(webpack@5.95.0):
+ terser-webpack-plugin@5.3.10(@swc/core@1.7.35)(webpack@5.95.0(@swc/core@1.7.35)):
dependencies:
'@jridgewell/trace-mapping': 0.3.25
jest-worker: 27.5.1
schema-utils: 3.3.0
serialize-javascript: 6.0.2
terser: 5.34.1
webpack: 5.95.0(@swc/core@1.7.35)
+ optionalDependencies:
+ '@swc/core': 1.7.35 Apparently this has to do with how pnpm resolves and dedupes peers. In one package, there is a // .pnpmfile.cjs
module.exports = {
hooks: {
readPackage: (pkg) => {
if (pkg.name === "terser-webpack-plugin") {
delete pkg.peerDependenciesMeta["@swc/core"];
}
return pkg;
}
}
}; I'm removing the optional peer dependency for I must say, this is quite counter-intuitive solution. I've seen some improvement for handling optional deps in pnpm (as per my research). If you come across this, there may already be another solution provided by pnpm itself. However, if not, I hope this is helpful 😊 |
As reported in ember-intl/ember-intl#1916, when a consumer of
ember-intl
tried to update@ember/test-helpers
tov4
, they encountered the error message,The reason is,
ember-intl
(a v1 addon) hadn't declared@ember/test-helpers
as a (peer) dependency. I can verify this assumption in ember-intl/ember-intl#1918, but the fix can't be released because severalember-try
scenarios forember-intl
failed with another error (CI run):Could you tell me what the error message wants me to do? Is this perhaps a bug in
@ember/test-helpers@4.0.2
?The text was updated successfully, but these errors were encountered: