-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated package configurations (#456)
* chore: Updated project configuration (ember-codemod-ember-render-helpers-to-v1) * refactor: Simplified src * chore: Updated project configuration (ember-render-helpers) * chore: Standardized scripts * chore: Installed update-workspace-root-version to help create tag names * chore: Added lockfile * chore: Added changeset --------- Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
- Loading branch information
Showing
13 changed files
with
125 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"ember-codemod-ember-render-helpers-to-v1": patch | ||
"ember-render-helpers": patch | ||
"test-app": patch | ||
--- | ||
|
||
Updated package configurations |
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
44 changes: 0 additions & 44 deletions
44
packages/ember-codemod-ember-render-helpers-to-v1/codemod-test-fixture.sh
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
packages/ember-codemod-ember-render-helpers-to-v1/codemod-test-fixtures.sh
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
19 changes: 7 additions & 12 deletions
19
packages/ember-codemod-ember-render-helpers-to-v1/src/steps/create-options.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,22 +1,17 @@ | ||
import type { CodemodOptions, Options } from '../types/index.js'; | ||
|
||
function getSrc(projectType: CodemodOptions['projectType']): string[] { | ||
switch (projectType) { | ||
case 'app': { | ||
return ['app/{components,templates}/**/*.hbs']; | ||
} | ||
|
||
case 'v1-addon': { | ||
return ['addon/{components,templates}/**/*.hbs']; | ||
} | ||
} | ||
} | ||
const source = { | ||
app: ['app/{components,templates}/**/*.hbs'], | ||
'v1-addon': ['addon/{components,templates}/**/*.hbs'], | ||
}; | ||
|
||
export function createOptions(codemodOptions: CodemodOptions): Options { | ||
const { projectRoot, projectType } = codemodOptions; | ||
|
||
const src = source[projectType]; | ||
|
||
return { | ||
projectRoot, | ||
src: getSrc(projectType), | ||
src, | ||
}; | ||
} |
32 changes: 32 additions & 0 deletions
32
packages/ember-codemod-ember-render-helpers-to-v1/update-test-fixtures.sh
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,32 @@ | ||
#!/usr/bin/env sh | ||
|
||
#---------- | ||
# | ||
# A. Purpose | ||
# | ||
# Fix all test fixtures after updating the source code. | ||
# | ||
# B. Usage | ||
# | ||
# ./update-test-fixtures.sh | ||
# | ||
#--------- | ||
|
||
# Compile TypeScript | ||
pnpm build | ||
|
||
# Update my-app | ||
rm -r "tests/fixtures/my-app/output" | ||
cp -r "tests/fixtures/my-app/input" "tests/fixtures/my-app/output" | ||
|
||
./dist/bin/ember-codemod-ember-render-helpers-to-v1.js \ | ||
--root "tests/fixtures/my-app/output" \ | ||
--type "app" | ||
|
||
# Update my-v1-addon | ||
rm -r "tests/fixtures/my-v1-addon/output" | ||
cp -r "tests/fixtures/my-v1-addon/input" "tests/fixtures/my-v1-addon/output" | ||
|
||
./dist/bin/ember-codemod-ember-render-helpers-to-v1.js \ | ||
--root "tests/fixtures/my-v1-addon/output" \ | ||
--type "v1-addon" |
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 |
---|---|---|
|
@@ -4,6 +4,3 @@ | |
# compiled output | ||
/declarations/ | ||
/dist/ | ||
|
||
# misc | ||
/coverage/ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.