karma icon indicating copy to clipboard operation
karma copied to clipboard

ESM Config File Support

Open npetruzzelli opened this issue 3 years ago • 10 comments

#3677

  • Description to be updated
  • Tests to be updated

npetruzzelli avatar May 30 '21 00:05 npetruzzelli

:white_check_mark: Build karma 2987 completed (commit https://github.com/karma-runner/karma/commit/251ec7ab15 by @npetruzzelli)

AppVeyorBot avatar May 30 '21 00:05 AppVeyorBot

:white_check_mark: Build karma 590 completed (commit https://github.com/karma-runner/karma/commit/251ec7ab15 by @npetruzzelli)

karmarunnerbot avatar May 30 '21 00:05 karmarunnerbot

:white_check_mark: Build karma 589 completed (commit https://github.com/karma-runner/karma/commit/251ec7ab15 by @npetruzzelli)

karmarunnerbot avatar May 30 '21 00:05 karmarunnerbot

@devoto13 - Does Karma currently need to support any versions of node that doesn't support import()? (versions 11 and below).

npetruzzelli avatar May 30 '21 00:05 npetruzzelli

Yes, Karma still supports Node 10, but it will be dropped in the next major release as Node 10 has reached the end of life in April. I would suggest to let this PR hang for a bit longer, until we start a branch for the next major release, so we need less cleanup to do.

devoto13 avatar Jun 02 '21 16:06 devoto13

Sounds like a good plan to me.

npetruzzelli avatar Jun 05 '21 13:06 npetruzzelli

Might I ask about when, will this go into master? 😂


In case, someone search issue and come here like me, here's my quick workaround using require hook.

https://github.com/karma-runner/karma/issues/3677#issuecomment-984527542

loynoir avatar Dec 02 '21 11:12 loynoir

At the very least I would have to merge in the latest master branch to bring this current. I think this repo also had a period of downtime when continuous integration was being updated. ( I wasn't able to follow that too closely).

Realistically, this isn't going to be the PR that gets merged, for a few reasons:

  1. Karma 6.x MUST support Node.js version 10
    • to change this is a breaking change, which requires a new major version (Karma 7.x)
    • a Node feature required to support this did not appear until Node 11.x
  2. Karma 7.x is expected to rewrite significant chunks of config code (deprecating/dropping support for some things to make the code more maintainable)
    • as a result, how import() is supported may change a bit as well

@devoto13 - is there a milestone / issue tag / some kind of tracker that lists what needs to be done before a pre-release branch for Karma 7.x is made available for contributions? I might have some time this month/next month to make a contribution

npetruzzelli avatar Dec 14 '21 12:12 npetruzzelli

@npetruzzelli CI is fixed now. I think it's mainly some maintainers' time to implement/review/test/land breaking changes, so we don't end up being stuck in pre-release mode for a long time and probably @jginsburgn's approval to start working on the next major 😄

There is https://github.com/karma-runner/karma/issues/3503 tracking breaking changes I would like to make (not necessarily all of them) + some of the open PRs.

It is pretty hot time at work now, so I'm not sure when I'll have some time to look into it.

Note that it's possible to install karma from GitHub as well. So if you rebase this PR, people can install it using similar approach as https://github.com/karma-runner/karma/pull/3726#issuecomment-968708216.

devoto13 avatar Dec 14 '21 12:12 devoto13

Got it, if I have a chance, I will at least try to update this branch. Thank you.

In the mean time, @loynoir may be interested in: https://github.com/karma-runner/karma/issues/3677#issuecomment-996972105

It requires 1 extra file, but you won't need any additional command line arguments when running node. Use what works best for you.

npetruzzelli avatar Dec 17 '21 19:12 npetruzzelli