-
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.
Removed unnecessary file path resolutions. Added tests. (#46)
* revert: Ensured that .github folder is present * revert: Ensured that tests folder is present * revert: Ensured that root files are present * refactor: Renamed function * chore: Added test fixtures * refactor: Added tests * Updated documentation * Updated blueprints * chore: Added changeset --------- Co-authored-by: ijlee2 <[email protected]>
- Loading branch information
Showing
187 changed files
with
3,950 additions
and
36 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,5 @@ | ||
--- | ||
"@codemod-utils/cli": patch | ||
--- | ||
|
||
Removed unnecessary file path resolutions. Added tests. |
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 |
---|---|---|
|
@@ -2,34 +2,40 @@ | |
|
||
# @codemod-utils/cli | ||
|
||
_CLI to create a codemod_ | ||
_CLI to create a codemod project_ | ||
|
||
|
||
## Usage | ||
|
||
Use `npx` to run `@codemod-utils/cli` and provide the codemod's name. (Alternatively, you can globally install `@codemod-utils/cli`.) | ||
Step 1. Use `npx` to run `@codemod-utils/cli`. Alternatively, you can globally install the package. | ||
|
||
```sh | ||
npx @codemod-utils/cli --name <your-codemod-name> <additional arguments> | ||
``` | ||
|
||
This will create a folder named `<your-codemod-name>`. Change to this directory, then run the following scripts: | ||
This will create a folder named `<your-codemod-name>`. | ||
|
||
Step 2. Change to the codemod directory, then run these scripts in sequence: | ||
|
||
```sh | ||
# Install dependencies | ||
pnpm install | ||
``` | ||
|
||
# Push to a (new) GitHub repository | ||
```sh | ||
# Commit changes | ||
git init | ||
git add . | ||
git commit -m "Initial commit" | ||
git branch -M main | ||
``` | ||
|
||
```sh | ||
# Push changes (to a new repo) | ||
git remote add origin [email protected]:<your-github-handle>/<your-repo-name>.git | ||
git branch -M main | ||
git push -u origin main | ||
``` | ||
|
||
Before pushing to the repository, consider updating `README.md` (e.g. link to the CI status badge). | ||
|
||
|
||
### Arguments | ||
|
||
|
@@ -41,15 +47,15 @@ npx @codemod-utils/cli --name ember-codemod-v1-to-v2 | |
|
||
|
||
<details> | ||
<summary>Optional: Add <code>@codemod-utils</code> packages</summary> | ||
<summary>Optional: Add more utilities</summary> | ||
|
||
By default, `@codemod-utils/cli` only installs [`@codemod-utils/files`](../files/README.md) and [`@codemod-utils/tests`](../tests/README.md). To add more utilities, pass `--addon` and the list of package names. | ||
By default, `@codemod-utils/cli` only installs [`@codemod-utils/files`](../files/README.md) and [`@codemod-utils/tests`](../tests/README.md). If you need more, pass `--addon` and list the package names. | ||
|
||
```sh | ||
npx @codemod-utils/cli --addon blueprints json | ||
``` | ||
|
||
The available package names are: | ||
The options are: | ||
|
||
- [`ast-javascript`](../ast/javascript/README.md) | ||
- [`ast-template`](../ast/template/README.md) | ||
|
@@ -66,7 +72,7 @@ The available package names are: | |
Pass `--root` to run the codemod somewhere else (i.e. not in the current directory). | ||
|
||
```sh | ||
npx @codemod-utils/cli --root=<path/to/your/project> | ||
npx @codemod-utils/cli --root <path/to/your/project> | ||
``` | ||
|
||
</details> | ||
|
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.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
13 changes: 13 additions & 0 deletions
13
...om-blueprints/javascript-with-addons/output/ember-codemod-args-to-signature/.eslintignore
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,13 @@ | ||
# compiled output | ||
/dist/ | ||
/dist-for-testing/ | ||
/tmp/ | ||
|
||
# dependencies | ||
/node_modules/ | ||
|
||
# misc | ||
!.* | ||
.*/ | ||
/src/blueprints/ | ||
/tests/fixtures/ |
41 changes: 41 additions & 0 deletions
41
...om-blueprints/javascript-with-addons/output/ember-codemod-args-to-signature/.eslintrc.cjs
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,41 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
root: true, | ||
parser: '@babel/eslint-parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
requireConfigFile: false, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['simple-import-sort'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:import/recommended', | ||
'plugin:n/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
rules: { | ||
curly: 'error', | ||
'simple-import-sort/exports': 'error', | ||
'simple-import-sort/imports': 'error', | ||
}, | ||
overrides: [ | ||
// JavaScript files | ||
{ | ||
files: ['**/*.js'], | ||
rules: { | ||
'import/no-duplicates': 'error', | ||
}, | ||
}, | ||
// Node files | ||
{ | ||
files: ['./.eslintrc.{cjs,js}', './.prettierrc.{cjs,js}'], | ||
env: { | ||
browser: false, | ||
node: true, | ||
}, | ||
extends: ['plugin:n/recommended'], | ||
}, | ||
], | ||
}; |
27 changes: 27 additions & 0 deletions
27
...odemod-args-to-signature/.github/ISSUE_TEMPLATE/ask-for-better-documentation.md
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,27 @@ | ||
--- | ||
name: Ask for better documentation | ||
about: Ask for better documentation | ||
title: '' | ||
labels: 'enhance: documentation' | ||
assignees: '' | ||
|
||
--- | ||
|
||
Hello! Thanks for taking time to suggest how we can improve documentation. | ||
|
||
Here, documentation can mean a few different things, including README, code comments, and tests. Anything that will help everyone understand how to use `ember-codemod-args-to-signature`! | ||
|
||
|
||
## I would like to see... πββοΈπββοΈ | ||
|
||
A clear, concise description of what you want to happen. | ||
|
||
|
||
## Why and how π¬ | ||
|
||
A clear, concise description of why you want something to happen and how we might be able to solve the problem. | ||
|
||
|
||
## Additional context β | ||
|
||
If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the request here. |
27 changes: 27 additions & 0 deletions
27
...mod-args-to-signature/.github/ISSUE_TEMPLATE/ask-for-new-feature-or-refactor.md
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,27 @@ | ||
--- | ||
name: Ask for new feature or refactor | ||
about: Ask for new feature or refactor | ||
title: '' | ||
labels: 'enhance: code' | ||
assignees: '' | ||
|
||
--- | ||
|
||
Hello! Thanks for taking time to suggest how we can improve `ember-codemod-args-to-signature`. | ||
|
||
Before you make a new issue, please search for similar issues. It's possible that someone has made a request already. | ||
|
||
|
||
## I would like to see... πββοΈπββοΈ | ||
|
||
A clear, concise description of what you want to happen. | ||
|
||
|
||
## Why and how π¬ | ||
|
||
A clear, concise description of why you want something to happen and how we might be able to solve the problem. | ||
|
||
|
||
## Additional context β | ||
|
||
If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the request here. |
38 changes: 38 additions & 0 deletions
38
...ons/output/ember-codemod-args-to-signature/.github/ISSUE_TEMPLATE/report-bug.md
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,38 @@ | ||
--- | ||
name: Report bug | ||
about: Report bug | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
Hello! Thanks for taking time to make a bug report. | ||
|
||
Before you make a new issue, please search for similar issues. It's possible that someone has reported this bug already. | ||
|
||
|
||
## Describe the bug π | ||
|
||
A clear and concise description of the bug. | ||
|
||
|
||
## Expected behavior π€ | ||
|
||
A clear and concise description of what you expected to see. | ||
|
||
|
||
## Minimal reproduction π¬ | ||
|
||
Describe steps to reproduce the issue. | ||
|
||
1. ... | ||
1. ... | ||
1. ... | ||
|
||
If possible, please share a repo with the minimum files to reproduce the issue. | ||
|
||
|
||
## Additional context β | ||
|
||
If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the problem here. |
35 changes: 35 additions & 0 deletions
35
...-codemod-args-to-signature/.github/ISSUE_TEMPLATE/report-outdated-dependency.md
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,35 @@ | ||
--- | ||
name: Report outdated dependency | ||
about: Report outdated dependency | ||
title: '' | ||
labels: 'enhance: dependency' | ||
assignees: '' | ||
|
||
--- | ||
|
||
Hello! Thanks for taking time to make an outdated dependency report. | ||
|
||
Before you make a new issue, please search for similar issues. It's possible that someone has made a request for update already. | ||
|
||
|
||
## List outdated dependencies π | ||
|
||
When you ran `pnpm outdated`, what did you see? | ||
|
||
```sh | ||
ββββββββββββββββββββββββββ¬ββββββββββ¬βββββββββ | ||
β Package β Current β Latest β | ||
ββββββββββββββββββββββββββΌββββββββββΌβββββββββ€ | ||
β @sondr3/minitest (dev) β 0.1.1 β 0.1.2 β | ||
ββββββββββββββββββββββββββ΄ββββββββββ΄βββββββββ | ||
``` | ||
|
||
|
||
## Risk analysis β οΈ | ||
|
||
Are there breaking changes that we should be aware of? Please add links to the `CHANGELOG`s, if they are available. | ||
|
||
|
||
## Additional context β | ||
|
||
If needed, you can provide more context (e.g. reference materials, screenshots, GIFs) for the problem here. |
Oops, something went wrong.