newspack-scripts 1.7.0 → 3.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: "\U0001F41E Bug report"
3
+ about: Report a bug if something isn't working as expected.
4
+
5
+ ---
6
+
7
+ **Describe the bug**
8
+ A clear and concise description of what the bug is. Please be as descriptive as possible; issues lacking detail, or for any other reason than to report a bug, may be closed without action.
9
+
10
+ **To Reproduce**
11
+ Steps to reproduce the behavior:
12
+ 1. Go to '...'
13
+ 2. Click on '....'
14
+ 3. Scroll down to '....'
15
+ 4. See error
16
+
17
+ **Screenshots**
18
+ If applicable, add screenshots to help explain your problem.
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: "✨ New Enhancement"
3
+ about: "If you have an idea to improve an existing feature please let us know or submit a Pull Request!"
4
+
5
+ ---
6
+
7
+ **Is your feature request related to a problem? Please describe.**
8
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
+
10
+ **Describe the solution you'd like**
11
+ A clear and concise description of what you want to happen.
12
+
13
+ **Describe alternatives you've considered**
14
+ A clear and concise description of any alternative solutions or features you've considered.
15
+
16
+ **Additional context**
17
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: "\U0001F680 Feature request"
3
+ about: "Suggest a new feature \U0001F389 We'll consider building it if it receives sufficient interest! \U0001F44D"
4
+
5
+ ---
6
+
7
+ **Is your feature request related to a problem? Please describe.**
8
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
+
10
+ **Describe the solution you'd like**
11
+ A clear and concise description of what you want to happen.
12
+
13
+ **Describe alternatives you've considered**
14
+ A clear and concise description of any alternative solutions or features you've considered.
15
+
16
+ **Additional context**
17
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,28 @@
1
+ ### All Submissions:
2
+
3
+ * [ ] Have you followed the [Newspack Contributing guideline](https://github.com/Automattic/newspack-theme/blob/master/.github/CONTRIBUTING.md)?
4
+ * [ ] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?
5
+
6
+ <!-- Mark completed items with an [x] -->
7
+
8
+ <!-- You can erase any parts of this template not applicable to your Pull Request. -->
9
+
10
+ ### Changes proposed in this Pull Request:
11
+
12
+ <!-- Describe the changes made to this Pull Request, and the reason for such changes. -->
13
+
14
+ Closes # .
15
+
16
+ ### How to test the changes in this Pull Request:
17
+
18
+ 1.
19
+ 2.
20
+ 3.
21
+
22
+ ### Other information:
23
+
24
+ * [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
25
+ * [ ] Have you written new tests for your changes, as applicable?
26
+ * [ ] Have you successfully ran tests with your changes locally?
27
+
28
+ <!-- Mark completed items with an [x] -->
@@ -0,0 +1,27 @@
1
+ # Dependabot config.
2
+ # Keep NPM and Composer packages up-to-date.
3
+ # Let's start out with weekly updates and then drop back to less frequent intervals after everything is up-to-date.
4
+
5
+ version: 2
6
+ updates:
7
+ # Enable version updates for npm
8
+ - package-ecosystem: 'npm'
9
+ # Look for `package.json` and `lock` files in the `root` directory
10
+ directory: '/'
11
+ # Check the npm registry for updates every day (weekdays)
12
+ schedule:
13
+ interval: 'weekly'
14
+ # Add reviewers
15
+ reviewers:
16
+ - 'Automattic/newspack-product'
17
+
18
+ # Enable version updates for Composer
19
+ - package-ecosystem: 'composer'
20
+ # Look for a `composer.lock` in the `root` directory
21
+ directory: '/'
22
+ # Check for updates every day (weekdays)
23
+ schedule:
24
+ interval: 'weekly'
25
+ # Add reviewers
26
+ reviewers:
27
+ - 'Automattic/newspack-product'
@@ -0,0 +1,18 @@
1
+ on:
2
+ pull_request_target:
3
+ types: [labeled]
4
+
5
+ name: Dependabot auto-merge
6
+ jobs:
7
+ auto-merge:
8
+ name: Auto-merge dependabot PRs for minor and patch updates
9
+ runs-on: ubuntu-latest
10
+ if: |
11
+ contains( github.event.pull_request.labels.*.name, 'dependencies' )
12
+ && ! contains( github.event.pull_request.labels.*.name, '[Status] Approved' )
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - uses: ahmadnassri/action-dependabot-auto-merge@v2
16
+ with:
17
+ target: minor # includes patch updates.
18
+ github-token: ${{ secrets.DEPENDABOT_TOKEN }}
@@ -0,0 +1,15 @@
1
+ on: pull_request_review
2
+ name: Label approved pull requests
3
+ jobs:
4
+ labelWhenApproved:
5
+ name: Label when approved
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - name: Label when approved
9
+ uses: pullreminders/label-when-approved-action@master
10
+ env:
11
+ APPROVALS: '1'
12
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13
+ ADD_LABEL: '[Status] Approved'
14
+ # Needs to be URL-encoded, see https://github.com/abinoda/label-when-approved-action/pull/3#discussion_r321882620
15
+ REMOVE_LABEL: '%5BStatus%5D%20Needs%20Review'
package/README.md CHANGED
@@ -17,7 +17,7 @@ Will run `jest` tests. Useful flags:
17
17
 
18
18
  Will run `calypso-build`, creating optimised production builds.
19
19
 
20
- ### start
20
+ ### watch
21
21
 
22
22
  Will run `calypso-build` in watch mode.
23
23
 
@@ -5,7 +5,7 @@ const spawn = require("cross-spawn");
5
5
  const [scriptName, ...nodeArgs] = process.argv.slice(2);
6
6
 
7
7
  if (
8
- ["test", "build", "start", "commit", "commitlint", "release"].includes(
8
+ ["test", "build", "watch", "commit", "commitlint", "release"].includes(
9
9
  scriptName
10
10
  )
11
11
  ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newspack-scripts",
3
- "version": "1.7.0",
3
+ "version": "3.0.0-alpha.2",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "newspack-scripts": "./bin/newspack-scripts.js"
package/post-release.sh CHANGED
@@ -3,19 +3,30 @@
3
3
  git config user.name "$GIT_COMMITTER_NAME"
4
4
  git config user.email "$GITHUB_COMMITER_EMAIL"
5
5
 
6
- # Reset the tip of alpha branch to the release branch.
7
- # The alpha brach is single-serving, just for alpha releases. After a release,
8
- # we don't care about any alpha changes.
9
- git pull origin release
10
- git checkout alpha
11
- git reset --hard release --
12
- git push "https://$GITHUB_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git" --force
6
+ # The last commit message at this point is the automated release commit. The second-to-last
7
+ # commit message should contain data about the merge.
8
+ SECOND_TO_LAST_COMMIT_MSG=$(git log -n 1 --skip 1 --pretty=format:"%s")
13
9
 
14
- # Cherry-pick the latest commit from the release branch onto the master branch.
15
- # This way the version numbers and the changelog on master are up to date.
16
- #
17
- # Note that this will fail if there is no CHANGELOG.md on master - in such case the cherry-pick will
18
- # result in a conflict.
10
+ LATEST_VERSION_TAG=$(git describe --tags --abbrev=0)
11
+
12
+ # If the merge was from alpha branch, alpha branch should be reset.
13
+ if [[ $(echo $SECOND_TO_LAST_COMMIT_MSG | grep '^Merge pull request.*alpha') ]]; then
14
+ echo '[newspack-scripts] Release was created from the alpha branch. Alpha branch will now be reset.'
15
+
16
+ # Reset the tip of alpha branch to the release branch.
17
+ # The alpha brach is single-serving, just for alpha releases. After a release,
18
+ # we don't care about any alpha changes.
19
+ git pull origin release
20
+ git checkout alpha
21
+ git reset --hard release --
22
+ # Force-push the alpha branch.
23
+ git push "https://$GITHUB_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git" --force
24
+ fi
25
+
26
+ # Update master branch with latest changes from the release branch, so they are in sync.
27
+ echo '[newspack-scripts] Merging the release branch into master'
19
28
  git checkout master
20
- git cherry-pick $(git rev-parse release) --strategy-option theirs
29
+ git merge --squash release
30
+ git commit --message "chore(release): merge in release $LATEST_VERSION_TAG"
31
+ # Push updated master upstream.
21
32
  git push "https://$GITHUB_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git"
@@ -19,11 +19,18 @@ const config = {
19
19
  debug: semanticReleaseArgs.debug,
20
20
 
21
21
  branches: [
22
+ // `release` branch is published on the main distribution channel (a new version on GH).
22
23
  "release",
24
+ // `alpha` branch – for regular pre-releases.
23
25
  {
24
26
  name: "alpha",
25
27
  prerelease: "alpha",
26
28
  },
29
+ // `hotfix/*` branches – for releases outside of the release schedule.
30
+ {
31
+ name: "hotfix/*",
32
+ prerelease: "hotfix",
33
+ },
27
34
  ],
28
35
  prepare: [
29
36
  "@semantic-release/changelog",
File without changes