Skip to content

Commit 3b988cf

Browse files
authored
fix(cli): import fs-extra (#11)
1. Update dependencies 2. Add Greenkeeper badge 3. Add tests and mocks 1. Mock @octokit/rest.js and dotenv 2. Refactor: rename github-resource-converter.js => base-resource-converter.js 3. Reports: send code coverage to Codacy 4. README.md: add contributing section 5. Add tests for baseResourceConverter 4. Refactor: move file export features 5. Add enum exportType 6. Add object fileExporter 7. Add test fixtures 8. Test cli: complete coverage 9. Build: jest fix testMatch config #1,#4 * ci(travis): fix 'no tests found' error See https://travis-ci.org/gregswindle/github-resource-converter/jobs/355791728#L2892 #1,#4 * ci(test): fix test issues 1. Appveyor didn't like the quotes for the eslintrc config path 2. Travis still cannot find the tests * ci(tests): fix build tests #1,#4 * ci(tests): fix build tests #1,#4 * ci(travis): try fixing jest #1,#4 * ci(travis): jest fixes and formatting 1. .eslintrc: switch-case: 2 spaces 2. .travis: git.depth = 1 3. .travis: no-npm-dedupe 4. .travis: send codacy coverage with npm-script posttest:ci:coverage:codacy 5. .env.example: better explanations with new envvars 6. manifest: format and add npm-scripts 7. docs: fix markdown-magic config to modify CONTRIBUTING.md #1,#4 * ci(travis): more jest test fixes #1,#4 * ci(travis): more jest test fixes #1,#4 * ci(services): appveyor and travis Attempt to run jest tests with full directory paths. #1,#4 * ci(appveyor): fix path issue Error parsing appveyor.yml: (Line: 37, Col: 5, Idx: 864) - (Line: 37, Col: 6, Idx: 865): While scanning for the next token, find character that cannot start any token #1,#4 * ci(jest): appveyor and travis I'm about to give up on Jest! 😠 #1,#4 * ci(jest): appveyor and travis #1,#4 * ci(jest): move dirs Moved __(fixtures|mocks|tests)__ dirs to rootDir 🤞 * ci(jest): add testPathPattern flag #1,#4 * ci(jest): re-add testMatch * ci(jest): add package Try using the 'jest-runner-eslint' test runner for Travis-CI and Appveyor. #1,#4 * ci(jest): add test runner * ci(jest): more fix attempts * fix(jest): add missing dir There's a reason why eslintrc is normally separated from gitignore. #1,#4 * refactor(dirs): move directories Put directories back under lib/ #1,#4 * docs(status): finish badges Correct typo for the coverage directory, too. #1,#4 * ci(tests): fix codacy-coverage - Point to the correct pathname - Send coverage via an npm-script * style(lint): exlcude src analysis Add exclusion patterns for tests, source, and CPD. #1,#2,#3,#4 * build(repo): ignore SonarCloud artifacts #1,#2,#3,#4 * style(code-smell): trailing whitespac Remove trailing whitespaces at ends of lines (L48). - Source: SonarCloud - Ref: L48 #1,#2,#3,#4 * test(coverage): add specs * fix(cli): import fs-extra 1. Add fs-extra as a dependency. 2. Achieve passing tests with full coverage. 3. Update npm-outdated dependencies. GH-10 * chore(labels): add labels GH-10,GH-11
1 parent cffc26a commit 3b988cf

19 files changed

Lines changed: 2299 additions & 1488 deletions

.github/CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,18 +1129,18 @@
11291129
| -------------- | --------------- | ----------- | ----------- | -------- |
11301130
| [@semantic-release/changelog@2.0.1](https://github.com/semantic-release/changelog#readme) | Set of semantic-release plugins for creating or updating a changelog file | 2.0.1 | MIT | dev |
11311131
| [@semantic-release/git@4.0.1](https://github.com/semantic-release/git#readme) | Set of semantic-release plugins to publish to a git repository | 4.0.1 | MIT | dev |
1132-
| [@semantic-release/npm@3.2.2](https://github.com/semantic-release/npm#readme) | Set of semantic-release plugins to publish to a npm registry | 3.2.2 | MIT | dev |
1133-
| [ajv@6.2.1](https://github.com/epoberezkin/ajv) | Another JSON Schema Validator | 6.2.1 | MIT | dev |
1132+
| [@semantic-release/npm@3.2.4](https://github.com/semantic-release/npm#readme) | Set of semantic-release plugins to publish to a npm registry | 3.2.4 | MIT | dev |
1133+
| [ajv@6.4.0](https://github.com/epoberezkin/ajv) | Another JSON Schema Validator | 6.4.0 | MIT | dev |
11341134
| [ajv-keywords@3.1.0](https://github.com/epoberezkin/ajv-keywords#readme) | Custom JSON-Schema keywords for Ajv validator | 3.1.0 | MIT | dev |
1135-
| [codacy-coverage@2.1.0](https://github.com/codacy/node-codacy-coverage) | Code Coverage reporter for Codacy.com | 2.1.0 | MIT | dev |
1135+
| [codacy-coverage@2.1.1](https://github.com/codacy/node-codacy-coverage) | Code Coverage reporter for Codacy.com | 2.1.1 | MIT | dev |
11361136
| [commitplease@3.2.0](https://github.com/jzaefferer/commitplease#readme) | Validates strings as commit messages | 3.2.0 | MIT | dev |
11371137
| [coveralls@3.0.0](https://github.com/nickmerwin/node-coveralls#readme) | takes json-cov output into stdin and POSTs to coveralls.io | 3.0.0 | BSD-2-Clause | dev |
1138-
| [eslint@4.18.2](https://eslint.org) | An AST-based pattern checker for JavaScript. | 4.18.2 | MIT | dev |
1138+
| [eslint@4.19.1](https://eslint.org) | An AST-based pattern checker for JavaScript. | 4.19.1 | MIT | dev |
11391139
| [eslint-config-prettier@^2.4.0](https://github.com/prettier/eslint-config-prettier#readme) | Turns off all rules that are unnecessary or might conflict with Prettier. | 2.9.0 | MIT | dev |
11401140
| [eslint-config-scanjs@1.0.0-beta4](https://github.com/mozfreddyb/eslint-config-scanjs#readme) | umbrella config to get scanjs-like functionality from eslint | 1.0.0-beta4 | MPL-2.0 | dev |
11411141
| [eslint-config-standard@11.0.0](https://github.com/standard/eslint-config-standard) | JavaScript Standard Style - ESLint Shareable Config | 11.0.0 | MIT | dev |
11421142
| [eslint-config-xo@0.20.1](https://github.com/xojs/eslint-config-xo#readme) | ESLint shareable config for XO | 0.20.1 | MIT | dev |
1143-
| [eslint-plugin-import@2.9.0](https://github.com/benmosher/eslint-plugin-import) | Import with sanity. | 2.9.0 | MIT | dev |
1143+
| [eslint-plugin-import@2.10.0](https://github.com/benmosher/eslint-plugin-import) | Import with sanity. | 2.10.0 | MIT | dev |
11441144
| [eslint-plugin-jsdoc@3.5.0](https://github.com/gajus/eslint-plugin-jsdoc#readme) | JSDoc linting rules for ESLint. | 3.5.0 | BSD-3-Clause | dev |
11451145
| [eslint-plugin-json@1.2.0](https://github.com/azeemba/eslint-plugin-json#readme) | Lint JSON files | 1.2.0 | ISC | dev |
11461146
| [eslint-plugin-no-unsafe-innerhtml@1.0.16](https://github.com/mozfreddyb/eslint-plugin-no-unsafe-innerhtml/) | custom ESLint rule to disallows unsafe innerHTML, outerHTML and insertAdjacentHTML | 1.0.16 | MPL-2.0 | dev |
@@ -1153,17 +1153,17 @@
11531153
| [eslint-plugin-xss@0.1.9](https://github.com/Rantanen/eslint-plugin-xss#readme) | Validates XSS related issues of mixing HTML and non-HTML content in variables. | 0.1.9 | ISC | dev |
11541154
| [fixpack@2.3.1](https://github.com/henrikjoreteg/fixpack) | cli tool that cleans up package.json files. | 2.3.1 | MIT | dev |
11551155
| [husky@^0.14.3](https://github.com/typicode/husky) | Prevents bad commit or push (git hooks, pre-commit/precommit, pre-push/prepush, post-merge/postmerge and all that stuff...) | 0.14.3 | MIT | dev |
1156-
| [jest@22.4.2](http://facebook.github.io/jest/) | Delightful JavaScript Testing. | 22.4.2 | MIT | dev |
1156+
| [jest@22.4.3](http://facebook.github.io/jest/) | Delightful JavaScript Testing. | 22.4.3 | MIT | dev |
11571157
| [jest-runner-eslint@0.4.0](https://github.com/jest-community/jest-runner-eslint) | An experimental ESLint runner for Jest | 0.4.0 | MIT | dev |
11581158
| [lec@^1.0.1](https://github.com/iShafayet/lec) | Command Line Wrapper for Line Ending Corrector (An utility that makes sure your files have consistent line endings) | 1.0.1 | MIT | dev |
1159-
| [lint-staged@7.0.0](https://github.com/okonet/lint-staged#readme) | Lint files staged by git | 7.0.0 | MIT | dev |
1159+
| [lint-staged@7.0.2](https://github.com/okonet/lint-staged#readme) | Lint files staged by git | 7.0.2 | MIT | dev |
11601160
| [markdown-magic@0.1.21](https://github.com/DavidWells/markdown-magic#readme) | Automatically update markdown files with content from external sources | 0.1.21 | MIT | dev |
11611161
| [markdown-magic-dependency-table@1.3.2](https://github.com/camacho/markdown-magic-dependency-table#readme) | Generate table of information about dependencies automatically in markdown | 1.3.2 | MIT | dev |
11621162
| [markdown-magic-install-command@1.3.1](https://github.com/camacho/markdown-magic-install-command#readme) | Print install command for markdown file | 1.3.1 | MIT | dev |
11631163
| [markdown-magic-package-scripts@1.2.1](https://github.com/camacho/markdown-magic-package-scripts#readme) | Print list of scripts in package.json with descriptions | 1.2.1 | MIT | dev |
11641164
| [nsp@^3.2.1](https://github.com/nodesecurity/nsp#readme) | The Node Security (nodesecurity.io) command line interface | 3.2.1 | Apache-2.0 | dev |
11651165
| [prettier@1.11.1](https://prettier.io) | Prettier is an opinionated code formatter | 1.11.1 | MIT | dev |
1166-
| [semantic-release@15.0.2](https://github.com/semantic-release/semantic-release#readme) | Automated semver compliant package publishing | 15.0.2 | MIT | dev |
1166+
| [semantic-release@15.1.4](https://github.com/semantic-release/semantic-release#readme) | Automated semver compliant package publishing | 15.1.4 | MIT | dev |
11671167
<!-- AUTO-GENERATED-CONTENT:END -->
11681168
11691169
## 8. **APIs**

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,31 @@ Closes #{ISSUE_NUMBER}
4141
4242
[coveralls-img]: https://coveralls.io/repos/github/commonality/architecture-decision-records/badge.svg
4343
[coveralls-url]: https://coveralls.io/github/commonality/architecture-decision-records
44-
[sonar-code-smells-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=code_smells
44+
[sonar-code-smells-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=code_smells
4545
[sonar-code-smells-url]: https://sonarcloud.io/component_measures/metric/code_smells/list?id=gregswindle-github-resource-converter&metric=code_smells
46-
[sonar-cognitive-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=cognitive_complexity
46+
[sonar-cognitive-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=cognitive_complexity
4747
[sonar-cognitive-url]: https://sonarcloud.io/component_measures/metric/cognitive_complexity/list?id=gregswindle-github-resource-converter&metric=cognitive_complexity
48-
[sonar-complexity-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=complexity
48+
[sonar-complexity-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=complexity
4949
[sonar-complexity-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=complexity
50-
[sonar-complexity-function-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=function_complexity
50+
[sonar-complexity-function-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=function_complexity
5151
[sonar-complexity-function-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=function_complexity
52-
[sonar-complexity-file-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=file_complexity
52+
[sonar-complexity-file-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=file_complexity
5353
[sonar-complexity-file-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=file_complexity
54-
[sonar-complexity-class-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=class_complexity
54+
[sonar-complexity-class-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=class_complexity
5555
[sonar-complexity-class-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=class_complexity
56-
[sonar-coverage-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=coverage
56+
[sonar-coverage-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=coverage
5757
[sonar-coverage-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=coverage
58-
[sonar-duplications-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=duplicated_line_density
58+
[sonar-duplications-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=duplicated_line_density
5959
[sonar-duplications-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=duplicated_lines_density
60-
[sonar-gate-img]: http://sonarcloud.io/api/badges/gate?key=gregswindle-github-resource-converter
60+
[sonar-gate-img]: http://sonarcloud.io/api/badges/gate?project=gregswindle-github-resource-converter
6161
[sonar-gate-url]: https://sonarcloud.io/dashboard?id=gregswindle-github-resource-converter
62-
[sonar-issues-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=blocker_violations
62+
[sonar-issues-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=blocker_violations
6363
[sonar-issues-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=violations
64-
[sonar-maintainability-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=new_maintainability_rating
64+
[sonar-maintainability-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=new_maintainability_rating
6565
[sonar-maintainability-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=new_maintainability_rating
66-
[sonar-reliability-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=new_reliability_rating
66+
[sonar-reliability-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=new_reliability_rating
6767
[sonar-reliability-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=new_reliability_rating
68-
[sonar-security-img]: http://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=vulnerabilities
68+
[sonar-security-img]: http://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=vulnerabilities
6969
[sonar-security-url]: https://sonarcloud.io/component_measures?id=gregswindle-github-resource-converter&metric=vulnerabilities
70-
[sonar-tech-debt-img]: https://sonarcloud.io/api/badges/measure?key=gregswindle-github-resource-converter&metric=sqale_debt_ratio
70+
[sonar-tech-debt-img]: https://sonarcloud.io/api/badges/measure?project=gregswindle-github-resource-converter&metric=sqale_debt_ratio
7171
[sonar-tech-debt-url]: https://sonarcloud.io/component_measures/metric/sqale_index/list?id=gregswindle-github-resource-converter&metric=sqale_debt_ratio

0 commit comments

Comments
 (0)