Commit Graph

82 Commits

Author SHA1 Message Date
Ryan Brandenburg 7a7cc5ab1e Set 2.0 baselines 2018-03-19 10:46:23 -07:00
Ryan Nowak b900a82bc3 Refocus Razor runtime assemblies
Microsoft.AspNetCore.Razor becomes the home for TagHelper-related types
that you use in your code.

Microsoft.AspNetCore.Razor.Runtime becomes the home type types you need
to build a view engine. User code should not need this package anymore.

None of these are breaking changes due to typeforwards.
2017-12-19 13:26:07 -08:00
Javier Calvarro Nelson d1cca77852 Update API Check baselines to 2.0.0 2017-09-22 15:33:52 -07:00
Nate McMaster 4cadee2762 Use Directory.Build.props/targets (#1641) 2017-08-23 12:24:57 -07:00
N. Taylor Mullen 99ff9d44a3 Update repo to utilize ApiCheck.
- Re-enabled api check for `Microsoft.AspNetCore.Razor` and `Microsoft.AspNetCore.Razor.Runtime`. This resulted in me adding known breaking changes for the packages.
- Added empty baseline files for `Microsoft.AspNetCore.Razor.Language`, `Microsoft.AspNetCore.Mvc.Razor.Extensions` and `Microsoft.CodeAnalysis.Razor`.
- Disabled ApiCheck for `Microsoft.CodeAnalysis.Razor.Workspaces`, `Microsoft.CodeAnalysis.Remote.Razor`, `RazorPageGenerator` and `Microsoft.VisualStudio.LanguageServices.Razor` to prevent ApiCheck warnings about missing baselines.

#1107
2017-07-07 15:59:36 -07:00
Nate McMaster 4d18334573 Target .NET Standard 2.0 2017-06-08 16:37:27 -07:00
Pranav K 2ea0659e60 Change compilation targets.
* Remove net451 as a compilation target
* Upgrade to netcoreapp2.0
2017-03-24 07:49:34 -07:00
Doug Bunting 6fbbd5d148 Disable API Check in projects with untracked breaking changes 2017-03-22 08:35:10 -07:00
Ryan Brandenburg a7eb30ddca Remove old razor 2017-03-17 14:58:13 -07:00
N. Taylor Mullen 8f9ff1abd9 Clean up TagHelperDescriptor APIs.
- Removed all design time descriptors and put their API surface into their corresponding descriptor. Part of removing the design time API surface was removing the tracking of `<Remarks>`, it wasn't used so there's on need to track it until we need it.
- Removed the Type requirement from `TagHelperDescriptor`. With this separation we'll be able to have abstract `TagHelper`s that aren't based on a class implementation.
- Removed Prefix from the `TagHelperDescriptor` API surface. It was a legacy requirement based on how the Razor parser was put together. We can work around this now.
- Stripped correlation information from the immediate `TagHelperDescriptor` API surface. Instead this information is now tracked in `TagMatchingRule`s. This change means that you will not have multiple `TagHelperDescriptor`s per `TagHelper`; instead it's all tracked in a single descriptor. A side effect of this change was the transformation of `IsIndexer` => 3 new properties.
- Renamed many descriptor types and property names.
- Added builder APIs to construct TagHelpers since they're inherently immutable in their API surface.
- Added `ITagHelperDescriptorBuilder` to represent `TagHelper`s that are built from an `ITagHelper` implementing class. It re-introduces the `TypeName` association of a `TagHelper`.
- Added `ITagHelperBoundAttributeDescriptorBuilder` to represent that an attribute was associated with a property.
- Added validation methods to the descriptor builders to enable consumers to validate the current state of the builder and add diagnostics as necessary.
- Moved descriptors away from RazorError.
- Updated the various comparers to understand the descriptors new API.
- Added a new `RazorDiagnosticFactory` abstraction to handle `RazorDiagnostic`s and their corresponding errors/ids etc. This new API should allow for easy addition of new `RazorDiagnostic` errors.
- Updated the `DefaultTagHelperDescriptorFactory` to construct `TagHelperDescriptor`s using the new builder APIs and in the new descriptor format (1 descriptor per type).
- Updated `ViewComponentTagHelperDescriptorFactory` to construct `TagHelperDescriptor`s with the builder API.
- With both factory implementations code was duplicated because the ViewComponent work will be moving outside of Razor once we have the proper hooks.
- Updated `TagHelper` binding bits to capture a binding result in order to query which rules appy to a given tag name.
Addressed feedback
- Update tests to react to new `TagHelperDescriptor` API.
- Remove case sensitive comparers and some cleanup
- Added TagHelperDescriptorJsonConverter, RazorDiagnosticJsonConverter and added serialization tests
2017-03-17 12:18:05 -07:00
Nate McMaster 43a41398ac Unify dependency versions to one file 2017-03-15 16:44:00 -07:00
Ajay Bhargav Baaskaran 4b2245eeb9 [Fixes #924] Correct RightShiftAssign operator 2017-02-15 16:31:40 -08:00
Nate McMaster 279855d947
Downgrade to stable packages 2017-02-14 16:15:35 -08:00
N. Taylor Mullen c49d7b8c27 Add support for new style Roslyn dotless commits.
- Roslyn swapped the way they performed dotless commit insertions. They went from:
date => date. => DateTime.  to
date => date. => date => DateTime => DateTime.
The problem with the new approach is that date => DateTime would be rejected and therefore force the editor to reparse and reclassify any dots as HTML giving improper IntelliSense.
- Updated Razor implicit expression edit handling to allow identifier => identifier replacements as long as the identifiers didn't result in keyword or directives.
- Added tests to verify the scenarios impacted.
2017-02-01 15:43:08 -08:00
Nate McMaster 79663ef90e Upgrade to RC.3 2017-01-20 09:01:49 -08:00
Nate McMaster 91bc4b3940 Remove redundant references 2017-01-05 18:12:53 -08:00
Pranav K 7657ea41a3 Updating to 4.4 CoreFx packages 2016-12-21 22:43:57 -08:00
Nate McMaster 705a490acb Upgrade to VS 2017 2016-12-16 16:04:22 -08:00
N. Taylor Mullen cf7489e600 Port WhiteSpaceRewriter and ConditionalAttributeCollapser.
- Add an `HtmlNodeOptimizationPass` that does all of the `RazorSyntaxTreeRewriting` that legacy used to achieve outside of `TagHelper`s.
- Add tests for `HtmlNodeOptimizationPass` to verify it's executing appropriate bits.

#849
2016-11-22 12:04:31 -08:00
Pranav K c746fd81df Updating versions to 1.2.0-* 2016-11-09 14:19:11 -08:00
jacalvar eaa273701b Updated baselines to remove Debug only members 2016-11-08 15:22:47 -08:00
jacalvar b9e58a4fe6 Created public API baselines 2016-11-08 11:05:35 -08:00
Piotr ff8b2260fb Update CSharpCodeParser.cs (#860)
Cleanup CSharpCodeParser.cs code.
2016-11-07 14:34:10 -08:00
Pranav K 039e1021a4 Updating partner package versions 2016-09-28 11:51:56 -07:00
Pranav K 5944dd6f87 Small perf fixes to improve precompilation times 2016-09-01 09:44:30 -07:00
Crystal Qian d19845730f Added a copy constructor for tag helper descriptors. (#827) 2016-08-31 15:38:35 -07:00
Crystal Qian 0e1a54ef4f Removed unnecessary dependency. 2016-08-30 17:14:28 -07:00
Crystal Qian bb5a70f9a8 Added a check for property bag in tag helper descriptor comparer.
Modified TagHelperDescriptorComparer to reflect changes made in #822.
2016-08-30 09:53:45 -07:00
Crystal Qian 127e095370 Added property bag to tag helper descriptor. (#822)
aspnet/Mvc#1051
2016-08-25 18:04:17 -07:00
Crystal Qian b34543621f Added property bag to tag helper descriptor. (#822)
aspnet/Mvc#1051
2016-08-25 09:31:29 -07:00
Crystal Qian 489c0d9046 Added view component tag helper updates. (#823)
Added view component tag helper updates.

aspnet/mvc#1051
2016-08-24 16:01:59 -07:00
N. Taylor Mullen 8d7c51bd60 Change TagHelpers to work in partial parsing.
- Prior to this change any query for ownership within a TagHelper would never succeed.
- TagHelpers structure can be influenced greatly by changes to the tags start/end body; therefore, only allowed modifications to TagHelper attribute values to avoid complexity and enable the more widespread scenario of a user typing C# code in an attribute value.
- Updated existing tests to reflect the new edit handlers that were added to TagHelper attributes.
- Added partial parsing tests to verify partial parses succeed/fail when expected.

#792
2016-08-15 16:15:41 -07:00
N. Taylor Mullen 82c9c40709 Capture exceptions when trying to parse files and return parse errors.
#808
2016-08-11 12:11:51 -07:00
Ajay Bhargav Baaskaran f09e2bf571 [Fixes #804] Fixed unsafe cast in CSharpCodeVisitor 2016-08-08 16:38:51 -07:00
Ajay Bhargav Baaskaran 687b3f6911 [Fixes #815] Fix Debug.Assert failure for malformed tags in expression 2016-08-08 16:34:38 -07:00
N. Taylor Mullen fc4a61586e Obsolete `EditorHints`.
- For tests added grouped pragma warning disables to not pollute the test files with too many duplicate warning disable/restores.

#780
2016-08-01 11:08:03 -07:00
N. Taylor Mullen d337bacc69 Add additional ifdefs to partial parsing tracing logic.
- Prior to this change we would be ToStringing the TextChange which resulted in 87% of successful partial parsing execution time.

#800
2016-07-11 11:49:25 -07:00
Doug Bunting 05a52f445f One build to rule them all
- well, at least VS and command-line builds will share output
- part of aspnet/Coherence-Signed#277
2016-07-07 12:26:20 -07:00
Pranav K eb2b58188a Updating to dev versions
# Conflicts:
#	test/Microsoft.AspNetCore.Razor.Test/project.json
2016-06-16 10:41:31 -07:00
N. Taylor Mullen e20d18636e Move more classes into Internal namespaces.
- These classes aren't needed as top level public classes.

#779
2016-06-13 13:53:14 -07:00
N. Taylor Mullen ccba161447 Move `FileSystem` dependency from Razor to Razor.Runtime. 2016-06-09 15:58:55 -07:00
N. Taylor Mullen 6e4f15bad4 Remove unused/unpurposeful classes.
- Several classes are legacy and left over from many changes in the Razor code base. This changeset removes those classes.
- Also moved several corresponding test cases

#778
2016-06-09 15:51:43 -07:00
mnltejaswini 3b9539960b [Perf] Preallocate TagHelperAttributes for simple bound string valued attributes Fixes #704 2016-06-01 11:24:32 -07:00
N. Taylor Mullen e14f4b095d Track `TagHelperAttribute` quotes.
- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeValueStyle`.
- Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeValueStyle` now.
- Stopped manually escaping double quotes because we now know how an attribute was originally written.
- Updated tests to account for new attribute format (from kvp).

#705
2016-05-27 12:28:33 -07:00
John Luo ccd0d52d8e React to updated CoreCLR packages
https://github.com/aspnet/Coherence/issues/97
2016-05-26 18:32:23 -07:00
mnltejaswini bde78dc3d4 [Perf]: Avoid ViewBuffers for writing bound TagHelper attribute values
Fixes #717
2016-05-25 12:06:03 -07:00
N. Taylor Mullen d0bf6bf841 Make HTML comments more resilient to extra end dashes.
aspnet/Mvc#4465
2016-05-24 15:34:35 -07:00
N. Taylor Mullen 80ebb4a068 Update `TagHelperDirectiveSpanVisitor` to properly capture TagHelper directive text.
- Added a test with optional quotes for each of the `TagHelperDirectiveDescriptor`s, add, remove and prefix.

#744
2016-05-23 17:07:36 -07:00
N. Taylor Mullen cdea6fd3fb Fix TagHelper directive tests to fail when expected.
- Prior to this change the equals bits were falling back to the type comparison that `ChunkGenerator` exposes.
2016-05-18 11:05:55 -07:00
Pranav K 852642de84 Revert "React to updated CoreCLR packages."
This reverts commit 46f7a8575e.
2016-05-18 09:37:25 -07:00