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

V8 Planned Changes #222

Closed
bmish opened this issue Nov 29, 2021 · 16 comments
Closed

V8 Planned Changes #222

bmish opened this issue Nov 29, 2021 · 16 comments
Labels

Comments

@bmish
Copy link
Collaborator

bmish commented Nov 29, 2021

Starting a list of my desired breaking changes, feedback welcome. Likely this release won't happen until 2022-05 or 2022-06 when we can drop Node 12/17 support, unless we come up with additional breaking changes we want to release sooner.

Changes for future major versions:

For reference, V7 was release 2021-10 (CHANGELOG, discussion in #175).

@sukima
Copy link

sukima commented Feb 7, 2022

I would like to propose that the default require-expect rule be changed from except-simple to never-except-zero.

the use of expect was originally a legacy issue and has since been superseded with better patters like assert.async() and Promises. It would be helpful that teams who prefer the expect pattern can opt-in instead of continuing to recommend a pattern that is no longer needed and mostly redundant.

@bmish
Copy link
Collaborator Author

bmish commented Feb 7, 2022

I agree that we shouldn't unnecessarily require expect everywhere. I also use the never-except-zero setting for require-expect in my projects.

@jacobq
Copy link

jacobq commented May 18, 2022

QUnit's docs for expect say:

It is recommended to test asynchronous code with assert.step() or assert.async() instead.

so I appreciate the move to "Change require-expect rule default to never-except-zero"
but I have a question about that. Do async tests still need to tell QUnit when they're done or does returning a promise (/ using an async function) do this automatically?

  // this is getting flagged by `require-expect` (technically correct but missing the point, I think)
  test('it does some async things just fine', async function (assert) {
    const done = assert.async(); // <== do I still need to do this? seems to work without it
    // ... do the testing ...
    done();
  })

In my case, the test is reading in a CSV file and performing an assert.strictEquals on every field, so there a zillions of them (and it seems silly/brittle to try to count them). Does it not make sense to have a default/recommended rule that doesn't seem to match QUnit's own recommendation or am I missing something?

@platinumazure
Copy link
Owner

@jacobq If you return a promise or use an async function, QUnit will wait for that promise to be resolved. So you shouldn't need to use assert.async in that case.

@jacobq
Copy link

jacobq commented May 19, 2022

@jacobq If you return a promise or use an async function, QUnit will wait for that promise to be resolved. So you shouldn't need to use assert.async in that case.

Thanks, that's sort-of what I thought (hadn't had to use async/done for a while), but I got confused about why the rule was telling me I needed expect. I've turned it off in my config now and am glad the default is getting changed.

@platinumazure
Copy link
Owner

@bmish This is becoming relatively urgent for us as GitHub Actions CI are now failing: https://github.com/platinumazure/eslint-plugin-qunit/actions/runs/5391205279/jobs/9787683963

Researched the issue and found this: https://stackoverflow.com/a/76255847

I think dependabot upgraded our lockfile to version 3 and that has broken our CI on npm 12 and 14. 12 is way past EOL and 14 recently hit EOL. So I think it's time to cut a major release here.

Is your list of proposed breaking changes still reasonably accurate? Do you have anything you want to add?

@bmish
Copy link
Collaborator Author

bmish commented Jun 27, 2023

@platinumazure I agree it's a good time for a release. I just opened up PRs for the 3 breaking changes I would like to get included. If you want to review and approve those, then one of us can conduct the major release now (I'm happy to if that helps).

@platinumazure
Copy link
Owner

@bmish Thanks! Only other thing I want to do is upgrade the other dependencies (which I started doing locally on top of my own Node version breaking change but I will take yours and rebase). I'll merge your 3 PRs, finish my changes, then push my own PR-- after that we can do the major release. Sound good?

Thanks for your help!

@bmish
Copy link
Collaborator Author

bmish commented Jun 27, 2023

Sounds good, please go ahead and merge my PRs and do all your dependency upgrades.

@platinumazure
Copy link
Owner

@bmish I've created #376 and #377 and requested your review on each. If you have no concerns, I think we could release after they are merged.

@bmish
Copy link
Collaborator Author

bmish commented Jun 27, 2023

@platinumazure approved. Feel free to conduct the major release. If you'd like me to do it, I'm happy to.

@platinumazure
Copy link
Owner

@bmish Thanks! I've merged everything that is ready to merge.

I'm having trouble with the release. I followed the instructions in RELEASE.md but it generated a patch bump rather than a major bump. When you have time, could you take a look and see if we need to change any configuration for release-it? Thanks!

@bmish
Copy link
Collaborator Author

bmish commented Jun 27, 2023

@platinumazure I opened #380 which should improve the automatic version numbers and the quality of the changelog generated.

@platinumazure
Copy link
Owner

@bmish I've cut a release and it looks good to me. Mind checking on your end? If all looks good, feel free to close the issue or leave a comment. Thanks for your help today!

@bmish
Copy link
Collaborator Author

bmish commented Jun 28, 2023

@platinumazure
Copy link
Owner

Thanks again @bmish for all your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants