Skip to content

Update dependencies and improve type safety in js-sdk-release-tools#39221

Open
skywing918 wants to merge 2 commits into
mainfrom
upgradeJsSdkReleaseTools
Open

Update dependencies and improve type safety in js-sdk-release-tools#39221
skywing918 wants to merge 2 commits into
mainfrom
upgradeJsSdkReleaseTools

Conversation

@skywing918

Copy link
Copy Markdown
Contributor

fixes #39220

This pull request updates dependencies, improves type safety, and refines utility functions in the js-sdk-release-tools-src project. The main changes include upgrading various dependencies (notably TypeScript and ESLint-related packages), improving type annotations and type safety in utility functions, and updating scripts for better formatting and testing workflows.

Dependency Updates and Build Improvements:

  • Upgraded several dependencies and devDependencies in package.json files, including major versions for TypeScript (^6.0.3), ESLint plugins, ts-morph, glob, js-yaml, and others. Updated the typescript-codegen-breaking-change-detector dependency to use a local file reference. Removed the optionalDependencies section and updated script commands for formatting and testing. [1] [2]
  • Bumped the version of typescript-codegen-breaking-change-detector to 0.7.11.

Type Safety Improvements:

  • Added and used a ReadmeMdConfig interface for better type safety in functions handling README.md configuration, and updated related function signatures and return types in utils.ts. [1] [2]
  • Improved nullish handling in generateSampleReadmeMd.ts by providing default empty strings for potentially undefined values, preventing runtime errors. [1] [2]
  • Added a TypeSpecProjectYaml interface and improved type assertions in updateTypeSpecProjectYamlFile.ts for safer YAML file manipulation.

Code Quality and Minor Fixes:

  • Removed unnecessary type annotation from a rule definition in ignore-inline-declarations-in-operation-group.ts for cleaner code.
  • Removed the downlevelIteration compiler option from tsconfig.json, as it is no longer needed with the updated TypeScript target.

- Bump versions of several dependencies in package.json for js-sdk-release-tools and typescript-codegen-breaking-change-detector.
- Refactor type definitions for better clarity and safety.
- Enhance README generation logic to handle undefined values gracefully.
- Remove deprecated husky configuration and streamline prettier scripts.
Copilot AI review requested due to automatic review settings July 9, 2026 09:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the dependencies of the standalone @azure-tools/js-sdk-release-tools tooling (now at eng/tools/js-sdk-release-tools-src) and its bundled typescript-codegen-breaking-change-detector sub-package to their latest July‑2026 versions (TypeScript 6.0.3, @typescript-eslint 8.x, ts-morph 28, glob 13, marked 18, pino 10, js-yaml 5, npm-registry-fetch 19, comment-json 5, @npmcli/package-json 7, @types/node 26, etc.). Alongside the version bumps it removes now-unused tooling deps/scripts (colors, minimatch, commander, tsx, husky/onchange, rollup optionalDependencies), switches the breaking-change-detector reference to a local file: path, and tightens type safety in a few utility functions. It resolves issue #39220.

Changes:

  • Bulk dependency/devDependency upgrades and script cleanup across both package.json files, plus removal of the downlevelIteration compiler option.
  • New ReadmeMdConfig and TypeSpecProjectYaml interfaces with safer nullish handling in README/TypeSpec YAML utilities.
  • Minor code cleanup: dropped a rule type annotation and reformatted an interface.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
eng/tools/js-sdk-release-tools-src/package.json Upgrades deps, removes optionalDependencies/colors/minimatch, and points the breaking-change-detector at a local file: path (build/publish risk).
.../typescript-codegen-breaking-change-detector/package.json Bumps to 0.7.11, upgrades to @typescript-eslint 8 / TypeScript 6, moves typescript to a peer dep, simplifies prettier scripts, drops husky/onchange/tsx.
.../src/llc/utils/utils.ts Adds ReadmeMdConfig and types getConfigFromReadmeMd/getPackageNameFromReadmeMd.
.../src/llc/utils/updateTypeSpecProjectYamlFile.ts Adds TypeSpecProjectYaml interface and narrows emitters before mutation.
.../src/llc/utils/generateSampleReadmeMd.ts Adds ?? '' defaults for possibly-undefined README fields.
.../src/azure/common/types.ts Reindents DeclarationDifferenceDetectorOptions (formatting only).
.../src/azure/common/rules/ignore-inline-declarations-in-operation-group.ts Removes the CreateOperationRule annotation, leaving its import unused.
eng/tools/js-sdk-release-tools-src/tsconfig.json Removes the downlevelIteration option.

"ts-morph": "^28.0.0",
"tslib": "^2.8.1",
"typescript-codegen-breaking-change-detector": "0.7.10",
"typescript-codegen-breaking-change-detector": "file:./packages/typescript-codegen-breaking-change-detector",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[js-sdk-release-tools-src] Upgrade dependencies to latest versions

2 participants