Skip to content

Commit

Permalink
Tooling fixes (#1321)
Browse files Browse the repository at this point in the history
* Fix versioning

* Fix native mocha support
  • Loading branch information
lauckhart authored Oct 27, 2024
1 parent d35d53b commit de3c9d2
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion chip-testing/.mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = require("@matter/tools").mocharc();
module.exports = require("@matter/testing").mocharc();
2 changes: 1 addition & 1 deletion packages/general/.mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = require("@matter/tools").mocharc();
module.exports = require("@matter/testing").mocharc();
2 changes: 1 addition & 1 deletion packages/matter.js/.mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = require("@matter/tools").mocharc();
module.exports = require("@matter/testing").mocharc();
2 changes: 1 addition & 1 deletion packages/model/.mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = require("@matter/tools").mocharc();
module.exports = require("@matter/testing").mocharc();
2 changes: 1 addition & 1 deletion packages/node/.mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = require("@matter/tools").mocharc();
module.exports = require("@matter/testing").mocharc();
2 changes: 1 addition & 1 deletion packages/nodejs/.mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = require("@matter/tools").mocharc();
module.exports = require("@matter/testing").mocharc();
2 changes: 1 addition & 1 deletion packages/protocol/.mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = require("@matter/tools").mocharc();
module.exports = require("@matter/testing").mocharc();
4 changes: 2 additions & 2 deletions packages/testing/src/mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ if (globalThis.crypto === undefined) {
function mocharc(format = "cjs") {
const { resolve } = require("path");
const cli = require("mocha/lib/cli/cli");
const listSupportFiles = require("./files.js").listSupportFiles;
const listSupportFiles = require("./util/files.js").listSupportFiles;

const TOOLS = resolve(__dirname, "../../..");
const TOOLS = resolve(__dirname, "../../../tools");

const testJs = `build/${format}/test`;
const defaultSpec = `${testJs}/**/*Test.js`;
Expand Down
7 changes: 0 additions & 7 deletions packages/tools/.mocharc.cjs

This file was deleted.

8 changes: 5 additions & 3 deletions packages/tools/src/versioning/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ interface Args {
}

export async function main(argv = process.argv) {
const args = commander("matter-version", "Manipulate monorepo package versions.")
const program = commander("matter-version", "Manipulate monorepo package versions.")
.argument("[version]")
.option("-p, --prefix <prefix>", "specify monorepo directory")
.option("-s, --set", "sets the release version")
.option("-a, --apply", "sets package versions to the release version")
.option("-t, --tag", "adds git tag for release version")
.parse(argv)
.opts<Args>();
.parse(argv);

const args = program.opts<Args>();
args.version = program.args[0];

const version = args.version;
const pkg = new Package({ path: args.prefix });
Expand Down
2 changes: 1 addition & 1 deletion packages/types/.mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = require("@matter/tools").mocharc();
module.exports = require("@matter/testing").mocharc();

0 comments on commit de3c9d2

Please sign in to comment.