Skip to content

feat: Alias and Breakingchange through PSA #100

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

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c6674ba
feat: Alias and Breakingchange
Sep 1, 2021
ff97be8
Merge branch 'main' into lizeng/PSACustomRules
isra-fel Sep 1, 2021
f43c3ec
feat: merge code of Alias and Breakingchange
Sep 1, 2021
6f26420
Merge branches 'lizeng/PSACustomRules' and 'lizeng/PSACustomRules' of…
Sep 1, 2021
924a7b0
style: delete annotations
Sep 2, 2021
64d1f9b
feat: get alias json file from modules
Sep 4, 2021
2473b42
style: delete annotation
Sep 4, 2021
5be1410
style: convert the path from absolute to relative
Sep 4, 2021
a1e17bc
feat: check for existence of PSA module
Sep 5, 2021
c699b37
feat: add change event
Sep 5, 2021
b5760ab
style: fix some annotations and log message
Sep 6, 2021
86786c0
feat:para alias of cmdlet
Sep 6, 2021
801a616
fix: change the path of tempfile when changing
Sep 6, 2021
d39d90b
fix: generation of alias cmdlets
Sep 6, 2021
2a22cc6
docs: how to generate alias spec and breaking change spec
Sep 9, 2021
5764847
fix: resolve the PR
Sep 9, 2021
a0e8207
feat: add debounce
Sep 9, 2021
72cff02
fix: copy custom rules to powershell exec path
Sep 9, 2021
515c5ed
fix: resolve review2
Sep 9, 2021
ad46e7d
fix: yml and lint
Sep 9, 2021
d8a1c14
fix: resolve review3
Sep 9, 2021
477c121
fix: remove the log of timer
Sep 9, 2021
f633147
feat: description to type of diagnostic
Sep 9, 2021
4b63e5c
prettier
isra-fel Sep 10, 2021
a59f57f
refactor debounce code
isra-fel Sep 10, 2021
c84dd8b
fix: copy-item
Sep 11, 2021
73d7870
fix: formatPlansToDiag
Sep 12, 2021
e4f0d73
fix: logic of breakingchange parameter implicit
Sep 12, 2021
69ccac8
docs: change version to 0.3.0
Sep 14, 2021
04c3425
feat: more detailed message about breaking change
Sep 14, 2021
cd89c0d
feat: filter the para belongs to powershell
Sep 17, 2021
da7e4b0
feat: get message from GetBreakingChangeTextFromAttribute method
Sep 22, 2021
600b47c
docs: add some notes for developers
Sep 22, 2021
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
3 changes: 1 addition & 2 deletions .azure-pipelines/vscode-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ steps:
- script: |
pushd vscode-extension
npm install
npm run lint
npm run compile
npm run lint && npm run compile
if [ $? -ne 0 ]; then
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# How to generate Az Module alias spec and breaking change spec

The alias specifications and breaking change specifications are separately stored in `vscode-extension/PSA_Custom_Rules/Alias/AliasSpec.json` and `vscode-extension/PSA_Custom_Rules/BreakingChange/BreakingchangeSpec.json`

## Generation Instruction

1. Install all az.* modules by `Install-Module azpreview`

2. Import all az.* modules
```powershell
$az_modules = gmo az.* -ListAvailable
for ([int]$i = 0; $i -lt $az_modules.Count; $i++){
import-module $az_modules[$i].name
}
```

3. Get the Az Modules alias information and save into `vscode-extension/PSA_Custom_Rules/Alias/AliasSpec.json`
```powershell
cd vscode-extension/PSA_Custom_Rules/Alias
./geneAlias.ps1
```

3. Get the Az Modules breaking change information and save into `vscode-extension/PSA_Custom_Rules/BreakingChange/BreakingchangeSpec.json`
```powershell
cd vscode-extension/PSA_Custom_Rules/BreakingChange
./geneBreakingChange.ps1
```

## Specification Instruction

1. Alias Spec
```json
{
"cmdlet": //The alias of cmdlets
{
"{Alias Cmdlet Name}": "{Formal Name of the Cmdlet}",
...
},
"para_cmdlet": //The alias of cmdlets' parameters
{
"{Name of Cmdlet}":
{
"{Alias Parameter Name}": "{Formal Name of the Parameter}",
...
},
...
}
}
```

2. Breaking Change Spec
```json
{
"cmdlet": //The breaking changes of cmdlets
[
{
"Name": "{The name of the cmdlet}",
"TypeBreakingChange": "The type of breaking change attribution"
},
...
]

"para_cmdlet": //The breaking changes of cmdlets' parameters
[
{
"Name": "{The name of the parameter}",
"TypeBreakingChange": "The type of breaking change attribution",
"CmdletName": "{The name of the cmdlet which the parameter belongs to}"
},
...
]
"func": //The breaking changes of functions
[
{
"Name": "{The name of the function}",
"TypeBreakingChange": "The type of breaking change attribution"
},
...
]
"para_func": //The breaking changes of functions' parameters
[
{
"Name": "{The name of the parameter}",
"TypeBreakingChange": "The type of breaking change attribution",
"FuncName": "{The name of the function which the parameter belongs to}"
},
...
]
}
```
5 changes: 5 additions & 0 deletions vscode-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Azure PowerShell Extension Release History

## 0.3.0
Add new features:
- Detect alias cmdlets or parameters, then you can quick-fix it to formal name
- Detect upcoming breaking change cmdlets or paramters and give some message about the change

## 0.2.0

Code refactoring and user experience optimization:
Expand Down
Loading