Share via


PnP JSCore 1.0.4

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

Batch.Execute Returns a Promise

When we introduced batching it was written such that all of your promises would resolve as expected once you called the execute method on the batch. There was however no way to know once all of those promises had resolved. This was addressed by adding support for returning a promise from the execute method which will resolve after all of the individual request promises resolve. This allows you to update the UI, make additional requests, or possibly reset a refresh timer. If you don't need this promise the calling pattern is unchanged so this is non-breaking.

104_batching

Simplified Getting Fields

We added a method to make it easier to get fields by either internal name or title. This simplifies getting a field and allows for greater flexibility using the getByInternalNameOrTitle method.

104_getfields

Bug Fixes & Improvements

We also added a lot of great fixes and improvements to the library - thanks to everyone from the community that contributed these updates!

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 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”