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

Dynamic tool install stryker mutator #67

Merged
merged 4 commits into from
Nov 6, 2024
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
File renamed without changes.
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"extends": "nodebb"
// "extends": "nodebb",
"rules": {},
"ignorePatterns": ["!.*"]
}
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
ignores: ["**/*.js"],
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"mocha": "10.4.0",
"mocha-lcov-reporter": "1.3.0",
"mockdate": "3.0.5",
"nyc": "15.1.0",
"nyc": "^15.1.0",
"smtp-server": "3.13.4"
},
"optionalDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion public/src/client/chats.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define('forum/chats', [
'forum/chats/user-list',
'forum/chats/message-search',
'forum/chats/pinned-messages',
'composer/autocomplete',
'autocomplete',
'hooks',
'bootbox',
'alerts',
Expand Down
2 changes: 1 addition & 1 deletion public/src/modules/quickreply.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

define('quickreply', [
'components', 'composer', 'composer/autocomplete', 'api',
'components', 'composer', 'autocomplete', 'api',
'alerts', 'uploadHelpers', 'mousetrap', 'storage', 'hooks',
], function (
components, composer, autocomplete, api,
Expand Down
8 changes: 5 additions & 3 deletions require-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
// this allows plugins to use `require.main.require` to reference NodeBB modules
// without worrying about multiple parent modules
if (require.main !== module) {
require.main.require = function (path) {
return require(path);
if(require.main){
require.main.require = function (path) {
return require(path);
};
};
}
};
2 changes: 1 addition & 1 deletion src/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ prestart.versionCheck();

if (!configExists && process.argv[2] !== 'setup') {
require('./setup').webInstall();
return;
//return;
}

if (configExists) {
Expand Down
2 changes: 2 additions & 0 deletions src/database/redis/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const connection = module.exports;
connection.connect = async function (options) {
return new Promise((resolve, reject) => {
options = options || nconf.get('redis');
console.log(nconf.get('redis'))
const redis_socket_or_host = options.host;

let cxn;
Expand All @@ -29,6 +30,7 @@ connection.connect = async function (options) {
});
} else {
// Else, connect over tcp/ip
console.log(options)
cxn = new Redis({
...options.options,
host: redis_socket_or_host,
Expand Down
1 change: 0 additions & 1 deletion src/flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ Flags.sort = async function (flagIds, sort) {

// Chatgpt Assisted Code
Flags.validate = async function (payload) {
console.log('Salman Al-Saigh');
const [target, reporter] = await Promise.all([
Flags.getTarget(payload.type, payload.id, payload.uid),
user.getUserData(payload.uid),
Expand Down
2 changes: 1 addition & 1 deletion src/meta/src/composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ define('composer', [
'composer/categoryList',
'composer/preview',
'composer/resize',
'composer/autocomplete',
'autocomplete',
'composer/scheduler',
'composer/post-queue',
'scrollStop',
Expand Down
13 changes: 0 additions & 13 deletions stryker.config.json

This file was deleted.

23 changes: 23 additions & 0 deletions stryker.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// @ts-check
/** @type {import('@stryker-mutator/api/core').PartialStrykerOptions} */
const config = {
_comment:
"This config was generated using 'stryker init'. Please take a look at: https://stryker-mutator.io/docs/stryker-js/configuration/ for more information.",
packageManager: "npm",
reporters: ["html", "clear-text", "progress"],
disableTypeChecks: "src/**/*.ts,jsx,tsx,html,vue}",
testRunner: "mocha",
testRunner_comment:
"Take a look at https://stryker-mutator.io/docs/stryker-js/mocha-runner for information about the mocha plugin.",
coverageAnalysis: "perTest",
// "testRunnerNodeArgs": ["--require", "esm"],
"mochaOptions": {
"spec": ["test/*.ts", "test/*.js"],
// "require": ["esm", "ts-node/register"],
// "require": ["ts-node/register"]
},
"mutate": [
"src/admin/search.js",
],
};
export default config;
Loading