ember-codemod-pod-to-octane 1.2.2 → 1.2.3

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/README.md CHANGED
@@ -115,10 +115,13 @@ To better meet your needs, consider cloning the repo and running the codemod loc
115
115
 
116
116
  ```sh
117
117
  cd <your/cloned/repo>
118
- npx ts-node ./bin/ember-codemod-pod-to-octane.js --root=<your/project/path>
119
- ```
120
118
 
121
- ⚠️ At the moment, it is not possible to run the codemod locally, because `ts-node@10.9.1` doesn't support `typescript@v5` correctly. You can track the progress in [#32](https://github.com/ijlee2/ember-codemod-pod-to-octane/issues/32).
119
+ # Compile TypeScript
120
+ pnpm build
121
+
122
+ # Run codemod
123
+ ./dist/bin/ember-codemod-pod-to-octane.js --root=<your/project/path>
124
+ ```
122
125
 
123
126
 
124
127
  ## Compatibility
@@ -1,13 +1,6 @@
1
- import { readPackageJson } from '@codemod-utils/json';
2
- function analyzePackageJson(codemodOptions) {
3
- const packageJson = readPackageJson(codemodOptions);
4
- return packageJson.name;
5
- }
6
1
  export function createOptions(codemodOptions) {
7
- const projectName = analyzePackageJson(codemodOptions);
8
2
  return {
9
3
  podPath: codemodOptions.podPath,
10
- projectName,
11
4
  projectRoot: codemodOptions.projectRoot,
12
5
  projectType: codemodOptions.projectType,
13
6
  testRun: codemodOptions.testRun,
@@ -1,13 +1,6 @@
1
- import { readPackageJson } from '@codemod-utils/json';
2
- function analyzePackageJson(codemodOptions) {
3
- const packageJson = readPackageJson(codemodOptions);
4
- return packageJson.name;
5
- }
6
1
  export function createOptions(codemodOptions) {
7
- const projectName = analyzePackageJson(codemodOptions);
8
2
  return {
9
3
  podPath: codemodOptions.podPath,
10
- projectName,
11
4
  projectRoot: codemodOptions.projectRoot,
12
5
  projectType: codemodOptions.projectType,
13
6
  testRun: codemodOptions.testRun,
@@ -1,6 +1,6 @@
1
1
  import { moveFiles } from '@codemod-utils/files';
2
2
  import { migrationStrategyForAddonFolder } from './addon/index.js';
3
- import { createOptions, updateAbsolutePaths, useAbsolutePaths, useRelativePaths, } from './steps/index.js';
3
+ import { createOptions } from './steps/index.js';
4
4
  import { migrationStrategyForTestsFolder } from './tests/index.js';
5
5
  export function migrateEmberEngine(codemodOptions) {
6
6
  const options = createOptions(codemodOptions);
@@ -14,12 +14,7 @@ export function migrateEmberEngine(codemodOptions) {
14
14
  console.log(migrationStrategy);
15
15
  return;
16
16
  }
17
- // Prepare for migration
18
- useAbsolutePaths(options);
19
17
  // Preserve code
20
18
  moveFiles(migrationStrategyAddon, options);
21
19
  moveFiles(migrationStrategyTests, options);
22
- // Update import paths
23
- updateAbsolutePaths(migrationStrategy, options);
24
- useRelativePaths(options);
25
20
  }
@@ -1,14 +1,6 @@
1
- import { readPackageJson, validatePackageJson } from '@codemod-utils/json';
2
- function analyzePackageJson(codemodOptions) {
3
- const packageJson = readPackageJson(codemodOptions);
4
- validatePackageJson(packageJson);
5
- return packageJson.name;
6
- }
7
1
  export function createOptions(codemodOptions) {
8
- const projectName = analyzePackageJson(codemodOptions);
9
2
  return {
10
3
  podPath: codemodOptions.podPath,
11
- projectName,
12
4
  projectRoot: codemodOptions.projectRoot,
13
5
  projectType: codemodOptions.projectType,
14
6
  testRun: codemodOptions.testRun,
@@ -1,4 +1 @@
1
1
  export * from './create-options.js';
2
- export * from './update-absolute-paths.js';
3
- export * from './use-absolute-paths.js';
4
- export * from './use-relative-paths.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-codemod-pod-to-octane",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Codemod to un-pod Ember apps, addons, and engines",
5
5
  "keywords": [
6
6
  "codemod",
@@ -25,7 +25,6 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@codemod-utils/files": "^0.4.1",
28
- "@codemod-utils/json": "^0.3.0",
29
28
  "yargs": "^17.7.2"
30
29
  },
31
30
  "devDependencies": {
@@ -67,7 +66,7 @@
67
66
  }
68
67
  },
69
68
  "scripts": {
70
- "build": "tsc --project tsconfig.build.json",
69
+ "build": "tsc --project tsconfig.build.json && chmod +x dist/bin/ember-codemod-pod-to-octane.js",
71
70
  "changelog": "lerna-changelog",
72
71
  "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
73
72
  "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",