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 vulnerable packages and replace deprecated mocha.opts #41

Merged
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ Configurable via [variables][] (`repo-owner`, `repo-name`, `default-branch`,
Runs the project's [Mocha↗︎][] test suite via [Istanbul↗︎][] and asserts that the
test suite satisfies the project's coverage requirements.

Configurable via [variables][] (`min-branch-coverage`) and __test/mocha.opts__.
Configurable via [variables][] (`min-branch-coverage`) and the `mocha` field of
__package.json__.

### `update-copyright-year`

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"doctest": "0.17.x",
"eslint": "6.8.x",
"eslint-plugin-markdown": "1.0.x",
"mocha": "5.x.x",
"nyc": "13.x.x",
"mocha": "8.x.x",
"nyc": "15.x.x",
"remark-cli": "7.x.x",
"remark-lint-no-undefined-references": "1.1.x",
"remark-lint-no-unused-definitions": "1.x.x",
Expand All @@ -51,5 +51,8 @@
"lint": "bin/lint",
"release": "bin/release",
"test": "npm run lint && bin/test && npm run doctest"
},
"mocha": {
"ui": "tdd"
Comment on lines +55 to +56
Copy link
Member

Choose a reason for hiding this comment

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

I think this has to be added as a command line argument, here:

-- node_modules/.bin/mocha

Otherwise I don't think it's going to be applied in dependent projects.

Copy link
Contributor Author

@wuweiss wuweiss Apr 8, 2021

Choose a reason for hiding this comment

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

Thx for the hint.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I forgot about mocha.opts, sorry for the misdirection. See #41 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

I think I've come full circle. Your original code was correct (prior to bf9fb04). We just need to tell other users of the lib to use the same approach. Currently the README advertises using mocha.opts. What do you think @davidchambers ?

Copy link
Member

Choose a reason for hiding this comment

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

I agree, Aldwin. I suggest the following:

Configurable via variables (min-branch-coverage) and the mocha field of package.json.

}
}
1 change: 0 additions & 1 deletion test/mocha.opts

This file was deleted.