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

Updated dependencies and ember-try scenarios #408

Merged
merged 15 commits into from
Dec 2, 2024

Conversation

ijlee2
Copy link
Collaborator

@ijlee2 ijlee2 commented Nov 27, 2024

Background

While investigating blockers for introducing Embroider, I realized that files in the addon folder (w/ version 4.1.4) show older Ember syntax and folder layout. This means, projects that depend on ember-modal-dialog will be unable to update their ember-source to 6.0.0.

I'd like to introduce 1-2 patch pull requests, to help these projects more independently introduce Embroider, introduce Ember v6, and migrate away from ember-modal-dialog. To do so, we need CI for the master branch to pass again.

What changed?

  • Updated dependencies to the latest, whenever possible.
  • Updated v1 addon setup to match closely the more recent setup from Ember CLI.
  • Replaced ember-prism with ember-shiki and downgraded liquid-* packages, so that tests will run without build or runtime errors (without these changes, we can see these errors when we run the dummy app locally and attempt to open a modal).
  • Updated ember-try scenarios to test ember-lts-3.28, ember-lts-4.12, ember-lts-5.12, Ember 6.x, and embroider-safe.

Note

ember-lts-3.24 has to be skipped because ember-shiki uses named blocks.

ember-release, ember-beta, and ember-canary (all point to 6.x) are failing because the addon has deprecated syntax ({{action}} helper) and classic component layout. Let's mark the failures as passing for now, since they should be fixed in the follow-up patch PRs.

Tip

I recommend checking the commits one-by-one using the Commits tab. You can select Hide whitespace to see fewer changes.

@ijlee2 ijlee2 force-pushed the update-dependencies branch from 21e7c06 to 4c314da Compare November 27, 2024 15:24
Comment on lines +8 to +9
-import { service } from '@ember/service';
+import { inject as service } from '@ember/service';
Copy link
Collaborator Author

@ijlee2 ijlee2 Nov 27, 2024

Choose a reason for hiding this comment

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

I patched ember-shiki because the syntax import { service } from '@ember/service' doesn't work in ember-lts-3.28.

@@ -21,7 +21,7 @@ module('Acceptance: modal-dialog | animatable', function (hooks) {
test('basic modal', async function (assert) {
assert.dom(modalRootElementSelector).exists({ count: 1 });
assert.isAbsent(overlaySelector);
assert.dom('#example-basic button').exists({ count: 1 });
assert.dom('#example-basic button').exists({ count: 2 });
Copy link
Collaborator Author

@ijlee2 ijlee2 Nov 27, 2024

Choose a reason for hiding this comment

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

The number of button's changed to 2 because ember-shiki has a copy button. To change the number back to 1, consider using data-test-* selectors instead of IDs and class names.

- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized
# - embroider-optimized
Copy link
Collaborator Author

@ijlee2 ijlee2 Nov 27, 2024

Choose a reason for hiding this comment

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

I saw that ember-modal-dialog passes embroider-safe. It's unlikely that it'll ever pass embroider-optimized due to liquid-* packages.

@lukemelia
Copy link
Contributor

Thanks for tackling this @ijlee2. Once you get to your goal of green on CI, I'm happy to merge.

@ijlee2
Copy link
Collaborator Author

ijlee2 commented Nov 27, 2024

@lukemelia Thanks. Earlier, I ran lint, test, and test:ember-compatibility locally, and they all passed. I see now that CI for this pull request failed due to a permission issue:

Please make sure you have the correct access rights
and the repository exists.

pnpm: Command failed with exit code 128: /usr/bin/git clone [email protected]:rwwagner90/perf-primitives.git /home/runner/.local/share/pnpm/store/v3/tmp/_tmp_1782_a3d77804b6ff0bdc785b16c3[22](https://github.com/yapplabs/ember-modal-dialog/actions/runs/12053373763/job/33610243999?pr=408#step:6:23)b4bd85
Cloning into '/home/runner/.local/share/pnpm/store/v3/tmp/_tmp_1782_a3d77804b6ff0bdc785b16c322b4bd85'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Is this something that you could help look into?

I see now. The error is due to my using liquid-wormhole from pzuraq's branch. I'll look into possible alternatives tomorrow.

@ijlee2 ijlee2 marked this pull request as draft November 27, 2024 16:05
@ijlee2 ijlee2 force-pushed the update-dependencies branch from 4c314da to 9e57388 Compare November 28, 2024 06:53
Comment on lines +139 to +142
"pnpm": {
"overrides": {
"perf-primitives": "0.0.6"
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The error that I posted in #408 (comment) occurred because liquid-wormhole@8cfb67b declared a forked commit of perf-primitives as its dependency.

While it may be possible to configure this repo's GitHub Actions to allow installing dependencies from forks, for simplicity, I think it may be better to force the original perf-primitives to be installed.

It's worth noting that, because tests for the animatable route pass only with unofficial versions of liquid-tether and liquid-wormhole, a passing CI doesn't necessarily mean that this addon will work on a consuming project with liquid-* packages.

@ijlee2 ijlee2 marked this pull request as ready for review November 28, 2024 07:01
@ijlee2
Copy link
Collaborator Author

ijlee2 commented Nov 28, 2024

@lukemelia Could you try running CI again? I'm not sure if it'll pass this time, because a couple of dev-dependencies (liquid-tether and liquid-wormhole) still refer to external repos.

@lukemelia
Copy link
Contributor

@ijlee2 Good to merge from your POV?

@ijlee2
Copy link
Collaborator Author

ijlee2 commented Dec 2, 2024

Good to merge from your POV?

I think so. On Friday, I noticed that, in contrast to what can be currently seen in the deployed site, the animations for some modals in the tethered-animatable route don't work. I couldn't find the right combinations of versions to install to get the animations to work and to get tests to run and pass.

Since these modals in tethered-animatable can still be opened/closed and the addon is now in maintenance mode, I think it's okay to merge this pull request so that we can focus on getting the CI green and removing deprecated syntax.

@ijlee2 ijlee2 merged commit 6a62491 into yapplabs:master Dec 2, 2024
9 checks passed
@ijlee2 ijlee2 deleted the update-dependencies branch December 2, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants