From 5601027e591fe4b66695abf006c48c330356114e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 4 Feb 2026 13:58:10 -0500 Subject: [PATCH 1/4] ci: splits package and vscode build scripts Signed-off-by: Vincent Biret --- vscode/package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index 4f4ae01f12..0aee455a3b 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -8,7 +8,9 @@ }, "scripts": { "lint": "npm run lint --w=\"@microsoft/kiota\" && npm run lint --w=kiota", - "build": "npm run build --w=\"@microsoft/kiota\" && npm run build --w=kiota", + "build": "npm run build:package && npm run build:vscode", + "build:package": "npm run build --w=\"@microsoft/kiota\"", + "build:vscode": "npm run build --w=kiota", "test:vscode": "npm run build && npm run test --w=kiota", "test:vscode:coverage": "npm run build && npm run test:coverage --w=kiota", "test:package": "npm run build --w=\"@microsoft/kiota\" && npm run test --w=\"@microsoft/kiota\"", @@ -36,4 +38,4 @@ "packages/npm-package", "packages/microsoft-kiota" ] -} +} \ No newline at end of file From 9cea25a92cc06f4075bbb7e728f52e1bd8e447a5 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 4 Feb 2026 16:12:04 -0500 Subject: [PATCH 2/4] fix: missing file extension for the esm variant of the npm package Signed-off-by: Vincent Biret --- vscode/packages/npm-package/connect.ts | 2 +- vscode/packages/npm-package/index.ts | 26 +++++++++++++------------- vscode/packages/npm-package/install.ts | 2 +- vscode/packages/npm-package/utils.ts | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/vscode/packages/npm-package/connect.ts b/vscode/packages/npm-package/connect.ts index c36fc72b22..4625fa9c74 100644 --- a/vscode/packages/npm-package/connect.ts +++ b/vscode/packages/npm-package/connect.ts @@ -1,6 +1,6 @@ import * as cp from 'child_process'; import * as rpc from 'vscode-jsonrpc/node'; -import { ensureKiotaIsPresent, getKiotaPath } from './install'; +import { ensureKiotaIsPresent, getKiotaPath } from './install.js'; export default async function connectToKiota(callback: (connection: rpc.MessageConnection) => Promise, workingDirectory: string = process.cwd()): Promise { diff --git a/vscode/packages/npm-package/index.ts b/vscode/packages/npm-package/index.ts index 585948e70b..1858eb05d7 100644 --- a/vscode/packages/npm-package/index.ts +++ b/vscode/packages/npm-package/index.ts @@ -1,13 +1,13 @@ -export * from './config'; -export * from './lib/generateClient'; -export * from './lib/generatePlugin'; -export * from './lib/getKiotaTree'; -export * from './lib/getKiotaVersion'; -export * from './lib/getManifestDetails'; -export * from './lib/languageInformation'; -export * from './lib/migrateFromLockFile'; -export * from './lib/removeItem'; -export * from './lib/searchDescription'; -export * from './lib/updateClients'; -export * from './types'; -export * from './utils'; \ No newline at end of file +export * from './config.js'; +export * from './lib/generateClient.js'; +export * from './lib/generatePlugin.js'; +export * from './lib/getKiotaTree.js'; +export * from './lib/getKiotaVersion.js'; +export * from './lib/getManifestDetails.js'; +export * from './lib/languageInformation.js'; +export * from './lib/migrateFromLockFile.js'; +export * from './lib/removeItem.js'; +export * from './lib/searchDescription.js'; +export * from './lib/updateClients.js'; +export * from './types.js'; +export * from './utils.js'; \ No newline at end of file diff --git a/vscode/packages/npm-package/install.ts b/vscode/packages/npm-package/install.ts index 58e0011274..b5629b32b5 100644 --- a/vscode/packages/npm-package/install.ts +++ b/vscode/packages/npm-package/install.ts @@ -3,7 +3,7 @@ import { createHash } from 'crypto'; import * as https from 'https'; import * as fs from 'fs'; import * as path from 'path'; -import { getKiotaConfig } from './config'; +import { getKiotaConfig } from './config.js'; import runtimeJson from './runtime.json'; diff --git a/vscode/packages/npm-package/utils.ts b/vscode/packages/npm-package/utils.ts index f4b1216810..c290cc17eb 100644 --- a/vscode/packages/npm-package/utils.ts +++ b/vscode/packages/npm-package/utils.ts @@ -1,4 +1,4 @@ -import { KiotaLogEntry, MaturityLevel, DependencyType, LogLevel } from "./types"; +import { KiotaLogEntry, MaturityLevel, DependencyType, LogLevel } from './types.js'; export function getLogEntriesForLevel(logEntries: KiotaLogEntry[], ...levels: LogLevel[]): KiotaLogEntry[] { return logEntries.filter((entry) => levels.indexOf(entry.level) !== -1); From d0f674e9736aa6b312f9dd100154f7c6d10a4b46 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 4 Feb 2026 16:13:52 -0500 Subject: [PATCH 3/4] fix: type definition location Signed-off-by: Vincent Biret --- vscode/packages/npm-package/tsconfig.cjs.json | 2 +- vscode/packages/npm-package/tsconfig.esm.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode/packages/npm-package/tsconfig.cjs.json b/vscode/packages/npm-package/tsconfig.cjs.json index cc9752b01d..d233e2bf5b 100644 --- a/vscode/packages/npm-package/tsconfig.cjs.json +++ b/vscode/packages/npm-package/tsconfig.cjs.json @@ -4,6 +4,6 @@ "outDir": "./dist/cjs", "module": "CommonJS", "declaration": true, - "declarationDir": "./dist/cjs/types" + "declarationDir": "./dist/cjs" } } diff --git a/vscode/packages/npm-package/tsconfig.esm.json b/vscode/packages/npm-package/tsconfig.esm.json index 396bc45f90..c83e656ae7 100644 --- a/vscode/packages/npm-package/tsconfig.esm.json +++ b/vscode/packages/npm-package/tsconfig.esm.json @@ -4,6 +4,6 @@ "outDir": "./dist/esm", "module": "ESNext", "declaration": true, - "declarationDir": "./dist/esm/types" + "declarationDir": "./dist/esm" } } From 8ed03a47e8d1a4427e61546a2f5bcb5ff5204538 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 4 Feb 2026 16:14:08 -0500 Subject: [PATCH 4/4] docs: adds changelog entries for npm package fixes Signed-off-by: Vincent Biret --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bcfe9031f..04d381b1e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed a bug where discriminator mappings for oneOf types with allOf-inherited schemas would incorrectly use schema names as keys instead of resolving the base type discriminator mappings. [#7339](https://github.com/microsoft/kiota/issues/7339) - Fixed TypeScript enum imports to use `import type` for type aliases to support `verbatimModuleSyntax`. [#7332](https://github.com/microsoft/kiota/pull/7332) +- Fixed a bug where the kiota npm package esm variant would fail to resolve modules. +- Fixes a bug where the kiota npm package type definitions would be misplaced. ## [1.30.0] - 2026-01-26 @@ -1705,4 +1707,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial GitHub release -