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

fix: apply implicit logic to jest resolver #825

Merged
merged 3 commits into from
Nov 13, 2018
Merged

Conversation

diervo
Copy link
Contributor

@diervo diervo commented Nov 13, 2018

Details

Apply implicit resolution logic to jest resolver (also did minor cleanup and refactor)

@diervo
Copy link
Contributor Author

diervo commented Nov 13, 2018

@trevor-bliss @jodarove FYI

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 1996233 | Target commit: fe231cf

lwc-engine-benchmark

table-append-1k metric base(1996233) target(fe231cf) trend
benchmark-table/append/1k duration 155.85 (±5.40 ms) 155.05 (±3.85 ms) -0.8ms (0.5%) 👌
table-clear-1k metric base(1996233) target(fe231cf) trend
benchmark-table/clear/1k duration 6.60 (±0.50 ms) 6.70 (±0.40 ms) +0.1ms (1.5%) 👌
table-create-10k metric base(1996233) target(fe231cf) trend
benchmark-table/create/10k duration 931.25 (±6.10 ms) 929.50 (±9.50 ms) -1.8ms (0.2%) 👌
table-create-1k metric base(1996233) target(fe231cf) trend
benchmark-table/create/1k duration 119.45 (±4.30 ms) 119.20 (±2.35 ms) -0.3ms (0.2%) 👌
table-update-10th-1k metric base(1996233) target(fe231cf) trend
benchmark-table/update-10th/1k duration 86.40 (±5.90 ms) 80.25 (±4.00 ms) -6.2ms (7.1%) 👍
tablecmp-append-1k metric base(1996233) target(fe231cf) trend
benchmark-table-component/append/1k duration 265.40 (±7.60 ms) 261.25 (±5.15 ms) -4.1ms (1.6%) 👍
tablecmp-clear-1k metric base(1996233) target(fe231cf) trend
benchmark-table-component/clear/1k duration 12.10 (±1.25 ms) 12.40 (±1.20 ms) +0.3ms (2.5%) 👌
tablecmp-create-10k metric base(1996233) target(fe231cf) trend
benchmark-table-component/create/10k duration 1841.60 (±11.00 ms) 1855.55 (±17.20 ms) +14.0ms (0.8%) 👎
tablecmp-create-1k metric base(1996233) target(fe231cf) trend
benchmark-table-component/create/1k duration 213.25 (±6.15 ms) 213.90 (±6.25 ms) +0.7ms (0.3%) 👌
tablecmp-update-10th-1k metric base(1996233) target(fe231cf) trend
benchmark-table-component/update-10th/1k duration 71.85 (±5.05 ms) 73.25 (±6.40 ms) +1.4ms (1.9%) 👌
wc-append-1k metric base(1996233) target(fe231cf) trend
benchmark-table-wc/append/1k duration 252.20 (±19.95 ms) 270.00 (±7.90 ms) +17.8ms (7.1%) 👎
wc-clear-1k metric base(1996233) target(fe231cf) trend
benchmark-table-wc/clear/1k duration 25.00 (±2.00 ms) 23.70 (±2.50 ms) -1.3ms (5.2%) 👍
wc-create-10k metric base(1996233) target(fe231cf) trend
benchmark-table-wc/create/10k duration 1990.65 (±61.30 ms) 1948.50 (±34.45 ms) -42.2ms (2.1%) 👍
wc-create-1k metric base(1996233) target(fe231cf) trend
benchmark-table-wc/create/1k duration 234.75 (±6.10 ms) 236.25 (±4.20 ms) +1.5ms (0.6%) 👌
wc-update-10th-1k metric base(1996233) target(fe231cf) trend
benchmark-table-wc/update-10th/1k duration 74.75 (±4.55 ms) 75.60 (±6.15 ms) +0.8ms (1.1%) 👌

function getLwcPath(path) {
if (extname(path) === '.css') {
return GLOBAL_CSS_MOCK;
function isImplicitHTMLImport(importee, { basedir }) {
Copy link
Member

Choose a reason for hiding this comment

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

We should add a TODO to revisit this code in the future. This code is now duplicated 3 times in the code base.

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 1996233 | Target commit: e530a2f

lwc-engine-benchmark

table-append-1k metric base(1996233) target(e530a2f) trend
benchmark-table/append/1k duration 155.85 (±5.40 ms) 155.85 (±3.70 ms) -0.0ms (0.0%) 👌
table-clear-1k metric base(1996233) target(e530a2f) trend
benchmark-table/clear/1k duration 6.60 (±0.50 ms) 7.00 (±0.40 ms) +0.4ms (6.1%) 👎
table-create-10k metric base(1996233) target(e530a2f) trend
benchmark-table/create/10k duration 931.25 (±6.10 ms) 943.90 (±7.80 ms) +12.6ms (1.4%) 👎
table-create-1k metric base(1996233) target(e530a2f) trend
benchmark-table/create/1k duration 119.45 (±4.30 ms) 120.50 (±3.05 ms) +1.0ms (0.9%) 👌
table-update-10th-1k metric base(1996233) target(e530a2f) trend
benchmark-table/update-10th/1k duration 86.40 (±5.90 ms) 80.40 (±4.00 ms) -6.0ms (6.9%) 👍
tablecmp-append-1k metric base(1996233) target(e530a2f) trend
benchmark-table-component/append/1k duration 265.40 (±7.60 ms) 266.60 (±5.20 ms) +1.2ms (0.5%) 👌
tablecmp-clear-1k metric base(1996233) target(e530a2f) trend
benchmark-table-component/clear/1k duration 12.10 (±1.25 ms) 13.30 (±2.10 ms) +1.2ms (9.9%) 👌
tablecmp-create-10k metric base(1996233) target(e530a2f) trend
benchmark-table-component/create/10k duration 1841.60 (±11.00 ms) 1844.50 (±13.75 ms) +2.9ms (0.2%) 👌
tablecmp-create-1k metric base(1996233) target(e530a2f) trend
benchmark-table-component/create/1k duration 213.25 (±6.15 ms) 220.65 (±5.40 ms) +7.4ms (3.5%) 👎
tablecmp-update-10th-1k metric base(1996233) target(e530a2f) trend
benchmark-table-component/update-10th/1k duration 71.85 (±5.05 ms) 73.40 (±6.15 ms) +1.6ms (2.2%) 👌
wc-append-1k metric base(1996233) target(e530a2f) trend
benchmark-table-wc/append/1k duration 252.20 (±19.95 ms) 270.55 (±11.50 ms) +18.4ms (7.3%) 👎
wc-clear-1k metric base(1996233) target(e530a2f) trend
benchmark-table-wc/clear/1k duration 25.00 (±2.00 ms) 23.95 (±2.60 ms) -1.0ms (4.2%) 👌
wc-create-10k metric base(1996233) target(e530a2f) trend
benchmark-table-wc/create/10k duration 1990.65 (±61.30 ms) 1985.70 (±45.65 ms) -5.0ms (0.2%) 👌
wc-create-1k metric base(1996233) target(e530a2f) trend
benchmark-table-wc/create/1k duration 234.75 (±6.10 ms) 235.75 (±4.85 ms) +1.0ms (0.4%) 👌
wc-update-10th-1k metric base(1996233) target(e530a2f) trend
benchmark-table-wc/update-10th/1k duration 74.75 (±4.55 ms) 74.70 (±6.30 ms) -0.0ms (0.1%) 👌

);
}

function isImplicitHTMLImport(importee, { basedir }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy/paste mistake? This function is duplicated above.

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 67008de | Target commit: 5c1b9b6

@diervo diervo merged commit c5554fd into master Nov 13, 2018
@diervo diervo deleted the dval/implicitJestResolver branch November 13, 2018 22:39
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.

3 participants