From b4d0522a674927a66dc45424afeb7932c5d36d3b Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Wed, 16 Aug 2023 23:51:26 +0000 Subject: [PATCH 1/2] Change how we use readFileSync to renable mockfs to work. --- src/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index 00bae6d2ca..f4ea172d0d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -126,7 +126,7 @@ export class KubeConfig { public loadFromFile(file: string, opts?: Partial): void { const rootDirectory = path.dirname(file); - this.loadFromString(fs.readFileSync(file, 'utf8'), opts); + this.loadFromString(fs.readFileSync(file).toString('utf-8'), opts); this.makePathsAbsolute(rootDirectory); } @@ -245,7 +245,7 @@ export class KubeConfig { const namespaceFile = `${pathPrefix}${Config.SERVICEACCOUNT_NAMESPACE_PATH}`; let namespace: string | undefined; if (fileExists(namespaceFile)) { - namespace = fs.readFileSync(namespaceFile, 'utf8'); + namespace = fs.readFileSync(namespaceFile).toString('utf-8'); } this.contexts = [ { From 09ead53a437972d55578e5a39696e977e1c5cefb Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Sun, 17 Sep 2023 15:30:09 +0000 Subject: [PATCH 2/2] Add Node 20 to our test matrix, remove Node 14. Cherry-pick fix to test for node 20. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6df7613ac6..4d1394aa38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ '18', '16', '14' ] + node: [ '20', '18', '16' ] name: Node ${{ matrix.node }} validation steps: - uses: actions/checkout@v4