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

Update mocha related dependencies #23

Closed
wants to merge 3 commits into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- uses: actions/setup-node@v2-beta
with:
node-version: "14.16.0"
node-version: "14"

- name: Install
run: yarn install --frozen-lockfile
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

- uses: actions/setup-node@v2-beta
with:
node-version: "14.16.0"
node-version: "14"

- name: Install
run: yarn install --frozen-lockfile
Expand Down
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:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: "14.16.0"
node-version: "14"
- name: Install
run: yarn install --frozen-lockfile
# </common-build>
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@
},
"devDependencies": {
"@types/chai": "^4.2.19",
"@types/mocha": "^8.2.2",
"@types/mocha": "^10.0.9",
"@types/node": "^15.12.4",
"@types/rimraf": "^3.0.0",
"@types/yargs": "^17.0.0",
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
"chai": "^4.3.4",
"chai": "^4.5.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not latest version, but last version supporting commonjs.

"dotenv": "^10.0.0",
"eslint": "^7.29.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.4.0",
"mocha": "^9.0.1",
"mocha": "^10.8.2",
"prettier": "^2.3.1",
"rimraf": "^3.0.2",
"ts-node": "^10.0.0",
"typescript": "^4.3.4"
"ts-node": "^10.9.2",
"typescript": "^5.6.3"
},
"dependencies": {
"@actions/cache": "^1.0.7",
Expand All @@ -49,9 +49,9 @@
"aws-sdk": "^2.932.0",
"csv-parse": "^4.16.0",
"csv-stringify": "^5.6.2",
"yargs": "^17.1.1"
"yargs": "^17.7.2"
},
"peerDependencies": {
"mocha": ">8.0.0"
"mocha": ">10.0.0"
}
}
2 changes: 1 addition & 1 deletion src/mochaPlugin/mochaRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function runMochaBenchmark(
spec: opts.spec ?? [],
};
const files = collectFiles(fileCollectParams);
mocha.files = files;
mocha.files = files.files;
await mocha.loadFilesAsync();

// Run the tests.
Expand Down
7 changes: 6 additions & 1 deletion src/utils/mochaCliExports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export interface FileCollectionOptions {
sort: boolean;
}

export const collectFiles = collectFilesMocha as (fileCollectParams: FileCollectionOptions) => string[];
export interface FileCollectionResponse {
files: string[];
unmatchedFiles: string[];
}

export const collectFiles = collectFilesMocha as (fileCollectParams: FileCollectionOptions) => FileCollectionResponse;

export const handleRequires = handleRequiresMocha as (requires?: string[]) => Promise<unknown>;
Loading
Loading