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

code-gen: error when JS keywords are used as group names #638

Merged
merged 1 commit into from
Feb 1, 2021

Conversation

dirkdev98
Copy link
Member

I made the same mistake twice already. The backend generators don't mind it at all, but in the react-query generator, we also dump a useApi() and something like the following is not allowed:

const { static } = useApi();

Closes #636

I made the same mistake twice already. The backend generators don't mind it at all, but in the react-query generator, we also dump a `useApi()` and something like the following is not allowed:

```ts
const { static } = useApi();
```

Closes #636
@dirkdev98 dirkdev98 enabled auto-merge (squash) February 1, 2021 18:21
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2021

==== C8 test coverage ====
Statements: 66.18% ( 24498/37019 )
Branches : 65.44% ( 2685 /4103 )
Functions : 65.93% ( 811 /1230 )
Lines : 66.18% ( 24498 /37019 )

@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2021

==== Benchmark result ====

Node.js version: 14
Total benchmarks: 15
          Passed: 15
          Failed: 0
-----------
router - github static path              200000  iterations    9684  ns/op
router - github path params              100000  iterations   11756  ns/op
compas validator simple                 5000000  iterations     278  ns/op
yup validator simple                     100000  iterations   13083  ns/op
fastest-validator validator simple     10000000  iterations     109  ns/op
compas validator nested                 1000000  iterations    1452  ns/op
yup validator nested                      50000  iterations   47888  ns/op
fastest-validator validator nested      2000000  iterations     587  ns/op
logger - strings                         500000  iterations    2881  ns/op
logger - objects                         500000  iterations    3479  ns/op
logger - deep objects                    500000  iterations    6340  ns/op
uuid                                    2000000  iterations     538  ns/op
uuid.isValid                           10000000  iterations     154  ns/op
isNil                                 500000000  iterations       0  ns/op
isPlainObject                          50000000  iterations      21  ns/op

@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2021

==== Benchmark result ====

Node.js version: 15
Total benchmarks: 15
          Passed: 15
          Failed: 0
-----------
router - github static path              100000  iterations   11595  ns/op
router - github path params              100000  iterations   13739  ns/op
compas validator simple                 5000000  iterations     287  ns/op
yup validator simple                     100000  iterations   14233  ns/op
fastest-validator validator simple     10000000  iterations     133  ns/op
compas validator nested                 1000000  iterations    1626  ns/op
yup validator nested                      50000  iterations   52998  ns/op
fastest-validator validator nested      2000000  iterations     600  ns/op
logger - strings                         500000  iterations    2937  ns/op
logger - objects                         500000  iterations    3491  ns/op
logger - deep objects                    200000  iterations    6119  ns/op
uuid                                    5000000  iterations     439  ns/op
uuid.isValid                           10000000  iterations     163  ns/op
isNil                                 500000000  iterations       0  ns/op
isPlainObject                          50000000  iterations      23  ns/op

@dirkdev98 dirkdev98 merged commit 70121ff into main Feb 1, 2021
@dirkdev98 dirkdev98 deleted the feat/code-gen-filter-keywords branch February 1, 2021 18:22
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.

code-gen: disallow js keywords for group names
1 participant