Releases: Sitecore/jss
20.0.1
20.0.0
20.0.0
New Features & Improvements
[create-sitecore-jss]
- New package containing initializers / templates for JSS sample applications (#881), (#883), (#882), (#880), (#879), (#878), (#876)
- This replaces previous
jss create
method to create new JSS applications - You can now create an application with guided prompts using initializer command of choice (
npx create-sitecore-jss
,npm init sitecore-jss
,yarn create sitecore-jss
) 🎉🎉🎉
[template/nextjs]
- Remove
withSitecoreContext
HOC from Layout.tsx (#887) - Component props auto-injection by Placeholder (#884)
- Plugins for next.config.js (#867)
- Refactor
sitemap-fetcher
to make it extendable (#865) - Upgrade to Next.js 12 (#860), (#948)
- Refactor
PagePropsFactory
to make it extendable (#857) - Remove locale variants from default rewrites (#832)
[template/angular]
Language is not preserved when navigating to another page (#793)
[template/nextjs]
[template/react]
[template/angular]
[template/vue]
- Use the app name as the prefix value for templates (#800), (#811), (#813), (#814)
- Throw error when run jss start using
FETCH_WITH=GraphQL
(#920) - Bring environment variable support to config generation (#911, #commit)
- Change the classname of
ContentBlock
from display-4 to contentTitle (#908) - Hidden renderings do not have implementation and result in console error message (#834)
- Use the app name as the prefix value for placeholders (#830)
[sitecore-jss-nextjs]
[sitecore-jss-react]
Handle Sitecore querystring property in Link component (#929)
[Maintenance]
Generate API reference docs (#840)
[sitecore-jss-manifest]
[template/nextjs]
Allow component manifest definitions to define a template name (#810)
Bug Fixes
[template/*]
[template/nextjs]
- graphql-let error when bootstrapping empty Nextjs app (#942)
- Use more focused paths for Sitecore rewrites (#921
- Add .babelrc to Next.js template to disable SWC compilation (#918)
- Can't start app in disconnected mode, throws webpack fallback option error (#913)
- Add .gitattributes to Next.js sample app with CRLF line endings (#855)
[Horizon]
Custom components cannot be added (#807)- Add gitignore (#988)
[template/angular]
- [10.3] "Edit related item" button redirects to home (#944)
- Update angular-devkit/build-angular to fix deprecation error (#917)
- Convert language to the sitecore compatible format (#906)
- Fix issues with Angular in disconnected mode (incorrect componentName + reverts changes (#commit)
- Opt out of angular telemetry by default (#commit)
- Fix handling of not found layout service requests in Angular sample (#809)
- Console error when /graphql requested in EE, localhost or horizon (#803)
[template/vue]
- The page is redirected to the home page of the website after clicking the "Change associated content" button in the Experience Editor (#907)
- Cannot add a new rendering to the newly created (#903)
[Horizon]
Cannot add a new rendering or highlight existing (#895)[Authoring]
'Add here' modal does not show allowed items on placeholder (#859)- Server error for Vue + --fetchWith GraphQL + node-headless-SSR-Experience-Edge (#812)
- Fix Vue sample RestLayoutService config (use 'apiHost', not 'endpoint') (#804)
[template/react]
Set changeOrigin: true for proxied Sitecore requests in connected mode (#808)
[template/vue]
[template/react]
Exception while rendering GraphQL page (#900)
[template/react]
[template/angular]
[template/vue]
Fix Template id for styleguide-explanatory-component-template & vue graphql fragment data (#816)
[template/react]
[template/angular]
[template/vue]
jss graphql:update throws errors (#806)
[template/react]
[template/angular]
[template/vue]
Include Sitecore server URL in media URLs by default (#802)
[sitecore-jss]
- TypeError: Only absolute URLs are supported (#826)
[sitecore-jss-vue]
- Experience Editor controls does not work until hard reload is done (#950)
- Styleguide-Layout-Reuse breaks EE (#938)
[sitecore-jss-nextjs]
- Prevent passing internalLinkMatcher prop (#847)
- Preview Mode doesn't work with fallback: false on Vercel (#846)
[caching]
Make tmpDir a configurable parameter (#839)
[node-headless-ssr-proxy]
[node-headless-ssr-experience-edge]
Added submodules import (#916)
[sitecore-jss-nextjs]
[sitecore-jss-react]
Attributes of an empty placeholder are applied to the next sibling <div>
tag in Experience Editor of JSS item (#833)
[sitecore-jss-dev-tools]
Fix circular dependencies (#843)
[sitecore-jss-cli]
- Ignore pdf and images when replacing or stripping prefix (#818)
- Handle underscores in app name when replacing prefix (#817)
[Maintenance]
- Upgrade security vulnerable packages (#866)
- Node 16 upgrade (#863)
- Resolve deprecated dependencies in sitecore-jss-cli package (#864)
- The page is redirected to the home page of the website after clicking the "Change associated content" button in the Experience Editor in angular application (#835)
- *scRouterLink breaks link generation (#815)
Breaking Changes
[samples/sitecore-embedded-jss-app]
Removed sample (migrated to https://github.com/Sitecore/headless-examples) (#845)
[samples/sitecore-javascript-renderings]
Removed sample (deprecated) (#845)
[samples]
Retire remaining samples (moved to initializer templates) (#891)
[sitecore-jss/*]
Consolidated packages together into sitecore-jss
package submodules. (#824, #commit, #commit). See upgrade guide for more details.
[sitecore-jss-cli]
Error handling for someone trying to run jss create (#893)
[template/nextjs]
[template/react]
Strongly typed SitecoreContext value (#841)
12.0.5
12.0.4
19.0.2
19.0.1
19.0.0
19.0.0
Documentation
The JSS documentation has migrated from jss.sitecore.com to Sitecore's primary developer documentation portal.
The new home for our docs is here - https://doc.sitecore.com/en/developers/hd/190/sitecore-headless-development/introducing-sitecore-javascript-rendering-sdk.html
New Features & Improvements
[sitecore-jss-react]
[sitecore-jss-nextjs]
Add withDatasourceCheck
higher order component (HOC) to better handle renderings with missing datasources (#723)
[sitecore-jss-*]
Compile and publish all base package as ESM (#758)
[sitecore-jss]
[sitecore-jss-nextjs]
[Dictionary Service] [Sitemap Service] Provide ability to customize jssAppTemplateId (#763)
[sitecore-jss]
Update editing functions for Horizon compatibility (backwards compatible) (#712)
[sitecore-jss-nextjs]
- Upgrade to Next.js 11 (#768)
- Utilize the
VERCEL_URL
env variable (if available) for generating public URLs (#725) - Enable dynamic component import (#727)
- Prevent extraneous router.replace in Experience Editor when using SSG (#736)
[sitecore-jss-vue]
[samples/nextjs]
[samples/react]
[samples/angular]
[samples/vue]
- Remove usage of deprecated
dataApi
. Replaced byRestLayoutService
andRestDictionaryService
(#744) - More reliable detection of disconnected or connected mode (#732)
[samples/react]
[samples/angular]
[samples/vue]
(#773)
- Add support for the
--fetchWith
option forjss create
, which selects REST or GraphQL APIs - Update to use Edge schema for GraphQL by default
- Update Sitecore configuration patches with relevant Edge-specific definitions
[samples/nextjs]
- Upgrade to Next.js 11 (#768)
- Horizon editor compatibility (#712, #723, #752)
- Enable creating a new app without boilerplate with the
--empty
flag forjss create
(#754) - Enable dynamic component import in sample (#727, #730)
[samples/vue]
Upgrade version 2.x to 3.x. Simplify dependencies; remove dependency on i18n (#724)
[samples/embedded-app]
Remove dependency on StepZilla (#747)
[samples/node-headless-ssr-proxy]
Remove '/dist' path from pathRewriteExcludeRoutes (#756)
Bug Fixes
[sitecore-jss-react]
[samples/nextjs]
[samples/react]
Fix double rendering (#775)
[sitecore-jss-react]
Error rendering raw self-closing tag elements in placeholders (#745)
[sitecore-jss-react-forms]
Experience Forms JSS React implementation doesn't use CSS class applied to entire form (#771)
[samples/angular]
Fix issue where dk-DA language is not rendered in connected and disconnected mode (#734)
[samples/react]
Fix 504 (Gateway Timeout) errors for proxied Sitecore requests (visitor identification, media, etc) when running in connected mode (#808)
Breaking Changes
[sitecore-jss]
[sitecore-jss-vue]
[sitecore-jss-react-native]
[sitecore-jss-react]
[sitecore-jss-nextjs]
[sitecore-jss-angular]
Remove deprecated dataApi
(#744)
[sitecore-jss-*]
[samples/*]
Avoid use of 'any' for TypeScript definitions (#759)
Sitecore JSS 18.0.1
Bug Fixes
#835 [sitecore-jss-angular]
Add utility function that allows Experience Editor to properly resolve onclick handlers (prevent page reload) while rendering a JSS Angular application
Sitecore JSS 15.0.2
Bug Fixes
#815 [sitecore-jss-angular]
Fix issue where querystring parameters would break links generated with the scRouterLink
component.
JSS 18.0.0
JSS 18.0.0 Release Notes
JSS 18.0.0 is compatible with Sitecore 10.1. To ensure that your JSS application is compatible with your licensed Sitecore version, consult the compatibility table.
Breaking changes
There are migration instructions from JSS 16-based applications.
[sitecore-jss-react-native]
Removed dataConversation
, since editable
property not used in disconnected
mode. (#624)
[samples/angular]
Upgrade angular
to v11. (#635)
[samples/nextjs]
Change how a custom query can be used in GraphQLSitemapService. Previous way: pass a formatSearchQuery
function to fetchExportSitemap
or fetchSSGSitemap
. New way: extend the GraphQLSitemapService
class and override the fetchSitemap
method. (#638)
- As part of adding support for Experience Edge, Sitecore XM's graphQL API was updated to mirror Experience Edge's schema. The following updates in JSS
- [sitecore-jss-nextjs] Update sitemap query to comply with changes to the GraphQL API
- [samples/nextjs] Update generated TypeScript models for GraphQL components to comply with changes to the GraphQL API
With the added support of GraphQL endpoints, the API surface area of JSS has essentially doubled. As a result, some reorganizing was done in the base packages, which causes breaking changes for how some services, classes and functions are exported. If you have imports from JSS base packages in your project, they may need to be updated per the migration guide table.
Introducing support for Sitecore Experience Edge 🎉🎉🎉
Experience Edge is Sitecore's new delivery platform, which serves Sitecore data to your JSS app at blazing fast speeds. You should learn about the Experience Edge GraphQL schema.
[samples/nextjs]
- Update Sitecore configuration patches with relevant Edge-specific definitions.
- #695 Add settings for language fallback with Experience Edge.
- #696 Add
IncludeServerUrlInMediaUrls
"default" configuration to avoid exposing the Sitecore server publicly when using Experience Edge.
[react]
[angular]
and [vue]
samples can also utilize Sitecore Experience Edge. A new [node-headless-ssr-experience-edge]
sample has been adeded to demonstrate how to configure this. Read docs.
New Documentation
We have added & polished documentation for our main package and our Next.js SDK, as follows:
For sitecore-jss
, see:
For sitecore-jss-nextjs
, see:
New & Improved Service Classes
Read our updated docs:
[sitecore-jss]
GraphQLDictionaryService
is a new service for fetching dictionary data using GraphQL Read docs.GraphQLLayoutService
is a new service for fetching layout data using GraphQL Read docs.- #716 Allow overriding which "named" Layout Service configuration (from Sitecore config) is used by JSS.
- Allow overriding 3rd party dependencies in JSS services that depend on 3rd party functionality (GraphQLLayoutService, RestDictionaryService, GraphQLDictionaryService, GraphQLSitemapService).
[sitecore-jss-nextjs]
- Make
GraphQLSitemapService
easier to customize by allowing overrides of default options. (#682, #705)
Other Notable Improvements
[sitecore-jss]
Enable debug logging for JSS services using the debug module. Read docs.- New options in
jss create
command. Read docs.
[samples/react-native]
(#624)
- Add shared
<Layout/>
component in order to have shared navigation panel. - Make Sitecore logo in header is touchable and will navigate to Home page when click on it.
- Remove usage of
dataConversation
.
Bug Fixes
[sitecore-jss]
- Fix issue with dictionary phrases not being cached when caching is enabled (#639)
mediaApi.updateImageUrl
now only switches to JSS media handler prefix ifimageParams
are sent. Otherwise, the original media URL is returned. Fixes hash errors ("ERROR MediaRequestProtection: An invalid/missing hash value was encountered.") from appearing in Sitecore logs (#681)
[samples/nextjs]
[samples/react]
[samples/vue]
- Fix issue where using the
jss scaffold
generated files with inconsistent line endings (#684) - Update Text components to accept number values (#713)
[sitecore-jss-nextjs]
- Fix issue with
getStaticPaths
only pre-rendering the first 10 pages (638) - Fix issue where links inside RichText controls caused pages to load twice (659)
[sitecore-jss-react]
Render value instead of array of single value when value doesn't contain line breaks (714)
[sitecore-jss-react-native]
(#624)
- [Image] Pass Object
style
type forSvgUrI
instead of Array. - [Date] Always render
<HtmlView/>
ifeditable
is provided.
[samples/react-native]
(#624)
- Fix Styleguide-FieldUsage-Date not working in connected mode.
- Styleguide-FieldUsage-Image: Fix incorrect
src
prop type in disconnected mode. Fix 'Plain image' example in connected mode. Remove unsupported 'Srcset image' adaptive example. - Styleguide-ComponentParams: fix incorrect
params
prop types in connected mode. - Fix connected tunnel mode for secure (https) Sitecore endpoints.
[samples/node-headless-ssr-proxy]
Fix how header value for 'accept-encoding' is set. This resolves an issue in the Angular sample where the /graphql page caused a console error (#680)
[sitecore-jss-forms]
Fix issue where pre-filled (default) form data isn't removed for multi-valued fields when user de-selects values (#677)