Skip to content

Commit db3b6d4

Browse files
v1.5.0
1 parent 2a957d9 commit db3b6d4

20 files changed

+287
-137
lines changed

ChangeLog.md

+111-28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# ChangeLog for PSFunctionInfo
22

3-
## 1.4.0
3+
## [Unreleased]
4+
5+
## [1.5.0] - 2025-03-19
6+
7+
### Added
8+
9+
- Added a default formatted list view for `Get-PSFunctionInfo` output.
10+
- Added a script property type extension for `PSFunctionInfo` objects to show `Age`.
11+
12+
### Changed
13+
14+
- Replaced bitly online help links
15+
- Refined filtering regex for PSFunctionInfo objects to exclude functions that end in a colon. These are typically PSDrive shortcuts. __This is a potential breaking change.__
16+
- Converted changelog to new format.
17+
- Updated help documentation.
18+
19+
## [1.4.0] - 2024-01-22
420

521
### Changed
622

@@ -9,90 +25,157 @@
925
- Help updates
1026
- Updated `README`
1127

12-
### Fixed
28+
### Added
1329

1430
- Added a warning to `Set-PSFunctionInfoDefaults` if the command is run without specifying any parameters.
15-
-
16-
## 1.3.0
31+
32+
## [1.3.0] - 2022-07-22
33+
34+
### Changed
1735

1836
- Updated missing online help links.
1937
- Help documentation updates.
2038
- Updated `README.md`.
2139

22-
## 1.2.0
40+
## [1.2.0] - 2022-07-22
41+
42+
### Added
2343

2444
- Added custom error messages to `ValidateScript()` parameter attributes.
2545
- Added a `NoSource` parameter to `New-PSFunctionInfo` to not include the source path.
2646
- Added `Set-PSFunctionInfo` and its alias `spfi`.
2747
- Added `Remove-PSFunctionInfo` and its alias `rpfi`.
48+
49+
### Changed
50+
2851
- Help updates.
2952
- Updated `README.md`.
3053

31-
## 1.1.0
54+
## [1.1.0] - 2022-03-15
55+
56+
### Added
3257

33-
- Fixed DefaultDisplayPropertySet in types.ps1xml file.
3458
- Added online help links.
59+
60+
### Updated
61+
3562
- Updated `README.md`.
3663

37-
## 1.0.0
64+
### Fixed
65+
66+
- Fixed DefaultDisplayPropertySet in types.ps1xml file.
67+
68+
## [1.0.0] - 2020-10-02
69+
70+
First official release to the PowerShell Gallery.
71+
72+
### Added
3873

39-
- Restructured module layout.
4074
- Added a property set called `TagInfo`.
4175
- Added command `Edit-PSFunctionInfo` with an alias of `efpi`. ([Issue #7](https://github.com/jdhitsolutions/PSFunctionInfo/issues/7))
4276
- Added better error handling to `Get-PSFunctionInfo` where function can't be found.
77+
78+
### Changed
79+
80+
- Restructured module layout.
4381
- Help updates.
44-
- First official release to the PowerShell Gallery.
4582
- Updated `README.md`.
4683

47-
## 0.6.0-preview
84+
## [0.6.0] - 2021-04-27
85+
86+
Preview release
87+
88+
### Added
4889

49-
- Fixed the `-Name` parameter argument completer in `Get-PSFunctionInfo`. The function parameter changed from `Name` to `FunctionName` which is why it broke. ([Issue #6](https://github.com/jdhitsolutions/PSFunctionInfo/issues/6))
50-
- Created private function `backup_file`.
5190
- Added a `-Backup` parameter to `New-PSFunctionInfo`. ([Issue #1](https://github.com/jdhitsolutions/PSFunctionInfo/issues/1))
91+
- Created private function `backup_file`.
92+
93+
### Changed
94+
5295
- Help updates
5396
- Updated `README.md`.
5497

55-
## 0.5.0-preview
98+
### Fixed
99+
100+
- Fixed the `-Name` parameter argument completer in `Get-PSFunctionInfo`. The function parameter changed from `Name` to `FunctionName` which is why it broke. ([Issue #6](https://github.com/jdhitsolutions/PSFunctionInfo/issues/6))
101+
102+
## [0.5.0] - 2021-04-26
103+
104+
Preview release
105+
106+
### Added
56107

57-
- Added an autocompleter for the `-Tag` parameter in `Get-PSFunctionInfo`. ([Issue #4](https://github.com/jdhitsolutions/PSFunctionInfo/issues/4))
108+
- Added an auto completer for the `-Tag` parameter in `Get-PSFunctionInfo`. ([Issue #4](https://github.com/jdhitsolutions/PSFunctionInfo/issues/4))
109+
- Added missing online help links.
110+
- Added a table view called `tags` to `psfunctioninfo.format.ps1xml`.
111+
- Added integration into the PowerShell ISE.
58112
- Added a private function, `new_psfunctioninfo`, to create a new PSFunctionInfo object from the metadata block.
113+
- Added integration into VS Code. ([Issue #2](https://github.com/jdhitsolutions/PSFunctionInfo/issues/2))
114+
115+
### Changed
116+
59117
- Changed `Name` parameter in `Get-PSFunctionInfo` to `FunctionName`. The parameter is positional, so it shouldn't make much difference. **This is a breaking change.**
60118
- Modified `Get-PSFunctionInfo` to get metadata from files. ([Issue #3](https://github.com/jdhitsolutions/PSFunctionInfo/issues/3))
61119
- Modified `PSFunctionInfo` class to not require Tags in the constructor.
62-
- Added missing online help links.
63-
- Added a table view called `tags` to `psfunctioninfor.format.ps1xml`.
64-
- Modified `psfunctioninfor.format.ps1xml` to reduce the `Alias` column to 15.
65-
- Added integration into the PowerShell ISE.
66-
- Added integration into VS Code. ([Issue #2](https://github.com/jdhitsolutions/PSFunctionInfo/issues/2))
120+
- Modified `psfunctioninfo.format.ps1xml` to reduce the `Alias` column to 15.
67121
- Updated help documentation.
68122
- Updated `README.md`.
69123

70-
## 0.4.0-preview
124+
## [0.4.0] - 2021-04-22
125+
126+
Preview release
127+
128+
### Added
71129

72130
- Added `Set-PSFunctionInfoDefaults` and `Get-PSFunctionInfoDefaults` to store default values. The defaults are stored in a JSON file at `$home\psfunctioninfo-defaults.json`. If the file is found when the module is imported, it will be used to set $PSDefaultParameterValues for this module.
73131
- Added `Update-PSFunctionInfoDefaults` which can be used to update defaults if they are changed after the module has been loaded.
74132
- Added `about_PSFunctionInfo` help.
133+
134+
### Changed
135+
75136
- Minor help updates.
76137
- Updated `README.md`.
77138

78-
## 0.3.0-preview
139+
## 0.3.0 - 2021-04-21
140+
141+
Preview release published to the PowerShell Gallery.
142+
143+
### Added
79144

80145
- Added online help links.
81-
- Published pre-release module to the PowerShell Gallery.
146+
147+
### Changed
148+
82149
- Updated `README.md`.
83150

84-
## 0.2.0
151+
## 0.2.0 - 2021-04-21
152+
153+
### Added
85154

86-
- Modified `Source` view in `psfunctioninfo.format.ps1xml` to not limit the Description width.
87-
- Updated `New-PSFunctionInfo` to better handle different function layouts.
88155
- Added Verbose output to `Get-PSFunctionInfoTag`.
89-
- Help updates.
90156
- Added an argument completer for the `Name` parameter of `Get-PSFunctionInfo`.
91157
- Added alias `gpfi` for `Get-PSFunctionInfo`.
92158
- Added alias `npfi` for `New-PSFunctionInfo`.
159+
160+
## Changed
161+
162+
- Modified `Source` view in `psfunctioninfo.format.ps1xml` to not limit the Description width.
163+
- Updated `New-PSFunctionInfo` to better handle different function layouts.
164+
- Help updates.
93165
- Updated module manifest.
94166
- Updated `README.md`.
95167

96-
## 0.1.0
168+
## 0.1.0 - 2021-03-10
97169

98170
- initial module files
171+
172+
[Unreleased]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v1.5.0..HEAD
173+
[1.5.0]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v1.4.0..v1.5.0
174+
[1.4.0]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v1.3.0..v1.4.0
175+
[1.3.0]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v1.2.0..v1.3.0
176+
[1.2.0]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v1.1.0..v1.2.0
177+
[1.1.0]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v1.0.0..v1.1.0
178+
[1.0.0]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v0.6.0..v1.0.0
179+
[0.6.0]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v0.5.0..v0.6.0
180+
[0.5.0]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v0.4.0..v0.5.0
181+
[0.4.0]: https://github.com/jdhitsolutions/PSFunctionInfo/compare/v0.3.0..v0.4.0

License.txt

0 Bytes
Binary file not shown.

PSFunctionInfo.psd1

162 Bytes
Binary file not shown.

PSFunctionInfo.psm1

+13-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (Test-Path -path $defaults) {
1111
}
1212
}
1313

14-
#Add VSCode Shortcuts
14+
#region Add VSCode Shortcuts
1515
if ($host.name -eq 'Visual Studio Code Host') {
1616
$global:PSDefaultParameterValues["New-PSFunctionInfo:Path"] = {$PSEditor.GetEditorContext().CurrentFile.Path}
1717

@@ -40,7 +40,6 @@ elseif ($host.name -eq 'Windows PowerShell ISE Host') {
4040

4141
#add a menu item
4242
$sb = {
43-
4443
Function PickList {
4544
# A WPF function picker for the PowerShell ISE
4645
Param([string[]]$Name)
@@ -159,8 +158,9 @@ elseif ($host.name -eq 'Windows PowerShell ISE Host') {
159158

160159
$PSIse.CurrentPowerShellTab.AddOnsMenu.Submenus.add("New-PSFunctionInfo", $sb, $Null)
161160
}
161+
#endregion
162162

163-
#create an argument completer
163+
#region create argument completers
164164
Register-ArgumentCompleter -CommandName Get-PSFunctionInfo -ParameterName FunctionName -ScriptBlock {
165165
param($commandName, $parameterName, $WordToComplete, $commandAst, $fakeBoundParameter)
166166

@@ -179,4 +179,13 @@ Register-ArgumentCompleter -CommandName Get-PSFunctionInfo -ParameterName Tag -S
179179
# completion text,listItem text,result type,Tooltip
180180
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
181181
}
182-
}
182+
}
183+
#endregion
184+
185+
#region type extensions
186+
187+
Update-TypeData -TypeName PSFunctionInfo -MemberType ScriptProperty -MemberName Age -Value {
188+
New-TimeSpan -Start $this.LastUpdate -end (Get-Date)
189+
} -Force
190+
191+
#endregion

README.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Or using `PSResourceGet`:
2222
Install-PSResource PSFunctionInfo [-scope CurrentUser]
2323
```
2424

25-
The module should work on both Windows PowerShell and PowerShell 7, even cross-platform, except for a few PowerShell-ISE-related commands.
25+
The module should work on both Windows PowerShell and PowerShell 7, even cross-platform, except for a few PowerShell ISE related commands.
2626

2727
## Description
2828

@@ -32,7 +32,7 @@ The code in this module isn't concerned with loading, running, or finding functi
3232

3333
![Get a single function](images/get-psfunctioninfo-1.png)
3434

35-
The default behavior is to show all functions that __don't__ belong to a module.
35+
The default behavior is to show all functions that __don't__ belong to a module and excluding a few common functions that PowerShell defines.
3636

3737
![Get stand-alone functions](images/get-psfunctioninfo-2.png)
3838

@@ -45,14 +45,13 @@ The PSFunctionInfo object includes a PropertySet called `AuthorInfo`.
4545
```dos
4646
PS C:\> Get-PSFunctionInfo -Tag modules | Select-Object -property AuthorInfo
4747
48-
4948
Name : Test-HelpLink
5049
Version : 0.9.0
5150
Source : C:\scripts\update-helplinks.ps1
5251
CompanyName : JDH IT Solutions, Inc.
5352
Copyright : (c) JDH IT Solutions, Inc.
5453
Description : Test if help file is missing the online link
55-
LastUpdate : 4/23/2021 9:21:00 AM
54+
LastUpdate : 4/23/2024 9:21:00 AM
5655
```
5756

5857
Or you can use the `TagInfo` property set. This gives you the same result as using the `tag` named view with `Format-Table`.,
@@ -70,7 +69,7 @@ Finally, you can also search .ps1 files for PSFunctionInfo metadata.
7069
Use the [New-PSFunctionInfo](docs/New-PSFunctionInfo.md) command to insert the metadata tag into your script file.
7170

7271
```powershell
73-
New-PSFunctionInfo -Path c:\scripts\Test-ConsoleColors.ps1 -Description "show console color combinations" -Name Test-ConsoleColor -Author "Jeff Hicks" -CompanyName "JDH IT Solutions" -Copyright "2023 JDH IT Solutions, Inc." -Tags "scripting","console"
72+
New-PSFunctionInfo -Path c:\scripts\Test-ConsoleColors.ps1 -Description "show console color combinations" -Name Test-ConsoleColor -Author "Jeff Hicks" -CompanyName "JDH IT Solutions" -Copyright "2024 JDH IT Solutions, Inc." -Tags "scripting","console"
7473
```
7574

7675
The default behavior is to insert the metadata tag immediately after the opening brace (`{`) into the file. __This command will update the file__. Or you can use the `ToClipBoard` parameter which will copy the metadata to the clipboard. You can then manually insert it into your script file that defines the function. You should avoid changing the formatting of the comment block.
@@ -84,11 +83,11 @@ You should get something like this:
8483
Version 1.0.0
8584
Author Jeff Hicks
8685
CompanyName JDH IT Solutions
87-
Copyright 2023 JDH IT Solutions, Inc.
86+
Copyright 2024 JDH IT Solutions, Inc.
8887
Description show console color combinations
8988
Guid 8e43a9d9-1df6-48c7-8595-7363087aba43
9089
Tags scripting,console
91-
LastUpdate 2/22/2023 10:43 AM
90+
LastUpdate 2/22/2024 10:43 AM
9291
Source C:\scripts\Test-ConsoleColors.ps1
9392
9493
#>
@@ -110,11 +109,11 @@ Function Get-Foo {
110109
Version 1.0.0
111110
Author Jeff Hicks
112111
CompanyName JDH IT Solutions
113-
Copyright 2023 JDH IT Solutions, Inc.
112+
Copyright 2024 JDH IT Solutions, Inc.
114113
Description Get Foo Stuff
115114
Guid 490595c6-6a0c-4572-baf4-f808c010de70
116115
Tags scripting,console
117-
LastUpdate 2/21/2023 10:41 AM
116+
LastUpdate 2/21/2024 10:41 AM
118117
Source C:\scripts\FooStuff.ps1
119118
120119
#>
@@ -212,7 +211,11 @@ This code is a prototype for a [suggestion](https://github.com/PowerShell/PowerS
212211

213212
This module was first described at <https://jdhitsolutions.com/blog/powershell/8343/a-better-way-to-manage-powershell-functions/>.
214213

214+
## Related Modules
215+
216+
:bulb: You might also be interested in the [PSFunctionTools](https://github.com/jdhitsolutions/PSFunctionTools) module which contains a set of PowerShell 7 tools for automating and accelerating script and module development.
217+
215218
## Roadmap
216219

217-
+ Add function metadata by file, auto-detecting the function name.
218-
+ Consider a bulk removal command to clean PSFunctionInfo metadata from files.
220+
- Add function metadata by file, auto-detecting the function name.
221+
- Consider a bulk removal command to clean PSFunctionInfo metadata from files.

docs/Edit-PSFunctionInfo.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSFunctionInfo-help.xml
33
Module Name: PSFunctionInfo
4-
online version: https://bit.ly/3w8SBFj
4+
online version: https://jdhitsolutions.com/yourls/06a244
55
schema: 2.0.0
66
---
77

@@ -129,7 +129,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
129129
130130
This command has an alias of epfi.
131131
132-
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/
132+
Learn more about PowerShell: https://jdhitsolutions.com/yourls/newsletter
133133
134134
## RELATED LINKS
135135

0 commit comments

Comments
 (0)