Freigeben über


PnP JSCore 1.0.1

Today we are releasing our first updates to address some issues there were reported last week. Thanks to those that reported the issues so we could get them resolved.

The biggest change is the introduction of the pnp.setup method. Currently this can be used to control the headers that are sent with every requests. This was done to fix an issue with SharePoint 2013 not enabling JSON light by default. This also opens up the opportunity to set an authentication header if you have a valid bearer token. Using setup is not required if you are operating in the context of SharePoint online or a SP 2013 environment where JSON light is available, everything will continue to default to minimal metadata.

This code allows the library to work in environments where JSON light is not configured. You only need to call setup once per page and the headers will be used for all subsequent requests.

1.0.1 code

The only setting available is the headers collection, but we will be looking to expand the configuration of the library as makes sense. One important note, if you set the odata value to nometadata - the library will work to get and update data, however it is important to remember that some of the methods that rely on the existence of metadata may fail. For example using the ODataEntity parsers and trying to chain off the results.

The two additional updates to the library were to address bugs reported in the issues list: 126 and 124. You can always check the Change Log to see what has been updated.

What is the JS Core Component?

The Patterns and Practices JavaScript Core Library was created to help developers by simplifying common operations within SharePoint. This is aligned with helping folks transitioning into client side development in support of the upcoming SharePoint Framework. Currently it contains a fluent API for working with the full SharePoint REST API as well as utility and helper functions. This takes the guess work out of creating REST requests, letting developers focus on the what and less on the how.

"Sharing is Caring"

Comments

  • Anonymous
    May 25, 2017
    Patrick, once again great job on all of this. Built something in 0365 on my dev tenant, brought it into SharePoint 2013 on premise, and it just quit on me. This looks like the exact solution.Thanks so much for all the hard work.
    • Anonymous
      June 01, 2017
      Thanks Michael for the kind words and very happy to hear you're finding the library useful!