Skip to content

SDK 4.1.0

Choose a tag to compare

@bryce-godfrey bryce-godfrey released this 25 Nov 20:10
· 17 commits to master since this release

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.json properties:

    • serverModulesIncludePatterns
    • serverModulesExcludePatterns

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 init inside 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 dependencies command 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/glide namespace 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 List records not being deleted on build when fluent code is removed.
  • Ignored type-only imports in sys modules during dependency generation.
  • Fixed UiAction onClick property being cleared on the instance.
  • Added diagnostics for missing .html file imports.
  • Ensured $meta.installMethod is respected on child records during build.
  • Fixed lstat errors when using certain 3rd-party front-end dependencies (e.g., @mix/x-charts).
  • Corrected ATF Test sys_scope not being set properly during build.
  • Fixed radio column choices not being populated during transform.
  • Corrected ClientScript diagnostic errors for type = 'onChange' | 'onLoad' when field is set.
  • Fixed multiple transform issues with UiPolicy.
  • Fixed build failures when fluent content includes XML CDATA escape sequences (]]>).
  • Ensured priority is captured correctly during BusinessRule transform.