Skip to content

Commit

Permalink
chore: update dev dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Mar 26, 2023
1 parent 6152724 commit 5df47fe
Show file tree
Hide file tree
Showing 9 changed files with 1,087 additions and 1,416 deletions.
2 changes: 1 addition & 1 deletion __tests__/buildkit/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('resolve', () => {
`,
null
]
])('given %p config', async (val, file, exValue, error: Error) => {
])('given %p config', async (val: string, file: boolean, exValue: string, error: Error | null) => {
try {
const buildkit = new BuildKit();
let config: string;
Expand Down
58 changes: 29 additions & 29 deletions __tests__/buildx/bake.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('hasLocalExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false
],
[
Expand All @@ -69,7 +69,7 @@ describe('hasLocalExporter', () => {
"target": "build"
},
}
},
} as unknown as BakeDefinition,
false
],
[
Expand All @@ -81,7 +81,7 @@ describe('hasLocalExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true
],
[
Expand All @@ -93,7 +93,7 @@ describe('hasLocalExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false
],
[
Expand All @@ -105,7 +105,7 @@ describe('hasLocalExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false
],
[
Expand All @@ -117,7 +117,7 @@ describe('hasLocalExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true
],
[
Expand All @@ -129,7 +129,7 @@ describe('hasLocalExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true
]
])('given %o returns %p', async (def: BakeDefinition, expected: boolean) => {
Expand All @@ -149,7 +149,7 @@ describe('hasTarExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false
],
[
Expand All @@ -161,7 +161,7 @@ describe('hasTarExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false
],
[
Expand All @@ -173,7 +173,7 @@ describe('hasTarExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false
],
[
Expand All @@ -185,7 +185,7 @@ describe('hasTarExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true
],
[
Expand All @@ -198,7 +198,7 @@ describe('hasTarExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true
],
[
Expand All @@ -210,7 +210,7 @@ describe('hasTarExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true
],
[
Expand All @@ -222,7 +222,7 @@ describe('hasTarExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false
],
[
Expand All @@ -234,7 +234,7 @@ describe('hasTarExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false
],
])('given %o returns %p', async (def: BakeDefinition, expected: boolean) => {
Expand All @@ -254,7 +254,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false,
undefined
],
Expand All @@ -267,7 +267,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true,
undefined
],
Expand All @@ -281,7 +281,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true,
undefined
],
Expand All @@ -294,7 +294,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false,
undefined
],
Expand All @@ -307,7 +307,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false,
undefined
],
Expand All @@ -320,7 +320,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false,
undefined
],
Expand All @@ -334,7 +334,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true,
undefined
],
Expand All @@ -347,7 +347,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false,
undefined
],
Expand All @@ -360,7 +360,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false,
undefined
],
Expand All @@ -373,7 +373,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
false,
undefined
],
Expand All @@ -386,7 +386,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true,
false
],
Expand All @@ -399,7 +399,7 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true,
true
],
Expand All @@ -412,11 +412,11 @@ describe('hasDockerExporter', () => {
]
},
}
},
} as unknown as BakeDefinition,
true,
true
],
])('given %o and load:%p returns %p', async (def: BakeDefinition, expected: boolean, load: boolean) => {
])('given %o and load:%p returns %p', async (def: BakeDefinition, expected: boolean, load: boolean | undefined) => {
expect(Bake.hasDockerExporter(def, load)).toEqual(expected);
});
});
2 changes: 1 addition & 1 deletion __tests__/buildx/inputs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ describe('resolveBuildSecret', () => {
['=bbbbbbb', false, '', '', new Error('=bbbbbbb is not a valid secret')],
[`foo=${path.join(fixturesDir, 'secret.txt')}`, true, 'foo', 'bar', null],
[`notfound=secret`, true, '', '', new Error('secret file secret not found')]
])('given %p key and %p secret', async (kvp: string, file: boolean, exKey: string, exValue: string, error: Error) => {
])('given %p key and %p secret', async (kvp: string, file: boolean, exKey: string, exValue: string, error: Error | null) => {
try {
let secret: string;
if (file) {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/buildx/install.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('download', () => {
['linux', 's390x'],
])(
'acquires buildx for %s/%s', async (os, arch) => {
jest.spyOn(osm, 'platform').mockImplementation(() => os);
jest.spyOn(osm, 'platform').mockImplementation(() => os as NodeJS.Platform);
jest.spyOn(osm, 'arch').mockImplementation(() => arch);
const install = new Install();
const buildxBin = await install.download('latest');
Expand Down Expand Up @@ -129,6 +129,6 @@ describe('getRelease', () => {
});

it('unknown release', async () => {
await expect(Install.getRelease('foo')).rejects.toThrowError(new Error('Cannot find Buildx release foo in https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-releases.json'));
await expect(Install.getRelease('foo')).rejects.toThrow(new Error('Cannot find Buildx release foo in https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-releases.json'));
});
});
2 changes: 1 addition & 1 deletion __tests__/docker/install.test.itg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {Docker} from '../../src/docker/docker';
const tmpDir = path.join(process.env.TEMP || '/tmp', 'docker-install-jest');

describe('install', () => {
jest.retryTimes(2);
jest.retryTimes(2, {logErrorsBeforeRetry: true});
// prettier-ignore
test.each(['v23.0.0'])(
'install docker %s', async (version) => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/docker/install.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('download', () => {
['v20.10.22', 'win32'],
])(
'acquires %p of docker (%s)', async (version, platformOS) => {
jest.spyOn(osm, 'platform').mockImplementation(() => platformOS);
jest.spyOn(osm, 'platform').mockImplementation(() => platformOS as NodeJS.Platform);
const install = new Install({
version: version,
runDir: tmpDir,
Expand All @@ -68,6 +68,6 @@ describe('getRelease', () => {
});

it('unknown release', async () => {
await expect(Install.getRelease('foo')).rejects.toThrowError(new Error('Cannot find Docker release foo in https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/docker-releases.json'));
await expect(Install.getRelease('foo')).rejects.toThrow(new Error('Cannot find Docker release foo in https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/docker-releases.json'));
});
});
6 changes: 3 additions & 3 deletions __tests__/github.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe('actionsRuntimeToken', () => {
process.env.ACTIONS_RUNTIME_TOKEN = 'foo';
expect(() => {
GitHub.actionsRuntimeToken;
}).toThrowError();
}).toThrow();
});
it('fixture', async () => {
process.env.ACTIONS_RUNTIME_TOKEN = fs.readFileSync(path.join(__dirname, 'fixtures', 'runtimeToken.txt')).toString().trim();
Expand All @@ -131,11 +131,11 @@ describe('printActionsRuntimeTokenACs', () => {
});
it('empty', async () => {
process.env.ACTIONS_RUNTIME_TOKEN = '';
await expect(GitHub.printActionsRuntimeTokenACs()).rejects.toThrowError(new Error('ACTIONS_RUNTIME_TOKEN not set'));
await expect(GitHub.printActionsRuntimeTokenACs()).rejects.toThrow(new Error('ACTIONS_RUNTIME_TOKEN not set'));
});
it('malformed', async () => {
process.env.ACTIONS_RUNTIME_TOKEN = 'foo';
await expect(GitHub.printActionsRuntimeTokenACs()).rejects.toThrowError(new Error("Cannot parse GitHub Actions Runtime Token: Invalid token specified: Cannot read properties of undefined (reading 'replace')"));
await expect(GitHub.printActionsRuntimeTokenACs()).rejects.toThrow(new Error("Cannot parse GitHub Actions Runtime Token: Invalid token specified: Cannot read properties of undefined (reading 'replace')"));
});
it('refs/heads/master', async () => {
const infoSpy = jest.spyOn(core, 'info');
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,23 @@
},
"devDependencies": {
"@types/csv-parse": "^1.2.2",
"@types/node": "^16.18.11",
"@types/node": "^16.18.21",
"@types/semver": "^7.3.13",
"@types/tmp": "^0.2.3",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"cpy-cli": "^4.2.0",
"dotenv": "^16.0.3",
"eslint": "^8.33.0",
"eslint-config-prettier": "^8.6.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^26.9.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^27.5.1",
"prettier": "^2.8.3",
"rimraf": "^4.1.2",
"ts-jest": "^27.1.5",
"jest": "^29.5.0",
"prettier": "^2.8.7",
"rimraf": "^4.4.1",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
"typescript": "^4.9.5"
}
}

0 comments on commit 5df47fe

Please sign in to comment.