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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print the literal code nodes-to-string is choking on #185

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

MynockSpit
Copy link
Contributor

This is a really dumb edit -- just pass down the content we're parsing from the top and do a slice (so as not to modify the original) on it. I was finding it challenging to read the AST and figure out what/where was breaking. With this, I can at least to a search in my package for the string.

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • documentation is changed or added

 PASS  test/jsx-parser.js 5 OK 44.865ms
test/parser.js 2> i18next-scanner: "none" does not exist in the namespaces (["translation"]): key="key2", options={}
 PASS  test/parser.js 69 OK 944.745ms
test/transform-stream.js 2> (node:97914) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
 PASS  test/transform-stream.js 55 OK 736.272ms

                         
  馃寛 SUMMARY RESULTS 馃寛  
                         

Suites:   3 passed, 3 of 3 completed
Asserts:  129 passed, of 129
Time:     8s
------------------------|----------|----------|----------|----------|-------------------|
File                    |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
------------------------|----------|----------|----------|----------|-------------------|
All files               |    91.68 |    88.08 |    98.68 |    91.27 |                   |
 acorn-jsx-walk.js      |      100 |       50 |    85.71 |      100 |              7,21 |
 flatten-object-keys.js |      100 |       90 |      100 |      100 |                22 |
 index.js               |    98.44 |      100 |      100 |    98.39 |                96 |
 nodes-to-string.js     |     81.4 |       75 |      100 |    80.95 |... 29,54,60,61,62 |
 omit-empty-object.js   |      100 |    83.33 |      100 |      100 |                25 |
 parser.js              |    91.01 |    88.92 |      100 |    90.48 |... 60,762,763,848 |
------------------------|----------|----------|----------|----------|-------------------|

Really dumb edit -- just pass down the content we're parsing from the top and do a slice (so as not to modify the original) on it. I was finding it challenging to read the AST and figure out what/where was breaking. With this, I can at least to a search in my package for the string.
@cheton cheton merged commit e65c3e3 into i18next:master Oct 12, 2021
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.

None yet

2 participants