Skip to content

chore: remove unused dependency (source-map) #48

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

Closed
wants to merge 3 commits into from

Conversation

diegofaria
Copy link

No description provided.

@jsf-clabot
Copy link

jsf-clabot commented May 26, 2017

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@diegofaria diegofaria closed this May 26, 2017
@diegofaria diegofaria deleted the patch-1 branch May 26, 2017 14:06
@diegofaria diegofaria restored the patch-1 branch May 26, 2017 14:08
@diegofaria diegofaria reopened this May 26, 2017
@alexander-akait
Copy link
Member

@diegofaria why?

@diegofaria
Copy link
Author

it looks like its not being used by the code, or i am too newbie?! x)

@alexander-akait
Copy link
Member

alexander-akait commented May 26, 2017

Seems SourceMap never used https://github.com/webpack-contrib/source-map-loader/blob/v0.1.1/index.js.

/cc @d3viant0ne

@michael-ciniawsky michael-ciniawsky changed the title dependency not used fix: remove unused dependency (source-map) May 26, 2017
Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

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

@diegofaria Thx, could you please remove the dependency from package.json aswell ? 😛

@michael-ciniawsky michael-ciniawsky changed the title fix: remove unused dependency (source-map) chore: remove unused dependency (source-map) May 26, 2017
@diegofaria
Copy link
Author

diegofaria commented May 28, 2017

I don't really know if it tests without SourcMap depedency will maintain the same purpose.
Can someone check?

@d3viant0ne @michael-ciniawsky @evilebottnawi

@joshwiens joshwiens self-assigned this May 29, 2017
@joshwiens
Copy link
Member

@diegofaria - You need to sign the CLA before this can be merged.

@diegofaria
Copy link
Author

I already did it @d3viant0ne :)

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

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

The with keyword is absolutely discouraged to use, quoting MDN here for reference

Using with is not recommended, and is forbidden in ECMAScript 5 strict mode. The recommended alternative is to assign the object whose properties you want to access to a temporary variable.

The question is if we still need it or if this is technical dept in the tests aswell (like the left over require in the loader itself), since the loader works without it, guessing that's likely to be the case :)
I can't for instance see how this is utilized, the expected value, just contains the 'with Sourcemap' {String} ¯_(ツ)_/¯. It's really weird 😛

Copy link
Member

@joshwiens joshwiens left a comment

Choose a reason for hiding this comment

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

This looks to me like tech debt but as @michael-ciniawsky said, it's just weird. We should probably ask Tobias just to be sure we aren't missing some sourcemap nuance that isn't apparent here.

@michael-ciniawsky
Copy link
Member

@zuohaocheng Do you have any idea why the withkeyword is used in the test and if it's still needed ? Otherwise I need to ask Tobias about it :D

@zuohaocheng
Copy link
Contributor

@michael-ciniawsky I'm not sure, but it looks more like a comment for me, as these are not real JavaScript file: without is definitely an illegal token. I would prefer to preserve them, and if possible, make it more clear to show these are not files in specific language.

What is done in source-map-loader does not include parsing the JavaScript file, as it only uses regex to match source map directive. As my understanding, it should be able to be used with other types of file, say, css.

Copy link
Contributor

@zuohaocheng zuohaocheng left a comment

Choose a reason for hiding this comment

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

It's great to remove unused dependencies. Meanwhile I'm not sure whether it's a good practice to remove those withs, because those files do not have to valid JavaScript file.

@diegofaria
Copy link
Author

What do you guys think it's left here?

@zuohaocheng @michael-ciniawsky

@zuohaocheng
Copy link
Contributor

@diegofaria Please kindly correct me if it's not the case. As mentioned in earlier comment, I think it would be nice to leave those withs as comment in test cases.

Removing unused dependency looks perfect forme.

@joshwiens joshwiens removed their assignment Aug 17, 2017
@diegofaria
Copy link
Author

diegofaria commented Aug 24, 2017

@zuohaocheng can you check if now it is correct?

@StarpTech
Copy link

What's the status?

@alexander-akait
Copy link
Member

/cc @diegofaria need accept CLA and rebase

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.

7 participants