-
Notifications
You must be signed in to change notification settings - Fork 754
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
Replace expressions nuget package with stripped down library #182
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5abf487
Pull in expressions library as-is
anthony-c-martin fe90480
Strip out unused bits
anthony-c-martin b96e4b0
Remove private nuget feed references
anthony-c-martin 803915a
Merge remote-tracking branch 'origin/master' into antmarti/expressions
anthony-c-martin 8eb654a
Address PR feedback
anthony-c-martin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -43,11 +43,6 @@ jobs: | |
with: | ||
dotnet-version: 3.1.301 | ||
|
||
- name: Update NuGet config | ||
# workaround for bug in setup-dotnet action (the config samples for authenticated feeds don't work) | ||
# encryption does not work on Linux or MacOS | ||
run: dotnet nuget update source Official --username bicep --password ${{ secrets.MSAZURE_NUGET_AUTH }} --valid-authentication-types=basic --configfile ./NuGet.config --store-password-in-clear-text | ||
|
||
- name: Build | ||
run: dotnet build --configuration ${{ matrix.configuration }} | ||
|
||
|
@@ -119,11 +114,6 @@ jobs: | |
with: | ||
dotnet-version: 3.1.301 | ||
|
||
- name: Update NuGet config | ||
# workaround for bug in setup-dotnet action (the config samples for authenticated feeds don't work) | ||
# encryption does not work on Linux or MacOS | ||
run: dotnet nuget update source Official --username bicep --password ${{ secrets.MSAZURE_NUGET_AUTH }} --valid-authentication-types=basic --configfile ./NuGet.config --store-password-in-clear-text | ||
|
||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<Nullable>disable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> | ||
</ItemGroup> | ||
|
||
</Project> |
25 changes: 25 additions & 0 deletions
25
src/Arm.Expression/Configuration/ExpressionSerializerSettings.cs
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,25 @@ | ||
// ---------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// ---------------------------------------------------------------------------- | ||
|
||
namespace Arm.Expression.Configuration | ||
{ | ||
/// <summary> | ||
/// Expression serializer settings. | ||
/// </summary> | ||
public class ExpressionSerializerSettings | ||
{ | ||
/// <summary> | ||
/// Gets or sets a value indicating whether the expression serializer will include the outer [ and ] | ||
/// characters when serializing a LanguageExpression. This setting is ignored if the serializer decides to serialize | ||
/// the expression into a single string literal. | ||
/// </summary> | ||
public bool IncludeOuterSquareBrackets { get; set; } = true; | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating whether the expression serializer will serialize a single string literal | ||
/// expression as a string | ||
/// </summary> | ||
public ExpressionSerializerSingleStringHandling SingleStringHandling { get; set; } = ExpressionSerializerSingleStringHandling.SerializeAsJTokenExpression; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/Arm.Expression/Configuration/ExpressionSerializerSingleStringHandling.cs
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,31 @@ | ||
// ---------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// ---------------------------------------------------------------------------- | ||
|
||
namespace Arm.Expression.Configuration | ||
{ | ||
/// <summary> | ||
/// Configures how expression serializer handles single string literal expressions. | ||
/// </summary> | ||
public enum ExpressionSerializerSingleStringHandling | ||
{ | ||
/// <summary> | ||
/// Not specified. | ||
/// </summary> | ||
NotSpecified = 0, | ||
|
||
/// <summary> | ||
/// Serializes the single string literal as a string literal expression of the form | ||
/// ['string contents']. This is the default behavior. The behavior does not apply for | ||
/// Language expressions that are not a single JTokenExpression with a string value. | ||
/// </summary> | ||
SerializeAsJTokenExpression = 1, | ||
|
||
/// <summary> | ||
/// Serializes the single string literal as a string value. If the string begins with a | ||
/// [ character, it will be escaped with [[. The behavior does not apply for | ||
/// Language expressions that are not a single JTokenExpression with a string value. | ||
/// </summary> | ||
SerializeAsString = 2, | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this goes in, can you remove the secret from GitHub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do!