newspack-scripts 1.7.0-alpha.2 → 2.0.0

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  Scripts for Newspack, heavily inspired by [`react-scripts`](https://github.com/facebook/create-react-app/blob/main/packages/react-scripts).
4
4
 
5
+ ---
6
+
5
7
  ## Available scripts
6
8
 
7
9
  ### test
@@ -15,7 +17,7 @@ Will run `jest` tests. Useful flags:
15
17
 
16
18
  Will run `calypso-build`, creating optimised production builds.
17
19
 
18
- ### start
20
+ ### watch
19
21
 
20
22
  Will run `calypso-build` in watch mode.
21
23
 
@@ -31,6 +33,8 @@ Lints to commit message, to be used in a git `commit-msg` hook.
31
33
 
32
34
  Will run [`semantic-release`](semantic-release.gitbook.io/) based on a very opinionated configuration.
33
35
 
36
+ ---
37
+
34
38
  ## Available configs
35
39
 
36
40
  This package exposes a couple of configuration files.
@@ -89,3 +93,11 @@ stylelint '**/*.scss' --syntax scss --config=./node_modules/newspack-scripts/con
89
93
  ```
90
94
 
91
95
  _Note: 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`. See https://github.com/Automattic/newspack-scripts/issues/1 for more information._
96
+
97
+ ---
98
+
99
+ ## Misc
100
+
101
+ ### `@wordpress/*` packages
102
+
103
+ This project list [`@wordpress/*` packages](https://github.com/WordPress/gutenberg/tree/trunk/packages) as dependencies in order to provide them to consumers. In a project using `calypso-build` (e.g. a consumer of `newspack-scripts`), the `@wordpress/*` packages are sourced from WP Core, not `node_modules`. The packages should be included in `node_modules`, though, to be available in other environments – notably when running tests. See [Dependency Extraction Webpack Plugin](https://www.npmjs.com/package/@wordpress/dependency-extraction-webpack-plugin) for more information.
@@ -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
  ) {
@@ -1,3 +1,14 @@
1
+ const path = require("path");
2
+
3
+ // Assume `@wordpress/*` packages are available. This is because `calypso-build` is using
4
+ // Dependency Extraction Webpack Plugin to use core WP packages instead of those from
5
+ // node_modules. The packages should still be part of the project (so they are listed in this
6
+ // project's package.json) so that they are available in testing environment.
7
+ // More on this:
8
+ // - https://www.npmjs.com/package/@wordpress/dependency-extraction-webpack-plugin
9
+ // - https://github.com/WordPress/gutenberg/issues/35630
10
+ const GLOBALLY_AVAILABLE_PACKAGES = ["@wordpress/.*"];
11
+
1
12
  module.exports = {
2
13
  extends: [
3
14
  "plugin:@wordpress/eslint-plugin/recommended",
@@ -16,7 +27,11 @@ module.exports = {
16
27
  camelcase: "off",
17
28
  // Disallow importing or requiring packages that are not listed in package.json
18
29
  // This prevents us from depending on transitive dependencies, which could break in unexpected ways.
19
- "import/no-extraneous-dependencies": ["error", { packageDir: "." }],
30
+ "import/no-extraneous-dependencies": [
31
+ "error",
32
+ { packageDir: [".", path.resolve(__dirname, "../")] },
33
+ ],
34
+ "import/no-unresolved": ["error", { ignore: GLOBALLY_AVAILABLE_PACKAGES }],
20
35
  // There's a conflict with prettier here:
21
36
  "react/jsx-curly-spacing": "off",
22
37
  // Skip prop types validation for now
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newspack-scripts",
3
- "version": "1.7.0-alpha.2",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "newspack-scripts": "./bin/newspack-scripts.js"
File without changes