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

chore: install lz-string from git repo #932

Closed
wants to merge 2 commits into from

Conversation

anc95
Copy link

@anc95 anc95 commented Apr 19, 2021

What:
I change lz-string install type from npm to git repo

Why:
lz-string@1.4.4 use WTFPL license, it could cause some law issue when use it.

How:
so I take the advice of it's author, install lz-stirng just from git repo to use MIT license. related issue

Checklist:

  • Documentation added to the
    docs site
  • Tests
  • Typescript definitions updated
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 19, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 651a12c:

Sandbox Source
react-testing-library-examples Configuration

@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #932 (651a12c) into master (3b58516) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #932   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        26           
  Lines          948       948           
  Branches       287       284    -3     
=========================================
  Hits           948       948           
Flag Coverage Δ
node-10.14.2 100.00% <ø> (?)
node-12 100.00% <ø> (ø)
node-14 100.00% <ø> (ø)
node-15 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


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 3b58516...651a12c. Read the comment docs.

package.json Outdated
@@ -44,7 +44,7 @@
"aria-query": "^4.2.2",
"chalk": "^4.1.0",
"dom-accessibility-api": "^0.5.4",
"lz-string": "^1.4.4",
"lz-string": "https://github.com/pieroxy/lz-string.git",
Copy link
Member

Choose a reason for hiding this comment

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

Can we install from a tag/branch instead? We're basically giving up SemVer here which could lead to all sorts of different issues.

lz-string has been out for years now with 3 million downloads. Not saying that this means it's safe but it looks like it.

@kentcdodds Was license mismatch in dependencies ever a problem for you?

Copy link
Member

Choose a reason for hiding this comment

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

You can point to a specific commit rather than the main branch which is what I would recommend.

I've never had license issues before.

Copy link
Author

Choose a reason for hiding this comment

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

Thx for your review, I just pushed a commit to add the lz-string latest commit hash on main branch

Copy link
Member

@MatanBobi MatanBobi Apr 20, 2021

Choose a reason for hiding this comment

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

I guess that's also not the best approach because now we're fixed to a specific release.
Maybe that's the best we can do though in regards to this PR.

Copy link
Author

Choose a reason for hiding this comment

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

This issue was reported by my company's front-end npm's safe detection platform. Now, I use yarn resolutions to fixed @testing/library at 7.25.0 which not has lz-string as it's dependencies. Can you approve this mr and publish the new version then I can keep @testing/library to latest version, or there would have any other better solution for this issue? Thanks

Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit hesitant to merge that since I don't know if every package manager can resolve that or creates other problems. Considering you already discovered yarn resolutions I would recommend using that for lz-string:

"resolutions": {
  "**/lz-string": "https://github.com/pieroxy/lz-string.git"
}

@eps1lon
Copy link
Member

eps1lon commented Jun 3, 2021

Thanks for the work.

I'm not comfortable with declaring git dependencies. Since there is a workaround (#932 (comment)) I'm closing.

@eps1lon eps1lon closed this Jun 3, 2021
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.

4 participants