@atlaskit/codemod-cli 0.8.6 → 0.9.1
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.
- package/CHANGELOG.md +20 -0
- package/dist/cjs/cli.js +5 -1
- package/dist/cjs/main.js +34 -10
- package/dist/cjs/sinceRef.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/cli.js +5 -0
- package/dist/es2019/main.js +12 -0
- package/dist/es2019/sinceRef.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/cli.js +5 -1
- package/dist/esm/main.js +34 -10
- package/dist/esm/sinceRef.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/types.d.ts +4 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/codemod-cli
|
|
2
2
|
|
|
3
|
+
## 0.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.9.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`2b8c48b26ab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2b8c48b26ab) - Instrumented `@atlaskit/codemod-cli` with none interaction support
|
|
14
|
+
|
|
15
|
+
New argument for the codemod-cli has been added to support preselect transform in command line.
|
|
16
|
+
|
|
17
|
+
## 0.8.7
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`54a44d46e29`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a44d46e29) - Renovate Bot upgraded simple-git from ^1.130.0 to 2.48.0
|
|
22
|
+
|
|
3
23
|
## 0.8.6
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/cjs/cli.js
CHANGED
|
@@ -30,12 +30,16 @@ function _run() {
|
|
|
30
30
|
while (1) {
|
|
31
31
|
switch (_context.prev = _context.next) {
|
|
32
32
|
case 0:
|
|
33
|
-
cli = (0, _meow.default)("\nUsage\n $ npx @atlaskit/codemod-cli [options] <file-paths>...\n\nOptions\n --transform, -t the transform to run, will prompt for a transform if not provided and no module is passed\n --since-ref, runs transforms for all packages that have been upgraded since the specified git ref\n --packages, runs transforms for the specified comma separated list of packages, optionally include a version for each package to run all transforms since that version\n --parser, -p babel|babylon|flow|ts|tsx parser to use for parsing the source files (default: babel)\n --extensions, -e transform files with these file extensions (comma separated list) (default: js)\n --ignore-pattern, ignore files that match a provided glob expression\n --fail-on-error, return a 1 exit code when errors were found during execution of codemods\n --version, -v version number\n --no-filter-paths disables dependant package file path filtering logic \n --help Help me \uD83D\uDE31\n\nExamples\n # Run a codemod over the /project/src directory, will be prompted for which codemod to run\n $ npx @atlaskit/codemod-cli /project/src\n\n # Run the \"4.0.0-remove-appearance-prop\" transform of the \"button\" package\n $ npx @atlaskit/codemod-cli -t button@4.0.0-remove-appearance-prop /project/src\n\n # Run all transforms for \"@atlaskit/button\" greater than version 3.0.0 and @atlaskit/range greater than 4.0.0\n $ npx @atlaskit/codemod-cli --packages @atlaskit/button@3.0.0,@atlaskit/range@4.0.0 /project/src\n", {
|
|
33
|
+
cli = (0, _meow.default)("\nUsage\n $ npx @atlaskit/codemod-cli [options] <file-paths>...\n\nOptions\n --preset, -n select transform by preset name, avoid user interaction\n --transform, -t the transform to run, will prompt for a transform if not provided and no module is passed\n --since-ref, runs transforms for all packages that have been upgraded since the specified git ref\n --packages, runs transforms for the specified comma separated list of packages, optionally include a version for each package to run all transforms since that version\n --parser, -p babel|babylon|flow|ts|tsx parser to use for parsing the source files (default: babel)\n --extensions, -e transform files with these file extensions (comma separated list) (default: js)\n --ignore-pattern, ignore files that match a provided glob expression\n --fail-on-error, return a 1 exit code when errors were found during execution of codemods\n --version, -v version number\n --no-filter-paths disables dependant package file path filtering logic \n --help Help me \uD83D\uDE31\n\nExamples\n # Run a codemod over the /project/src directory, will be prompted for which codemod to run\n $ npx @atlaskit/codemod-cli /project/src\n\n # Run the \"4.0.0-remove-appearance-prop\" transform of the \"button\" package\n $ npx @atlaskit/codemod-cli -t button@4.0.0-remove-appearance-prop /project/src\n\n # Run all transforms for \"@atlaskit/button\" greater than version 3.0.0 and @atlaskit/range greater than 4.0.0\n $ npx @atlaskit/codemod-cli --packages @atlaskit/button@3.0.0,@atlaskit/range@4.0.0 /project/src\n", {
|
|
34
34
|
flags: {
|
|
35
35
|
transform: {
|
|
36
36
|
type: 'string',
|
|
37
37
|
alias: 't'
|
|
38
38
|
},
|
|
39
|
+
preset: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
alias: 'n'
|
|
42
|
+
},
|
|
39
43
|
packages: {
|
|
40
44
|
type: 'string'
|
|
41
45
|
},
|
package/dist/cjs/main.js
CHANGED
|
@@ -120,29 +120,53 @@ var getTransformPrompt = /*#__PURE__*/function () {
|
|
|
120
120
|
|
|
121
121
|
var resolveTransform = /*#__PURE__*/function () {
|
|
122
122
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(flags, transforms) {
|
|
123
|
+
var transform;
|
|
123
124
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
124
125
|
while (1) {
|
|
125
126
|
switch (_context2.prev = _context2.next) {
|
|
126
127
|
case 0:
|
|
128
|
+
if (!flags.preset) {
|
|
129
|
+
_context2.next = 7;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
transform = transforms.find(function (_ref5) {
|
|
134
|
+
var name = _ref5.name;
|
|
135
|
+
return name === flags.preset;
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
if (transform) {
|
|
139
|
+
_context2.next = 6;
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
console.warn("No preset found for: ".concat(_chalk.default.bgRed(flags.preset)));
|
|
144
|
+
_context2.next = 7;
|
|
145
|
+
break;
|
|
146
|
+
|
|
147
|
+
case 6:
|
|
148
|
+
return _context2.abrupt("return", transform);
|
|
149
|
+
|
|
150
|
+
case 7:
|
|
127
151
|
if (!(flags.transform && (0, _transforms.hasTransform)(flags.transform))) {
|
|
128
|
-
_context2.next =
|
|
152
|
+
_context2.next = 9;
|
|
129
153
|
break;
|
|
130
154
|
}
|
|
131
155
|
|
|
132
156
|
return _context2.abrupt("return", (0, _transforms.parseTransformPath)(flags.transform));
|
|
133
157
|
|
|
134
|
-
case
|
|
158
|
+
case 9:
|
|
135
159
|
if (flags.transform && !(0, _transforms.hasTransform)(flags.transform)) {
|
|
136
160
|
console.warn("No available transform found for: ".concat(_chalk.default.bgRed(flags.transform)));
|
|
137
161
|
}
|
|
138
162
|
|
|
139
|
-
_context2.next =
|
|
163
|
+
_context2.next = 12;
|
|
140
164
|
return getTransformPrompt(transforms);
|
|
141
165
|
|
|
142
|
-
case
|
|
166
|
+
case 12:
|
|
143
167
|
return _context2.abrupt("return", _context2.sent);
|
|
144
168
|
|
|
145
|
-
case
|
|
169
|
+
case 13:
|
|
146
170
|
case "end":
|
|
147
171
|
return _context2.stop();
|
|
148
172
|
}
|
|
@@ -156,7 +180,7 @@ var resolveTransform = /*#__PURE__*/function () {
|
|
|
156
180
|
}();
|
|
157
181
|
|
|
158
182
|
var runTransform = /*#__PURE__*/function () {
|
|
159
|
-
var
|
|
183
|
+
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(filePaths, transform, flags) {
|
|
160
184
|
var logger, codemodDirs, transformPath, args, jscodeshiftContent, jscodeshiftContentNew;
|
|
161
185
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
162
186
|
while (1) {
|
|
@@ -218,7 +242,7 @@ var runTransform = /*#__PURE__*/function () {
|
|
|
218
242
|
}));
|
|
219
243
|
|
|
220
244
|
return function runTransform(_x4, _x5, _x6) {
|
|
221
|
-
return
|
|
245
|
+
return _ref6.apply(this, arguments);
|
|
222
246
|
};
|
|
223
247
|
}();
|
|
224
248
|
|
|
@@ -276,7 +300,7 @@ var validatePackages = function validatePackages(packages, errorCallback) {
|
|
|
276
300
|
};
|
|
277
301
|
|
|
278
302
|
var parseArgs = /*#__PURE__*/function () {
|
|
279
|
-
var
|
|
303
|
+
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(input, flags) {
|
|
280
304
|
var packages, unvalidatedPackages, _unvalidatedPackages;
|
|
281
305
|
|
|
282
306
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
@@ -332,7 +356,7 @@ var parseArgs = /*#__PURE__*/function () {
|
|
|
332
356
|
}));
|
|
333
357
|
|
|
334
358
|
return function parseArgs(_x7, _x8) {
|
|
335
|
-
return
|
|
359
|
+
return _ref7.apply(this, arguments);
|
|
336
360
|
};
|
|
337
361
|
}();
|
|
338
362
|
|
|
@@ -363,7 +387,7 @@ function _main() {
|
|
|
363
387
|
case 4:
|
|
364
388
|
_yield$parseArgs = _context5.sent;
|
|
365
389
|
packages = _yield$parseArgs.packages;
|
|
366
|
-
_process$env$_PACKAGE = "0.
|
|
390
|
+
_process$env$_PACKAGE = "0.9.1", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
|
|
367
391
|
logger.log(_chalk.default.bgBlue(_chalk.default.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
|
|
368
392
|
|
|
369
393
|
if (packages && packages.length > 0) {
|
package/dist/cjs/sinceRef.js
CHANGED
|
@@ -11,7 +11,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
11
11
|
|
|
12
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _simpleGit = _interopRequireDefault(require("simple-git"));
|
|
15
15
|
|
|
16
16
|
var _types = require("./types");
|
|
17
17
|
|
|
@@ -43,7 +43,7 @@ var getPackagesSinceRef = /*#__PURE__*/function () {
|
|
|
43
43
|
while (1) {
|
|
44
44
|
switch (_context.prev = _context.next) {
|
|
45
45
|
case 0:
|
|
46
|
-
git = (0,
|
|
46
|
+
git = (0, _simpleGit.default)();
|
|
47
47
|
_context.prev = 1;
|
|
48
48
|
_context.next = 4;
|
|
49
49
|
return git.revparse(['--verify', ref]);
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/cli.js
CHANGED
|
@@ -8,6 +8,7 @@ Usage
|
|
|
8
8
|
$ npx @atlaskit/codemod-cli [options] <file-paths>...
|
|
9
9
|
|
|
10
10
|
Options
|
|
11
|
+
--preset, -n select transform by preset name, avoid user interaction
|
|
11
12
|
--transform, -t the transform to run, will prompt for a transform if not provided and no module is passed
|
|
12
13
|
--since-ref, runs transforms for all packages that have been upgraded since the specified git ref
|
|
13
14
|
--packages, runs transforms for the specified comma separated list of packages, optionally include a version for each package to run all transforms since that version
|
|
@@ -34,6 +35,10 @@ Examples
|
|
|
34
35
|
type: 'string',
|
|
35
36
|
alias: 't'
|
|
36
37
|
},
|
|
38
|
+
preset: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
alias: 'n'
|
|
41
|
+
},
|
|
37
42
|
packages: {
|
|
38
43
|
type: 'string'
|
|
39
44
|
},
|
package/dist/es2019/main.js
CHANGED
|
@@ -55,6 +55,18 @@ const getTransformPrompt = async transforms => {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
const resolveTransform = async (flags, transforms) => {
|
|
58
|
+
if (flags.preset) {
|
|
59
|
+
const transform = transforms.find(({
|
|
60
|
+
name
|
|
61
|
+
}) => name === flags.preset);
|
|
62
|
+
|
|
63
|
+
if (!transform) {
|
|
64
|
+
console.warn(`No preset found for: ${chalk.bgRed(flags.preset)}`);
|
|
65
|
+
} else {
|
|
66
|
+
return transform; // Return only if transform found.
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
58
70
|
if (flags.transform && hasTransform(flags.transform)) {
|
|
59
71
|
return parseTransformPath(flags.transform);
|
|
60
72
|
}
|
package/dist/es2019/sinceRef.js
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/cli.js
CHANGED
|
@@ -15,12 +15,16 @@ function _run() {
|
|
|
15
15
|
while (1) {
|
|
16
16
|
switch (_context.prev = _context.next) {
|
|
17
17
|
case 0:
|
|
18
|
-
cli = meow("\nUsage\n $ npx @atlaskit/codemod-cli [options] <file-paths>...\n\nOptions\n --transform, -t the transform to run, will prompt for a transform if not provided and no module is passed\n --since-ref, runs transforms for all packages that have been upgraded since the specified git ref\n --packages, runs transforms for the specified comma separated list of packages, optionally include a version for each package to run all transforms since that version\n --parser, -p babel|babylon|flow|ts|tsx parser to use for parsing the source files (default: babel)\n --extensions, -e transform files with these file extensions (comma separated list) (default: js)\n --ignore-pattern, ignore files that match a provided glob expression\n --fail-on-error, return a 1 exit code when errors were found during execution of codemods\n --version, -v version number\n --no-filter-paths disables dependant package file path filtering logic \n --help Help me \uD83D\uDE31\n\nExamples\n # Run a codemod over the /project/src directory, will be prompted for which codemod to run\n $ npx @atlaskit/codemod-cli /project/src\n\n # Run the \"4.0.0-remove-appearance-prop\" transform of the \"button\" package\n $ npx @atlaskit/codemod-cli -t button@4.0.0-remove-appearance-prop /project/src\n\n # Run all transforms for \"@atlaskit/button\" greater than version 3.0.0 and @atlaskit/range greater than 4.0.0\n $ npx @atlaskit/codemod-cli --packages @atlaskit/button@3.0.0,@atlaskit/range@4.0.0 /project/src\n", {
|
|
18
|
+
cli = meow("\nUsage\n $ npx @atlaskit/codemod-cli [options] <file-paths>...\n\nOptions\n --preset, -n select transform by preset name, avoid user interaction\n --transform, -t the transform to run, will prompt for a transform if not provided and no module is passed\n --since-ref, runs transforms for all packages that have been upgraded since the specified git ref\n --packages, runs transforms for the specified comma separated list of packages, optionally include a version for each package to run all transforms since that version\n --parser, -p babel|babylon|flow|ts|tsx parser to use for parsing the source files (default: babel)\n --extensions, -e transform files with these file extensions (comma separated list) (default: js)\n --ignore-pattern, ignore files that match a provided glob expression\n --fail-on-error, return a 1 exit code when errors were found during execution of codemods\n --version, -v version number\n --no-filter-paths disables dependant package file path filtering logic \n --help Help me \uD83D\uDE31\n\nExamples\n # Run a codemod over the /project/src directory, will be prompted for which codemod to run\n $ npx @atlaskit/codemod-cli /project/src\n\n # Run the \"4.0.0-remove-appearance-prop\" transform of the \"button\" package\n $ npx @atlaskit/codemod-cli -t button@4.0.0-remove-appearance-prop /project/src\n\n # Run all transforms for \"@atlaskit/button\" greater than version 3.0.0 and @atlaskit/range greater than 4.0.0\n $ npx @atlaskit/codemod-cli --packages @atlaskit/button@3.0.0,@atlaskit/range@4.0.0 /project/src\n", {
|
|
19
19
|
flags: {
|
|
20
20
|
transform: {
|
|
21
21
|
type: 'string',
|
|
22
22
|
alias: 't'
|
|
23
23
|
},
|
|
24
|
+
preset: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
alias: 'n'
|
|
27
|
+
},
|
|
24
28
|
packages: {
|
|
25
29
|
type: 'string'
|
|
26
30
|
},
|
package/dist/esm/main.js
CHANGED
|
@@ -100,29 +100,53 @@ var getTransformPrompt = /*#__PURE__*/function () {
|
|
|
100
100
|
|
|
101
101
|
var resolveTransform = /*#__PURE__*/function () {
|
|
102
102
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(flags, transforms) {
|
|
103
|
+
var transform;
|
|
103
104
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
104
105
|
while (1) {
|
|
105
106
|
switch (_context2.prev = _context2.next) {
|
|
106
107
|
case 0:
|
|
108
|
+
if (!flags.preset) {
|
|
109
|
+
_context2.next = 7;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
transform = transforms.find(function (_ref5) {
|
|
114
|
+
var name = _ref5.name;
|
|
115
|
+
return name === flags.preset;
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
if (transform) {
|
|
119
|
+
_context2.next = 6;
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
console.warn("No preset found for: ".concat(chalk.bgRed(flags.preset)));
|
|
124
|
+
_context2.next = 7;
|
|
125
|
+
break;
|
|
126
|
+
|
|
127
|
+
case 6:
|
|
128
|
+
return _context2.abrupt("return", transform);
|
|
129
|
+
|
|
130
|
+
case 7:
|
|
107
131
|
if (!(flags.transform && hasTransform(flags.transform))) {
|
|
108
|
-
_context2.next =
|
|
132
|
+
_context2.next = 9;
|
|
109
133
|
break;
|
|
110
134
|
}
|
|
111
135
|
|
|
112
136
|
return _context2.abrupt("return", parseTransformPath(flags.transform));
|
|
113
137
|
|
|
114
|
-
case
|
|
138
|
+
case 9:
|
|
115
139
|
if (flags.transform && !hasTransform(flags.transform)) {
|
|
116
140
|
console.warn("No available transform found for: ".concat(chalk.bgRed(flags.transform)));
|
|
117
141
|
}
|
|
118
142
|
|
|
119
|
-
_context2.next =
|
|
143
|
+
_context2.next = 12;
|
|
120
144
|
return getTransformPrompt(transforms);
|
|
121
145
|
|
|
122
|
-
case
|
|
146
|
+
case 12:
|
|
123
147
|
return _context2.abrupt("return", _context2.sent);
|
|
124
148
|
|
|
125
|
-
case
|
|
149
|
+
case 13:
|
|
126
150
|
case "end":
|
|
127
151
|
return _context2.stop();
|
|
128
152
|
}
|
|
@@ -136,7 +160,7 @@ var resolveTransform = /*#__PURE__*/function () {
|
|
|
136
160
|
}();
|
|
137
161
|
|
|
138
162
|
var runTransform = /*#__PURE__*/function () {
|
|
139
|
-
var
|
|
163
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(filePaths, transform, flags) {
|
|
140
164
|
var logger, codemodDirs, transformPath, args, jscodeshiftContent, jscodeshiftContentNew;
|
|
141
165
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
142
166
|
while (1) {
|
|
@@ -196,7 +220,7 @@ var runTransform = /*#__PURE__*/function () {
|
|
|
196
220
|
}));
|
|
197
221
|
|
|
198
222
|
return function runTransform(_x4, _x5, _x6) {
|
|
199
|
-
return
|
|
223
|
+
return _ref6.apply(this, arguments);
|
|
200
224
|
};
|
|
201
225
|
}();
|
|
202
226
|
|
|
@@ -254,7 +278,7 @@ var validatePackages = function validatePackages(packages, errorCallback) {
|
|
|
254
278
|
};
|
|
255
279
|
|
|
256
280
|
var parseArgs = /*#__PURE__*/function () {
|
|
257
|
-
var
|
|
281
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(input, flags) {
|
|
258
282
|
var packages, unvalidatedPackages, _unvalidatedPackages;
|
|
259
283
|
|
|
260
284
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
@@ -310,7 +334,7 @@ var parseArgs = /*#__PURE__*/function () {
|
|
|
310
334
|
}));
|
|
311
335
|
|
|
312
336
|
return function parseArgs(_x7, _x8) {
|
|
313
|
-
return
|
|
337
|
+
return _ref7.apply(this, arguments);
|
|
314
338
|
};
|
|
315
339
|
}();
|
|
316
340
|
|
|
@@ -340,7 +364,7 @@ function _main() {
|
|
|
340
364
|
case 4:
|
|
341
365
|
_yield$parseArgs = _context5.sent;
|
|
342
366
|
packages = _yield$parseArgs.packages;
|
|
343
|
-
_process$env$_PACKAGE = "0.
|
|
367
|
+
_process$env$_PACKAGE = "0.9.1", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
|
|
344
368
|
logger.log(chalk.bgBlue(chalk.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
|
|
345
369
|
|
|
346
370
|
if (packages && packages.length > 0) {
|
package/dist/esm/sinceRef.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import simpleGit from 'simple-git
|
|
3
|
+
import simpleGit from 'simple-git';
|
|
4
4
|
import { ValidationError } from './types';
|
|
5
5
|
var packageRegex = /"(@(?:atlaskit|atlassian|atlassiansox)\/.*)": "(.*)"/;
|
|
6
6
|
|
package/dist/esm/version.json
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export declare type CliFlags = {
|
|
|
5
5
|
* The transform to run
|
|
6
6
|
*/
|
|
7
7
|
transform?: string;
|
|
8
|
+
/**
|
|
9
|
+
* select which transform to run
|
|
10
|
+
*/
|
|
11
|
+
preset?: string;
|
|
8
12
|
/**
|
|
9
13
|
* Comma separated list of packages to run transforms for, @scope/package[@version]. If version is supplied, will only run transforms above that version
|
|
10
14
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/codemod-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "A cli for distributing codemods for atlassian-frontend components and services",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"codemod-cli": "./bin/codemod-cli.js"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/tokens": "^0.
|
|
27
|
+
"@atlaskit/tokens": "^0.8.0",
|
|
28
28
|
"@babel/runtime": "^7.0.0",
|
|
29
29
|
"@types/chalk": "^2.2.0",
|
|
30
30
|
"@types/jscodeshift": "^0.11.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"meow": "^8.1.1",
|
|
36
36
|
"projector-spawn": "^1.0.1",
|
|
37
37
|
"semver": "^7.3.0",
|
|
38
|
-
"simple-git": "^
|
|
38
|
+
"simple-git": "^2.48.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@atlaskit/docs": "*",
|