Skip to content

Commit d03b7af

Browse files
committed
Merge branch 'master' of https://github.com/powershell/PSResourceGet into release/v1.1.0-preview2
2 parents ba788e7 + f74d444 commit d03b7af

37 files changed

+2672
-1486
lines changed

.ci/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ stages:
3131

3232
steps:
3333

34+
- task: UseDotNet@2
35+
inputs:
36+
useGlobalJson: true
37+
3438
- pwsh: |
3539
Get-ChildItem -Path env:
3640
displayName: Capture environment for build

.editorconfig

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
# .NET coding convention settings for EditorConfig
3+
# https://learn.microsoft.com/visualstudio/ide/editorconfig-code-style-settings-reference
4+
#
5+
# This file was taken from PowerShell/PowerShell 2024-07-13
6+
# https://github.com/PowerShell/PowerShell/blob/master/.editorconfig
7+
8+
# Top-most EditorConfig file
9+
root = true
10+
11+
[*]
12+
charset = utf-8
13+
# indent_size intentionally not specified in this section
14+
indent_style = space
15+
insert_final_newline = true
16+
17+
# Source code
18+
[*.{cs,ps1,psd1,psm1}]
19+
indent_size = 4
20+
21+
# Shell scripts
22+
[*.sh]
23+
end_of_line = lf
24+
indent_size = 4
25+
26+
# Xml project files
27+
[*.{csproj,resx,ps1xml}]
28+
indent_size = 2
29+
30+
# Data serialization
31+
[*.{json,yaml,yml}]
32+
indent_size = 2
33+
34+
# Markdown
35+
[*.md]
36+
indent_size = 2
37+
38+
# Xml files
39+
[*.{resx,ruleset,stylecop,xml,xsd,xsl}]
40+
indent_size = 2
41+
42+
# Xml config files
43+
[*.{props,targets,config,nuspec}]
44+
indent_size = 2
45+
46+
[*.tsv]
47+
indent_style = tab
48+
49+
# Dotnet code style settings:
50+
[*.cs]
51+
# Sort using and Import directives with System.* appearing first
52+
dotnet_sort_system_directives_first = true
53+
54+
file_header_template = Copyright (c) Microsoft Corporation.\nLicensed under the MIT License.
55+
56+
# Modifier preferences
57+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
58+
59+
# Avoid "this." and "Me." if not necessary
60+
dotnet_style_qualification_for_field = false:suggestion
61+
dotnet_style_qualification_for_property = false:suggestion
62+
dotnet_style_qualification_for_method = false:suggestion
63+
dotnet_style_qualification_for_event = false:suggestion
64+
65+
# Use language keywords instead of framework type names for type references
66+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
67+
dotnet_style_predefined_type_for_member_access = true:suggestion
68+
69+
# Name all constant fields using PascalCase
70+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
71+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
72+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
73+
74+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
75+
dotnet_naming_symbols.constant_fields.required_modifiers = const
76+
77+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
78+
79+
# Static fields should have s_ prefix
80+
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
81+
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
82+
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
83+
84+
dotnet_naming_symbols.static_fields.applicable_kinds = field
85+
dotnet_naming_symbols.static_fields.required_modifiers = static
86+
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
87+
88+
dotnet_naming_style.static_prefix_style.required_prefix = s_
89+
dotnet_naming_style.static_prefix_style.capitalization = camel_case
90+
91+
# Internal and private fields should be _camelCase
92+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
93+
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
94+
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
95+
96+
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
97+
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
98+
99+
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
100+
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
101+
102+
# Suggest more modern language features when available
103+
dotnet_style_object_initializer = true:suggestion
104+
dotnet_style_collection_initializer = true:suggestion
105+
dotnet_style_coalesce_expression = true:suggestion
106+
dotnet_style_null_propagation = true:suggestion
107+
dotnet_style_explicit_tuple_names = true:suggestion
108+
dotnet_style_readonly_field = true:suggestion
109+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
110+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
111+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
112+
dotnet_style_prefer_conditional_expression_over_return = true:silent
113+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
114+
dotnet_style_prefer_auto_properties = true:suggestion
115+
csharp_prefer_simple_default_expression = true:suggestion
116+
117+
dotnet_code_quality_unused_parameters = non_public:suggestion
118+
119+
# CSharp code style settings:
120+
[*.cs]
121+
122+
csharp_preserve_single_line_blocks = true
123+
csharp_preserve_single_line_statements = false
124+
csharp_prefer_braces = true:silent
125+
126+
csharp_prefer_static_local_function = true:suggestion
127+
csharp_prefer_simple_using_statement = false:none
128+
csharp_style_prefer_switch_expression = true:suggestion
129+
csharp_style_prefer_range_operator = false:none
130+
csharp_style_prefer_index_operator = false:none
131+
csharp_style_pattern_local_over_anonymous_function = false:none
132+
133+
csharp_using_directive_placement = outside_namespace:suggestion
134+
135+
# Indentation preferences
136+
csharp_indent_block_contents = true
137+
csharp_indent_braces = false
138+
csharp_indent_case_contents = true
139+
csharp_indent_case_contents_when_block = true
140+
csharp_indent_switch_labels = true
141+
csharp_indent_labels = one_less_than_current
142+
143+
# Only use var when it's obvious what the variable type is
144+
csharp_style_var_for_built_in_types = false:none
145+
csharp_style_var_when_type_is_apparent = false:none
146+
csharp_style_var_elsewhere = false:suggestion
147+
148+
# Expression-bodied members
149+
csharp_style_expression_bodied_local_functions = true:silent
150+
151+
# Prefer method-like constructs to have a block body
152+
csharp_style_expression_bodied_methods = false:none
153+
csharp_style_expression_bodied_constructors = false:none
154+
csharp_style_expression_bodied_operators = false:none
155+
156+
# Prefer property-like constructs to have an expression-body
157+
csharp_style_expression_bodied_properties = true:none
158+
csharp_style_expression_bodied_indexers = true:none
159+
csharp_style_expression_bodied_accessors = true:none
160+
161+
# Suggest more modern language features when available
162+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
163+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
164+
csharp_style_inlined_variable_declaration = true:suggestion
165+
csharp_style_throw_expression = true:suggestion
166+
csharp_style_conditional_delegate_call = true:suggestion
167+
168+
# Space preferences
169+
csharp_space_after_cast = false
170+
csharp_space_after_colon_in_inheritance_clause = true
171+
csharp_space_after_comma = true
172+
csharp_space_after_dot = false
173+
csharp_space_after_keywords_in_control_flow_statements = true
174+
csharp_space_after_semicolon_in_for_statement = true
175+
csharp_space_around_binary_operators = before_and_after
176+
csharp_space_around_declaration_statements = do_not_ignore
177+
csharp_space_before_colon_in_inheritance_clause = true
178+
csharp_space_before_comma = false
179+
csharp_space_before_dot = false
180+
csharp_space_before_open_square_brackets = false
181+
csharp_space_before_semicolon_in_for_statement = false
182+
csharp_space_between_empty_square_brackets = false
183+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
184+
csharp_space_between_method_call_name_and_opening_parenthesis = false
185+
csharp_space_between_method_call_parameter_list_parentheses = false
186+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
187+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
188+
csharp_space_between_method_declaration_parameter_list_parentheses = false
189+
csharp_space_between_parentheses = false
190+
csharp_space_between_square_brackets = false
191+
192+
# Newline settings
193+
csharp_new_line_before_open_brace = all
194+
csharp_new_line_before_else = true
195+
csharp_new_line_before_catch = true
196+
csharp_new_line_before_finally = true
197+
csharp_new_line_before_members_in_object_initializers = true
198+
csharp_new_line_before_members_in_anonymous_types = true
199+
csharp_new_line_between_query_expression_clauses = true

.github/workflows/codeql-analysis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
security-events: write # for github/codeql-action/analyze to upload SARIF results
2525
name: Analyze
2626
runs-on: ubuntu-latest
27-
27+
2828
strategy:
2929
fail-fast: false
3030
matrix:
@@ -33,27 +33,31 @@ jobs:
3333
build-mode: manual
3434
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
3535
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
36-
36+
3737
steps:
3838
- name: Checkout repository
3939
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
4040

41+
- uses: actions/setup-dotnet@v4
42+
with:
43+
global-json-file: global.json
44+
4145
# Initializes the CodeQL tools for scanning.
4246
- name: Initialize CodeQL
4347
uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
4448
with:
4549
languages: ${{ matrix.language }}
4650
# ℹ️ Command-line programs to run using the OS shell.
4751
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
48-
52+
4953
- run: |
5054
Get-ChildItem .
5155
name: Capture env
52-
56+
5357
- run: |
5458
.\build.ps1 -Clean -Build
5559
name: Build
56-
60+
5761
- name: Perform CodeQL Analysis
5862
uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
5963
with:

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ srcOld/code/bin
44
srcOld/code/obj
55
out
66
test/**/obj
7-
test/**/bin
7+
test/**/bin
8+
.vs
9+
.vscode
10+
src/code/.vs
11+
test/testFiles/testScripts/test.ps1

.vscode/extensions.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
44
// List of extensions which should be recommended for users of this workspace.
55
"recommendations": [
6+
"EditorConfig.EditorConfig",
7+
"ms-dotnettools.csdevkit",
68
"ms-dotnettools.csharp",
7-
"ms-vscode.powershell-preview",
8-
"patcx.vscode-nuget-gallery",
9-
"fudge.auto-using"
9+
"ms-vscode.powershell",
10+
"patcx.vscode-nuget-gallery"
1011
],
1112
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
12-
"unwantedRecommendations": [
13-
"ms-vscode.powershell"
14-
]
15-
}
13+
"unwantedRecommendations": []
14+
}

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"console": "externalTerminal",
1818
"stopAtEntry": false,
1919
"logging": {
20-
"engineLogging": false,
20+
"logging.diagnosticsLog.protocolMessages": false,
2121
"moduleLoad": false,
2222
"exceptions": false,
2323
"browserStdOut": false
@@ -30,4 +30,4 @@
3030
"processId": "${command:pickProcess}"
3131
}
3232
]
33-
}
33+
}

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"csharp.semanticHighlighting.enabled": true,
3+
"dotnet.automaticallyCreateSolutionInWorkspace": false,
34
"omnisharp.enableEditorConfigSupport": true,
45
"omnisharp.enableRoslynAnalyzers": true
5-
}
6+
}

CHANGELOG/1.0.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,34 @@
11
# 1.0 Changelog
22

3+
## [1.0.5](https://github.com/PowerShell/PSResourceGet/compare/v1.0.4.1...v1.0.5) - 2024-05-13
4+
5+
### Bug Fixes
6+
- Update `nuget.config` to use PowerShell packages feed (#1649)
7+
- Refactor V2ServerAPICalls and NuGetServerAPICalls to use object-oriented query/filter builder (#1645 Thanks @sean-r-williams!)
8+
- Fix unnecessary `and` for version globbing in V2ServerAPICalls (#1644 Thanks again @sean-r-williams!)
9+
- Fix requiring `tags` in server response (#1627 Thanks @evelyn-bi!)
10+
- Add 10 minute timeout to HTTPClient (#1626)
11+
- Fix save script without `-IncludeXml` (#1609, #1614 Thanks @o-l-a-v!)
12+
- PAT token fix to translate into HttpClient 'Basic Authorization'(#1599 Thanks @gerryleys!)
13+
- Fix incorrect request url when installing from ADO (#1597 Thanks @antonyoni!)
14+
- Improved exception handling (#1569)
15+
- Ensure that .NET methods are not called in order to enable use in Constrained Language Mode (#1564)
16+
- PSResourceGet packaging update
17+
18+
## [1.0.4.1](https://github.com/PowerShell/PSResourceGet/compare/v1.0.4...v1.0.4.1) - 2024-04-05
19+
20+
- PSResourceGet packaging update
21+
22+
## [1.0.4](https://github.com/PowerShell/PSResourceGet/compare/v1.0.3...v1.0.4) - 2024-04-05
23+
24+
### Patch
25+
26+
- Dependency package updates
27+
328
## [1.0.3](https://github.com/PowerShell/PSResourceGet/compare/v1.0.2...v1.0.3) - 2024-03-13
429

530
### Bug Fixes
31+
632
- Bug fix for null package version in `Install-PSResource`
733

834
## [1.0.2](https://github.com/PowerShell/PSResourceGet/compare/v1.0.1...v1.0.2) - 2024-02-06

CHANGELOG/preview.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## [1.1.0-preview2](https://github.com/PowerShell/PSResourceGet/compare/v1.1.0-preview1...v1.1.0-preview2) - 2024-09-13
2+
3+
### New Features
4+
5+
- New cmdlet `Compress-PSResource` which packs a package into a .nupkg and saves it to the file system (#1682, #1702)
6+
- New `-Nupkg` parameter for `Publish-PSResource` which pushes pushes a .nupkg to a repository (#1682)
7+
- New `-ModulePrefix` parameter for `Publish-PSResource` which adds a prefix to a module name (#1694)
8+
9+
### Bug Fixes
10+
11+
- Add prerelease string when NormalizedVersion doesn't exist, but prelease string does (#1681 Thanks @sean-r-williams)
12+
- Add retry logic when deleting files (#1667 Thanks @o-l-a-v!)
13+
- Fix broken PAT token use (#1672)
14+
- Updated error messaging for authenticode signature failures (#1701)
15+
116
## [1.1.0-preview1](https://github.com/PowerShell/PSResourceGet/compare/v1.0.3...v1.1.0-preview1) - 2024-04-01
217

318
### New Features

CODE_OF_CONDUCT.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# Code of Conduct
1+
# Microsoft Open Source Code of Conduct
22

3-
This project has adopted the [Microsoft Open Source Code of Conduct][conduct-code].
4-
For more information see the [Code of Conduct FAQ][conduct-FAQ] or contact [opencode@microsoft.com][conduct-email] with any additional questions or comments.
3+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
54

6-
[conduct-code]: https://opensource.microsoft.com/codeofconduct/
7-
[conduct-FAQ]: https://opensource.microsoft.com/codeofconduct/faq/
8-
[conduct-email]: mailto:opencode@microsoft.com
5+
Resources:
6+
7+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9+
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
10+
- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support)

0 commit comments

Comments
 (0)