Open muuvmuuv opened 7 months ago
Do you know what's the minimal requirement for Angular/TS here @muuvmuuv ? Trying to figure out if we can release such a change in a minor version without breaking everyone.
I already tried to but its hard to say. We would need tests for that to check against lower semver ranges. But since it no longer works on my end between these and the previous version I would say this is the range.
Would it make sense to grab that here after v18 release since TS version is now high enough?
Absolutely, I'd say if anything it must be part of v18 release (since as part of breaking changes we can require minimal TS version). Do you think you'd have time to make a PR with this change into v18 PR?
Yeah ofc. But I don't think I can write tests for that, Jest is kinda picky with mixed import syntax so it wont be ez.. maybe a custom test suite in shell-script with tsc?
Just something I discovered developing in angular-builders is that "@lerna-lite/run" is missing in order to do something like: yarn lerna run --scope @angular-builders/common test
OR how do you execute scripts inside a package?
maybe a custom test suite in shell-script with tsc? Yeah, e2e test are probably the way to go. We already have custom shell scripts for e2e tests, for example this one for custom-webpack builder or this one for the Jest builder.
I think that the existing e2e tests for builders will implicitly cover the change (coz they depend on @angular-builders/common
and use loadModule
) but feel free to add more and/or add a proprietary ci shell script for common
.
how do you execute scripts inside a package
We use yarn workspaces foreach
for multiple packages or yarn workspace
for a single package (like here). In most cases this should be enough.
Ok, this requires way more work, it does work in my szenario because my repo has type=module and other stuff set to newer settings, but it does not in here because a lot still requires cjs syntaxes. I guess every example and package must first be updated to be esm only or something like that but idk if that even works with Angular. I tried setting stuff to type=module but that comes with another error "Unknown file extension ".ts" and so on ^^
Just to make it clear: is it a bug or an enhancement? We have examples with both csj
and esm
which are working for custom-webpack
and custom-esbuild
builders.
I remember that it was indeed a bug when I initially opened the issue but it seem to be disappeared at some point. Maybe TS had an update fixing it. Might check that out when v18 is out and look in detail.
Describe the Bug
Angular with latest TypeScript semver range supports direct import.
Must be changed to:
Minimal Reproduction
Note: Our policy is that issues reported without a reproduction will be closed immediately and then reopened once a reproduction has been provided. Please respect the developers of this project by doing this. We give of our personal time to work on this project and would rather be spending our time fixing or enhancing the library than chasing down badly described or unreproducible issues. Please delete this note once you have read it.
Expected Behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Additional Context
Add any other context about the problem here.