ember-codemod-pod-to-octane 0.3.1 → 1.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.
package/README.md CHANGED
@@ -7,7 +7,7 @@ _Codemod to un-pod Ember apps, addons, and engines_
7
7
 
8
8
  ## Usage
9
9
 
10
- Step 1. Quickly return to [default Octane](https://cli.emberjs.com/release/advanced-use/project-layouts/#classiclayout).
10
+ Step 1. Quickly return to [default Octane](https://cli.emberjs.com/release/advanced-use/project-layouts/#classiclayout).<sup>1</sup>
11
11
 
12
12
  ```sh
13
13
  cd <your/project/path>
@@ -16,7 +16,9 @@ npx ember-codemod-pod-to-octane <arguments>
16
16
 
17
17
  Step 2. Remove `podModulePrefix` from `config/environment.js` and `usePods` from `.ember-cli`.
18
18
 
19
- Step 3. Update references to the moved files (e.g. `import` statement, `composes` property from `ember-css-modules`).
19
+ Step 3. Update references originating from, as well as pointing to, the moved files. These can include `import` statement, `composes` property from `ember-css-modules`, etc.
20
+
21
+ <sup>1. By default, Octane assumes the **flat component structure**. So does this codemod to help different Ember projects converge to one layout. If you want the **nested component structure** (also supported by Octane), you can run [`ember-flat-to-nested`](https://github.com/bertdeblock/ember-flat-to-nested) afterwards.</sup>
20
22
 
21
23
 
22
24
  ### Arguments
@@ -55,7 +57,7 @@ Note, you can use `--root` to un-pod the demo app of an Ember addon.
55
57
 
56
58
  ```sh
57
59
  # If the current directory is the addon root
58
- npx ember-codemod-pod-to-octane --root=tests/dummy/app --type=app
60
+ npx ember-codemod-pod-to-octane --type=app --root=tests/dummy
59
61
  ```
60
62
 
61
63
  </details>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-codemod-pod-to-octane",
3
- "version": "0.3.1",
3
+ "version": "1.0.0",
4
4
  "description": "Codemod to un-pod Ember apps, addons, and engines",
5
5
  "keywords": [
6
6
  "ember-codemod",
@@ -41,17 +41,17 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@babel/core": "^7.18.13",
45
- "@babel/eslint-parser": "^7.18.9",
44
+ "@babel/core": "^7.19.6",
45
+ "@babel/eslint-parser": "^7.19.1",
46
46
  "glob": "^8.0.3",
47
- "yargs": "^17.5.1"
47
+ "yargs": "^17.6.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@sondr3/minitest": "^0.1.1",
51
- "eslint": "^8.22.0",
51
+ "eslint": "^8.26.0",
52
52
  "eslint-config-prettier": "^8.5.0",
53
53
  "eslint-plugin-prettier": "^4.2.1",
54
- "eslint-plugin-simple-import-sort": "^7.0.0",
54
+ "eslint-plugin-simple-import-sort": "^8.0.0",
55
55
  "fixturify": "^2.1.1",
56
56
  "lerna-changelog": "^2.2.0",
57
57
  "prettier": "^2.7.1"
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForComponentClasses(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForComponentStylesheets(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForComponentTemplates(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForRouteAdapters(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForRouteControllers(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForRouteModels(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForRouteRoutes(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForRouteSerializers(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForRouteStylesheets(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForRouteTemplates(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForServices(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForComponents(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForRouteControllers(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForRouteRoutes(options) {
@@ -1,6 +1,7 @@
1
- import glob from 'glob';
2
1
  import { join } from 'node:path';
3
2
 
3
+ import glob from 'glob';
4
+
4
5
  import { mapPaths } from '../../../utils/map-paths.js';
5
6
 
6
7
  export function migrationStrategyForServices(options) {