Merge pull request #2470 from github/dependabot/npm_and_yarn/extensions/ql-vscode/faker-js/faker-8.0.2
Bump @faker-js/faker from 7.5.0 to 8.0.2 in /extensions/ql-vscode
This commit is contained in:
24
extensions/ql-vscode/package-lock.json
generated
24
extensions/ql-vscode/package-lock.json
generated
@@ -55,7 +55,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.13",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
|
||||
"@faker-js/faker": "^7.5.0",
|
||||
"@faker-js/faker": "^8.0.2",
|
||||
"@github/markdownlint-github": "^0.3.0",
|
||||
"@octokit/plugin-throttling": "^5.0.1",
|
||||
"@storybook/addon-actions": "^6.5.17-alpha.0",
|
||||
@@ -2677,13 +2677,19 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@faker-js/faker": {
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-7.5.0.tgz",
|
||||
"integrity": "sha512-8wNUCCUHvfvI0gQpDUho/3gPzABffnCn5um65F8dzQ86zz6dlt4+nmAA7PQUc8L+eH+9RgR/qzy5N/8kN0Ozdw==",
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.0.2.tgz",
|
||||
"integrity": "sha512-Uo3pGspElQW91PCvKSIAXoEgAUlRnH29sX2/p89kg7sP1m2PzCufHINd0FhTXQf6DYGiUlVncdSPa2F9wxed2A==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/fakerjs"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0",
|
||||
"npm": ">=6.0.0"
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
||||
"npm": ">=6.14.13"
|
||||
}
|
||||
},
|
||||
"node_modules/@gar/promisify": {
|
||||
@@ -48233,9 +48239,9 @@
|
||||
}
|
||||
},
|
||||
"@faker-js/faker": {
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-7.5.0.tgz",
|
||||
"integrity": "sha512-8wNUCCUHvfvI0gQpDUho/3gPzABffnCn5um65F8dzQ86zz6dlt4+nmAA7PQUc8L+eH+9RgR/qzy5N/8kN0Ozdw==",
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.0.2.tgz",
|
||||
"integrity": "sha512-Uo3pGspElQW91PCvKSIAXoEgAUlRnH29sX2/p89kg7sP1m2PzCufHINd0FhTXQf6DYGiUlVncdSPa2F9wxed2A==",
|
||||
"dev": true
|
||||
},
|
||||
"@gar/promisify": {
|
||||
|
||||
@@ -1694,7 +1694,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.13",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
|
||||
"@faker-js/faker": "^7.5.0",
|
||||
"@faker-js/faker": "^8.0.2",
|
||||
"@github/markdownlint-github": "^0.3.0",
|
||||
"@octokit/plugin-throttling": "^5.0.1",
|
||||
"@storybook/addon-actions": "^6.5.17-alpha.0",
|
||||
|
||||
@@ -135,14 +135,14 @@ const manyScannedRepos = Array.from({ length: 1000 }, (_, i) => {
|
||||
return {
|
||||
...mockedScannedRepo,
|
||||
analysisStatus: VariantAnalysisRepoStatus.Succeeded,
|
||||
resultCount: faker.datatype.number({ min: 0, max: 1000 }),
|
||||
resultCount: faker.number.int({ min: 0, max: 1000 }),
|
||||
repository: {
|
||||
...mockedScannedRepo.repository,
|
||||
// We need to ensure the ID is unique for React keys
|
||||
id: faker.helpers.unique(faker.datatype.number, [], {
|
||||
id: faker.helpers.unique(faker.number.int, [], {
|
||||
store: uniqueStore,
|
||||
}),
|
||||
fullName: `octodemo/${faker.helpers.unique(faker.random.word, [], {
|
||||
fullName: `octodemo/${faker.helpers.unique(faker.word.sample, [], {
|
||||
store: uniqueStore,
|
||||
})}`,
|
||||
},
|
||||
|
||||
@@ -41,10 +41,10 @@ export function createDbConfig({
|
||||
}
|
||||
|
||||
export function createLocalDbConfigItem({
|
||||
name = `database${faker.datatype.number()}`,
|
||||
name = `database${faker.number.int()}`,
|
||||
dateAdded = faker.date.past().getTime(),
|
||||
language = `language${faker.datatype.number()}`,
|
||||
storagePath = `storagePath${faker.datatype.number()}`,
|
||||
language = `language${faker.number.int()}`,
|
||||
storagePath = `storagePath${faker.number.int()}`,
|
||||
}: {
|
||||
name?: string;
|
||||
dateAdded?: number;
|
||||
|
||||
@@ -29,7 +29,7 @@ export function createRootRemoteDbItem({
|
||||
}
|
||||
|
||||
export function createRemoteOwnerDbItem({
|
||||
ownerName = `owner${faker.datatype.number()}`,
|
||||
ownerName = `owner${faker.number.int()}`,
|
||||
selected = false,
|
||||
}: {
|
||||
ownerName?: string;
|
||||
@@ -43,7 +43,7 @@ export function createRemoteOwnerDbItem({
|
||||
}
|
||||
|
||||
export function createRemoteRepoDbItem({
|
||||
repoFullName = `owner${faker.datatype.number()}/repo${faker.datatype.number}`,
|
||||
repoFullName = `owner${faker.number.int()}/repo${faker.number.int()}`,
|
||||
selected = false,
|
||||
parentListName = undefined,
|
||||
}: {
|
||||
@@ -60,7 +60,7 @@ export function createRemoteRepoDbItem({
|
||||
}
|
||||
|
||||
export function createRemoteSystemDefinedListDbItem({
|
||||
listName = `top_${faker.datatype.number()}`,
|
||||
listName = `top_${faker.number.int()}`,
|
||||
listDisplayName = `Display Name`,
|
||||
listDescription = `Description`,
|
||||
selected = false,
|
||||
@@ -82,7 +82,7 @@ export function createRemoteSystemDefinedListDbItem({
|
||||
export function createRemoteUserDefinedListDbItem({
|
||||
expanded = false,
|
||||
selected = false,
|
||||
listName = `list${faker.datatype.number()}`,
|
||||
listName = `list${faker.number.int()}`,
|
||||
repos = [
|
||||
createRemoteRepoDbItem({
|
||||
parentListName: listName,
|
||||
@@ -119,10 +119,10 @@ export function createRootLocalDbItem({
|
||||
}
|
||||
|
||||
export function createLocalDatabaseDbItem({
|
||||
databaseName = `database${faker.datatype.number()}`,
|
||||
databaseName = `database${faker.number.int()}`,
|
||||
dateAdded = faker.date.past().getTime(),
|
||||
language = `language${faker.datatype.number()}`,
|
||||
storagePath = `storagePath${faker.datatype.number()}`,
|
||||
language = `language${faker.number.int()}`,
|
||||
storagePath = `storagePath${faker.number.int()}`,
|
||||
selected = false,
|
||||
}: {
|
||||
databaseName?: string;
|
||||
@@ -142,7 +142,7 @@ export function createLocalDatabaseDbItem({
|
||||
}
|
||||
|
||||
export function createLocalListDbItem({
|
||||
listName = `top_${faker.datatype.number()}`,
|
||||
listName = `top_${faker.number.int()}`,
|
||||
selected = false,
|
||||
expanded = false,
|
||||
databases = [],
|
||||
|
||||
@@ -42,7 +42,7 @@ export function createMockLocalQueryInfo({
|
||||
name: dbName,
|
||||
},
|
||||
start: startTime,
|
||||
id: faker.datatype.number().toString(),
|
||||
id: faker.number.int().toString(),
|
||||
userSpecifiedLabel,
|
||||
} as InitialQueryInfo;
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ import {
|
||||
RepositoryWithMetadata,
|
||||
} from "../../../../src/variant-analysis/gh-api/repository";
|
||||
|
||||
export function createMockRepository(name = faker.random.word()): Repository {
|
||||
export function createMockRepository(name = faker.word.sample()): Repository {
|
||||
return {
|
||||
id: faker.datatype.number(),
|
||||
id: faker.number.int(),
|
||||
name,
|
||||
full_name: `github/${name}`,
|
||||
private: faker.datatype.boolean(),
|
||||
@@ -16,7 +16,7 @@ export function createMockRepository(name = faker.random.word()): Repository {
|
||||
export function createMockRepositoryWithMetadata(): RepositoryWithMetadata {
|
||||
return {
|
||||
...createMockRepository(),
|
||||
stargazers_count: faker.datatype.number(),
|
||||
stargazers_count: faker.number.int(),
|
||||
updated_at: faker.date.past().toISOString(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ export function createMockScannedRepo(
|
||||
private: isPrivate,
|
||||
},
|
||||
analysis_status: analysisStatus,
|
||||
result_count: faker.datatype.number(),
|
||||
artifact_size_in_bytes: faker.datatype.number(),
|
||||
result_count: faker.number.int(),
|
||||
artifact_size_in_bytes: faker.number.int(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ export function createMockSkippedRepoGroup(): VariantAnalysisSkippedRepositoryGr
|
||||
}
|
||||
|
||||
export function createMockNotFoundSkippedRepoGroup(): VariantAnalysisNotFoundRepositoryGroup {
|
||||
const repoName1 = `github/${faker.random.word()}`;
|
||||
const repoName2 = `github/${faker.random.word()}`;
|
||||
const repoName1 = `github/${faker.word.sample()}`;
|
||||
const repoName2 = `github/${faker.word.sample()}`;
|
||||
|
||||
return {
|
||||
repository_count: 2,
|
||||
|
||||
@@ -16,7 +16,7 @@ export function createMockApiResponse(
|
||||
skippedRepos: VariantAnalysisSkippedRepositories = createMockSkippedRepos(),
|
||||
): VariantAnalysisApiResponse {
|
||||
const variantAnalysis: VariantAnalysisApiResponse = {
|
||||
id: faker.datatype.number(),
|
||||
id: faker.number.int(),
|
||||
controller_repo: {
|
||||
...createMockRepository(),
|
||||
name: "pickles",
|
||||
@@ -28,7 +28,7 @@ export function createMockApiResponse(
|
||||
created_at: faker.date.recent().toISOString(),
|
||||
updated_at: faker.date.recent().toISOString(),
|
||||
status,
|
||||
actions_workflow_run_id: faker.datatype.number(),
|
||||
actions_workflow_run_id: faker.number.int(),
|
||||
scanned_repositories: scannedRepos,
|
||||
skipped_repositories: skippedRepos,
|
||||
};
|
||||
|
||||
@@ -10,8 +10,8 @@ export function createMockVariantAnalysisRepoTask(): VariantAnalysisRepoTask {
|
||||
private: false,
|
||||
},
|
||||
analysis_status: VariantAnalysisRepoStatus.Succeeded,
|
||||
result_count: faker.datatype.number(),
|
||||
artifact_size_in_bytes: faker.datatype.number(),
|
||||
result_count: faker.number.int(),
|
||||
artifact_size_in_bytes: faker.number.int(),
|
||||
artifact_url: "https://www.pickles.com",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
|
||||
export function createMockRepository(): Repository {
|
||||
return {
|
||||
id: faker.datatype.number(),
|
||||
fullName: `github/${faker.random.word()}`,
|
||||
id: faker.number.int(),
|
||||
fullName: `github/${faker.word.sample()}`,
|
||||
private: faker.datatype.boolean(),
|
||||
};
|
||||
}
|
||||
@@ -15,7 +15,7 @@ export function createMockRepository(): Repository {
|
||||
export function createMockRepositoryWithMetadata(): RepositoryWithMetadata {
|
||||
return {
|
||||
...createMockRepository(),
|
||||
stargazersCount: faker.datatype.number(),
|
||||
stargazersCount: faker.number.int(),
|
||||
updatedAt: faker.date.past().toISOString(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import { createMockRepositoryWithMetadata } from "./repository";
|
||||
|
||||
export function createMockScannedRepo(
|
||||
name: string = faker.random.word(),
|
||||
name: string = faker.word.sample(),
|
||||
isPrivate: boolean = faker.datatype.boolean(),
|
||||
analysisStatus: VariantAnalysisRepoStatus = VariantAnalysisRepoStatus.Pending,
|
||||
): VariantAnalysisScannedRepository {
|
||||
@@ -17,8 +17,8 @@ export function createMockScannedRepo(
|
||||
private: isPrivate,
|
||||
},
|
||||
analysisStatus,
|
||||
resultCount: faker.datatype.number(),
|
||||
artifactSizeInBytes: faker.datatype.number(),
|
||||
resultCount: faker.number.int(),
|
||||
artifactSizeInBytes: faker.number.int(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@ export function createMockNotFoundRepoGroup(): VariantAnalysisSkippedRepositoryG
|
||||
repositoryCount: 2,
|
||||
repositories: [
|
||||
{
|
||||
fullName: `github/${faker.random.word()}`,
|
||||
fullName: `github/${faker.word.sample()}`,
|
||||
},
|
||||
{
|
||||
fullName: `github/${faker.random.word()}`,
|
||||
fullName: `github/${faker.word.sample()}`,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -11,8 +11,8 @@ export function createMockVariantAnalysisRepositoryTask(
|
||||
return {
|
||||
repository: createMockRepositoryWithMetadata(),
|
||||
analysisStatus: VariantAnalysisRepoStatus.Pending,
|
||||
resultCount: faker.datatype.number(),
|
||||
artifactSizeInBytes: faker.datatype.number(),
|
||||
resultCount: faker.number.int(),
|
||||
artifactSizeInBytes: faker.number.int(),
|
||||
databaseCommitSha: faker.git.commitSha(),
|
||||
sourceLocationPrefix: faker.system.filePath(),
|
||||
artifactUrl: faker.internet.url(),
|
||||
|
||||
@@ -4,8 +4,8 @@ import { QueryLanguage } from "../../../../src/common/query-language";
|
||||
|
||||
export function createMockSubmission(): VariantAnalysisSubmission {
|
||||
return {
|
||||
startTime: faker.datatype.number(),
|
||||
controllerRepoId: faker.datatype.number(),
|
||||
startTime: faker.number.int(),
|
||||
controllerRepoId: faker.number.int(),
|
||||
actionRepoRef: "repo-ref",
|
||||
query: {
|
||||
name: "query-name",
|
||||
|
||||
@@ -14,7 +14,7 @@ export function createMockVariantAnalysis({
|
||||
status = VariantAnalysisStatus.InProgress,
|
||||
scannedRepos = createMockScannedRepos(),
|
||||
skippedRepos = createMockSkippedRepos(),
|
||||
executionStartTime = faker.datatype.number(),
|
||||
executionStartTime = faker.number.int(),
|
||||
}: {
|
||||
status?: VariantAnalysisStatus;
|
||||
scannedRepos?: VariantAnalysisScannedRepository[];
|
||||
@@ -22,10 +22,10 @@ export function createMockVariantAnalysis({
|
||||
executionStartTime?: number | undefined;
|
||||
}): VariantAnalysis {
|
||||
return {
|
||||
id: faker.datatype.number(),
|
||||
id: faker.number.int(),
|
||||
controllerRepo: {
|
||||
...createMockRepository(),
|
||||
fullName: `github/${faker.datatype.hexadecimal({
|
||||
fullName: `github/${faker.string.hexadecimal({
|
||||
prefix: "",
|
||||
})}`,
|
||||
},
|
||||
@@ -42,7 +42,7 @@ export function createMockVariantAnalysis({
|
||||
createdAt: faker.date.recent().toISOString(),
|
||||
updatedAt: faker.date.recent().toISOString(),
|
||||
status,
|
||||
actionsWorkflowRunId: faker.datatype.number(),
|
||||
actionsWorkflowRunId: faker.number.int(),
|
||||
scannedRepos,
|
||||
skippedRepos,
|
||||
};
|
||||
|
||||
@@ -197,7 +197,7 @@ describe(processVariantAnalysisRepositoryTask.name, () => {
|
||||
|
||||
describe(processScannedRepository.name, () => {
|
||||
const mockApiResponse = createMockScannedRepo(
|
||||
faker.random.word(),
|
||||
faker.word.sample(),
|
||||
faker.datatype.boolean(),
|
||||
VariantAnalysisRepoStatus.Pending,
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ describe(VariantAnalysisResultsManager.name, () => {
|
||||
let variantAnalysisResultsManager: VariantAnalysisResultsManager;
|
||||
|
||||
beforeEach(async () => {
|
||||
variantAnalysisId = faker.datatype.number();
|
||||
variantAnalysisId = faker.number.int();
|
||||
|
||||
const cli = mockedObject<CodeQLCliServer>({});
|
||||
variantAnalysisResultsManager = new VariantAnalysisResultsManager(
|
||||
|
||||
Reference in New Issue
Block a user