flow-upgrade 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +10 -0
  2. package/dist/Styled.js +12 -14
  3. package/dist/Types.js +21 -1
  4. package/dist/bin/runSpecificCodemod.js +117 -0
  5. package/dist/bin/upgrade.js +75 -0
  6. package/dist/codemodUtils/getClassMemberName.js +27 -0
  7. package/dist/codemodUtils/replaceMethodWithArrowProp.js +60 -0
  8. package/dist/codemods/collapseObjectInitialization.js +250 -0
  9. package/dist/codemods/convertImplicitInexactObjectTypes.js +35 -0
  10. package/dist/codemods/removeAnnotationsInDestructuring.js +40 -0
  11. package/dist/codemods/removeDuplicateClassProperties.js +268 -0
  12. package/dist/findFlowFiles.js +136 -158
  13. package/dist/runCodemods.js +36 -0
  14. package/dist/upgrade.js +127 -153
  15. package/dist/upgrades/0.170.0/index.js +25 -0
  16. package/dist/upgrades/0.176.0/index.js +25 -0
  17. package/dist/upgrades/0.84.0/index.js +25 -0
  18. package/dist/upgrades/index.js +29 -0
  19. package/dist/utils/redirectConsole.js +59 -0
  20. package/package.json +29 -21
  21. package/dist/codemods/ReactUtils.js +0 -140
  22. package/dist/codemods/createAggregateCodemod.js +0 -36
  23. package/dist/codemods/runCodemods.js +0 -54
  24. package/dist/index.js +0 -38
  25. package/dist/upgrades/0.53.0/ReactComponentExplicitTypeArgs/codemod.js +0 -154
  26. package/dist/upgrades/0.53.0/ReactComponentExplicitTypeArgs/index.js +0 -75
  27. package/dist/upgrades/0.53.0/ReactComponentSimplifyTypeArgs/codemod.js +0 -65
  28. package/dist/upgrades/0.53.0/ReactComponentSimplifyTypeArgs/index.js +0 -52
  29. package/dist/upgrades/0.53.0/ReactUtilityTypes/codemod.js +0 -156
  30. package/dist/upgrades/0.53.0/ReactUtilityTypes/index.js +0 -59
  31. package/dist/upgrades/0.84.0/ExplicitInexactObjectSyntax/codemod.js +0 -18
  32. package/dist/upgrades/0.84.0/ExplicitInexactObjectSyntax/index.js +0 -25
package/dist/upgrade.js CHANGED
@@ -1,69 +1,72 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = upgrade;
4
7
 
5
- /**
6
- * @format
7
- *
8
- */
8
+ var _semver = _interopRequireDefault(require("semver"));
9
+
10
+ var _chalk = _interopRequireDefault(require("chalk"));
11
+
12
+ var _ora = _interopRequireDefault(require("ora"));
13
+
14
+ var _promptConfirm = _interopRequireDefault(require("prompt-confirm"));
9
15
 
10
- const semver = require('semver');
11
- const chalk = require('chalk');
12
- const ora = require('ora');
13
- const Confirm = require('prompt-confirm');
14
- const Styled = require('./Styled');
15
- const findFlowFiles = require('./findFlowFiles');
16
+ var _Styled = _interopRequireDefault(require("./Styled"));
17
+
18
+ var _findFlowFiles = require("./findFlowFiles");
19
+
20
+ var _runCodemods = _interopRequireDefault(require("./runCodemods"));
21
+
22
+ var _upgrades = require("./upgrades");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
25
 
17
26
  /**
18
- * Holds all of the upgrades that need to be run to upgrade to each version from
19
- * the last version of Flow.
27
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE file in the root directory of this source tree.
31
+ *
32
+ * @format
33
+ *
20
34
  */
21
- const VERSION_UPGRADES = [
22
- // We started writing and distributing upgrades with `flow-upgrade` after Flow
23
- // version 0.52.0. We assume that you have valid Flow 0.52.0 code and are not
24
- // backporting any previous automated upgrades.
25
-
26
- {
27
- version: '0.53.0',
28
- upgrades: [require('./upgrades/0.53.0/ReactComponentExplicitTypeArgs'), require('./upgrades/0.53.0/ReactComponentSimplifyTypeArgs'), require('./upgrades/0.53.0/ReactUtilityTypes')]
29
- }, {
30
- version: '0.84.0',
31
- upgrades: [require('./upgrades/0.84.0/ExplicitInexactObjectSyntax')]
32
- }];
33
35
 
34
36
  /**
35
37
  * Decides all of the upgrades that will need to be run when moving from one
36
38
  * version to another and runs them asynchronously.
37
39
  */
38
- module.exports = (() => {
39
- var _ref = _asyncToGenerator(function* (directory, currentVersion, nextVersion, options) {
40
- const allUpgrades = [];
41
- // Collect all of the upgrades we will need to run.
42
- for (let i = 0; i < VERSION_UPGRADES.length; i++) {
43
- var _VERSION_UPGRADES$i = VERSION_UPGRADES[i];
44
- const version = _VERSION_UPGRADES$i.version,
45
- upgrades = _VERSION_UPGRADES$i.upgrades;
46
- // If the version number is larger then the version we are upgrading to we
47
- // are done! Do not add any more upgrades,
48
-
49
- if (semver.cmp(version, '>', nextVersion)) {
50
- break;
51
- }
52
- // If the version number is larget then the current version, but not larger
53
- // then the next version then we want to run the upgrades for this version.
54
- if (semver.cmp(version, '>', currentVersion)) {
55
- upgrades.forEach(function (upgrade) {
56
- return allUpgrades.push(upgrade);
57
- });
58
- }
40
+ async function upgrade(directory, currentVersion, nextVersion, options) {
41
+ const log = options.silent ? () => {} : (...messages) => console.log(...messages);
42
+ const allUpgrades = []; // Collect all of the upgrades we will need to run.
43
+
44
+ for (let i = 0; i < _upgrades.VERSION_UPGRADES.length; i++) {
45
+ const {
46
+ version,
47
+ upgrades
48
+ } = _upgrades.VERSION_UPGRADES[i]; // If the version number is larger then the version we are upgrading to we
49
+ // are done! Do not add any more upgrades,
50
+
51
+ if (_semver.default.cmp(version, '>', nextVersion)) {
52
+ break;
53
+ } // If the version number is larget then the current version, but not larger
54
+ // then the next version then we want to run the upgrades for this version.
55
+
56
+
57
+ if (_semver.default.cmp(version, '>', currentVersion)) {
58
+ upgrades.forEach(upgrade => allUpgrades.push(upgrade));
59
59
  }
60
- console.log();
61
- console.log(Styled.sectionHeader('flow-upgrade'));
62
- console.log();
63
- {
64
- const titleStyled = chalk.bold('flow-upgrade');
65
- // Log the initial intro message for our user.
66
- const message = `
60
+ }
61
+
62
+ log();
63
+ log(_Styled.default.sectionHeader('flow-upgrade'));
64
+ log();
65
+ {
66
+ const titleStyled = _chalk.default.bold('flow-upgrade'); // Log the initial intro message for our user.
67
+
68
+
69
+ const message = `
67
70
  Thank you for choosing to upgrade Flow. In every release the Flow community adds
68
71
  new features and improves the performance of Flow to better serve you and your
69
72
  team. Upgrading gives you the best that Flow has to offer.
@@ -80,115 +83,86 @@ using git make sure you've commit the changes in your working directory.) After
80
83
  running ${titleStyled} review the changes that were made and manually tweak
81
84
  your code until you are happy with the upgrade.
82
85
 
83
- The Flow version you're upgrading from: ${chalk.bold.magenta(currentVersion)}
84
- The Flow version you're upgrading to: ${chalk.bold.green(nextVersion)}
86
+ The Flow version you're upgrading from: ${_chalk.default.bold.magenta(currentVersion)}
87
+ The Flow version you're upgrading to: ${_chalk.default.bold.green(nextVersion)}
85
88
 
86
- We will assume that your code is valid Flow ${chalk.bold.magenta(currentVersion)} code.
89
+ We will assume that your code is valid Flow ${_chalk.default.bold.magenta(currentVersion)} code.
87
90
 
88
91
  We will be running the following steps to upgrade your codebase. Each step will
89
92
  print a short message explaining what it does before it runs, but we won't stop
90
93
  to ask you for reconfirmation once we begin upgrading.
91
94
 
92
- ${allUpgrades.map(function (u, i) {
93
- return Styled.upgradeTitle(u.title, i + 1);
94
- }).join('\n')}
95
+ ${allUpgrades.map((u, i) => _Styled.default.upgradeTitle(u.title, i + 1)).join('\n')}
95
96
 
96
- Today we will be upgrading all JavaScript files using Flow in: ${chalk.bold.magenta(directory)}
97
+ Today we will be upgrading all JavaScript files using Flow in: ${_chalk.default.bold.magenta(directory)}
97
98
 
98
99
  Excluding any JavaScript files in node_modules directories, in flow-typed
99
100
  directories, in __flowtests__ directories, or files ending in -flowtest.js.
100
101
  `.slice(1);
101
- console.log(message);
102
- }
103
- // Create a new spinner.
104
- const spinner = ora({
105
- text: chalk.italic.cyan('Finding all the Flow files to be upgraded...'),
106
- color: 'cyan'
107
- });
108
- // Start the spinner.
109
- spinner.start();
110
- // Find all of the Flow files in the directory we are upgrading.
111
- let filePaths;
112
- try {
113
- filePaths = yield findFlowFiles(directory, options);
114
- } catch (error) {
115
- // Stop the spinner if we get an error.
116
- spinner.stop();
117
- throw error;
118
- }
119
- // Stop the spinner.
120
- spinner.stop();
121
- // Log the number of Flow files that we found.
122
- console.log(`Found ${chalk.bold.cyan(filePaths.length)} Flow files.`);
123
- console.log();
124
- // Make sure the user knows that they should review their information before
125
- // proceeding.
126
- console.log(chalk.bold.red('Please review this information to make sure that it is correct before proceeding.'));
127
- console.log();
128
- // Ask the user for confirmation.
129
- const answer = yield new Confirm('Are you ready to begin the upgrade?').run();
130
- // If the user did not let us continue then log a new line and do not
131
- // continue.
132
- if (!answer) {
133
- console.log();
134
- return;
102
+ log(message);
103
+ } // Find all of the Flow files in the directory we are upgrading.
104
+
105
+ const filePaths = await (0, _findFlowFiles.findFlowFilesWithSpinner)(directory, options); // Make sure the user knows that they should review their information before
106
+ // proceeding.
107
+
108
+ log(_chalk.default.bold.red('Please review this information to make sure that it is correct before proceeding.'));
109
+ log(); // Ask the user for confirmation.
110
+
111
+ const answer = options.yes || (await new _promptConfirm.default('Are you ready to begin the upgrade?').run()); // If the user did not let us continue then log a new line and do not
112
+ // continue.
113
+
114
+ if (!answer) {
115
+ log();
116
+ return;
117
+ } // Run through all of our upgrades.
118
+
119
+
120
+ while (allUpgrades.length) {
121
+ // Put some space between us and the last upgrade.
122
+ log(); // Get the next upgrade.
123
+
124
+ const upgrade = allUpgrades.shift();
125
+
126
+ switch (upgrade.kind) {
127
+ // If this is a codemod, collect all codemods after it as well and execute
128
+ // those codemods together.
129
+ case 'codemod':
130
+ {
131
+ const codemods = [upgrade]; // While the next upgrade is a codemod, add it to our `codemods` array.
132
+
133
+ while (allUpgrades[0] && allUpgrades[0].kind === 'codemod') {
134
+ codemods.push(allUpgrades.shift());
135
+ } // Tell the user what we are about to do.
136
+
137
+
138
+ log(_Styled.default.sectionHeader('Codemods'));
139
+ log();
140
+ log('We are now going to run the following codemods:');
141
+ log();
142
+ log(codemods.map((u, i) => _Styled.default.upgradeTitle(u.title, i + 1)).join('\n'));
143
+ log();
144
+ log('Following is a short description of each codemod listed above so ' + 'that you know\nhow your code is being upgraded.');
145
+ log();
146
+ log(_Styled.default.divider());
147
+ log();
148
+ codemods.forEach((u, i) => {
149
+ log(_Styled.default.upgradeTitle(u.title, i + 1));
150
+ log();
151
+ log(u.description);
152
+ log();
153
+ log(_Styled.default.divider());
154
+ log();
155
+ });
156
+ log(`Running ${_chalk.default.bold.cyan(codemods.length)} codemods...`);
157
+ log(); // Run all of our codemods.
158
+
159
+ await (0, _runCodemods.default)(codemods, filePaths, options);
160
+ break;
161
+ }
162
+ // Throw an error for all other kinds of upgrades.
163
+
164
+ default:
165
+ throw new Error(`Unexpected upgrade kind: '${upgrade.kind}'`);
135
166
  }
136
- // Run through all of our upgrades.
137
- while (allUpgrades.length) {
138
- // Put some space between us and the last upgrade.
139
- console.log();
140
- // Get the next upgrade.
141
- const upgrade = allUpgrades.shift();
142
- switch (upgrade.kind) {
143
- // If this is a codemod, collect all codemods after it as well and execute
144
- // those codemods together.
145
- case 'codemod':
146
- {
147
- const codemods = [upgrade];
148
- // While the next upgrade is a codemod, add it to our `codemods` array.
149
- while (allUpgrades[0] && allUpgrades[0].kind === 'codemod') {
150
- codemods.push(allUpgrades.shift());
151
- }
152
- // Tell the user what we are about to do.
153
- console.log(Styled.sectionHeader('Codemods'));
154
- console.log();
155
- console.log('We are now going to run the following codemods:');
156
- console.log();
157
- console.log(codemods.map(function (u, i) {
158
- return Styled.upgradeTitle(u.title, i + 1);
159
- }).join('\n'));
160
- console.log();
161
- console.log('Following is a short description of each codemod listed above so ' + 'that you know\nhow your code is being upgraded.');
162
- console.log();
163
- console.log(Styled.divider());
164
- console.log();
165
- codemods.forEach(function (u, i) {
166
- console.log(Styled.upgradeTitle(u.title, i + 1));
167
- console.log();
168
- console.log(u.description);
169
- console.log();
170
- console.log(Styled.divider());
171
- console.log();
172
- });
173
- console.log(`Running ${chalk.bold.cyan(codemods.length)} codemods...`);
174
- console.log();
175
- // Run all of our codemods.
176
- const runCodemods = require('./codemods/runCodemods');
177
- yield runCodemods(codemods.map(function ({ transformPath }) {
178
- return transformPath;
179
- }), filePaths);
180
- break;
181
- }
182
- // Throw an error for all other kinds of upgrades.
183
- default:
184
- throw new Error(`Unexpected upgrade kind: '${upgrade.kind}'`);
185
- }
186
- }
187
- });
188
-
189
- function upgrade(_x, _x2, _x3, _x4) {
190
- return _ref.apply(this, arguments);
191
167
  }
192
-
193
- return upgrade;
194
- })();
168
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _removeDuplicateClassProperties = _interopRequireDefault(require("../../codemods/removeDuplicateClassProperties"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ /**
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ *
18
+ * @format
19
+ *
20
+ */
21
+ var _default = {
22
+ version: '0.170.0',
23
+ upgrades: [_removeDuplicateClassProperties.default]
24
+ };
25
+ exports.default = _default;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _removeAnnotationsInDestructuring = _interopRequireDefault(require("../../codemods/removeAnnotationsInDestructuring"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ /**
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ *
18
+ * @format
19
+ *
20
+ */
21
+ var _default = {
22
+ version: '0.176.0',
23
+ upgrades: [_removeAnnotationsInDestructuring.default]
24
+ };
25
+ exports.default = _default;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _convertImplicitInexactObjectTypes = _interopRequireDefault(require("../../codemods/convertImplicitInexactObjectTypes"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ /**
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ *
18
+ * @format
19
+ *
20
+ */
21
+ var _default = {
22
+ version: '0.84.0',
23
+ upgrades: [_convertImplicitInexactObjectTypes.default]
24
+ };
25
+ exports.default = _default;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VERSION_UPGRADES = void 0;
7
+
8
+ var _ = _interopRequireDefault(require("./0.170.0"));
9
+
10
+ var _2 = _interopRequireDefault(require("./0.176.0"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ /**
15
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ *
20
+ * @format
21
+ *
22
+ */
23
+
24
+ /**
25
+ * Holds all of the upgrades that need to be run to upgrade to each version from
26
+ * the last version of Flow.
27
+ */
28
+ const VERSION_UPGRADES = [_.default, _2.default];
29
+ exports.VERSION_UPGRADES = VERSION_UPGRADES;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ *
9
+ */
10
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, "__esModule", {
13
+ value: true
14
+ });
15
+ exports.redirectConsole = redirectConsole;
16
+ exports.restoreConsole = restoreConsole;
17
+
18
+ var util = _interopRequireWildcard(require("util"));
19
+
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
24
+ const oldConsole = {
25
+ error: console.error,
26
+ info: console.info,
27
+ log: console.log,
28
+ warn: console.warn
29
+ };
30
+
31
+ function redirectConsole(reporter_) {
32
+ const reporter = typeof reporter_ === 'function' ? reporter_(oldConsole) : reporter_; // $FlowExpectedError[cannot-write]
33
+
34
+ console.log = (...args) => {
35
+ reporter.onStdout(util.format(...args));
36
+ }; // $FlowExpectedError[cannot-write]
37
+
38
+
39
+ console.info = (...args) => {
40
+ reporter.onStdout(util.format(...args));
41
+ }; // $FlowExpectedError[cannot-write]
42
+
43
+
44
+ console.warn = (...args) => {
45
+ reporter.onStdout('[WARN]' + util.format(...args));
46
+ }; // $FlowExpectedError[cannot-write]
47
+
48
+
49
+ console.error = (...args) => {
50
+ reporter.onStderr(util.format(...args));
51
+ };
52
+ }
53
+
54
+ function restoreConsole() {
55
+ for (const [name, fn] of Object.entries(oldConsole)) {
56
+ // $FlowExpectedError
57
+ console[name] = fn;
58
+ }
59
+ }
package/package.json CHANGED
@@ -1,18 +1,22 @@
1
1
  {
2
2
  "name": "flow-upgrade",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "A utility for upgrading your codebase to the latest version of Flow.",
5
5
  "engines": {
6
- "node": ">=6"
6
+ "node": ">=14"
7
7
  },
8
+ "license": "MIT",
8
9
  "files": [
9
10
  "dist"
10
11
  ],
11
- "bin": "./dist/index.js",
12
+ "bin": {
13
+ "flow-upgrade": "./dist/bin/index.js",
14
+ "flow-codemod": "./dist/bin/runSpecificCodemod.js"
15
+ },
12
16
  "scripts": {
13
- "build": "rm -rf dist && babel src --out-dir dist --ignore __tests__",
17
+ "build": "rm -rf dist && babel src --out-dir dist --ignore '**/__tests__'",
14
18
  "test": "jest --watch",
15
- "prepublish": "npm run build",
19
+ "prepublish": "yarn run build",
16
20
  "postpublish": "node ./scripts/postpublish.js"
17
21
  },
18
22
  "repository": {
@@ -23,26 +27,30 @@
23
27
  "url": "https://github.com/facebook/flow/issues"
24
28
  },
25
29
  "homepage": "https://github.com/facebook/flow/tree/master/packages/flow-upgrade#readme",
26
- "jest": {
27
- "rootDir": "src",
28
- "testMatch": [
29
- "**/__tests__/*-test.js"
30
- ]
31
- },
32
30
  "dependencies": {
31
+ "@babel/highlight": "^7.18.6",
33
32
  "chalk": "^2.0.1",
34
- "graceful-fs": "^4.1.11",
35
- "jscodeshift": "git://github.com/jbrown215/jscodeshift.git",
36
- "ora": "^1.3.0",
33
+ "fs-extra": "10.1.0",
34
+ "hermes-estree": "0.9.0",
35
+ "hermes-parser": "0.9.0",
36
+ "hermes-transform": "0.9.0",
37
+ "klaw-sync": "^6.0.0",
38
+ "ora": "^5.4.1",
37
39
  "prompt-confirm": "^1.2.0",
38
- "semver": "^5.3.0",
39
- "yargs": "^8.0.2"
40
+ "semver": "^7.3.7",
41
+ "yargs": "^17.0.1"
42
+ },
43
+ "peerDependencies": {
44
+ "prettier": "^2.4.1"
40
45
  },
41
46
  "devDependencies": {
42
- "babel-cli": "^6.24.1",
43
- "babel-preset-env": "^1.6.0",
44
- "babel-preset-flow": "^6.23.0",
45
- "flow-bin": "0.74.0",
46
- "jest": "^20.0.4"
47
+ "@babel/cli": "^7.14.8",
48
+ "@babel/core": "^7.14.8",
49
+ "@babel/preset-env": "^7.14.8",
50
+ "@babel/preset-flow": "^7.14.5",
51
+ "flow-bin": "^0.178.0",
52
+ "jest": "^27.5.1",
53
+ "memfs": "^3.4.3",
54
+ "prettier": "^2.4.1"
47
55
  }
48
56
  }