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

Feat/v2 #157

Merged
merged 28 commits into from
Jan 27, 2021
Merged

Feat/v2 #157

merged 28 commits into from
Jan 27, 2021

Conversation

Dougley
Copy link
Member

@Dougley Dougley commented Dec 30, 2020

This rewrites the module to pure Typescript, and also fixes some spec violations along the way.

@Dougley Dougley self-assigned this Dec 30, 2020
@codecov
Copy link

codecov bot commented Jan 1, 2021

Codecov Report

Merging #157 (81fb520) into master (a51851a) will decrease coverage by 2.56%.
The diff coverage is 97.43%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master     #157      +/-   ##
===========================================
- Coverage   100.00%   97.43%   -2.57%     
===========================================
  Files            9       11       +2     
  Lines          136      195      +59     
  Branches        27       69      +42     
===========================================
+ Hits           136      190      +54     
- Misses           0        5       +5     
Impacted Files Coverage Δ
src/parsers/discord.ts 92.00% <92.00%> (ø)
src/parsers/functional.ts 97.77% <97.77%> (ø)
src/index.ts 100.00% <100.00%> (ø)
src/parsers/args.ts 100.00% <100.00%> (ø)
src/parsers/index.ts 100.00% <100.00%> (ø)
src/parsers/miscellaneous.ts 100.00% <100.00%> (ø)
src/parsers/strings.ts 100.00% <100.00%> (ø)
src/parsers/time.ts 100.00% <100.00%> (ø)
src/parsers/variables.ts 100.00% <100.00%> (ø)
src/utils.ts 100.00% <100.00%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a51851a...81fb520. Read the comment docs.

im not fully happy with how the math parser works,
but this is in-spec with how jagtag does it,
assuming its only for doing actual arithmetic
- do math in the proper order of operations
- when math is supplied with non-ints, do string manipulation
@Dougley Dougley marked this pull request as ready for review January 2, 2021 15:14
@Dougley
Copy link
Member Author

Dougley commented Jan 2, 2021

Resolves #84

@Dougley Dougley linked an issue Jan 2, 2021 that may be closed by this pull request
@Dougley Dougley marked this pull request as draft January 3, 2021 16:25
this is exactly how original jagtag does it,
its even still pemdas compliant!
this exists in the source from jagtag, but seems to be disabled
@Dougley Dougley marked this pull request as ready for review January 15, 2021 12:23
@Dougley Dougley requested a review from curtisf January 15, 2021 12:24
src/parsers/strings.ts Outdated Show resolved Hide resolved
src/parsers/strings.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@linuswillner linuswillner left a comment

Choose a reason for hiding this comment

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

A few styling nits. Moreover:

  • There are currently some significant gaps in code coverage, mainly related around error conditions. These should be covered.
  • Unnecessary explicit variable type declarations can be removed to reduce noise.
  • The removal of the mandate to use strict boolean expressions can be enacted to reduce a lot of noise around boolean checks. This should in my opinion be done to allow JS truthy/falsy logic to be taken advantage of.

src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/parsers/discord.ts Outdated Show resolved Hide resolved
src/parsers/functional.ts Outdated Show resolved Hide resolved
src/parsers/discord.ts Outdated Show resolved Hide resolved
src/parsers/functional.ts Outdated Show resolved Hide resolved
@Dougley Dougley merged commit ac46648 into master Jan 27, 2021
@Dougley Dougley deleted the feat/v2 branch January 27, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

types
3 participants