Commit Graph

12 Commits

Author SHA1 Message Date
Paul Melnikow
2ee1327eed Refactor the NuGet v2 badges; switch Resharper to XML (#2934)
This closes #2921 by switching ReSharper to the XML API used by Powershell, and refactors the powershell code back into the common nuget v2 service class. It also removes mocked tests of the color logic, replacing them with smaller-bracket tests that accomplish the same thing more concisely.
2019-02-07 21:14:04 -05:00
Caleb Cartwright
855c9cd261 Remove dev dep imports in production code (#2937)
Fixes #2876 with @paulmelnikow's suggestion 

Moved imports of `ServiceTester` and `createServiceTester` to a separate file so that dev dependencies are not imported by service classes.
2019-02-05 21:51:55 -05:00
Paul Melnikow
226fa67a02 Create shortcut for BaseService-related imports (#2809)
Continue to implement #2698:

- Add `core/base-service/index.js` (but hold off on moving the things it imports)
- Add shortcuts in `services/index.js` for Base*Service, errors, and deprecatedService. This file will be streamlined later to avoid cluttering it with rarely used bits.
- Apply consistent ordering of imports and use of `module.exports` in testers.
- Remove some renaming of imports.
- Remove obsolete tests here and there.
2019-01-21 15:41:24 -05:00
Paul Melnikow
7d4acba5c1 Validate namedParams in examples (#2786)
Fix #2784
2019-01-16 19:38:36 -05:00
Paul Melnikow
89113eee17 Migrate deprecated staticExample -> staticPreview (#2650) 2019-01-06 17:30:25 -05:00
Tyler James Leonhardt
499ea363e0 Add PowerShell Gallery platform support (#2465)
Now that we have [PowerShell Core](https://github.com/powershell/powershell) the cross-plat version of PowerShell... it'd be really cool to have a badge that shows the OS's that your module works on.

On the PowerShell Gallery, users can do this by using the tags `Windows` `MacOS` `Linux`. In this PR, I use the PowerShell Gallery API to grab the tags from that package and display `windows` `macos` `linux` if they exist.

The result is:
![](https://i.imgur.com/auXUkJJ.png)

which aligns with Conda and Cocoapods
2018-12-06 13:23:40 -05:00
Paul Melnikow
b600bde44e The last of the badge examples (#2389)
* Move PowerShell

* Move Choco + Resharper

* Move MyGet and Nuget
2018-11-25 09:14:54 -05:00
Paul Melnikow
5e99aad2de Rewrite [NuGet] badges including [myget chocolatey resharper powershellgallery] (#2257)
The NuGet badge examples are straggling in all-badge-examples. Rather than move them as is, I thought it made more sense to refactor the services and see if they could be generated. I didn't take that on here; this is a straight rewrite of the badges. The old implementations were fairly difficult to follow. The new implementations are complicated too, though I hope much more readable.

Though the NuGet behaviors could be consolidated into a single flag, I split `withTenant` and `withFeed` into separate flags, thinking naming the behaviors makes the implementations easier to understand. I defaulted these to true, thinking that really this is really a MyGet implementation which is generalized to NuGet. Though maybe it makes more sense to have the MyGet style as the default. Probably it doesn't matter much either way.

I added a helper class ServiceUrlBuilder to construct the Shields service URL. It's useful in this complex case where the URL must be built up conditionally. This might be useful in a couple other places.

I also wrote a new service to handle the Powershell badges. They've diverged a little bit from the Nuget v2. There's a bit of shared code which I factored out.

If the XML Nuget APIs are more reliable, we could consider switching everything else over to them, though for now I would like to get this merged and get #2078 fixed.

Fix #2078
2018-11-14 17:28:15 -05:00
chris48s
aeceb283d8 switch [powershellgallery] to use temp url (#2189) 2018-10-23 18:03:50 +01:00
Paul Melnikow
7a664ca3e8 Run prettier (#1866)
Merging this separately so the commit with the tooling change is readable. This is a follow-on to #1167 which turned prettier on.
2018-08-08 17:57:14 -04:00
Marcin Mielnicki
b418235c7f Standard name in nuget v2 downloads badge (#1726) 2018-06-10 21:36:40 +02:00
Paul Melnikow
ea4b758612 Move service tests alongside code (#1563)
Per discussion in #1543
2018-03-20 18:32:48 -07:00