@atlaskit/codemod-cli 0.31.0 → 0.31.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 +6 -0
- package/dist/cjs/main.js +1 -1
- package/dist/cjs/presets/remove-token-fallbacks/utils/reporter.js +3 -2
- package/dist/es2019/presets/remove-token-fallbacks/utils/reporter.js +4 -0
- package/dist/esm/main.js +1 -1
- package/dist/esm/presets/remove-token-fallbacks/utils/reporter.js +4 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/cjs/main.js
CHANGED
|
@@ -362,7 +362,7 @@ function _main() {
|
|
|
362
362
|
case 4:
|
|
363
363
|
_yield$parseArgs = _context6.sent;
|
|
364
364
|
packages = _yield$parseArgs.packages;
|
|
365
|
-
_process$env$_PACKAGE = "0.
|
|
365
|
+
_process$env$_PACKAGE = "0.0.0-development", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
|
|
366
366
|
logger.log(_chalk.default.bgBlue(_chalk.default.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
|
|
367
367
|
if (packages && packages.length > 0) {
|
|
368
368
|
logger.log(_chalk.default.gray("Searching for codemods for newer versions of the following packages: ".concat(packages.map(function (pkg) {
|
|
@@ -15,7 +15,7 @@ var _path = _interopRequireDefault(require("path"));
|
|
|
15
15
|
var _uuid = require("uuid");
|
|
16
16
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
17
17
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
18
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /* eslint-disable no-console */
|
|
18
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /* eslint-disable no-console */ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
19
19
|
function writeToCsv(_x, _x2) {
|
|
20
20
|
return _writeToCsv.apply(this, arguments);
|
|
21
21
|
}
|
|
@@ -296,7 +296,8 @@ function _writeReports() {
|
|
|
296
296
|
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
297
297
|
while (1) switch (_context6.prev = _context6.next) {
|
|
298
298
|
case 0:
|
|
299
|
-
|
|
299
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
300
|
+
replacementsFilePath = _path.default.join(reportFolder, "".concat((0, _uuid.v4)(), "_success.csv")); // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
300
301
|
nonReplacementsFilePath = _path.default.join(reportFolder, "".concat((0, _uuid.v4)(), "_failed.csv"));
|
|
301
302
|
_context6.next = 4;
|
|
302
303
|
return _promises.default.mkdir(reportFolder, {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
import fs from 'fs/promises';
|
|
3
3
|
import path from 'path';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
7
|
async function writeToCsv(filePath, data) {
|
|
6
8
|
await fs.writeFile(filePath, data.join('\n'), 'utf-8');
|
|
@@ -112,7 +114,9 @@ function prepareCsvData(items) {
|
|
|
112
114
|
});
|
|
113
115
|
}
|
|
114
116
|
export async function writeReports(details, reportFolder) {
|
|
117
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
115
118
|
const replacementsFilePath = path.join(reportFolder, `${uuidv4()}_success.csv`);
|
|
119
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
116
120
|
const nonReplacementsFilePath = path.join(reportFolder, `${uuidv4()}_failed.csv`);
|
|
117
121
|
await fs.mkdir(reportFolder, {
|
|
118
122
|
recursive: true
|
package/dist/esm/main.js
CHANGED
|
@@ -355,7 +355,7 @@ function _main() {
|
|
|
355
355
|
case 4:
|
|
356
356
|
_yield$parseArgs = _context6.sent;
|
|
357
357
|
packages = _yield$parseArgs.packages;
|
|
358
|
-
_process$env$_PACKAGE = "0.
|
|
358
|
+
_process$env$_PACKAGE = "0.0.0-development", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
|
|
359
359
|
logger.log(chalk.bgBlue(chalk.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
|
|
360
360
|
if (packages && packages.length > 0) {
|
|
361
361
|
logger.log(chalk.gray("Searching for codemods for newer versions of the following packages: ".concat(packages.map(function (pkg) {
|
|
@@ -7,6 +7,8 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
7
7
|
/* eslint-disable no-console */
|
|
8
8
|
import fs from 'fs/promises';
|
|
9
9
|
import path from 'path';
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
10
12
|
import { v4 as uuidv4 } from 'uuid';
|
|
11
13
|
function writeToCsv(_x, _x2) {
|
|
12
14
|
return _writeToCsv.apply(this, arguments);
|
|
@@ -288,7 +290,8 @@ function _writeReports() {
|
|
|
288
290
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
289
291
|
while (1) switch (_context6.prev = _context6.next) {
|
|
290
292
|
case 0:
|
|
291
|
-
|
|
293
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
294
|
+
replacementsFilePath = path.join(reportFolder, "".concat(uuidv4(), "_success.csv")); // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
292
295
|
nonReplacementsFilePath = path.join(reportFolder, "".concat(uuidv4(), "_failed.csv"));
|
|
293
296
|
_context6.next = 4;
|
|
294
297
|
return fs.mkdir(reportFolder, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/codemod-cli",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.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/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"bin": "./bin/codemod-cli.js",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
32
|
-
"@atlaskit/tokens": "^
|
|
32
|
+
"@atlaskit/tokens": "^8.0.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
34
|
"@codeshift/utils": "^0.2.4",
|
|
35
35
|
"@hypermod/utils": "^0.4.2",
|