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.
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.
What is the JS Core Component?
"Sharing is Caring"