Skip to content

Commit 41f1bc4

Browse files
author
James Salas
authored
Upgrade immutable version to latest (#69)
* feat: upgrade immutable, rework yarn versions, bump version, stop hoisting, change main on source package.json
1 parent de919c0 commit 41f1bc4

21 files changed

+489
-523
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
# fallback to using the latest cache if no exact match is found
3434
- v1-dependencies-
3535

36-
- run: yarn install
36+
- run: yarn install --frozen-lockfile
3737

3838
- save_cache:
3939
paths:

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
dist
22
coverage
3+
packages/store/docs

.yarnrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

jest.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ process.env.JEST_JUNIT_OUTPUT = './coverage/junit.xml';
55

66
module.exports = {
77
globals: {
8-
'ts-jest': {
9-
stringifyContentPathRegex: '\\.html$',
10-
},
8+
__TRANSFORM_HTML__: true,
119
},
1210
transform: {
1311
'^.+\\.(ts|js|html)$':

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"packages": ["packages/*"],
3-
"version": "9.0.0",
3+
"version": "10.0.0",
44
"npmClient": "yarn",
55
"useWorkspaces": true,
66
"ignore": "example-app",

package.json

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -37,43 +37,41 @@
3737
"node": ">=8"
3838
},
3939
"devDependencies": {
40-
"@angular/animations": "7.2.1",
41-
"@angular/cli": "7.2.2",
42-
"@angular/common": "7.2.1",
43-
"@angular/compiler": "7.2.1",
44-
"@angular/compiler-cli": "7.2.1",
45-
"@angular/core": "7.2.1",
46-
"@angular/forms": "7.2.1",
47-
"@angular/platform-browser": "7.2.1",
48-
"@angular/platform-browser-dynamic": "7.2.1",
49-
"@angular/router": "7.2.1",
50-
"@commitlint/cli": "7.0.0",
51-
"@commitlint/config-conventional": "7.0.1",
52-
"@commitlint/prompt-cli": "7.0.0",
53-
"@types/jest": "23.1.6",
54-
"@types/webpack-env": "1.13.6",
55-
"babel-core": "6.26.3",
56-
"babel-jest": "23.4.2",
57-
"codelyzer": "4.5.0",
58-
"husky": "1.1.3",
59-
"immutable": "3.8.1",
60-
"jest": "23.4.1",
61-
"jest-junit": "5.1.0",
62-
"jest-preset-angular": "6.0.0",
63-
"jest-zone-patch": "0.0.8",
64-
"lerna": "3.4.3",
65-
"lint-staged": "7.2.0",
66-
"ng-packagr": "4.5.0",
67-
"npm-run-all": "4.1.3",
68-
"prettier": "1.13.7",
69-
"redux": "4.0.0",
70-
"redux-logger": "2.10.2",
71-
"rimraf": "2.6.2",
72-
"rxjs": "6.3.3",
73-
"tsickle": "0.34.0",
74-
"tslib": "1.9.3",
75-
"tslint": "5.11.0",
76-
"typescript": "3.2.2",
77-
"zone.js": "0.8.26"
40+
"@angular/animations": "^7.0.0",
41+
"@angular/common": "^7.0.0",
42+
"@angular/compiler": "^7.0.0",
43+
"@angular/compiler-cli": "^7.0.0",
44+
"@angular/core": "^7.0.0",
45+
"@angular/forms": "^7.0.0",
46+
"@angular/platform-browser": "^7.0.0",
47+
"@angular/platform-browser-dynamic": "^7.0.0",
48+
"@angular/router": "^7.0.0",
49+
"@babel/core": "^7.0.0-0",
50+
"@babel/types": "^7.2.2",
51+
"@commitlint/cli": "^7.3.2",
52+
"@commitlint/config-conventional": "^7.3.1",
53+
"@commitlint/prompt-cli": "^7.3.1",
54+
"@types/jest": "^23.1.13",
55+
"babel-core": "^7.0.0-0",
56+
"babel-jest": "^23.0.0",
57+
"codelyzer": "^4.5.0",
58+
"husky": "^1.3.1",
59+
"jest": "^23.6.0",
60+
"jest-junit": "^6.0.1",
61+
"jest-preset-angular": "^6.0.2",
62+
"jest-zone-patch": "^0.0.10",
63+
"lerna": "^3.10.6",
64+
"lint-staged": "^8.1.0",
65+
"ng-packagr": "^4.6.0",
66+
"npm-run-all": "^4.1.3",
67+
"prettier": "~1.15.3",
68+
"redux": "^4.0.0",
69+
"rimraf": "^2.6.2",
70+
"rxjs": "^6.0.0",
71+
"tsickle": "^0.34.0",
72+
"tslib": "^1.9.0",
73+
"tslint": "^5.12.1",
74+
"typescript": "~3.2.0",
75+
"zone.js": "~0.8.26"
7876
}
7977
}

packages/example-app/package.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,21 @@
1515
"node": ">=8"
1616
},
1717
"dependencies": {
18-
"@angular-redux/form": "latest",
19-
"@angular-redux/router": "latest",
20-
"@angular-redux/store": "latest",
21-
"@angular/common": "^7.2.0",
22-
"@angular/compiler": "^7.2.0",
23-
"@angular/core": "^7.2.0",
24-
"@angular/forms": "^7.2.0",
25-
"@angular/http": "^7.2.0",
26-
"@angular/platform-browser": "^7.2.0",
27-
"@angular/platform-browser-dynamic": "^7.2.0",
28-
"@angular/router": "^7.2.0",
29-
"@types/webpack-env": "1.13.6",
18+
"@angular-redux/form": "10.0.0",
19+
"@angular-redux/router": "10.0.0",
20+
"@angular-redux/store": "10.0.0",
21+
"@angular/common": "^7.2.1",
22+
"@angular/compiler": "^7.2.1",
23+
"@angular/core": "^7.2.1",
24+
"@angular/forms": "^7.2.1",
25+
"@angular/http": "^7.2.1",
26+
"@angular/platform-browser": "^7.2.1",
27+
"@angular/platform-browser-dynamic": "^7.2.1",
28+
"@angular/router": "^7.2.1",
3029
"core-js": "^2.6.2",
3130
"flux-standard-action": "^2.0.3",
3231
"ramda": "^0.23.0",
33-
"redux": "^4.0.1",
32+
"redux": "^4.0.0",
3433
"redux-logger": "^3.0.1",
3534
"redux-observable": "^1.0.0",
3635
"rxjs": "^6.3.3",

packages/form/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ For the simplest use-cases, the API is very straightforward. Your template
1919
would look something like this:
2020

2121
```html
22-
<form connect="myForm">
23-
<input type="text" name="address" ngControl ngModel />
24-
</form>
22+
<form connect="myForm">
23+
<input type="text" name="address" ngControl ngModel />
24+
</form>
2525
```
2626

2727
The important bit to note here is the `[connect]` directive. This is the only thing
@@ -42,9 +42,7 @@ Then I would supply `myForm` as the argument to `[connect]`. If myForm were nest
4242
deeper inside of the app state, you could do something like this:
4343

4444
```html
45-
<form [connect]="['personalInfo', 'myForm']">
46-
...
47-
</form>
45+
<form [connect]="['personalInfo', 'myForm']">...</form>
4846
```
4947

5048
Note that ImmutableJS integration is provided seamlessly. If `personalInfo` is an
@@ -207,9 +205,9 @@ that element from the Redux state.
207205
The value in "connect" attribute is the value that will show up in the Redux store. The formGroup value is the name of the object in your code that represents the form group.
208206

209207
```html
210-
<form connect="myForm" [formGroup]="loginForm">
211-
<input type="text" name="address" formControlName="firstName" />
212-
</form>
208+
<form connect="myForm" [formGroup]="loginForm">
209+
<input type="text" name="address" formControlName="firstName" />
210+
</form>
213211
```
214212

215213
#### Troubleshooting

packages/form/package.json

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-redux/form",
3-
"version": "9.0.0",
3+
"version": "10.0.0",
44
"description": "Build Angular 2+ forms with Redux",
55
"author": "Chris Bond",
66
"license": "MIT",
@@ -25,25 +25,14 @@
2525
"node": ">=8"
2626
},
2727
"peerDependencies": {
28-
"@angular-redux/store": "^9.0.0",
28+
"@angular-redux/store": "^10.0.0",
2929
"@angular/core": "^7.0.0",
3030
"@angular/forms": "^7.0.0",
3131
"redux": "^4.0.0",
3232
"rxjs": "^6.0.0"
3333
},
3434
"dependencies": {
35-
"immutable": "3.8.1"
35+
"immutable": "^4.0.0-rc.12"
3636
},
37-
"devDependencies": {
38-
"@angular-redux/store": "9.0.0"
39-
},
40-
"main": "dist/bundles/angular-redux-form.umd.js",
41-
"module": "dist/fesm5/angular-redux-form.js",
42-
"es2015": "dist/fesm2015/angular-redux-form.js",
43-
"esm5": "dist/esm5/angular-redux-form.js",
44-
"esm2015": "dist/esm2015/angular-redux-form.js",
45-
"fesm5": "dist/fesm5/angular-redux-form.js",
46-
"fesm2015": "dist/fesm2015/angular-redux-form.js",
47-
"typings": "dist/angular-redux-form.d.ts",
48-
"metadata": "dist/angular-redux-form.metadata.json"
37+
"main": "src/index.ts"
4938
}

packages/form/src/form-reducer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Iterable } from 'immutable';
1+
import { Collection } from 'immutable';
22

33
import { Action } from 'redux';
44

@@ -7,10 +7,10 @@ import { FORM_CHANGED } from './form-store';
77
import { State } from './state';
88

99
export const defaultFormReducer = <RootState>(
10-
initialState?: RootState | Iterable.Keyed<string, any>,
10+
initialState?: RootState | Collection.Keyed<string, any>,
1111
) => {
1212
const reducer = (
13-
state: RootState | Iterable.Keyed<string, any> | undefined = initialState,
13+
state: RootState | Collection.Keyed<string, any> | undefined = initialState,
1414
action: Action & { payload?: any },
1515
) => {
1616
switch (action.type) {

0 commit comments

Comments
 (0)