SDK 4.1.0
Availalbe on npm at @servicenow/sdk
π New Features
Module Include/Exclude File Patterns
-
Added support for specifying include and exclude file patterns during module builds.
-
Useful for omitting test files or other support files from being treated as module files.
-
New
now.config.jsonproperties:serverModulesIncludePatternsserverModulesExcludePatterns
Default patterns:
// Include defaults
"**/*.ts",
"**/*.tsx",
"**/*.js",
"**/*.jsx",
"**/*.cts",
"**/*.cjs",
"**/*.mts",
"**/*.mjs",
"**/*.json"
// Exclude defaults
"**/*.test.ts",
"**/*.test.js",
"**/*.d.ts"Apply Templates to Existing Projects
- Running
initinside an existing SDK project now prompts for template selection. - Enables applying UI templates and others to already initialized projects.
Script Include Type Generation for Modules
- The
dependenciescommand now scans modules for scope definitions and fetches script-include types from the instance. - Types are saved under
@types/servicenow. - Detection is based on subpath imports under the
@servicenow/glidenamespace like@servicenow/glide/[scope].
Example:
import { global } from "@servicenow/glide/global";
function test() {
const utils = new global.UtilScript();
const tables = utils.getTables("cmdb_ci_server");
}π Fixes
- Fixed
Listrecords not being deleted on build when fluent code is removed. - Ignored
type-only imports in sys modules during dependency generation. - Fixed
UiActiononClickproperty being cleared on the instance. - Added diagnostics for missing
.htmlfile imports. - Ensured
$meta.installMethodis respected on child records during build. - Fixed
lstaterrors when using certain 3rd-party front-end dependencies (e.g.,@mix/x-charts). - Corrected ATF
Testsys_scopenot being set properly during build. - Fixed radio column choices not being populated during transform.
- Corrected
ClientScriptdiagnostic errors fortype = 'onChange' | 'onLoad'whenfieldis set. - Fixed multiple transform issues with
UiPolicy. - Fixed build failures when fluent content includes XML CDATA escape sequences (
]]>). - Ensured
priorityis captured correctly duringBusinessRuletransform.