Skip to content

Commit fd7c600

Browse files
authored
Merge pull request #86 v2.0.0
Release v2!!!!!
2 parents 95634e9 + 2e0310f commit fd7c600

File tree

77 files changed

+6553
-2011
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+6553
-2011
lines changed

.gitignore

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22
*.ini
33
*.conf
44
*.config
5+
config.xml
56

6-
# Ignore Environment files
7-
.env*
7+
# Ignore all files beginning with a dot (.)
8+
.*
9+
# except for git files
10+
!.gitattributes
11+
!.gitignore
12+
!.github/
13+
14+
# Ignore Release directory generated by local builds
15+
Release/
16+
Tools/
17+
ConfluencePS/en-US/
18+
TestResult.xml
19+
20+
#######
21+
# Excerpts from https://www.gitignore.io
22+
#######
23+
24+
### OSX ###
25+
.DS_Store
26+
.AppleDouble
27+
.LSOverride
28+
29+
### Windows ###
30+
# Windows image file caches
31+
Thumbs.db
32+
ehthumbs.db
33+
34+
# Folder config file
35+
Desktop.ini

.vscode/settings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,12 @@
55
"files.trimTrailingWhitespace": true,
66
"files.insertFinalNewline": true,
77
"editor.tabSize": 4,
8-
"powershell.scriptAnalysis.settingsPath": "PSScriptAnalyzerSettings.psd1"
8+
"powershell.scriptAnalysis.settingsPath": "PSScriptAnalyzerSettings.psd1",
9+
"[markdown]": {
10+
"editor.wordwrap": "on",
11+
"editor.renderWhitespace": "all",
12+
"editor.acceptSuggestionOnEnter": false,
13+
"editor.rulers": [80],
14+
"editor.trimAutoWhitespace": false
15+
},
916
}

.vscode/tasks.json

Lines changed: 41 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,56 @@
1-
// A task runner that invokes Pester to run all Pester tests under the
2-
// current workspace folder.
3-
4-
// NOTE: This Pester task runner requires an updated version of Pester (>=3.4.0)
5-
// in order for the problemMatcher to find failed test information (message, line, file).
6-
// If you don't have that version, you can update Pester from the PSGallery like so:
7-
//
8-
// PS C:\> Update-Module Pester
9-
//
10-
// If that gives an error like:
11-
// "Module 'Pester' was not installed by using Install-Module, so it cannot be updated."
12-
// then execute:
13-
//
14-
// PS C:\> Install-Module Pester -Scope CurrentUser -Force
15-
//
16-
171
// Available variables which can be used inside of strings.
182
// ${workspaceRoot}: the root folder of the team
193
// ${file}: the current opened file
4+
// ${relativeFile}: the current opened file relative to workspaceRoot
205
// ${fileBasename}: the current opened file's basename
216
// ${fileDirname}: the current opened file's dirname
227
// ${fileExtname}: the current opened file's extension
238
// ${cwd}: the current working directory of the spawned process
24-
259
{
26-
"version": "0.1.0",
27-
10+
// See https://go.microsoft.com/fwlink/?LinkId=733558
11+
// for the documentation about the tasks.json format
12+
"version": "2.0.0",
2813
// Start PowerShell
29-
"command": "${env.windir}\\sysnative\\windowspowershell\\v1.0\\PowerShell.exe",
30-
31-
// The command is a shell script
32-
"isShellCommand": true,
33-
14+
"windows": {
15+
"command": "${env:windir}\\sysnative\\windowspowershell\\v1.0\\PowerShell.exe",
16+
"args": [
17+
"-NoProfile",
18+
"-ExecutionPolicy",
19+
"Bypass"
20+
]
21+
},
22+
"linux": {
23+
"command": "/usr/bin/powershell",
24+
"args": [
25+
"-NoProfile"
26+
]
27+
},
28+
"osx": {
29+
"command": "/usr/local/bin/powershell",
30+
"args": [
31+
"-NoProfile"
32+
]
33+
},
3434
// Show the output window always
3535
"showOutput": "always",
36-
37-
"args": [
38-
"-NoProfile", "-ExecutionPolicy", "Bypass",
39-
"if (Test-Path '${workspaceRoot}\\.env.ps1') {. '${workspaceRoot}\\.env.ps1'}; Write-Host 'Invoking Pester...'; Invoke-Pester -PesterOption @{IncludeVSCodeMarker=$true};",
40-
"Invoke-Command { Write-Host \"Completed all tasks in task runner: $($args[0])\" } -args"
41-
],
42-
4336
// Associate with test task runner
4437
"tasks": [{
45-
"taskName": "Pester",
46-
"isTestCommand": true,
47-
"problemMatcher": [{
48-
"owner": "powershell",
49-
"fileLocation": ["absolute"],
50-
"severity": "error",
51-
"pattern": [{
52-
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
53-
"message": 1
54-
},
55-
{
56-
"regexp": "^\\s+at\\s+[^,]+,\\s*(.*?):\\s+line\\s+(\\d+)$",
57-
"file": 1,
58-
"line": 2
59-
}
38+
"taskName": "Build Help",
39+
"suppressTaskName": true,
40+
"args": [
41+
"Write-Host 'Invoking platyPS'; New-ExternalHelp -Path .\\docs\\en-US -OutputPath .\\ConfluencePS\\en-US -Force;",
42+
"Invoke-Command { Write-Host 'Completed Build task in task runner.' }"
6043
]
61-
}]
62-
}]
44+
},
45+
{
46+
"taskName": "Test",
47+
"suppressTaskName": true,
48+
"isTestCommand": true,
49+
"args": [
50+
"Write-Host 'Invoking Pester'; Invoke-Pester -PesterOption @{IncludeVSCodeMarker=$true};",
51+
"Invoke-Command { Write-Host 'Completed Test task in task runner.' }"
52+
],
53+
"problemMatcher": "$pester"
54+
}
55+
]
6356
}

CHANGELOG.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/),
6+
and this project adheres to [Semantic Versioning](http://semver.org/).
7+
8+
## [2.0.0] - 2017-08-17
9+
A new major version! ConfluencePS has been totally refactored to introduce new features and greatly improve efficiency.
10+
11+
"A new major version" means limited older functionality was intentionally broken. In addition, there are a ton of good changes, so some big picture notes first:
12+
13+
- All functions changed from "Wiki" prefix to "Confluence", like `Get-ConfluencePage`
14+
- But the module accommodates for any prefix you want, e.g. `Import-Module ConfluencePS -Prefix Wiki`
15+
- Functions changed or removed:
16+
- `Get-WikiLabelApplied` [removed; functionality added to `Get-ConfluencePage -Label foo`]
17+
- `Get-WikiPageLabel` > `Get-ConfluenceLabel`
18+
- `New-WikiLabel` > `Add-ConfluenceLabel`
19+
- `Get-*` functions now support paging, and defining your preferred page size
20+
- `-Limit` and `-Expand` parameters were removed from functions
21+
- With paging implementation, modifying the returned object limit isn't necessary
22+
- And allows for richer objects to be returned by default
23+
- `-ApiUri` and `-Credential` parameters added to every function
24+
- This is useful if you have more than one Confluence instance
25+
- `Set-ConfluenceInfo` now defines `ApiUri` and `Credential` defaults for the current session
26+
- And you can override any single function:
27+
- `Get-ConfluenceSpace -ApiUri 'https://wiki2.example.com' -Credential (Get-Credential)`
28+
- All functions now output custom object types, like `[ConfluencePS.Page]`
29+
- Allows for returning more object properties...
30+
- ...and only displaying the most relevant in the default output
31+
- Also enables a much improved pipeline flow
32+
- This behavior removed the need for the `-Expand` parameter
33+
- Private functions are leveraged heavily to reduce repeat code
34+
- `Invoke-Method` is the most prominent example
35+
36+
If you like drinking from the firehose, here's [everything we closed for 2.0], because we probably forgot to list something here. Otherwise, read on for summarized details.
37+
38+
### Added
39+
- All `Get-*` functions now support paging
40+
- `-ApiUri` and `-Credential` parameters added to functions
41+
- `Set-ConfluenceInfo` behavior is mostly unchanged (see below)
42+
- Objects returned are now custom typed, like `[ConfluencePS.Page]`
43+
- Try piping ConfluencePS objects into `Format-List *` to see all properties
44+
45+
### Changed
46+
- Function prefix defaults to "Confluence" instead of "Wiki" (`Get-ConfluenceSpace`)
47+
- If you like "Wiki", you can `Import-Module ConfluencePS -Prefix Wiki`
48+
- `Add-ConfluenceLabel`
49+
- Name used to be `New-WikiLabel`
50+
- The "Add" verb better reflects the function's behavior
51+
- `Get-ConfluenceChildPage`
52+
- Default behavior returns only immediate child pages. Which also means...
53+
- Added `-Recurse` to return all pages below the given page, not just immediate child objects
54+
- NOTE: Recurse is not available in on-prem installs right now, only Atlassian cloud instances
55+
- `-ParentID` > `-PageID`
56+
- `Get-ConfluenceLabel`
57+
- Name used to be `Get-WikiPageLabel`
58+
- Now returns `[ConfluencePS.ContentLabelSet]` objects
59+
- Which are relationships of `[ConfluencePS.Label]` & `[ConfluencePS.Page]` objects
60+
- `Get-ConfluencePage`
61+
- `Get-ConfluencePage` (with no parameters) doesn't work anymore
62+
- With paging supported, this would be a ton of pages
63+
- `Get-ConfluenceSpace | Get-ConfluencePage` still works, if you really need it
64+
- Now returns `[ConfluencePS.Page]` objects
65+
- New `-Label` parameter filters returned pages by applied label(s)
66+
- New `-Space` parameter accepts Space objects
67+
- `Get-ConfluenceSpace`
68+
- Now returns `[ConfluencePS.Space]` objects
69+
- `-Key` renamed to `-SpaceKey` ("Key" still works as an alias)
70+
- `-Name` parameter removed
71+
- `New-ConfluencePage`
72+
- New `-Parent` parameter accepts Page objects
73+
- New `-Space` parameter accepts Space objects
74+
- `New-ConfluenceSpace`
75+
- `-Key` renamed to `-SpaceKey` ("Key" still works as an alias)
76+
- `Set-ConfluenceInfo`
77+
- Now adds the URI/Credential to `$PSDefaultParameterValues`
78+
- `-ApiUri` & `-Credential` parameters now exist on every function
79+
- `Set-ConfluenceInfo` defines their defaults for the current session
80+
- Meaning they could still be overwritten on any single command
81+
- No longer automatically prompts for credentials if `-Credential` is absent
82+
- Allows for anonymous authentication to public instances
83+
- New `-PromptCredentials` parameter displays a `Get-Credential` dialog while connecting
84+
- New `-PageSize` parameter optionally defines default page size for the session
85+
- `Set-ConfluencePage`
86+
- Now returns `[ConfluencePS.Page]` objects
87+
- `-CurrentVersion` parameter removed (determined and incremented automatically now)
88+
- New `-Parent` parameter accepts Page objects
89+
90+
### Removed
91+
- `-Limit` and `-Expand` parameters
92+
- `Get-*` function paging removes the need for fiddling with returned object limits
93+
- Custom object types hold relevant properties, removing the need to manually "expand" results
94+
- `Get-WikiLabelApplied`
95+
- Functionality replaced with `Get-ConfluencePage -Label foo`
96+
97+
### Much ❤
98+
[@lipkau](https://github.com/lipkau) refactored the entire module, and is the only reason `2.0` is a reality. In short, he is amazing. Thank you!
99+
100+
101+
## [1.0.0-69] - 2016-11-28
102+
No changelog available for version `1.0` of ConfluencePS. `1.0` was created in late 2015. Version `.69` was published to the PowerShell Gallery in Nov 2016, and it remained unchanged until `2.0`. If you're looking for things that changed prior to `2.0`...sorry, but these probably aren't the droids you're looking for. :)
103+
104+
105+
106+
[everything we closed for 2.0]: https://github.com/AtlassianPS/ConfluencePS/issues?utf8=%E2%9C%93&q=closed%3A2017-04-01..2017-08-17

0 commit comments

Comments
 (0)