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
Can we drop builtin AMD support? #1729
Comments
I don't think of QUnit as a library one is meant to bundle. Most test runners afaik share that sentiment, in that test runner generally act on your behalf to run your tests, and your tests import your application code (possibly built/compiled), and the test framework is either imported by your test files (which would not be compiled or built) or ahead of time by the test runner itself. In the case of AMD, there's usually a top-level file for the app and for the test, where I worry that requiring them to have a separate build just for QUnit would lower dev experience, and potentially decrease confidence in the test result as it means they would no longer integrate with their main build (or have a separate build that contains only QUnit, hence why we added upstream support at some point). The projects I'm aware of that use QUnit and AMD, would, I suspect not benefit from this change. Do you agree? I am open to dropping native support, but perhaps not for the same reasons as you. For example, if it becomes a burden to support we could instead recommend that projects build their own It looks like for ESM we'll need a separate distribution indeed since it's hard to import CJS directly in ESM, and transform services seem to currenlty misunderstand our exports (per #1724), so providing our own one would make that work directly, possibly even without needig to enumerate each export by name (we have quite a few). For AMD, it seems like it'd be trivial to continue support in the non-ESM ("CJS") distribution with these three lines of code as-is. |
Given that this works: https://jsbin.com/fipayiy/edit?html,output,
If folks are still using AMD without a tool to build AMD for them, then I think a wrapper script / build would be fine.
yeah, I am ok with this.
this happens in tool-less situations (local browser) as well. transform services are irrelevant.
yeah, and if we need to bundle an IIFE format, AMD is IIFE + the 3 lines easy peasy. |
so, I think the main thing I'd like to do organizationally is move the repo to a monorepo so we can have a setup like:
as far as I know, only pnpm supports this type of monorepo where the top level is also a publishable package. thoughts? |
* Remove AMD export. * Remove eslint globals entry. Closes #1729.
@Krinkle is there a discord or some other chat platform where we'd be able to talk more synchronously about planning the future of the repo? |
@NullVoxPopuli Yes, we have a Matrix room at https://app.gitter.im/#/room/#qunitjs_qunit:gitter.im (webchat), or via other clients: https://matrix.to/#/#qunitjs_qunit:gitter.im |
AMD is an implementation detail of a bundler, and it feels goofy to have built in.
all tools these days know how to work with The Platform, so I think this could be a good opportunity to have less to maintain.
The text was updated successfully, but these errors were encountered: