Skip to content
This repository was archived by the owner on Oct 3, 2022. It is now read-only.

Commit 9bd8777

Browse files
authored
Update dependencies (lyft#42)
* Update dependencies
1 parent abbbb57 commit 9bd8777

File tree

6 files changed

+1773
-647
lines changed

6 files changed

+1773
-647
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ node_modules
22
dist
33
.DS_Store
44
coverage/
5-
.log
5+
*.log

LICENSE.md

+73-73
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
66

7-
1. Definitions.
7+
1. Definitions.
88

99
"License" shall mean the terms and conditions for use, reproduction,
1010
and distribution as defined by Sections 1 through 9 of this document.
@@ -63,33 +63,33 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6363
on behalf of whom a Contribution has been received by Licensor and
6464
subsequently incorporated within the Work.
6565

66-
2. Grant of Copyright License. Subject to the terms and conditions of
67-
this License, each Contributor hereby grants to You a perpetual,
68-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69-
copyright license to reproduce, prepare Derivative Works of,
70-
publicly display, publicly perform, sublicense, and distribute the
71-
Work and such Derivative Works in Source or Object form.
72-
73-
3. Grant of Patent License. Subject to the terms and conditions of
74-
this License, each Contributor hereby grants to You a perpetual,
75-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76-
(except as stated in this section) patent license to make, have made,
77-
use, offer to sell, sell, import, and otherwise transfer the Work,
78-
where such license applies only to those patent claims licensable
79-
by such Contributor that are necessarily infringed by their
80-
Contribution(s) alone or by combination of their Contribution(s)
81-
with the Work to which such Contribution(s) was submitted. If You
82-
institute patent litigation against any entity (including a
83-
cross-claim or counterclaim in a lawsuit) alleging that the Work
84-
or a Contribution incorporated within the Work constitutes direct
85-
or contributory patent infringement, then any patent licenses
86-
granted to You under this License for that Work shall terminate
87-
as of the date such litigation is filed.
88-
89-
4. Redistribution. You may reproduce and distribute copies of the
90-
Work or Derivative Works thereof in any medium, with or without
91-
modifications, and in Source or Object form, provided that You
92-
meet the following conditions:
66+
2. Grant of Copyright License. Subject to the terms and conditions of
67+
this License, each Contributor hereby grants to You a perpetual,
68+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69+
copyright license to reproduce, prepare Derivative Works of,
70+
publicly display, publicly perform, sublicense, and distribute the
71+
Work and such Derivative Works in Source or Object form.
72+
73+
3. Grant of Patent License. Subject to the terms and conditions of
74+
this License, each Contributor hereby grants to You a perpetual,
75+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76+
(except as stated in this section) patent license to make, have made,
77+
use, offer to sell, sell, import, and otherwise transfer the Work,
78+
where such license applies only to those patent claims licensable
79+
by such Contributor that are necessarily infringed by their
80+
Contribution(s) alone or by combination of their Contribution(s)
81+
with the Work to which such Contribution(s) was submitted. If You
82+
institute patent litigation against any entity (including a
83+
cross-claim or counterclaim in a lawsuit) alleging that the Work
84+
or a Contribution incorporated within the Work constitutes direct
85+
or contributory patent infringement, then any patent licenses
86+
granted to You under this License for that Work shall terminate
87+
as of the date such litigation is filed.
88+
89+
4. Redistribution. You may reproduce and distribute copies of the
90+
Work or Derivative Works thereof in any medium, with or without
91+
modifications, and in Source or Object form, provided that You
92+
meet the following conditions:
9393

9494
(a) You must give any other recipients of the Work or
9595
Derivative Works a copy of this License; and
@@ -127,51 +127,51 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
127127
reproduction, and distribution of the Work otherwise complies with
128128
the conditions stated in this License.
129129

130-
5. Submission of Contributions. Unless You explicitly state otherwise,
131-
any Contribution intentionally submitted for inclusion in the Work
132-
by You to the Licensor shall be under the terms and conditions of
133-
this License, without any additional terms or conditions.
134-
Notwithstanding the above, nothing herein shall supersede or modify
135-
the terms of any separate license agreement you may have executed
136-
with Licensor regarding such Contributions.
137-
138-
6. Trademarks. This License does not grant permission to use the trade
139-
names, trademarks, service marks, or product names of the Licensor,
140-
except as required for reasonable and customary use in describing the
141-
origin of the Work and reproducing the content of the NOTICE file.
142-
143-
7. Disclaimer of Warranty. Unless required by applicable law or
144-
agreed to in writing, Licensor provides the Work (and each
145-
Contributor provides its Contributions) on an "AS IS" BASIS,
146-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147-
implied, including, without limitation, any warranties or conditions
148-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149-
PARTICULAR PURPOSE. You are solely responsible for determining the
150-
appropriateness of using or redistributing the Work and assume any
151-
risks associated with Your exercise of permissions under this License.
152-
153-
8. Limitation of Liability. In no event and under no legal theory,
154-
whether in tort (including negligence), contract, or otherwise,
155-
unless required by applicable law (such as deliberate and grossly
156-
negligent acts) or agreed to in writing, shall any Contributor be
157-
liable to You for damages, including any direct, indirect, special,
158-
incidental, or consequential damages of any character arising as a
159-
result of this License or out of the use or inability to use the
160-
Work (including but not limited to damages for loss of goodwill,
161-
work stoppage, computer failure or malfunction, or any and all
162-
other commercial damages or losses), even if such Contributor
163-
has been advised of the possibility of such damages.
164-
165-
9. Accepting Warranty or Additional Liability. While redistributing
166-
the Work or Derivative Works thereof, You may choose to offer,
167-
and charge a fee for, acceptance of support, warranty, indemnity,
168-
or other liability obligations and/or rights consistent with this
169-
License. However, in accepting such obligations, You may act only
170-
on Your own behalf and on Your sole responsibility, not on behalf
171-
of any other Contributor, and only if You agree to indemnify,
172-
defend, and hold each Contributor harmless for any liability
173-
incurred by, or claims asserted against, such Contributor by reason
174-
of your accepting any such warranty or additional liability.
130+
5. Submission of Contributions. Unless You explicitly state otherwise,
131+
any Contribution intentionally submitted for inclusion in the Work
132+
by You to the Licensor shall be under the terms and conditions of
133+
this License, without any additional terms or conditions.
134+
Notwithstanding the above, nothing herein shall supersede or modify
135+
the terms of any separate license agreement you may have executed
136+
with Licensor regarding such Contributions.
137+
138+
6. Trademarks. This License does not grant permission to use the trade
139+
names, trademarks, service marks, or product names of the Licensor,
140+
except as required for reasonable and customary use in describing the
141+
origin of the Work and reproducing the content of the NOTICE file.
142+
143+
7. Disclaimer of Warranty. Unless required by applicable law or
144+
agreed to in writing, Licensor provides the Work (and each
145+
Contributor provides its Contributions) on an "AS IS" BASIS,
146+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147+
implied, including, without limitation, any warranties or conditions
148+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149+
PARTICULAR PURPOSE. You are solely responsible for determining the
150+
appropriateness of using or redistributing the Work and assume any
151+
risks associated with Your exercise of permissions under this License.
152+
153+
8. Limitation of Liability. In no event and under no legal theory,
154+
whether in tort (including negligence), contract, or otherwise,
155+
unless required by applicable law (such as deliberate and grossly
156+
negligent acts) or agreed to in writing, shall any Contributor be
157+
liable to You for damages, including any direct, indirect, special,
158+
incidental, or consequential damages of any character arising as a
159+
result of this License or out of the use or inability to use the
160+
Work (including but not limited to damages for loss of goodwill,
161+
work stoppage, computer failure or malfunction, or any and all
162+
other commercial damages or losses), even if such Contributor
163+
has been advised of the possibility of such damages.
164+
165+
9. Accepting Warranty or Additional Liability. While redistributing
166+
the Work or Derivative Works thereof, You may choose to offer,
167+
and charge a fee for, acceptance of support, warranty, indemnity,
168+
or other liability obligations and/or rights consistent with this
169+
License. However, in accepting such obligations, You may act only
170+
on Your own behalf and on Your sole responsibility, not on behalf
171+
of any other Contributor, and only if You agree to indemnify,
172+
defend, and hold each Contributor harmless for any liability
173+
incurred by, or claims asserted against, such Contributor by reason
174+
of your accepting any such warranty or additional liability.
175175

176176
END OF TERMS AND CONDITIONS
177177

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
Transforms React code written in JavaScript to TypeScript.
66

77
[**🖥 Download the VSCode Extension**](https://marketplace.visualstudio.com/items?itemName=mohsen1.react-javascript-to-typescript-transform-vscode)
8+
89
## Features:
910

10-
* Proxies `PropTypes` to `React.Component` generic type and removes PropTypes
11-
* Provides state typing for `React.Component` based on initial state and `setState()` calls in the component
12-
* Hoist large interfaces for props and state out of `React.Component<P, S>` into declared types
13-
* Convert functional components with `PropTypes` property to TypeScript and uses propTypes to generate function type declaration
11+
* Proxies `PropTypes` to `React.Component` generic type and removes PropTypes
12+
* Provides state typing for `React.Component` based on initial state and `setState()` calls in the component
13+
* Hoist large interfaces for props and state out of `React.Component<P, S>` into declared types
14+
* Convert functional components with `PropTypes` property to TypeScript and uses propTypes to generate function type declaration
1415

1516
## Example
1617

package.json

+18-19
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,43 @@
1818
"prettier": "prettier --write *.{js,json,css,md,ts,tsx}"
1919
},
2020
"jest": {
21-
"mapCoverage": true,
2221
"transform": {
2322
".ts": "<rootDir>/node_modules/ts-jest/preprocessor.js"
2423
},
2524
"testRegex": "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
2625
"moduleFileExtensions": ["ts", "js"]
2726
},
2827
"lint-staged": {
29-
"*.{js,json,css,md,ts,tsx}": ["npm run prettier", "git add"]
28+
"*.{js,json,css,md,ts,tsx}": ["node_modules/.bin/prettier --write", "git add"]
3029
},
3130
"bin": "dist/cli.js",
3231
"author": "Mohsen Azimi <[email protected]>",
3332
"license": "Apache-2.0",
3433
"dependencies": {
35-
"chalk": "^1.1.3",
36-
"commander": "^2.10.0",
34+
"chalk": "^2.4.1",
35+
"commander": "^2.15.1",
3736
"detect-indent": "^5.0.0",
3837
"glob": "^7.1.2",
39-
"lodash": "^4.17.4",
40-
"prettier": "^1.10.2",
41-
"typescript": "2.7"
38+
"lodash": "^4.17.10",
39+
"prettier": "^1.12.1",
40+
"typescript": "2.8.3"
4241
},
4342
"devDependencies": {
44-
"@types/chalk": "^0.4.31",
43+
"@types/chalk": "^2.2.0",
4544
"@types/commander": "^2.9.1",
4645
"@types/detect-indent": "^5.0.0",
47-
"@types/glob": "^5.0.30",
48-
"@types/jest": "^20.0.2",
49-
"@types/lodash": "^4.14.93",
50-
"@types/node": "^8.0.2",
51-
"@types/prettier": "^1.10.0",
52-
"@types/react": "^15.0.31",
46+
"@types/glob": "^5.0.35",
47+
"@types/jest": "^22.2.3",
48+
"@types/lodash": "^4.14.109",
49+
"@types/node": "^10.1.2",
50+
"@types/prettier": "^1.12.2",
51+
"@types/react": "^16.3.14",
5352
"dedent": "^0.7.0",
5453
"husky": "^0.14.3",
55-
"jest": "^20.0.4",
56-
"lint-staged": "^6.0.1",
57-
"ts-jest": "^20.0.6",
58-
"ts-node": "^3.1.0",
59-
"tslint": "^5.2.0"
54+
"jest": "^22.4.4",
55+
"lint-staged": "^7.1.1",
56+
"ts-jest": "^22.4.6",
57+
"ts-node": "^6.0.3",
58+
"tslint": "^5.10.0"
6059
}
6160
}

src/compiler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as os from 'os';
22
import * as fs from 'fs';
33
import * as ts from 'typescript';
4-
import * as chalk from 'chalk';
4+
import chalk from 'chalk';
55
import * as _ from 'lodash';
66
import * as prettier from 'prettier';
77
import * as detectIndent from 'detect-indent';

0 commit comments

Comments
 (0)