Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update lockfile and dependencies (#49)
* fix(lockfile): update lockfile + fix vulnerabilities * chore(deps): first wave of dep update * fix(npm-scripts): move Husky hooks to NPM scripts To be usable with the new major version of Husky * chore(commit-hook): use the suggested script Use the hook script suggested by the official docs to see if that exits from the shell it runs in (the previous version doesn't) * fix: fix issues highlighted by local Husky hooks * fix(remark): fix Remark config * fix(package): reverted `commander` bump to unbreak tests * fix(package): reverted `commander` bump to unbreak tests * style(remark-config): formatting * fix(index): remove unneeded null coalescing * test: add more tests [wip] * refactor: clean-up and refactoring * chore: bump commander to v6 + removed a blank line * chore(dep): bumped commander to v6.2.0 v7.0.0 breaks several tests so I'll tackle that in another PR * fix(transform): fix regression * fix(transform): fix small issue
- Loading branch information
1 parent
1555b53
commit f5d69a1
Showing
17 changed files
with
19,009 additions
and
20,272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run precommit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run lint && npm t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
{ | ||
"plugins": [ | ||
"remark-preset-lint-recommended", | ||
"remark-preset-lint-consistent" | ||
"remark-preset-lint-consistent", | ||
[ | ||
"remark-lint-no-undefined-references", | ||
{ | ||
"allow": [ | ||
" ", | ||
"[ ]" | ||
] | ||
} | ||
] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
const { scoreToString, generate } = require('../src/process.ts'); | ||
const { OUTPUT, PARSED_OUTPUT, INPUT, JSON_OUTPUT, CSV_OUTPUT, MD_OUTPUT, HTML_OUTPUT, TEXT_OUTPUT } = require('./fixtures.js'); | ||
|
||
test('scoreToString', () => { | ||
expect(scoreToString(OUTPUT[0])).toBe(PARSED_OUTPUT); | ||
}); | ||
|
||
//TODO: Add tests that properly check the output from the transformers used by generate() | ||
describe('generate', () => { | ||
test('JSON', () => { | ||
expect(generate({ | ||
inputs: [INPUT], | ||
format: 'json' | ||
})).toBe(JSON_OUTPUT) | ||
}); | ||
|
||
test('CSV', () => { | ||
expect(generate({ | ||
inputs: [INPUT], | ||
format: 'csv' | ||
})).toBe(CSV_OUTPUT) | ||
}); | ||
|
||
test('MD', () => { | ||
expect(generate({ | ||
inputs: [INPUT], | ||
format: 'md' | ||
})).toBe(MD_OUTPUT) | ||
}); | ||
|
||
test('HTML', () => { | ||
expect(generate({ | ||
inputs: [INPUT], | ||
format: 'html' | ||
})).toBe(HTML_OUTPUT) | ||
}); | ||
|
||
test('Text', () => { | ||
expect(generate({ | ||
inputs: [INPUT], | ||
format: 'text' | ||
})).toBe(TEXT_OUTPUT) | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.