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(webpack-cli): prefer import-local #1345

Merged
merged 1 commit into from
Mar 18, 2020

Conversation

snitin315
Copy link
Member

What kind of change does this PR introduce?

removed stale import-local

Did you add tests for your changes?
NA
If relevant, did you update the documentation?
NA
Summary
Fixes #1318

Does this PR introduce a breaking change?

NO

Other information

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Remove from dependencies too

@webpack-bot
Copy link

@snitin315 Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@evilebottnawi Please review the new changes.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Update lock file too

@snitin315
Copy link
Member Author

Update lock file too

lock file is not present, all lock files are being ignored except the root lock file

@alexander-akait
Copy link
Member

And we still should update lock file, when something changes in dependencies/devDependencies in package.json you always need regenerate lock file

@snitin315
Copy link
Member Author

snitin315 commented Mar 17, 2020

And we still should update lock file, when something changes in dependencies/devDependencies in package.json you always need regenerate lock file

I did generate again, but no changes to stage and commit.

Screenshot from 2020-03-17 21-35-19

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Oh, sorry I was wrong, we should not remove import-local, we should uncomment return;.

How it is package works - if we have globally installed webpack-cli, it is require local installed webpack-cli package (from local node_modules) and continue execution (https://github.com/sindresorhus/import-local/blob/master/index.js#L18), if it is locally we just continue execution

@snitin315
Copy link
Member Author

snitin315 commented Mar 17, 2020

unable to commit changes, getting the following error -

Screenshot from 2020-03-17 22-15-46

Tried disabling eslint for the line, doesn't work as well
Do I have to make changes in eslint conf?

@alexander-akait
Copy link
Member

alexander-akait commented Mar 17, 2020

Do I have to make changes in eslint conf?

Yes, only for that file, use overrides https://eslint.org/docs/user-guide/configuring and setup right parserOptions (ecmaFeatures.globalReturn: true)

@webpack-bot
Copy link

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@snitin315
Copy link
Member Author

snitin315 commented Mar 18, 2020

overrides were throwing warning as well,

    overrides: [
        {
            files: ['./bin/cli.js'],
            parserOptions: {
                ecmaFeatures: {
                    globalReturn: true,
                },
            },
        },
    ],

Screenshot from 2020-03-18 09-05-22

So, I wrapped the logic inside IIFE. please check if it's ok to do so.

@snitin315 snitin315 changed the title chore(webpack-cli): remove stale import-local chore(webpack-cli): improve import-local Mar 18, 2020
@alexander-akait
Copy link
Member

overrides were throwing warning as well,

Eslint have cli args to check what rules used for file, okay, I will fix it soon

So, I wrapped the logic inside IIFE. please check if it's ok to do so.

No, it is wrong

@alexander-akait
Copy link
Member

Please remove IIFE and wait merge #1348

@alexander-akait
Copy link
Member

Tested locally and all fine, we will need to add tests in the future (when we starts increase coverage)

@alexander-akait alexander-akait merged commit 1af3bef into webpack:next Mar 18, 2020
@snitin315 snitin315 deleted the chore/import-local branch March 18, 2020 11:48
@snitin315 snitin315 changed the title chore(webpack-cli): improve import-local fix(webpack-cli): prefer import-local Mar 18, 2020
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.

import-local doesn't make sense
5 participants