PnP JSCore 1.0.3

The latest release, 1.0.3, of the Patterns and Practices JavaScript Core Library includes some new enhancements and fixes to issues reported since the last release.

Support for Node

The largest enhancement included in this release is the addition of the NodeFetchClient which uses SharePoint OAuth add-in only authentication to allow the library to work directly from node. This opens up two key new scenarios we are excited to support. The first is the ability to write applications and host them in node. These can include management services, remote event receivers (web hooks), or simple console app like programs. The second scenario is the ability to test the library directly against SharePoint. We are working to expand the test coverage and welcome help, just drop a comment in this issue to claim a section.

To enable the node client you need to use the setup method and provide a valid client id, client secret, and site url. To get started with the tests please see this wiki article for further details and pointers on registering an add-in.


This is not included in the browser build as it would only serve to bloat the library. If you setup the library to use the node client in the browser an exception will be thrown.

Integration Testing

As mentioned above, now that we can execute requests against SharePoint directly from node we are actively working to build out the tests to include live web tests. This effort has already proven valuable as we fixed a few bugs as well as some updates required when working in verbose mode. It is expected that as we add more of these live tests we will find other issues, but that is all part of the process of growing a new code base.

Documentation Updates

We have also worked to bring API level documentation to the community. These documents are generated directly from the source code comments and will be updated with each release. You can also use the "gulp docs" command to generate them locally. This is another area we are looking to improve and welcome PRs to update the styling as well as enhance the quality of the comments.

Other Fixes and Enhancements

  • Fix for an issue reported in FireFox that was due to their slightly different implementation of the Headers object used by the fetch client.
  • Fix for an issue related to the url for a particular profile service url being incorrect.
  • Added support for fields and available fields to the web object.
  • Updates to the readme aimed at making it easier to locate the project resources such as documentation and the sample add-in.
  • Updates to the project dependencies in the package.json file.
  • Miscellaneous small bug fixes found when testing against SharePoint related to making requests in verbose mode.


We have also integrated the project with bithound, a code analysis tool which will help us maintain up to date dependencies. Currently we have a score of 93 out of 100, which is great to see and was accomplished with minimal changes. We will continue to evolve our use of this tool - for now if you submit a PR it will show that "some files failed". You can safely ignore this and we will not reject a PR based on this analysis.

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 (0)

Skip to main content