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

feat: rewrite of ngx-sub-form without inheritance #188

Merged
merged 82 commits into from
Nov 21, 2021
Merged

Conversation

maxime1992
Copy link
Contributor

No description provided.

package.json Outdated Show resolved Hide resolved
maxime1992 and others added 13 commits October 23, 2020 15:32
This is a major architecture change which is brought without any breaking change 😄!

We've split up the code base in 2: Old one and new one.
The old one hasn't moved at all but is now deprecated (not removed yet!).
You can keep using the old one for a bit and have a smooth/incremental update to use the new API.

Few changes that you have to note with the new API:
- Only works with Angular 9 or more
- The app needs to have Ivy activated (this is because we use `ɵmarkDirty` internally. If it ever gets removed we'll probably have to ask to provide the `ChangeDetectorRef` but we were able to around this for now!)
- We got rid of inheritance 🙌
- Form errors on a FormArray are now an object instead of an array. Previously the array contained null values on all the fields without any error. It's now an object containing only the ones with errors and you can access them using the index

Please start upgrading to the new API as soon as possible as we stop supporting the old API as of today and will remove it in a near release.

This closes #171 for the major architectural changes and also the following issues as a result:
- closes #82
- closes #86
- closes #93
- closes #133
- closes #143
- closes #144
- closes #149
- closes #160
- closes #168
…orm and ngx-sub-form/new to avoid making a breaking change
…we can import only from that one when migrating
This feature was available before and got forgotten in the new one
…mponent which are not bind to their input will never be able to emit updates
maxime1992 and others added 20 commits November 18, 2021 16:02
BREAKING CHANGE:

By upgrading to Angular 13, ngx-sub-form will now stop publishing view engine compatible bundle.
If you're still running a pre Angular 13 version and want to use ngx-sub-form from here it should still be safe to do so thanks to ngcc.
If you're on Angular 13 already then when you install the dependencies by running `npm install` or `yarn` you shouldn't see `ngx-sub-form` in the list of libraries being compiled by ngcc anymore.
We should restore those later but I don't want to have to deal with this during the upgrade
zakhenry
zakhenry previously approved these changes Nov 21, 2021
@maxime1992 maxime1992 changed the title [WIP] feat: rewrite of ngx-sub-form without inheritance feat: rewrite of ngx-sub-form without inheritance Nov 21, 2021
@maxime1992 maxime1992 merged commit 4ab93f6 into master Nov 21, 2021
@github-actions
Copy link

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment