GithubHelp home page GithubHelp logo

newspack-scripts's People

Contributors

adekbadek avatar dependabot[bot] avatar dkoo avatar leogermani avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

newspack-scripts's Issues

Resolving `prettier` dependency

Due to issue with dependency resolving, you might end up a different version of prettier in project's node_modules and node_modules/newspack-scripts/node_modules.
To fix this and make newspack-scripts use to "root" version of prettier, remove the offending prettier version in a postinstall hook script:

"postinstall": "rm -rf node_modules/newspack-scripts/node_modules/prettier"

This might be caused by version resolving being thrown off by aliasing prettier to wp-prettier as npm:[email protected].

Technically it seems like the overrides option should take care of that, but I did not have any luck with using it.

Post-release: alpha branch detection; master sync

The post-release script tries to determine if the release if a hotfix, or a regular release.

  • in case of a hotfix release, alpha branch will be updated with the latest (hotfix) release, so that it contains both what was on alpha and the hotfix
  • in case of a regular release (alpha -> release), the alpha branch will be reset on top of release, to provide a clean slate for next alpha release

The detection does not seem to work, though - see this post-release run.


Also, perhaps related: the post-release master sync (so that the master branch has the latest version numbers in package.json and other files) resulted in alpha version being merged โ€“ Automattic/newspack-plugin@4a9c3fc

Overwrites on post-release merge

The post-fix merge is too aggressive. The assumption behind it is that the changes on master are already on release, and so a --strategy-option=theirs (a "force our changes" merge) is ok.

However, if the changes on release are from a hotfix, that is directly commited (not from master, via alpha, as is the usual way), the delta will be different โ€“ and if a file was both

  • edited in the hotfix
  • edited on master after last release

then the post-release merge will overwrite the changes from master. Example.

Proposed solution

The post-release script should

  1. checkout master
  2. pick the auto-updated files (package.json etc) from release
  3. do a regular merge
  4. if there's a conflict, abort merge and notify the team

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.