Skip to content

Get rid of top-level dependency on prop-types#1460

Merged
marvinhagemeister merged 1 commit into
preactjs:masterfrom
natevw:drop-extra-dep
Mar 27, 2019
Merged

Get rid of top-level dependency on prop-types#1460
marvinhagemeister merged 1 commit into
preactjs:masterfrom
natevw:drop-extra-dep

Conversation

@natevw

@natevw natevw commented Mar 26, 2019

Copy link
Copy Markdown
Contributor

It looks like this was inadvertently added in 069bc8f#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R63 when the debug app started using it.

Later it was properly added to the debug module itself via 109bdbd#diff-7a30b5ab41cde7241b4fc10f730143fdR23 but without cleaning it up from the main package.

This restores the preact package itself to have no dependencies, so we can all sleep better at night.

It looks like this was inadvertantly added in preactjs@069bc8f#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R63 to support the debug app. Later it was properly added to the debug module itself via preactjs@109bdbd#diff-7a30b5ab41cde7241b4fc10f730143fdR23 but without cleaning it up from the main package.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling c9445c1 on natevw:drop-extra-dep into 085a0d6 on developit:master.

@marvinhagemeister marvinhagemeister left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch! You're completely right that the dependency can be removed 👍 🎉

@marvinhagemeister marvinhagemeister merged commit 6fac51e into preactjs:master Mar 27, 2019
@andrewiggins

andrewiggins commented Mar 27, 2019

Copy link
Copy Markdown
Member

@marvinhagemeister Hmm does this work? The debug/package.json isn't directly installed (user doesn't run npm i preact/debug) so it's dependencies aren't installed.

That being said, (if my understanding is correct) I'm not sure what to do here...

@marvinhagemeister

Copy link
Copy Markdown
Member

@andrewiggins that's a very good point! I'll check again later today

@marvinhagemeister

Copy link
Copy Markdown
Member

@andrewiggins yep, you're right. The CI didn't fail because eslint-config-developit pulls in prop-types leading to it being available in node_modules even though it isn't declared as a top-level dependency. Another argument in favor of having production tests...

I'll revert it.

marvinhagemeister added a commit that referenced this pull request Mar 27, 2019
ForsakenHarmony pushed a commit that referenced this pull request Mar 28, 2019
Reverts #1460

I clicked the green button to early. As @andrewiggins correctly pointed out in #1460 we do need this for `preact/debug`. This wasn't caught by our CI because a `devDependency` pulled in `prop-types` too.
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