Skip to content

Commit 095e5d4

Browse files
dependabot[bot]madhavilosetty-intelclaude
authored
build(deps): bump js-yaml from 4.2.0 to 5.2.1 (#2789)
* build(deps): bump js-yaml from 4.2.0 to 5.2.1 Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.2.0 to 5.2.1. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.2.0...5.2.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 5.2.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix(api): use js-yaml named imports for v5 compatibility js-yaml v5 is ESM-only and dropped its default export, exposing only flat named exports. The profile export route imported the default (`import yaml from 'js-yaml'`), so `yaml.dump()` threw and the export endpoint returned 500. Switch to named imports (`dump`/`load`) in the route and its test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: madhavilosetty-intel <madhavi.losetty@intel.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5efe5b5 commit 095e5d4

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"express-ws": "^5.0.2",
6060
"got": "^15.1.0",
6161
"http-z": "^7.0.0",
62-
"js-yaml": "^4.2.0",
62+
"js-yaml": "^5.2.1",
6363
"minimist": "^1.2.8",
6464
"mqtt": "^5.15.2",
6565
"node-forge": "^1.4.0",

src/routes/admin/profiles/export.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { exportProfile } from './export.js'
88
import { Environment } from '../../../utils/Environment.js'
99

1010
import { vi, type MockInstance } from 'vitest'
11-
import yaml from 'js-yaml'
11+
import { load } from 'js-yaml'
1212
import crypto from 'crypto'
1313

1414
describe('Profiles - Export', () => {
@@ -41,7 +41,7 @@ describe('Profiles - Export', () => {
4141
decipher.setAuthTag(tag)
4242
const decrypted = Buffer.concat([decipher.update(ct), decipher.final()])
4343
const pt = decrypted.toString('utf8')
44-
return yaml.load(pt)
44+
return load(pt)
4545
}
4646

4747
beforeEach(() => {

src/routes/admin/profiles/export.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { NOT_FOUND_EXCEPTION, NOT_FOUND_MESSAGE } from '../../../utils/constants
55
import handleError from '../../../utils/handleError.js'
66
import { RPSError } from '../../../utils/RPSError.js'
77
import { type Request, type Response } from 'express'
8-
import yaml from 'js-yaml'
8+
import { dump } from 'js-yaml'
99
import { encryptWithRandomKey } from '../../../utils/encryptWithRandomKey.js'
1010
import { type CertCredentials } from '../../../interfaces/ISecretManagerService.js'
1111
import { Environment } from '../../../utils/Environment.js'
@@ -203,7 +203,7 @@ export async function exportProfile(req: Request, res: Response): Promise<void>
203203
}
204204
}
205205

206-
const yamlStr = yaml.dump(output)
206+
const yamlStr = dump(output)
207207
// Encrypt the YAML string and provide the key
208208
const { cipherText, key } = encryptWithRandomKey(yamlStr)
209209

0 commit comments

Comments
 (0)