Skip to content

Commit

Permalink
chore(deps-dev): bump the eslint group with 1 update (#1245)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump the eslint group with 1 update

Bumps the eslint group with 1 update: [eslint-config-standard-with-typescript](https://github.com/standard/eslint-config-standard-with-typescript).

- [Release notes](https://github.com/standard/eslint-config-standard-with-typescript/releases)
- [Changelog](https://github.com/standard/eslint-config-standard-with-typescript/blob/master/CHANGELOG.md)
- [Commits](mightyiam/eslint-config-love@v40.0.0...v42.0.0)

---
updated-dependencies:
- dependency-name: eslint-config-standard-with-typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <[email protected]>

* type assert

Signed-off-by: Jan Kowalleck <[email protected]>

* foof

Signed-off-by: Jan Kowalleck <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jan Kowalleck <[email protected]>
  • Loading branch information
dependabot[bot] and jkowalleck authored Dec 9, 2023
1 parent ed73b3a commit 6d20379
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ All notable changes to this project will be documented in this file.
## unreleased

* Changed
* Hardened JSON imports (via [#1242])
* Hardened JSON imports (via [#1242], [#1245])
* Build
* Use _TypeScript_ `v5.3.3` now, was `v5.3.2` (via [#1244])

[#1242]: https://github.com/CycloneDX/cyclonedx-webpack-plugin/pull/1242
[#1244]: https://github.com/CycloneDX/cyclonedx-webpack-plugin/pull/1244
[#1245]: https://github.com/CycloneDX/cyclonedx-webpack-plugin/pull/1245

## 3.8.3 - 2023-12-01

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"c8": "^8.0.1",
"eslint": "8.55.0",
"eslint-config-standard": "17.1.0",
"eslint-config-standard-with-typescript": "40.0.0",
"eslint-config-standard-with-typescript": "42.0.0",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-simple-import-sort": "10.0.0",
"jest": "29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function getPackageDescription (path: string): PackageDescription | undef
try {
return {
path: packageJson,
packageJson: loadJsonFile(packageJson)
packageJson: loadJsonFile(packageJson) ?? {}
}
} catch {
return undefined
Expand Down
4 changes: 2 additions & 2 deletions src/extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class Extractor {
logger?.log('try to build new Component from PkgPath', pkg.path)
try {
const _packageJson = structuredClonePolyfill(pkg.packageJson)
normalizePackageJson(_packageJson /* add debug for warnings? */)
normalizePackageJson(_packageJson as object /* add debug for warnings? */)
// region fix normalizations
if (typeof pkg.packageJson === 'string') {
// allow non-SemVer strings
Expand All @@ -71,7 +71,7 @@ export class Extractor {
} catch (e) {
logger?.warn('normalizePackageJson from PkgPath', pkg.path, 'failed:', e)
}
component = pkgs[pkg.path] = this.#componentBuilder.makeComponent(pkg.packageJson)
component = pkgs[pkg.path] = this.#componentBuilder.makeComponent(pkg.packageJson as object)
logger?.debug('built', component, 'based on', pkg, 'for module', module)
}
if (component !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export class CycloneDxWebpackPlugin {
builder: CDX.Builders.FromNodePackageJson.ComponentBuilder,
logger: WebpackLogger
): CDX.Models.Component | undefined {
const thisPackageJson = this.rootComponentAutodetect
const thisPackageJson: object = this.rootComponentAutodetect
? getPackageDescription(path)?.packageJson
: { name: this.rootComponentName, version: this.rootComponentVersion }
if (thisPackageJson === undefined) { return undefined }
Expand Down Expand Up @@ -354,7 +354,7 @@ export class CycloneDxWebpackPlugin {

for (const packageJsonPath of packageJsonPaths) {
logger.log('try to build new Tool from PkgPath', packageJsonPath)
const packageJson = loadJsonFile(packageJsonPath)
const packageJson: object = loadJsonFile(packageJsonPath) ?? {}
normalizePackageJson(packageJson, w => { logger.debug('normalizePackageJson from PkgPath', packageJsonPath, 'caused:', w) })
const tool = builder.makeTool(packageJson)
if (tool !== undefined) {
Expand Down

0 comments on commit 6d20379

Please sign in to comment.