Skip to content

Commit e03b24c

Browse files
author
Chris Brody
authored
Merge pull request #79 from brodybits/0.9.1-patch-updates
0.9.1 patch updates
2 parents 3df57d3 + a33dc71 commit e03b24c

File tree

58 files changed

+5425
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+5425
-97
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Stryker mutator output
2+
reports

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ Temporary Items
2727

2828
node_modules
2929
npm-debug.log
30+
31+
# Stryker mutator output
32+
.stryker-tmp
33+
reports
34+
stryker.log

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ createLibraryModule({
121121
prefix: String, /* The prefix for the library (Default: ``) */
122122
moduleName: String, /* The module library package name to be used in package.json. Default: react-native-(name in param-case) */
123123
modulePrefix: String, /* The module prefix for the library, ignored if moduleName is specified (Default: react-native) */
124-
platforms: Array, /* Platforms the library will be created for. (Default: ['ios', 'android']) */
124+
platforms: Array | String, /* Platforms the library will be created for. (Default: ['android', 'ios']) */
125125
packageIdentifier: String, /* (Android only!) The package name for the Android module (Default: com.reactlibrary) */
126126
githubAccount: String, /* The github account where the library is hosted (Default: `github_account`) */
127127
authorName: String, /* The author's name (Default: `Your Name`) */

lib/cli-program.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ program
2424

2525
program.parse(process.argv);
2626

27-
if (!program.args.length) {
28-
program.help();
29-
}
27+
// TBD non-functional error handling code
28+
// FUTURE TODO: handle missing argument error in the right place
29+
// (see issue #48)
30+
// if (!program.args.length) {
31+
// program.help();
32+
// }

lib/lib.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ const generateWithOptions = ({
139139

140140
return true;
141141
}).map((template) => {
142-
if (!template.name) {
143-
return Promise.resolve();
144-
}
145142
const templateArgs = {
146143
name: className,
147144
moduleName,

lib/utils/npmAddScriptSync.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ module.exports = (packageJsonPath, script, fs) => {
77
try {
88
var packageJson = jsonfile.readFileSync(packageJsonPath, { fs });
99
if (!packageJson.scripts) packageJson.scripts = {};
10-
if (!script.force && packageJson.scripts[script.key]) {
11-
throw new Error(`That script entry for key: ${script.key} already exists.`);
12-
}
1310
packageJson.scripts[script.key] = script.value;
1411
jsonfile.writeFileSync(packageJsonPath, packageJson, { fs, spaces: 2 });
1512
} catch (e) {

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"scripts": {
88
"jest": "jest",
99
"lint": "eslint .",
10+
"run-stryker": "stryker run",
1011
"test": "npm run lint && npm run jest"
1112
},
1213
"repository": {
@@ -50,6 +51,10 @@
5051
"uuid": "^3.3.3"
5152
},
5253
"devDependencies": {
54+
"@stryker-mutator/core": "^2.0.2",
55+
"@stryker-mutator/html-reporter": "^2.0.2",
56+
"@stryker-mutator/javascript-mutator": "^2.0.2",
57+
"@stryker-mutator/jest-runner": "^2.0.2",
5358
"eslint": "^6.3.0",
5459
"eslint-config-standard": "^14.1.0",
5560
"eslint-plugin-import": "^2.18.2",

stryker.conf.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = config => {
2+
config.set({
3+
mutator: 'javascript',
4+
packageManager: 'yarn',
5+
reporters: ['html', 'clear-text', 'progress'],
6+
testRunner: 'jest',
7+
transpilers: [],
8+
coverageAnalysis: 'off'
9+
});
10+
};

tests/lib-cli-command/object/lib-cli-command-object-text.test.js renamed to tests/with-injection/cli/command/object/lib-cli-command-object-text.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const command = require('../../../lib/cli-command.js');
1+
const command = require('../../../../../lib/cli-command.js');
22

33
test('cli-command object', () => {
44
expect(command).toMatchSnapshot();

0 commit comments

Comments
 (0)