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 - 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 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/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" } } 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);