Skip to content

shiritori: update dependencies #17

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

Merged
merged 8 commits into from
Apr 17, 2019
Merged

Conversation

proppy
Copy link
Contributor

@proppy proppy commented Apr 10, 2019

  • bump all dependencies version
  • add missing fields to package.json
  • adapt to kuroshiro breaking change
  • switch to Promise for dispatching result

Test report:

npm test

  ✔ check: loose used (1.3s)
  ✔ interact: lose (1.3s)
  ✔ check: loose ん (1.3s)
  ✔ interact: next (1.3s)
  ✔ check: continue (1.3s)
  ✔ check: loose chain (1.3s)
  ✔ check: kanji (1.3s)
  ✔ interact: win used (1.3s)
  ✔ interact: win ん (1.3s)
  ✔ interact: error (1.3s)
  ✔ check: ぁぃぅぇぉゃゅょ rules (1.3s)
  ✔ kanas (1.3s)
  ✔ check: ー rules (1.3s)

  13 tests passed

c8 coverage report (not 100% because of bcoe/c8#72)

----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |    92.06 |    72.55 |      100 |    92.06 |                   |
 index.js |    92.06 |    72.55 |      100 |    92.06 |... 97,110,118,124 |
----------|----------|----------|----------|----------|-------------------|

nyc coveratge report:

----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |      100 |      100 |      100 |      100 |                   |
 index.js |      100 |      100 |      100 |      100 |                   |
----------|----------|----------|----------|----------|-------------------|

/cc @yoichiro @atulep @Fleker @smishra2

- bump all dependencies version
- add missing fields to package.json
- adapt to kuroshiro breaking change
- switch to Promise for dispatching result
proppy added 4 commits April 11, 2019 16:56
- return structured enum instead of exception
- refresh tests dependencies and lint rules
@proppy proppy requested a review from Fleker April 12, 2019 05:07
});
});
app.intent('actions.intent.TEXT', async (conv, input) => {
const result = await shiritori.interact(dict, input, conv.data.used);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't seem to catch the Error anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, the previous code was doing nothing but re-throwing it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you at least catch the error here and state an error message? Otherwise the function will crash and so will your action.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, actually removed the error handling, since it wasn't valid, see ce5269c commit message for more details.

proppy added 3 commits April 15, 2019 10:56
The error was actually checking for an empty 'string' rather than a
empty list of words.

The former would not happen as long as the dictionary of transcription
is valid, and the later is already covered by former winning condition
(WIN_USED).
@Fleker
Copy link
Member

Fleker commented Apr 16, 2019

LGTM

1 similar comment
@Fleker
Copy link
Member

Fleker commented Apr 16, 2019

LGTM

@proppy proppy merged commit 30b1a43 into actions-on-google:master Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants