Skip to content

Commit cc7957f

Browse files
authored
Updated dependencies (#47)
* chore: Standardized format * chore: Standardized scripts * chore: Updated @codemod-utils packages --------- Co-authored-by: ijlee2 <[email protected]>
1 parent ad16797 commit cc7957f

File tree

6 files changed

+65
-58
lines changed

6 files changed

+65
-58
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Changelog
2+
13
## 0.7.2 (2023-06-13)
24

35
### Bug Fix

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ You can also look at another codemod called [`ember-addon-migrator`](https://git
113113

114114
## Compatibility
115115

116-
* Node.js v16 or above
116+
- Node.js v16 or above
117117

118118

119119
## Contributing

codemod-test-fixture.sh

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,22 @@
44
#
55
# A. Purpose
66
#
7-
# Fix the expected output of a test fixture after updating the source code
8-
# of ember-codemod-v1-to-v2.
7+
# Fix the expected output of a test fixture after updating the source code.
98
#
109
# B. Usage
1110
#
12-
# ./codemod-test-fixture.sh [OPTIONAL-FLAGS] <FIXTURE-NAME>
13-
#
14-
# Step 1. Run the script to update the files in `tests/fixtures/<FIXTURE-NAME>/output`.
15-
#
16-
# Choice a. Run the codemod without the optional arguments.
11+
# For named arguments, do not include `=` between the flag and the value.
12+
# Positional arguments are to appear at the end.
1713
#
18-
# ./codemod-test-fixture.sh ember-container-query-glint
19-
#
20-
# Choice b. Run the codemod with the optional arguments. (For named arguments,
21-
# do not include `=` between the flag and the value. Positional arguments must
22-
# appear at the end.)
23-
#
24-
# ./codemod-test-fixture.sh -a "packages/ember-container-query" ember-container-query-customizations
14+
# ./codemod-test-fixture.sh [OPTIONAL-FLAGS] <FIXTURE-NAME>
2515
#
2616
#---------
2717

2818
# Read the named arguments
29-
while getopts ":a:t:T:" flag
19+
while getopts ":a:" flag
3020
do
3121
case $flag in
32-
a) ADDON_LOCATION=$OPTARG;;
33-
t) TEST_APP_LOCATION=$OPTARG;;
34-
T) TEST_APP_NAME=$OPTARG;;
22+
a) ARGUMENTS=$OPTARG;;
3523
esac
3624
done
3725

@@ -51,10 +39,6 @@ fi
5139
rm -r "tests/fixtures/$FIXTURE/output"
5240
cp -r "tests/fixtures/$FIXTURE/input" "tests/fixtures/$FIXTURE/output"
5341

54-
./dist/bin/ember-codemod-v1-to-v2.js \
55-
--addon-location=$ADDON_LOCATION \
56-
--root="tests/fixtures/$FIXTURE/output" \
57-
--test-app-location=$TEST_APP_LOCATION \
58-
--test-app-name=$TEST_APP_NAME
42+
./dist/bin/ember-codemod-v1-to-v2.js $ARGUMENTS --root="tests/fixtures/$FIXTURE/output"
5943

6044
echo "SUCCESS: Updated the output of $FIXTURE.\n"

codemod-test-fixtures.sh

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# A. Purpose
66
#
7-
# Fix all test fixtures after updating the source code of ember-codemod-v1-to-v2.
7+
# Fix all test fixtures after updating the source code.
88
#
99
# B. Usage
1010
#
@@ -15,13 +15,34 @@
1515
# Compile TypeScript
1616
pnpm build
1717

18-
./codemod-test-fixture.sh -a "packages/ember-container-query" -t "demo-app" -T "demo-app-for-ember-container-query" ember-container-query-customizations
19-
./codemod-test-fixture.sh ember-container-query-glint
20-
./codemod-test-fixture.sh ember-container-query-javascript
21-
./codemod-test-fixture.sh ember-container-query-scoped
22-
./codemod-test-fixture.sh ember-container-query-typescript
23-
./codemod-test-fixture.sh -a "packages/new-v1-addon" -t "demo-app" -T "demo-app-for-new-v1-addon" new-v1-addon-customizations
24-
./codemod-test-fixture.sh new-v1-addon-javascript
25-
./codemod-test-fixture.sh new-v1-addon-npm
26-
./codemod-test-fixture.sh new-v1-addon-pnpm
27-
./codemod-test-fixture.sh new-v1-addon-typescript
18+
./codemod-test-fixture.sh \
19+
-a "--addon-location packages/ember-container-query --test-app-location demo-app --test-app-name demo-app-for-ember-container-query" \
20+
ember-container-query-customizations
21+
22+
./codemod-test-fixture.sh \
23+
ember-container-query-glint
24+
25+
./codemod-test-fixture.sh \
26+
ember-container-query-javascript
27+
28+
./codemod-test-fixture.sh \
29+
ember-container-query-scoped
30+
31+
./codemod-test-fixture.sh \
32+
ember-container-query-typescript
33+
34+
./codemod-test-fixture.sh \
35+
-a "--addon-location packages/new-v1-addon --test-app-location demo-app --test-app-name demo-app-for-new-v1-addon" \
36+
new-v1-addon-customizations
37+
38+
./codemod-test-fixture.sh \
39+
new-v1-addon-javascript
40+
41+
./codemod-test-fixture.sh \
42+
new-v1-addon-npm
43+
44+
./codemod-test-fixture.sh \
45+
new-v1-addon-pnpm
46+
47+
./codemod-test-fixture.sh \
48+
new-v1-addon-typescript

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
"test": "./build.sh --test && mt dist-for-testing --quiet"
3939
},
4040
"dependencies": {
41-
"@codemod-utils/blueprints": "^0.2.0",
42-
"@codemod-utils/files": "^0.4.1",
43-
"@codemod-utils/json": "^0.3.1",
41+
"@codemod-utils/blueprints": "^0.2.1",
42+
"@codemod-utils/files": "^0.5.0",
43+
"@codemod-utils/json": "^0.3.2",
4444
"strip-json-comments": "^5.0.0",
4545
"yargs": "^17.7.2"
4646
},
4747
"devDependencies": {
4848
"@babel/core": "^7.22.5",
49-
"@codemod-utils/tests": "^0.2.2",
49+
"@codemod-utils/tests": "^0.2.3",
5050
"@sondr3/minitest": "^0.1.1",
5151
"@tsconfig/esm": "^1.0.3",
5252
"@tsconfig/node16": "^1.0.4",

pnpm-lock.yaml

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)