ServiceNow SDK release notes
Summarize
Summary of ServiceNow SDK release notes
The ServiceNow® SDK enables developers to create and manage scoped applications locally using Visual Studio Code and to upload changes to a ServiceNow instance. The Xanadu release introduces enhancements that improve source code development with ServiceNow Fluent, a domain-specific language for defining application metadata. This update supports better integration with development environments, source control, and error detection at build time.
Show less
Key Features
- ServiceNow Fluent Language: Write application metadata as source code with APIs for various metadata types, enabling development in familiar environments.
- Visual Studio Code Integration: Install the ServiceNow Fluent Language server for advanced language processing and validation.
- Authentication: OAuth 2.0 support added for instance authentication via the
now-sdk authcommand. - Command Enhancements:
- New parameters like
project-type,template,debug, andreinstallallow customization of create, convert, fetch, and deploy operations. - Convert command defaults to
moduleproject type to support gradual migration of metadata to Fluent code. - Deprecated parameters such as
scopeIdandmodehave been removed to streamline processes.
- New parameters like
- Configuration Updates: The
modulePathsparameter replaces the deprecatedtranspiledSourceDirinnow.config.jsonfor mapping source to output directories in TypeScript projects. - Diagnostics Control: Suppress Fluent and TypeScript diagnostics with comment directives like
@fluent-ignoreand control synchronization with@fluent-disable-sync. - Table API Enhancement: Configure field labels in tables and columns using the label object.
- Improved Application Structure: Default application layouts now include a
.gitignorefile and separate configuration files for better organization.
Key Outcomes
- Developers can efficiently build and maintain scoped applications entirely in source code, benefiting from modern code editors and source control tools.
- Enhanced commands and parameters provide greater control over application creation, conversion, deployment, and debugging.
- Improved authentication methods and diagnostics options increase security and developer productivity.
- Migration to ServiceNow Fluent is simplified with incremental conversion workflows and better configuration management.
- Removal of outdated parameters and streamlined commands reduce complexity and potential errors during development.
Additional Information
The ServiceNow SDK is distributed via npm and requires Node.js and npm installed locally. It integrates closely with the ServiceNow IDE, which uses the SDK for application packaging and provides Fluent APIs for source code development. For upgrading, use the now-sdk upgrade command to move to the latest version safely.
The ServiceNow® software development kit (SDK) enables developers to create scoped applications in source code locally in Visual Studio Code Desktop and upload changes to a ServiceNow instance. ServiceNow SDK was enhanced and updated in the Xanadu release.
ServiceNow SDK highlights for the Xanadu release
Write source code to define the metadata that makes up applications with ServiceNow Fluent.
See ServiceNow SDK for more information.
Important information for upgrading ServiceNow SDK to Xanadu
Upgrade to the latest version of the ServiceNow SDK with the now-sdk upgrade command. For more information, see Upgrade the ServiceNow SDK.
New in the Xanadu release
- Version 2.2.1
- Turn off synchronizing changes to ServiceNow Fluent code
- Turn off synchronizing changes to ServiceNow Fluent objects or files using the
@fluent-disable-syncor@fluent-disable-sync-for-filecomment directives.
- Version 2.1.1
- Authenticate to an instance using OAuth 2.0
- Authenticate to a ServiceNow instance using OAuth 2.0 by setting the
typeparameter on thenow-sdk authcommand tooauth. - Ignore ServiceNow Fluent diagnostics
- Suppress ServiceNow Fluent and TypeScript diagnostics using the
@fluent-ignorecomment directive.
- Version 2.0
- Build scoped applications in source code
- Write source code to define the metadata that makes up applications using ServiceNow Fluent. ServiceNow Fluent is a domain-specific programming language with APIs for defining the different types of application metadata. Developing applications in source code enables you to work in familiar development environments, create and modify complex applications, manage code in source control more easily, and catch errors at build time.
- ServiceNow Fluent Language server in Visual Studio Code
- Get language processing and validation for ServiceNow Fluent in Visual Studio Code by installing the ServiceNow Fluent Language server from the Visual Studio Code Marketplace.
Changed in this release
- Version 2.2.3
- Convert command uses module project type by default
- The
projectTypeparameter is set tomoduleby default. By converting an application with the module project type, you can gradually migrate application metadata into ServiceNow Fluent code rather than converting all application metadata into code initially.
- Version 2.2.1
- transpiledSourceDir parameter replaced with modulePaths parameter in now.config.json file
- Use the
modulePathsparameter in the now.config.json file for your application to map the source directory for modules to the output directory for modules instead of the deprecatedtranspiledSourceDirparameter. ThemodulePathsparameter is used to compile TypeScript source files into JavaScript modules.
- Version 2.1.1
- Table API includes label object
- Configure field labels [sys_documentation] for tables and columns with the label object in the Table API.
- Version 2.0.1
- Create and convert commands include template parameter
- Specify whether to use JavaScript or TypeScript in modules with the
templateparameter on thenow-sdk createandnow-sdk convertcommands. This parameter determines the configuration of the package.json and now.config.json files and adds a tsconfig.json file for TypeScript projects.
- Version 2.0
- Default application structure
- The default application structure includes some changes to directories and files, including the addition of a .gitignore file and moving the
nowobject configuration in package.json to its own now.config.json file. - Create and convert commands include project-type parameter
- Specify the type of application to create or convert with the
project-typeparameter on thenow-sdk createandnow-sdk convertcommands. This parameter determines the default application structure based on whether you want to use ServiceNow Fluent and JavaScript modules and third-party libraries in the application (fluent) or only use JavaScript modules and third-party libraries (module). - Fetch command includes debug parameter
- Return debug logs generated during the fetch process by setting the
debugparameter to true with thenow-sdk fetchcommand. - Deploy command includes reinstall parameter
- Uninstall and reinstall the application on the instance by setting the
reinstallparameter to true with thenow-sdk deploycommand. Reinstalling an application ensures that the metadata on the instance matches the metadata in the deployment package.Warning:Metadata that is on the instance but not in your local application is removed.
Removed in this release
- The
scopeIdparameter was removed from thenow-sdk convertcommand, which supported converting global applications. Only scoped applications can be converted. - The
modeparameter was removed from thenow-sdk fetchandnow-sdk deploycommands. A complete fetch or deploy are always executed.
Activation information
The ServiceNow SDK is available as an npm package from the public npm registry and installed locally. For information about installing the ServiceNow SDK, see Install the ServiceNow SDK in an application.
Additional requirements
You must have Node.js and npm installed to install the ServiceNow SDK. For more information, see Install the ServiceNow SDK in an application.