-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* breaking: Ignored styles.js in an addon's app folder * feature: Handled controllers, routes, services, and route templates in v1 addons * refactor: Used migrateV1Addon() to migrate engines * breaking: Removed engine as a possible option for --type * refactor: Removed unused code --------- Co-authored-by: ijlee2 <[email protected]>
- Loading branch information
Showing
51 changed files
with
101 additions
and
595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
src/migration/engine/steps/create-file-path-maps/addon/index.ts
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
src/migration/engine/steps/create-file-path-maps/tests/index.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './app/index.js'; | ||
export * from './engine/index.js'; | ||
export * from './v1-addon/index.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
src/migration/v1-addon/steps/create-file-path-maps/app/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
import type { FilePathMap, Options } from '../../../../../types/index.js'; | ||
import { mapComponentClasses } from './map-component-classes.js'; | ||
import { mapComponentStylesheets } from './map-component-stylesheets.js'; | ||
import { mapComponentTemplates } from './map-component-templates.js'; | ||
import { mapRouteControllers } from './map-route-controllers.js'; | ||
import { mapRouteRoutes } from './map-route-routes.js'; | ||
import { mapRouteTemplates } from './map-route-templates.js'; | ||
import { mapServices } from './map-services.js'; | ||
|
||
export function mapAppFolder(options: Options): FilePathMap { | ||
return new Map([ | ||
...mapComponentClasses(options), | ||
...mapComponentStylesheets(options), | ||
...mapComponentTemplates(options), | ||
...mapRouteControllers(options), | ||
...mapRouteRoutes(options), | ||
...mapRouteTemplates(options), | ||
...mapServices(options), | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/migration/v1-addon/steps/create-file-path-maps/app/map-services.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { findFiles } from '@codemod-utils/files'; | ||
|
||
import type { | ||
FilePathMapEntries, | ||
Options, | ||
} from '../../../../../types/index.js'; | ||
import { renamePodPath } from '../../../../../utils/files/index.js'; | ||
|
||
export function mapServices(options: Options): FilePathMapEntries { | ||
const { projectRoot } = options; | ||
|
||
const filePaths = findFiles('app/**/service.js', { | ||
projectRoot, | ||
}); | ||
|
||
return filePaths.map((oldFilePath) => { | ||
const newFilePath = renamePodPath(oldFilePath, { | ||
entityDir: 'app', | ||
replace: (key: string) => { | ||
return `app/services/${key}`; | ||
}, | ||
}); | ||
|
||
return [oldFilePath, newFilePath]; | ||
}); | ||
} |
10 changes: 9 additions & 1 deletion
10
src/migration/v1-addon/steps/create-file-path-maps/tests/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
import type { FilePathMap, Options } from '../../../../../types/index.js'; | ||
import { mapComponents } from './map-components.js'; | ||
import { mapRouteControllers } from './map-route-controllers.js'; | ||
import { mapRouteRoutes } from './map-route-routes.js'; | ||
import { mapServices } from './map-services.js'; | ||
|
||
export function mapTestsFolder(options: Options): FilePathMap { | ||
return new Map([...mapComponents(options)]); | ||
return new Map([ | ||
...mapComponents(options), | ||
...mapRouteControllers(options), | ||
...mapRouteRoutes(options), | ||
...mapServices(options), | ||
]); | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/fixtures/v1-addon/javascript/input/app/components/ui/form/field/styles.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/fixtures/v1-addon/javascript/input/app/components/ui/form/information/styles.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/fixtures/v1-addon/javascript/input/app/components/ui/form/styles.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/fixtures/v1-addon/sass/input/app/components/ui/form/field/styles.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/fixtures/v1-addon/sass/input/app/components/ui/form/information/styles.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/fixtures/v1-addon/sass/input/app/components/ui/form/styles.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/fixtures/v1-addon/typescript/input/app/components/ui/form/field/styles.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/fixtures/v1-addon/typescript/input/app/components/ui/form/information/styles.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/fixtures/v1-addon/typescript/input/app/components/ui/form/styles.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.