newspack-scripts 5.1.1 → 5.2.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.
@@ -1,8 +1,6 @@
1
- const path = require("path");
2
-
3
1
  // Assume `@wordpress/*` packages are available. This is because `calypso-build` is using
4
2
  // 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
3
+ // node_modules. The packages should still be part of the project (they are listed in this
6
4
  // project's package.json) so that they are available in testing environment.
7
5
  // More on this:
8
6
  // - https://www.npmjs.com/package/@wordpress/dependency-extraction-webpack-plugin
@@ -36,12 +34,10 @@ module.exports = {
36
34
  rules: {
37
35
  "no-console": "off",
38
36
  camelcase: "off",
39
- // Disallow importing or requiring packages that are not listed in package.json
40
- // This prevents us from depending on transitive dependencies, which could break in unexpected ways.
41
- "import/no-extraneous-dependencies": [
42
- "error",
43
- { packageDir: [".", path.resolve(__dirname, "../")] },
44
- ],
37
+ // Some dependencies are injected by WP, and should not be declared in package.json (won't be used anyway).
38
+ // See https://github.com/WordPress/gutenberg/blob/e035f71/packages/dependency-extraction-webpack-plugin/README.md#behavior-with-scripts
39
+ // Unfortunately there's no "ignore" option for this rule, so it's disabled altogether.
40
+ "import/no-extraneous-dependencies": "off",
45
41
  "import/no-unresolved": ["error", { ignore: GLOBALLY_AVAILABLE_PACKAGES }],
46
42
  // There's a conflict with prettier here:
47
43
  "react/jsx-curly-spacing": "off",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newspack-scripts",
3
- "version": "5.1.1",
3
+ "version": "5.2.0",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "newspack-scripts": "./bin/newspack-scripts.js"
@@ -0,0 +1,8 @@
1
+ description: PHP executor
2
+ docker:
3
+ - image: "cimg/php:<<parameters.tag>>"
4
+ parameters:
5
+ tag:
6
+ default: 8.1-node
7
+ description: PHP image version
8
+ type: string
@@ -0,0 +1,30 @@
1
+ description: >
2
+ Generate documentation. This will create a new branch called docs and push the HTML documentation to it, as /docs directory.
3
+ To make this work with GH pages, visit <repo-url>/settings/pages, set branch to "docs", and folder to "/docs".
4
+
5
+ executor: php-81
6
+
7
+ steps:
8
+ - checkout
9
+ - run:
10
+ name: Install dependencies
11
+ command: |
12
+ sudo apt-get update && sudo apt-get install -y graphviz plantuml
13
+ - run:
14
+ name: Download PHPDocumentor
15
+ command: |
16
+ curl -L -o ./phpdocumentor https://phpdoc.org/phpDocumentor.phar
17
+ chmod +x ./phpdocumentor
18
+ - run:
19
+ name: Generate documentation
20
+ command: |
21
+ ./phpdocumentor run -d . -t ./docs
22
+ - run:
23
+ name: Switch to docs branch, commit, and push
24
+ command: |
25
+ git config user.name "${GIT_COMMITTER_NAME}"
26
+ git config user.email "${GITHUB_COMMITER_EMAIL}"
27
+ git checkout -b docs
28
+ git add -f docs
29
+ git commit -m "Update the docs"
30
+ git push "https://${GITHUB_TOKEN}@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git" --force
@@ -1,7 +1,7 @@
1
1
  description: >
2
2
  Lint PHP files.
3
3
 
4
- executor: default
4
+ executor: php-81
5
5
 
6
6
  steps:
7
7
  - checkout