Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node 20 to our test matrix, remove node 14, fix test for node 20. #1269

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class KubeConfig {

public loadFromFile(file: string, opts?: Partial<ConfigOptions>): 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);
}

Expand Down Expand Up @@ -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 = [
{
Expand Down