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

test: ts esnext #2584

Merged
merged 8 commits into from
Apr 5, 2021
Merged

test: ts esnext #2584

merged 8 commits into from
Apr 5, 2021

Conversation

anshumanv
Copy link
Member

What kind of change does this PR introduce?

test

Did you add tests for your changes?
Yes

If relevant, did you update the documentation?
NA

Summary
Add test for ts esm

Does this PR introduce a breaking change?
no

Other information
Fix #2458

@anshumanv anshumanv requested a review from a team as a code owner March 31, 2021 18:42
@anshumanv
Copy link
Member Author

need to skip test for node < 14

@alexander-akait
Copy link
Member

Yep

@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #2584 (14d53d9) into master (2bf24dd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2584   +/-   ##
=======================================
  Coverage   91.35%   91.35%           
=======================================
  Files          29       29           
  Lines        1480     1480           
  Branches      425      425           
=======================================
  Hits         1352     1352           
  Misses        128      128           

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 2bf24dd...14d53d9. Read the comment docs.

@anshumanv
Copy link
Member Author

hmm timing out here but seems to pass locally


describe('webpack cli', () => {
it('should support typescript esnext file', async () => {
if (process.version.slice(1, 3) < 14) {
Copy link
Member

Choose a reason for hiding this comment

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

version in its own variable

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@anshumanv anshumanv requested a review from evenstensberg April 2, 2021 16:14
alexander-akait
alexander-akait previously approved these changes Apr 2, 2021
snitin315
snitin315 previously approved these changes Apr 2, 2021
evenstensberg
evenstensberg previously approved these changes Apr 2, 2021
@anshumanv
Copy link
Member Author

hm timing out on node 14 on macos 😞

@alexander-akait
Copy link
Member

Very weird, can you investigate? Maybe we really need increase timeout here

@anshumanv
Copy link
Member Author

Yep lets try increasing timeout, seems to work for me quickly in MacOS

test: rm eslint disable

test: rm eslint disable
return;
}

if (isMacOS && !isWebpack5) {
Copy link
Member

Choose a reason for hiding this comment

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

Why here isWebpack5? Happens only for v4 on macos?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's !isWebpack5 i.e 4 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Member Author

Choose a reason for hiding this comment

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

which is very weird as I don't know how webpack version change is causing this

Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't work locally either 😞

Copy link
Member

Choose a reason for hiding this comment

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

Doesn't work locally either disappointed

Do you mean it freezes on macos locally too?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep

Copy link
Member

Choose a reason for hiding this comment

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

Very weird, bug we will drop webpack v4 in near future, so let's merge


const { exitCode, stderr, stdout } = await run(__dirname, ['-c', './webpack.config.ts'], {
nodeOptions: ['--loader=ts-node/esm'],
env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true },
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 avoid using WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG here, it should works without it, locally fine

Copy link
Member Author

Choose a reason for hiding this comment

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

yep lets avoid it

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESM in webpack.config.ts isn't supported if ts-node outputs ESM
5 participants