@octaviaflow/upgrade 1.0.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.
@@ -1,46 +1,39 @@
1
- /**
2
- * Copyright OctaviaFlow
3
- * Author: Vishal Kumar
4
- * Created: 11/November/2025
5
- *
6
- * This source code is licensed under the Apache-2.0 license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
1
  #!/usr/bin/env node
11
2
 
12
3
  /**
13
4
  * Copyright OctaviaFlow
14
5
  * Author: Vishal Kumar
15
6
  * Created: 11/November/2025
16
- *
7
+ *
8
+ * This source code is licensed under the Apache-2.0 license found in the
9
+ * LICENSE file in the root directory of this source tree.
17
10
  */
18
11
 
19
12
  /* eslint-disable no-console */
20
13
 
21
- 'use strict';
14
+ "use strict";
22
15
 
23
16
  // Makes the script crash on unhandled rejections instead of silently
24
17
  // ignoring them. In the future, promise rejections that are not handled will
25
18
  // terminate the Node.js process with a non-zero exit code.
26
- process.on('unhandledRejection', (error) => {
19
+ process.on("unhandledRejection", (error) => {
27
20
  console.error(error);
28
21
  });
29
22
 
30
23
  var currentNodeVersion = process.versions.node;
31
- var semver = currentNodeVersion.split('.');
24
+ var semver = currentNodeVersion.split(".");
32
25
  var major = semver[0];
33
26
 
34
27
  if (major < 14) {
35
28
  console.error(
36
29
  `You are running Node ${currentNodeVersion}.\n` +
37
30
  `octaviaflow-upgrade requires Node 14 or higher, please update your ` +
38
- `version of Node.`
31
+ `version of Node.`,
39
32
  );
40
33
  process.exit(1);
41
34
  }
42
35
 
43
- var { main } = require('../cli');
36
+ var { main } = require("../cli");
44
37
 
45
38
  main(process).catch((error) => {
46
39
  console.error(error);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@octaviaflow/upgrade",
3
3
  "description": "A tool for upgrading OctaviaFlow versions",
4
- "version": "1.0.0",
4
+ "version": "2.0.0",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
7
7
  "octaviaflow-upgrade": "./bin/octaviaflow-upgrade.js"
@@ -2,16 +2,16 @@
2
2
  * Copyright OctaviaFlow
3
3
  * Author: Vishal Kumar
4
4
  * Created: 11/November/2025
5
- *
5
+ *
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
10
  //prettier-ignore
11
- import { Button } from 'carbon-components-react';
11
+ import { Button } from 'octaviaflow-components-react';
12
12
  //prettier-ignore
13
- import { Tile, Tooltip } from 'carbon-components-react';
13
+ import { Tile, Tooltip } from 'octaviaflow-components-react';
14
14
  //prettier-ignore
15
- import CodeSnippet from 'carbon-components-react';
16
- import Something from 'somewhere-else';
17
- import { SomethingElse } from 'somewhere-else';
15
+ import CodeSnippet from 'octaviaflow-components-react';
16
+ import Something from "somewhere-else";
17
+ import { SomethingElse } from "somewhere-else";
@@ -2,14 +2,13 @@
2
2
  * Copyright OctaviaFlow
3
3
  * Author: Vishal Kumar
4
4
  * Created: 11/November/2025
5
- *
5
+ *
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
+ "use strict";
10
11
 
11
- 'use strict';
12
+ const { defineTest } = require("jscodeshift/dist/testUtils");
12
13
 
13
- const { defineTest } = require('jscodeshift/dist/testUtils');
14
-
15
- defineTest(__dirname, 'update-carbon-components-react-import-to-scoped');
14
+ defineTest(__dirname, "update-octaviaflow-components-react-import-to-scoped");
@@ -2,14 +2,13 @@
2
2
  * Copyright OctaviaFlow
3
3
  * Author: Vishal Kumar
4
4
  * Created: 11/November/2025
5
- *
5
+ *
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
+ "use strict";
10
11
 
11
- 'use strict';
12
+ const { defineTest } = require("jscodeshift/dist/testUtils");
12
13
 
13
- const { defineTest } = require('jscodeshift/dist/testUtils');
14
-
15
- defineTest(__dirname, 'update-carbon-icons-react-import-to-carbon-react');
14
+ defineTest(__dirname, "update-octaviaflow-icons-react-import-to-carbon-react");
@@ -2,7 +2,7 @@
2
2
  * Copyright OctaviaFlow
3
3
  * Author: Vishal Kumar
4
4
  * Created: 11/November/2025
5
- *
5
+ *
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
@@ -13,11 +13,11 @@
13
13
  * This source code is licensed under the Apache-2.0 license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  *
16
- * Rewrites imports from 'carbon-components-react' to '@octaviaflow/react'
16
+ * Rewrites imports from 'octaviaflow-components-react' to '@octaviaflow/react'
17
17
  *
18
18
  * Transforms:
19
19
  *
20
- * import { Button } from 'carbon-components-react';
20
+ * import { Button } from 'octaviaflow-components-react';
21
21
  *
22
22
  * Into:
23
23
  *
@@ -30,11 +30,11 @@ function transformer(file, api) {
30
30
  return j(file.source)
31
31
  .find(j.ImportDeclaration, {
32
32
  source: {
33
- value: 'carbon-components-react',
33
+ value: "octaviaflow-components-react",
34
34
  },
35
35
  })
36
36
  .forEach((path) => {
37
- path.get('source').replace(j.stringLiteral('@octaviaflow/react'));
37
+ path.get("source").replace(j.stringLiteral("@octaviaflow/react"));
38
38
  })
39
39
  .toSource();
40
40
  }
@@ -2,7 +2,7 @@
2
2
  * Copyright OctaviaFlow
3
3
  * Author: Vishal Kumar
4
4
  * Created: 11/November/2025
5
- *
5
+ *
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
@@ -30,11 +30,11 @@ function transformer(file, api) {
30
30
  return j(file.source)
31
31
  .find(j.ImportDeclaration, {
32
32
  source: {
33
- value: '@octaviaflow/icons-react',
33
+ value: "@octaviaflow/icons-react",
34
34
  },
35
35
  })
36
36
  .forEach((path) => {
37
- path.get('source').replace(j.stringLiteral('@octaviaflow/react/icons'));
37
+ path.get("source").replace(j.stringLiteral("@octaviaflow/react/icons"));
38
38
  })
39
39
  .toSource();
40
40
  }