PnP JSCore 2.0.0

The latest release, 2.0.0, of the Patterns and Practices JavaScript Core Library represents an exciting milestone in our evolution and is thanks to all of the great contributions, feedback, and ideas from the community. Thank you all! This update does represent a breaking change but we've tried to minimize the effort required in migration.

Reorganization

If you are a contributor to the library one of the first things you've likely noticed in the dev branch is that we moved things around. We added a debug folder (more on that below) and removed provisioning code. The provisioning code can now be found in a new repo where it can grow and evolve on its own. We also reorganized and simplified the gulp tasks - though all of the expected functionality remains in place.

Debugging

Taking into account feedback and a desire to enhance the development experience we added support for debugging directly in the library. This will help with folks developing new features or fixing bugs as you can directly test, set break points, and step through the internals of the library. The full steps are outlined here.

Wiki Enhancements

Another piece of feedback we heard is a need for better documentation and we have started to enhance the wiki to include deeper details around configuring, using, and extending the library. We have reorganized the menu to help guide you to the information you need to be successful. As always these articles are a work in progress and the community is encouraged to help us create new articles or update existing ones.

Enhancements

  • Added a getJSON method to File
  • Added support for attachments on list items
  • Multiple updates to UserCustomActions
  • Simplified request pipeline
  • Added currentUser property to web
  • Added custom exceptions
  • Added support for use of custom HttpClientImpl instances (docs)
  • Gave full control of response handling including errors to parsers (parser docs)
  • Exporting additional classes from the library
  • Added limited FieldLinks support (as possible with the REST API)
  • Added file property to item class
  • Added ability to manage features in webs/sites
  • Ability to pass ListItemEntityTypeFullName when creating list items (example)

Bug Fixes

  • Fix for empty body in SPRequestExecutorClient
  • Fix for broken tests
  • Fix for empty responses in SPRequestExecutorClient as reported in #256
  • Fix for context info when a Site instance is created directly
  • Fix for property names in wrong property names in sitegroups and siteusers
  • Fixed bug with using a web immediately after it is created using ensure
  • Fixed typing errors when using library with SharePoint Framework

What is the JS Core Component?

The Patterns and Practices JavaScript Core Library was created to help developers by simplifying common operations within SharePoint and the 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”