From 9171182ac1d5c907df631ac5d00d729348527bb5 Mon Sep 17 00:00:00 2001 From: Tom de Bruijn Date: Tue, 2 Nov 2021 16:13:53 +0100 Subject: [PATCH] Update the FileMetadata mode type to String The Ruby gem transmits this value as a String, because I think we decided to this to make sure we transmit the value in a format we expect to be human readable, like `00777` or `100777`. It's more flexible as a String format. Previously the value would be send as `33188`, but transformed it sends it as `"100644"`. --- .../.changesets/fix-diagnose-report-path-modes-format.md | 5 +++++ packages/nodejs/src/diagnose.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 packages/nodejs/.changesets/fix-diagnose-report-path-modes-format.md diff --git a/packages/nodejs/.changesets/fix-diagnose-report-path-modes-format.md b/packages/nodejs/.changesets/fix-diagnose-report-path-modes-format.md new file mode 100644 index 00000000..a81f19d9 --- /dev/null +++ b/packages/nodejs/.changesets/fix-diagnose-report-path-modes-format.md @@ -0,0 +1,5 @@ +--- +bump: "patch" +--- + +Transmit the path file modes in the diagnose report as an octal number. Previously it send values like `33188` and now it transmits `100644`, which is a bit more human readable. diff --git a/packages/nodejs/src/diagnose.ts b/packages/nodejs/src/diagnose.ts index 124ff9a3..d6e63308 100644 --- a/packages/nodejs/src/diagnose.ts +++ b/packages/nodejs/src/diagnose.ts @@ -13,7 +13,7 @@ import { JS_TO_RUBY_MAPPING } from "./config/configmap" interface FileMetadata { content?: string[] exists: boolean - mode?: number + mode?: string ownership?: { gid: number uid: number @@ -161,7 +161,7 @@ export class DiagnoseTool { paths[key] = { ...data, exists: true, - mode, + mode: mode.toString(8), ownership: { gid, uid