Skip to content

fix: Move patch-package to dependencies#467

Merged
frankieyan merged 1 commit intobetafrom
frankie/fix-patch-package
Mar 11, 2021
Merged

fix: Move patch-package to dependencies#467
frankieyan merged 1 commit intobetafrom
frankie/fix-patch-package

Conversation

@frankieyan
Copy link
Member

@frankieyan frankieyan commented Mar 10, 2021

Short description

With #464 I added patch-package in order to patch rollup-plugin-style, however when being installed as a package with npm ci, patch-package will not be available and the install will exit.

This moves patch-package to our dependencies so that it'd be available. When installing as a package, it will omit patching dev dependencies, so other than the extra package being installed, there should be no additional consequences: ref

The alternative is to run patch-package with the prepare script, which sounds like it covers all the scenarios that we would want it to run in, however, patch-package used to recommend the prepare script and have since changed it to postinstall: ds300/patch-package@f9fb13b.

Test Plan

While not exactly the same as installing off of the registry, we can try installing this off of git and seeing the postinstall script run:

  • In another repo, run npm install git://github.com/doist/reactist#frankie/fix-patch-package
  • Run rm -rf node_modules
  • Run npm ci
  • You should see the following output:
> @doist/reactist@9.1.0-beta.1 postinstall /Users/frankie/Documents/twist-web/node_modules/@doist/reactist
> patch-package

patch-package 6.4.6
Applying patches...
No patch files found

Whereas if you try the steps above with v9.1.0-beta.1, it should fail

PR Checklist

  • Added tests for bugs / new features
  • Updated docs (storybooks, readme)
  • Executed npm run validate and made sure no errors / warnings were shown
  • Described changes in CHANGELOG.md
  • Bumped version in package.json and package-lock.json (npm --no-git-tag-version version <major|minor|patch>) ref
  • Updated all static build artifacts (npm run build-all)

Versioning

v9.1.0-beta.2

@frankieyan frankieyan requested review from a team and Bloomca and removed request for a team March 10, 2021 14:37
@frankieyan frankieyan self-assigned this Mar 10, 2021
Copy link
Contributor

@henningmu henningmu left a comment

Choose a reason for hiding this comment

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

Works as advertised 👏

@frankieyan frankieyan merged commit b9adc14 into beta Mar 11, 2021
@frankieyan frankieyan deleted the frankie/fix-patch-package branch March 11, 2021 10:18
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.

2 participants