Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patched #54 #55

Merged
merged 2 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ module.exports = {
extends: ['plugin:@typescript-eslint/recommended-type-checked'],
rules: {
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
},
Expand Down
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/give-feedback.md

This file was deleted.

29 changes: 7 additions & 22 deletions .github/ISSUE_TEMPLATE/report-bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,23 @@ Before you make a new issue, please search for similar issues. It's possible tha

## Describe the bug 🐞

A clear and concise description of what the bug is.
A clear and concise description of the bug.


## Expected behavior 🤔

A clear and concise description of what you expected to happen.
A clear and concise description of what you expected to see.


## Minimal reproduction 🔬

Describe steps to reproduce the behavior:
Describe steps to reproduce the issue.

1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
1. ...
1. ...
1. ...

If possible, please, share a link with a minimal reproduction.

<!--
Create a minimal reproduction using one of the following:
- Ember Twiddle: https://ember-twiddle.com/
- Create a GitHub repository: https://guides.emberjs.com/release/getting-started/quick-start/
-->


## Environment 🌍

- Ember: -
- Node.js/npm: -
- OS: -
- Browser: -
If possible, please share a repo with the minimum files to reproduce the issue.


## Additional context ➕
Expand Down
1 change: 0 additions & 1 deletion .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = {
options: {
printWidth: 80,
singleQuote: true,
trailingComma: 'all',
},
},
],
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ In most cases, I recommend running the codemod without any arguments (i.e. allow
By default, the package name decides where the addon package lives. Pass `--addon-location` to override the logic. This may be useful if you have a workspace with many addons.

```sh
npx ember-codemod-v1-to-v2 --addon-location="packages/ui/buttons"
npx ember-codemod-v1-to-v2 --addon-location packages/ui/buttons
```

</details>
Expand All @@ -64,7 +64,7 @@ npx ember-codemod-v1-to-v2 --addon-location="packages/ui/buttons"
Pass `--root` to run the codemod on a project somewhere else (i.e. not in the current directory).

```sh
npx ember-codemod-v1-to-v2 --root=<path/to/your/project>
npx ember-codemod-v1-to-v2 --root <path/to/your/project>
```

</details>
Expand All @@ -75,7 +75,7 @@ npx ember-codemod-v1-to-v2 --root=<path/to/your/project>
By default, the test-app package lives in the folder `test-app`. Pass `--test-app-location` to override the logic.

```sh
npx ember-codemod-v1-to-v2 --test-app-location="docs-app"
npx ember-codemod-v1-to-v2 --test-app-location docs-app
```

</details>
Expand All @@ -86,7 +86,7 @@ npx ember-codemod-v1-to-v2 --test-app-location="docs-app"
By default, the test-app package is named `test-app`. Pass `--test-app-name` to override the logic. This may be useful if you have a workspace with many addons.

```sh
npx ember-codemod-v1-to-v2 --test-app-name="test-app-for-ui-buttons"
npx ember-codemod-v1-to-v2 --test-app-name test-app-for-ui-buttons
```

</details>
Expand All @@ -105,7 +105,7 @@ cd <path/to/cloned/repo>
pnpm build

# Run codemod
./dist/bin/ember-codemod-v1-to-v2.js --root=<path/to/your/project>
./dist/bin/ember-codemod-v1-to-v2.js --root <path/to/your/project>
```

You can also look at another codemod called [`ember-addon-migrator`](https://github.com/NullVoxPopuli/ember-addon-migrator).
Expand Down
10 changes: 5 additions & 5 deletions codemod-test-fixture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
#
#---------

# Read the named arguments
while getopts ":a:" flag
# Get named arguments for the binary
while getopts ":N:" flag
do
case $flag in
a) ARGUMENTS=$OPTARG;;
N) NAMED_ARGUMENTS=$OPTARG;;
esac
done

# Read the positional arguments
# Get fixture name
FIXTURE=${@:$OPTIND:1}

if [ ! $FIXTURE ]
Expand All @@ -39,6 +39,6 @@ fi
rm -r "tests/fixtures/$FIXTURE/output"
cp -r "tests/fixtures/$FIXTURE/input" "tests/fixtures/$FIXTURE/output"

./dist/bin/ember-codemod-v1-to-v2.js $ARGUMENTS --root="tests/fixtures/$FIXTURE/output"
./dist/bin/ember-codemod-v1-to-v2.js $NAMED_ARGUMENTS --root="tests/fixtures/$FIXTURE/output"

echo "SUCCESS: Updated the output of $FIXTURE.\n"
4 changes: 2 additions & 2 deletions codemod-test-fixtures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
pnpm build

./codemod-test-fixture.sh \
-a "--addon-location packages/ember-container-query --test-app-location demo-app --test-app-name demo-app-for-ember-container-query" \
-N "--addon-location packages/ember-container-query --test-app-location demo-app --test-app-name demo-app-for-ember-container-query" \
ember-container-query-customizations

./codemod-test-fixture.sh \
Expand All @@ -32,7 +32,7 @@ pnpm build
ember-container-query-typescript

./codemod-test-fixture.sh \
-a "--addon-location packages/new-v1-addon --test-app-location demo-app --test-app-name demo-app-for-new-v1-addon" \
-N "--addon-location packages/new-v1-addon --test-app-location demo-app --test-app-name demo-app-for-new-v1-addon" \
new-v1-addon-customizations

./codemod-test-fixture.sh \
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,15 @@
"typescript": "^5.1.6"
},
"engines": {
"node": ">= 16"
"node": "16.* || >= 18"
},
"changelog": {
"labels": {
"breaking": "Breaking Change",
"bug": "Bug Fix",
"enhance: code": "Enhancement",
"enhance: dependency": "Internal",
"enhance: documentation": "Documentation",
"user feedback": "User Feedback"
"enhance: documentation": "Documentation"
}
},
"pnpm": {
Expand Down