diff --git a/HISTORY.md b/HISTORY.md index 80c99d32f..64e014b54 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. ## unreleased +* Build + * Disabled TypeScript compilerOption `esModuleInterop` (via [#736]) + * Disabled TypeScript compilerOption `allowSyntheticDefaultImports` (via [#736]) + +[#736]: https://github.com/CycloneDX/cyclonedx-node-npm/pull/736 + ## 1.12.0 - 2023-05-17 Based on [OWASP Software Component Verification Standard for Software Bill of Materials](https://scvs.owasp.org/scvs/v2-software-bill-of-materials/) diff --git a/src/builders.ts b/src/builders.ts index 660f4511b..5a224c947 100644 --- a/src/builders.ts +++ b/src/builders.ts @@ -19,7 +19,7 @@ Copyright (c) OWASP Foundation. All Rights Reserved. import { type Builders, Enums, type Factories, Models, Utils } from '@cyclonedx/cyclonedx-library' import { existsSync } from 'fs' -import normalizePackageData from 'normalize-package-data' +import * as normalizePackageData from 'normalize-package-data' import { type PackageURL } from 'packageurl-js' import * as path from 'path' diff --git a/tsconfig.json b/tsconfig.json index 70c574bcf..b1ecd1f9a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -71,8 +71,8 @@ /* Interop Constraints */ "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + // "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ @@ -87,7 +87,7 @@ // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ + "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */