-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(library): refactor the entire code base
BREAKING CHANGE: refactor the entire code I completely rewrote the library from scratch for two reasons: 1. Provide as much support as possible without introducing bugs, breaking strict mode, or creating an inconvenient API. 2. Reduce the library size. Here are the changes: - Angular's peer dependency is now `>= 12`. - FormGroup's generic was removed in favor of the **experimental** `ControlsOf` interface. - Remove `mergeValidators`. Use addValidators in v12. - Remove `validateOn`. - Remove `getControl` in favor of `get(key)` or `get(['nested', 'key'])`. - Remove errors typing. - Validators should now be imported from Angular. - `FormBuilder` doesn't support generic anymore. Due to the complexity of the builder API, we're currently couldn't create a "good" implementation of `ControlsOf` for the builder. - Remove the `group.persist()` from the instance to an exported function to make it tree-shakeable. Fixes #197,#103,#102,#97,#100
- Loading branch information
1 parent
8675a4f
commit 5cee6fe
Showing
157 changed files
with
44,281 additions
and
23,421 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["**/*"], | ||
"plugins": ["@nrwl/nx"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nrwl/nx/enforce-module-boundaries": [ | ||
"error", | ||
{ | ||
"enforceBuildableLibDependency": true, | ||
"allow": [], | ||
"depConstraints": [ | ||
{ | ||
"sourceTag": "*", | ||
"onlyDependOnLibsWithTags": ["*"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nrwl/nx/typescript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nrwl/nx/javascript"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Bug Report | ||
description: Report a bug in the Reactive Forms Library | ||
|
||
body: | ||
- type: dropdown | ||
id: is-regression | ||
attributes: | ||
label: Is this a regression? | ||
options: | ||
- 'Yes' | ||
- 'No' | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
id: reproduction | ||
attributes: | ||
label: Please provide a link to a minimal reproduction of the bug | ||
|
||
- type: textarea | ||
id: exception-or-error | ||
attributes: | ||
label: Please provide the exception or error you saw | ||
render: true | ||
|
||
- type: textarea | ||
id: environment | ||
attributes: | ||
label: Please provide the environment you discovered this bug in | ||
render: true | ||
|
||
- type: textarea | ||
id: other | ||
attributes: | ||
label: Anything else? | ||
|
||
- type: dropdown | ||
id: contribute | ||
attributes: | ||
label: Do you want to create a pull request? | ||
options: | ||
- 'Yes' | ||
- 'No' | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: 'Feature Request' | ||
description: Suggest a feature for Reactive Forms Library | ||
|
||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: proposed-solution | ||
attributes: | ||
label: Proposed solution | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: alternatives-considered | ||
attributes: | ||
label: Alternatives considered | ||
validations: | ||
required: true | ||
|
||
- type: dropdown | ||
id: contribute | ||
attributes: | ||
label: Do you want to create a pull request? | ||
options: | ||
- 'Yes' | ||
- 'No' | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: 'Support Request' | ||
about: Questions and requests for support | ||
--- | ||
|
||
Please do not file questions or support requests on the GitHub issues tracker. | ||
|
||
You can get your questions answered using other communication channels. Please see: | ||
|
||
https://github.com/ngneat/reactive-forms/discussions | ||
|
||
Thank you! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: '@ngneat/reactive-forms' | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm i | ||
|
||
- name: Run ESLint | ||
run: npm run lint:all | ||
|
||
- name: Run Build | ||
run: npm run build:all | ||
|
||
- name: Run unit tests | ||
run: npm run test:all |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.