Update dependencies and improve type safety in js-sdk-release-tools#39221
Update dependencies and improve type safety in js-sdk-release-tools#39221skywing918 wants to merge 2 commits into
Conversation
- 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.
There was a problem hiding this comment.
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.jsonfiles, plus removal of thedownlevelIterationcompiler option. - New
ReadmeMdConfigandTypeSpecProjectYamlinterfaces 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", |
fixes #39220
This pull request updates dependencies, improves type safety, and refines utility functions in the
js-sdk-release-tools-srcproject. 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:
package.jsonfiles, including major versions for TypeScript (^6.0.3), ESLint plugins,ts-morph,glob,js-yaml, and others. Updated thetypescript-codegen-breaking-change-detectordependency to use a local file reference. Removed theoptionalDependenciessection and updated script commands for formatting and testing. [1] [2]typescript-codegen-breaking-change-detectorto0.7.11.Type Safety Improvements:
ReadmeMdConfiginterface for better type safety in functions handlingREADME.mdconfiguration, and updated related function signatures and return types inutils.ts. [1] [2]generateSampleReadmeMd.tsby providing default empty strings for potentially undefined values, preventing runtime errors. [1] [2]TypeSpecProjectYamlinterface and improved type assertions inupdateTypeSpecProjectYamlFile.tsfor safer YAML file manipulation.Code Quality and Minor Fixes:
ignore-inline-declarations-in-operation-group.tsfor cleaner code.downlevelIterationcompiler option fromtsconfig.json, as it is no longer needed with the updated TypeScript target.