@atlaskit/codemod-cli 0.26.0 → 0.26.2

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/codemod-cli
2
2
 
3
+ ## 0.26.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#137870](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137870)
8
+ [`92637b4b74cf7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/92637b4b74cf7) -
9
+ Fixed the import path check in remove-gemini-dark-options transformer
10
+
11
+ ## 0.26.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#136464](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136464)
16
+ [`4f11a637eccad`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4f11a637eccad) -
17
+ Fixed the import path checking in remove-gemini-dark-options transformer.
18
+
3
19
  ## 0.26.0
4
20
 
5
21
  ### Minor Changes
package/dist/cjs/main.js CHANGED
@@ -305,7 +305,7 @@ function _main() {
305
305
  case 4:
306
306
  _yield$parseArgs = _context5.sent;
307
307
  packages = _yield$parseArgs.packages;
308
- _process$env$_PACKAGE = "0.26.0", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
308
+ _process$env$_PACKAGE = "0.26.2", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
309
309
  logger.log(_chalk.default.bgBlue(_chalk.default.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
310
310
  if (packages && packages.length > 0) {
311
311
  logger.log(_chalk.default.gray("Searching for codemods for newer versions of the following packages: ".concat(packages.map(function (pkg) {
@@ -12,9 +12,11 @@ function transformer(file, api) {
12
12
  var j = api.jscodeshift;
13
13
  var source = j(file.source);
14
14
 
15
- // check if import from @af/visual-regression
16
- var imports = (0, _utils.getImportDeclaration)(j, source, '@af/visual-regression');
17
- if (!imports.length) {
15
+ // check if import from @af/visual-regression, @atlassian/jira-vr-testing or @atlassian/gemini
16
+ var platformImports = (0, _utils.getImportDeclaration)(j, source, '@af/visual-regression');
17
+ var jiraImports = (0, _utils.getImportDeclaration)(j, source, '@atlassian/jira-vr-testing');
18
+ var geminiImports = (0, _utils.getImportDeclaration)(j, source, '@atlassian/gemini');
19
+ if (!platformImports.length && !jiraImports.length && !geminiImports.length) {
18
20
  return file.source;
19
21
  }
20
22
 
@@ -6,9 +6,11 @@ function transformer(file, api) {
6
6
  const j = api.jscodeshift;
7
7
  const source = j(file.source);
8
8
 
9
- // check if import from @af/visual-regression
10
- const imports = getImportDeclaration(j, source, '@af/visual-regression');
11
- if (!imports.length) {
9
+ // check if import from @af/visual-regression, @atlassian/jira-vr-testing or @atlassian/gemini
10
+ const platformImports = getImportDeclaration(j, source, '@af/visual-regression');
11
+ const jiraImports = getImportDeclaration(j, source, '@atlassian/jira-vr-testing');
12
+ const geminiImports = getImportDeclaration(j, source, '@atlassian/gemini');
13
+ if (!platformImports.length && !jiraImports.length && !geminiImports.length) {
12
14
  return file.source;
13
15
  }
14
16
 
package/dist/esm/main.js CHANGED
@@ -298,7 +298,7 @@ function _main() {
298
298
  case 4:
299
299
  _yield$parseArgs = _context5.sent;
300
300
  packages = _yield$parseArgs.packages;
301
- _process$env$_PACKAGE = "0.26.0", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
301
+ _process$env$_PACKAGE = "0.26.2", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
302
302
  logger.log(chalk.bgBlue(chalk.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
303
303
  if (packages && packages.length > 0) {
304
304
  logger.log(chalk.gray("Searching for codemods for newer versions of the following packages: ".concat(packages.map(function (pkg) {
@@ -6,9 +6,11 @@ function transformer(file, api) {
6
6
  var j = api.jscodeshift;
7
7
  var source = j(file.source);
8
8
 
9
- // check if import from @af/visual-regression
10
- var imports = getImportDeclaration(j, source, '@af/visual-regression');
11
- if (!imports.length) {
9
+ // check if import from @af/visual-regression, @atlassian/jira-vr-testing or @atlassian/gemini
10
+ var platformImports = getImportDeclaration(j, source, '@af/visual-regression');
11
+ var jiraImports = getImportDeclaration(j, source, '@atlassian/jira-vr-testing');
12
+ var geminiImports = getImportDeclaration(j, source, '@atlassian/gemini');
13
+ if (!platformImports.length && !jiraImports.length && !geminiImports.length) {
12
14
  return file.source;
13
15
  }
14
16
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { type Flags, type Default } from './types';
2
3
  declare const defaultFlags: {
3
4
  parser: "babel";
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { type Flags, type Default } from './types';
2
3
  declare const defaultFlags: {
3
4
  parser: "babel";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/codemod-cli",
3
- "version": "0.26.0",
3
+ "version": "0.26.2",
4
4
  "description": "A cli for distributing codemods for atlassian-frontend components and services",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"