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: only use an extensions in imports in ES Modules #464

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

dirkdev98
Copy link
Member

TypeScript doesn't rewrite paths, so when the target is not ES modules, we should not specify import extensions. The easiest way is to use type: "module" from the package.json

TypeScript doesn't rewrite paths, so when the target is not ES modules, we should not specify import extensions. The easiest way is to use `type: "module"` from the package.json
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2020

==== Benchmark result ====

Node.js version: 14

Total benchmarks: 13
          Passed: 13
          Failed: 0
-----------
lbu validator simple                    2000000  iterations      537  ns/op
yup validator simple                      20000  iterations    62797  ns/op
fastest-validator validator simple     10000000  iterations      136  ns/op
lbu validator nested                      50000  iterations    47143  ns/op
yup validator nested                       2000  iterations   502817  ns/op
fastest-validator validator nested      2000000  iterations      950  ns/op
logger - strings                         500000  iterations     2447  ns/op
logger - objects                         500000  iterations     2989  ns/op
logger - deep objects                    200000  iterations     5406  ns/op
uuid                                    2000000  iterations      556  ns/op
uuid.isValid                           10000000  iterations      170  ns/op
isNil                                 500000000  iterations        0  ns/op
isPlainObject                         100000000  iterations       19  ns/op

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2020

==== C8 test coverage ====
Statements: 70.39% ( 18041/25630 )
Branches : 71.52% ( 2114 /2956 )
Functions : 70.75% ( 670 /947 )
Lines : 70.39% ( 18041 /25630 )

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2020

==== Benchmark result ====

Node.js version: 15

Total benchmarks: 13
          Passed: 13
          Failed: 0
-----------
lbu validator simple                    5000000  iterations      495  ns/op
yup validator simple                      20000  iterations    76194  ns/op
fastest-validator validator simple     10000000  iterations      121  ns/op
lbu validator nested                      50000  iterations    50013  ns/op
yup validator nested                       2000  iterations   603077  ns/op
fastest-validator validator nested      2000000  iterations      864  ns/op
logger - strings                         500000  iterations     2362  ns/op
logger - objects                         500000  iterations     2943  ns/op
logger - deep objects                    200000  iterations     5014  ns/op
uuid                                    2000000  iterations      665  ns/op
uuid.isValid                           10000000  iterations      149  ns/op
isNil                                 500000000  iterations        0  ns/op
isPlainObject                         100000000  iterations       19  ns/op

@dirkdev98 dirkdev98 merged commit f29afec into main Nov 3, 2020
@dirkdev98 dirkdev98 deleted the feat/es-modules branch November 3, 2020 20:26
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.

1 participant