Skip to content
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

dependencySatisfies only reliable with a peerDep #58

Merged
merged 2 commits into from
Jan 13, 2022
Merged

dependencySatisfies only reliable with a peerDep #58

merged 2 commits into from
Jan 13, 2022

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Jan 13, 2022

This addon uses dependencySatisfies to check the ember-source version. But unless you have a peerDep on ember-source, that was unreliable depending on Yarn/NPM optimization behaviors. And now as of embroider-build/embroider#1070 we're making dependencySatisfies strict so that it won't accidentally work sometimes when you don't actually declare a dependency or peerDependency.

This addon uses `dependencySatisfies` to check the ember-source version. But unless you have a peerDep on ember-source, that was unreliable depending on Yarn/NPM optimization behaviors. And now as of embroider-build/embroider#1070 we're making `dependencySatisfies` strict so that it won't accidentally work sometimes when you don't actually declare a dependency or peerDependency.
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli left a comment

Choose a reason for hiding this comment

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

💯
I totally meant to PR this myself and forgot 😅

thank you!!!

@SergeAstapov
Copy link
Contributor

💯needed change!

@ef4 do you think build failure is related?

ERROR Summary:
122

123
  - broccoliBuilderErrorStack: TypeError: Cannot read property 'version' of undefined
124
    at CompatAppAdapter.makeAdjustImportOptions (/home/runner/work/ember-render-modifiers/ember-render-modifiers/node_modules/@embroider/compat/src/compat-app.js:286:80)
125
    at CompatAppAdapter.adjustImportsOptions (/home/runner/work/ember-render-modifiers/ember-render-modifiers/node_modules/@embroider/compat/src/compat-app.js:275:21)
126
    at CompatAppAdapter.<anonymous> (/home/runner/work/ember-render-modifiers/ember-render-modifiers/node_modules/typescript-memoize/dist/memoize-decorator.js:132:52)
127
    at AppBuilder.get resolvableExtensionsPattern (/home/runner/work/ember-render-modifiers/ember-render-modifiers/node_modules/@embroider/core/src/app.js:150:66)

@ef4
Copy link
Contributor Author

ef4 commented Jan 13, 2022

Probably not caused by this PR, but legitimate problems caused by recent embroider releases. I will look into it.

@ef4
Copy link
Contributor Author

ef4 commented Jan 13, 2022

I think this failure was hitting a bug that is already fixed in newer embroider releases:

embroider-build/embroider@8261003

Going to update @embroider/test-setup so it's testing against that fix.

@ef4
Copy link
Contributor Author

ef4 commented Jan 13, 2022

This is ready to go. I would add that because this addon is very trusting with its semver range of @embroider/macros, this is somewhat urgent to release because people will get embroider-build/embroider#1070 automatically and break.

@ef4
Copy link
Contributor Author

ef4 commented Jan 13, 2022

I see I already have bits to release, so I will release.

@ef4 ef4 merged commit eb8e29f into master Jan 13, 2022
@ef4 ef4 deleted the ef4-patch-1 branch January 13, 2022 19:27
@ef4 ef4 added the bug Something isn't working label Jan 13, 2022
Windvis added a commit to ember-polyfills/ember-router-service-refresh-polyfill that referenced this pull request Jan 19, 2022
This ensures that dependencySatisfies can detect the version correctly.

More information: emberjs/ember-render-modifiers#58
Windvis added a commit to ember-polyfills/ember-router-service-refresh-polyfill that referenced this pull request Jan 19, 2022
This ensures that dependencySatisfies can detect the version correctly.

More information: emberjs/ember-render-modifiers#58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants