[DOC] Resolve incorrect branch references in Gutenberg links (#44566)
* Fix Gutenberg links in the docs pointing to the wrong branch * Add changefile(s) from automation for the following project(s): @woocommerce/notices, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/components, woocommerce-blocks, woocommerce-beta-tester, woo-ai * Fix markdown lint errors * Fix wrong link in the docs --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
f79bf3a340
commit
452c522b95
|
@ -2,59 +2,63 @@
|
|||
|
||||
Currently we have a set of public-facing packages that can be dowloaded from [npm](https://www.npmjs.com/org/woocommerce) and used in external applications. Here is a non-exhaustive list.
|
||||
|
||||
- `@woocommerce/components`: A library of components that can be used to create pages in the WooCommerce dashboard and reports pages.
|
||||
- `@woocommerce/csv-export`: A set of functions to convert data into CSV values, and enable a browser download of the CSV data.
|
||||
- `@woocommerce/currency`: A class to display and work with currency values.
|
||||
- `@woocommerce/date`: A collection of utilities to display and work with date values.
|
||||
- `@woocommerce/navigation`: A collection of navigation-related functions for handling query parameter objects, serializing query parameters, updating query parameters, and triggering path changes.
|
||||
- `@woocommerce/tracks`: User event tracking utility functions for Automattic based projects.
|
||||
- `@woocommerce/components`: A library of components that can be used to create pages in the WooCommerce dashboard and reports pages.
|
||||
- `@woocommerce/csv-export`: A set of functions to convert data into CSV values, and enable a browser download of the CSV data.
|
||||
- `@woocommerce/currency`: A class to display and work with currency values.
|
||||
- `@woocommerce/date`: A collection of utilities to display and work with date values.
|
||||
- `@woocommerce/navigation`: A collection of navigation-related functions for handling query parameter objects, serializing query parameters, updating query parameters, and triggering path changes.
|
||||
- `@woocommerce/tracks`: User event tracking utility functions for Automattic based projects.
|
||||
|
||||
## Working with existing packages
|
||||
|
||||
- You can make changes to packages files as normal, and running `pnpm start` will compile and watch both app files and packages.
|
||||
- :warning: Add any dependencies to a package using `pnpm add` from the package root.
|
||||
- :warning: Make sure you're not importing from any other files outside of the package (you can import from other packages, just use the `import from @woocommerce/package` syntax).
|
||||
- Don't change the version in `package.json`.
|
||||
- Label your PR with the `Packages` label.
|
||||
- See the [Package Release Tool](https://github.com/woocommerce/woocommerce/blob/f9e7a5a3fb11cdd4dc064c02e045cf429cb6a2b6/tools/package-release/README.md) for instructions on how to release packages.
|
||||
- You can make changes to packages files as normal, and running `pnpm start` will compile and watch both app files and packages.
|
||||
- :warning: Add any dependencies to a package using `pnpm add` from the package root.
|
||||
- :warning: Make sure you're not importing from any other files outside of the package (you can import from other packages, just use the `import from @woocommerce/package` syntax).
|
||||
- Don't change the version in `package.json`.
|
||||
- Label your PR with the `Packages` label.
|
||||
- See the [Package Release Tool](https://github.com/woocommerce/woocommerce/blob/f9e7a5a3fb11cdd4dc064c02e045cf429cb6a2b6/tools/package-release/README.md) for instructions on how to release packages.
|
||||
|
||||
---
|
||||
|
||||
## Creating a new package
|
||||
|
||||
Most of this is pulled [from the Gutenberg workflow](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#creating-new-package).
|
||||
Most of this is pulled [from the Gutenberg workflow](https://github.com/WordPress/gutenberg/blob/trunk/CONTRIBUTING.md#creating-new-package).
|
||||
|
||||
To create a new package, add a new folder to `/packages`, containing…
|
||||
|
||||
1. `package.json` based on the template:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "@woocommerce/package-name",
|
||||
"version": "1.0.0-beta.0",
|
||||
"description": "Package description.",
|
||||
"author": "Automattic",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"keywords": [ "wordpress", "woocommerce" ],
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/[_YOUR_PACKAGE_]/README.md",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/woocommerce/woocommerce.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/woocommerce/woocommerce/issues"
|
||||
},
|
||||
"main": "build/index.js",
|
||||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
"name": "@woocommerce/package-name",
|
||||
"version": "1.0.0-beta.0",
|
||||
"description": "Package description.",
|
||||
"author": "Automattic",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"keywords": [ "wordpress", "woocommerce" ],
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/[_YOUR_PACKAGE_]/README.md",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/woocommerce/woocommerce.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/woocommerce/woocommerce/issues"
|
||||
},
|
||||
"main": "build/index.js",
|
||||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. `.npmrc` file which disables creating `package-lock.json` file for the package:
|
||||
```
|
||||
|
||||
```text
|
||||
package-lock=false
|
||||
```
|
||||
|
||||
3. `README.md` file containing at least:
|
||||
- Package name
|
||||
- Package description
|
||||
|
@ -63,10 +67,10 @@ To create a new package, add a new folder to `/packages`, containing…
|
|||
4. A `src` directory for the source of your module. Note that you'll want an `index.js` file that exports the package contents, see other packages for examples.
|
||||
5. A blank Changelog file, `changelog.md`.
|
||||
|
||||
```
|
||||
# Changelog
|
||||
```text
|
||||
# Changelog
|
||||
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
```
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
```
|
||||
|
||||
6. Add the new package name to `packages/js/dependency-extraction-webpack-plugin/assets/packages.js` so that users of that plugin will also be able to use the new package without enqueuing it.
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: Fix Gutenberg links in the docs pointing to incorrect branch.
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
Search
|
||||
===
|
||||
# Search
|
||||
|
||||
A search box which autocompletes results while typing, allowing for the user to select an existing object
|
||||
(product, order, customer, etc). Currently only products are supported.
|
||||
|
@ -8,10 +7,10 @@ A search box which autocompletes results while typing, allowing for the user to
|
|||
|
||||
```jsx
|
||||
<Search
|
||||
type="products"
|
||||
placeholder="Search for a product"
|
||||
selected={ selected }
|
||||
onChange={ items => setState( { selected: items } ) }
|
||||
type="products"
|
||||
placeholder="Search for a product"
|
||||
selected={ selected }
|
||||
onChange={ items => setState( { selected: items } ) }
|
||||
/>
|
||||
```
|
||||
|
||||
|
@ -23,7 +22,7 @@ Name | Type | Default | Description
|
|||
`className` | String | `null` | Class name applied to parent div
|
||||
`onChange` | Function | `noop` | Function called when selected results change, passed result list
|
||||
`type` | One of: 'categories', 'countries', 'coupons', 'customers', 'downloadIps', 'emails', 'orders', 'products', 'taxes', 'usernames', 'variations', 'custom' | `null` | (required) The object type to be used in searching
|
||||
`autocompleter` | Completer | `null` | Custom [completer](https://github.com/WordPress/gutenberg/tree/master/packages/components/src/autocomplete#the-completer-interface) to be used in searching. Required when `type` is 'custom'
|
||||
`autocompleter` | Completer | `null` | Custom [completer](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/autocomplete#the-completer-interface) to be used in searching. Required when `type` is 'custom'
|
||||
`placeholder` | String | `null` | A placeholder for the search input
|
||||
`selected` | Array | `[]` | An array of objects describing selected values. If the label of the selected value is omitted, the Tag of that value will not be rendered inside the search box.
|
||||
`inlineTags` | Boolean | `false` | Render tags inside input, otherwise render below input
|
||||
|
@ -31,7 +30,7 @@ Name | Type | Default | Description
|
|||
`staticResults` | Boolean | `false` | Render results list positioned statically instead of absolutely
|
||||
`disabled` | Boolean | `false` | Whether the control is disabled or not
|
||||
|
||||
### `selected` item structure:
|
||||
### `selected` item structure
|
||||
|
||||
- `id`: One of type: number, string
|
||||
- `label`: String
|
|
@ -1,30 +1,30 @@
|
|||
# Dependency Extraction Webpack Plugin
|
||||
|
||||
Extends Wordpress [Dependency Extraction Webpack Plugin](https://github.com/WordPress/gutenberg/tree/master/packages/dependency-extraction-webpack-plugin) to automatically include WooCommerce dependencies in addition to WordPress dependencies.
|
||||
Extends Wordpress [Dependency Extraction Webpack Plugin](https://github.com/WordPress/gutenberg/tree/trunk/packages/dependency-extraction-webpack-plugin) to automatically include WooCommerce dependencies in addition to WordPress dependencies.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the module
|
||||
|
||||
```
|
||||
```bash
|
||||
pnpm install @woocommerce/dependency-extraction-webpack-plugin --save-dev
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Use this as you would [Dependency Extraction Webpack Plugin](https://github.com/WordPress/gutenberg/tree/master/packages/dependency-extraction-webpack-plugin). The API is exactly the same, except that WooCommerce packages are also handled automatically.
|
||||
Use this as you would [Dependency Extraction Webpack Plugin](https://github.com/WordPress/gutenberg/tree/trunk/packages/dependency-extraction-webpack-plugin). The API is exactly the same, except that WooCommerce packages are also handled automatically.
|
||||
|
||||
```js
|
||||
// webpack.config.js
|
||||
const WooCommerceDependencyExtractionWebpackPlugin = require( '@woocommerce/dependency-extraction-webpack-plugin' );
|
||||
|
||||
module.exports = {
|
||||
// …snip
|
||||
plugins: [ new WooCommerceDependencyExtractionWebpackPlugin() ],
|
||||
// …snip
|
||||
plugins: [ new WooCommerceDependencyExtractionWebpackPlugin() ],
|
||||
};
|
||||
```
|
||||
|
||||
Additional module requests on top of Wordpress [Dependency Extraction Webpack Plugin](https://github.com/WordPress/gutenberg/tree/master/packages/dependency-extraction-webpack-plugin) are:
|
||||
Additional module requests on top of Wordpress [Dependency Extraction Webpack Plugin](https://github.com/WordPress/gutenberg/tree/trunk/packages/dependency-extraction-webpack-plugin) are:
|
||||
|
||||
| Request | Global | Script handle | Notes |
|
||||
| ------------------------------ | ------------------------ | ---------------------- | --------------------------------------------------------|
|
||||
|
@ -35,24 +35,24 @@ Additional module requests on top of Wordpress [Dependency Extraction Webpack Pl
|
|||
| `@woocommerce/settings` | `wc['wcSettings']` | `wc-settings` | |
|
||||
| `@woocommerce/*` | `wc['*']` | `wc-*` | |
|
||||
|
||||
#### Options
|
||||
### Options
|
||||
|
||||
An object can be passed to the constructor to customize the behavior, for example:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
plugins: [
|
||||
new WooCommerceDependencyExtractionWebpackPlugin( {
|
||||
bundledPackages: [ '@woocommerce/components' ],
|
||||
} ),
|
||||
],
|
||||
plugins: [
|
||||
new WooCommerceDependencyExtractionWebpackPlugin( {
|
||||
bundledPackages: [ '@woocommerce/components' ],
|
||||
} ),
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
##### `bundledPackages`
|
||||
#### `bundledPackages`
|
||||
|
||||
- Type: array
|
||||
- Default: []
|
||||
- Type: array
|
||||
- Default: []
|
||||
|
||||
A list of potential WooCommerce excluded packages, this will include the excluded package within the bundle (example above).
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: Fix Gutenberg links in the docs pointing to incorrect branch.
|
||||
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
This is an [ESLint](https://eslint.org/) plugin including configurations and custom rules for WooCommerce development.
|
||||
|
||||
**Note:** This primarily extends the [`@wordpress/eslint-plugin/recommended`](https://github.com/WordPress/gutenberg/tree/master/packages/eslint-plugin) ruleset and does not change any of the rules exposed on that plugin. As a base, all WooCommerce projects are expected to follow WordPress JavaScript Code Styles.
|
||||
**Note:** This primarily extends the [`@wordpress/eslint-plugin/recommended`](https://github.com/WordPress/gutenberg/tree/trunk/packages/eslint-plugin) ruleset and does not change any of the rules exposed on that plugin. As a base, all WooCommerce projects are expected to follow WordPress JavaScript Code Styles.
|
||||
|
||||
However, this ruleset does implement the following (which do not conflict with WordPress standards):
|
||||
|
||||
- Using typescript eslint parser to allow for eslint Import ([see issue](https://github.com/gajus/eslint-plugin-jsdoc/issues/604#issuecomment-653962767))
|
||||
- prettier formatting (using `wp-prettier`)
|
||||
- Dependency grouping (External and Internal) for dependencies in JavaScript files
|
||||
- No yoda conditionals
|
||||
- Radix argument required for `parseInt`.
|
||||
- Using typescript eslint parser to allow for eslint Import ([see issue](https://github.com/gajus/eslint-plugin-jsdoc/issues/604#issuecomment-653962767))
|
||||
- prettier formatting (using `wp-prettier`)
|
||||
- Dependency grouping (External and Internal) for dependencies in JavaScript files
|
||||
- No yoda conditionals
|
||||
- Radix argument required for `parseInt`.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the module
|
||||
|
||||
```
|
||||
```bash
|
||||
pnpm install @woocommerce/eslint-plugin --save-dev
|
||||
```
|
||||
|
||||
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
|
||||
Refer to the [ESLint documentation on Shareable Configs](http://eslint.org/docs/developer-guide/shareable-configs) for more information.
|
||||
|
||||
The `recommended` preset will include rules governing an ES2015+ environment, and includes rules from the [`@wordpress/eslint-plugin/recommended`](https://github.com/WordPress/gutenberg/tree/master/packages/eslint-plugin) project.
|
||||
The `recommended` preset will include rules governing an ES2015+ environment, and includes rules from the [`@wordpress/eslint-plugin/recommended`](https://github.com/WordPress/gutenberg/tree/trunk/packages/eslint-plugin) project.
|
||||
|
||||
If you want to use prettier in your code editor, you'll need ot create a `.prettierrc.js` file at the root of your project with the following:
|
||||
|
||||
|
@ -44,4 +44,4 @@ module.exports = require("@wordpress/prettier-config");
|
|||
|
||||
| Rule | Description | Recommended |
|
||||
| -------------------------------------------------------------------------- | ----------------------------------------- | ----------- |
|
||||
| [dependency-group](/packages/eslint-plugin/docs/rules/dependency-group.md) | Enforce dependencies docblocks formatting | ✓ |
|
||||
| [dependency-group](/packages/js/eslint-plugin/docs/rules/dependency-group.md) | Enforce dependencies docblocks formatting | ✓ |
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: Fix Gutenberg links in the docs pointing to incorrect branch.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/master/packages#maintaining-changelogs. -->
|
||||
<!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/trunk/packages#maintaining-changelogs. -->
|
||||
|
||||
# Unreleased
|
||||
|
||||
|
@ -18,16 +18,18 @@
|
|||
## 3.1.0
|
||||
|
||||
- Fix commonjs module build, allow package to be built in isolation. #7286
|
||||
|
||||
## 3.0.0 (2021-06-03)
|
||||
|
||||
## Breaking changes
|
||||
|
||||
- Move Lodash to a peer dependency.
|
||||
|
||||
## 2.0.0 (2020-02-10)
|
||||
|
||||
### Breaking Change
|
||||
|
||||
- A notices message is no longer spoken as a result of notice creation, but rather by its display in the interface by its corresponding [`Notice` component](https://github.com/WordPress/gutenberg/tree/master/packages/components/src/notice).
|
||||
- A notices message is no longer spoken as a result of notice creation, but rather by its display in the interface by its corresponding [`Notice` component](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/notice).
|
||||
|
||||
## 1.5.0 (2019-06-12)
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: Fix Gutenberg links in the docs pointing to incorrect branch.
|
||||
|
|
@ -45,7 +45,7 @@ pnpm install
|
|||
pnpm build:zip
|
||||
```
|
||||
|
||||
See [wp-scripts](https://github.com/WordPress/gutenberg/tree/master/packages/scripts) for more usage information.
|
||||
See [wp-scripts](https://github.com/WordPress/gutenberg/tree/trunk/packages/scripts) for more usage information.
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: Fix Gutenberg links in the docs pointing to incorrect branch.
|
||||
|
|
@ -15,7 +15,7 @@ pnpm --filter=@woocommerce/plugin-woocommerce-beta-tester install
|
|||
pnpm --filter=@woocommerce/plugin-woocommerce-beta-tester start
|
||||
```
|
||||
|
||||
See [wp-scripts](https://github.com/WordPress/gutenberg/tree/master/packages/scripts) for more usage information.
|
||||
See [wp-scripts](https://github.com/WordPress/gutenberg/tree/trunk/packages/scripts) for more usage information.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: Fix Gutenberg links in the docs pointing to incorrect branch.
|
||||
|
|
@ -26,13 +26,13 @@ If you want to see what we're working on for future versions, or want to help ou
|
|||
|
||||
Run through the ["Writing Your First Block Type" tutorial](https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/writing-your-first-block-type/) for a quick course in block-building.
|
||||
|
||||
For deeper dive, try looking at the [core blocks code,](https://github.com/WordPress/gutenberg/tree/master/packages/block-library/src) or see what [components are available.](https://github.com/WordPress/gutenberg/tree/master/packages/components/src)
|
||||
For deeper dive, try looking at the [core blocks code,](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src) or see what [components are available.](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src)
|
||||
|
||||
Other useful docs to explore:
|
||||
|
||||
- [`InnerBlocks`](https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inner-blocks/README.md)
|
||||
- [`InnerBlocks`](https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/inner-blocks/README.md)
|
||||
- [`apiFetch`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-api-fetch/)
|
||||
- [`@wordpress/editor`](https://github.com/WordPress/gutenberg/blob/master/packages/editor/README.md)
|
||||
- [`@wordpress/editor`](https://github.com/WordPress/gutenberg/blob/trunk/packages/editor/README.md)
|
||||
- [`@wordpress/create-block`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/)
|
||||
|
||||
## Long-term vision
|
||||
|
|
|
@ -5,7 +5,7 @@ TextToolbarButton is used in Toolbar for text buttons which show `isToggled` sta
|
|||
Notes:
|
||||
|
||||
- Gutenberg core has `ToolbarGroup` and `ToolbarButton` in progress. When these are available this component may not be needed.
|
||||
- Gutenberg [core `html` block uses regular `Button` in toolbar](https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/html/edit.js), and sets `is-active` class to trigger "active" styling when button is toggled on.
|
||||
- Gutenberg [core `html` block uses regular `Button` in toolbar](https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/html/edit.js), and sets `is-active` class to trigger "active" styling when button is toggled on.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ Use the following command to run the unit tests:
|
|||
npm run test
|
||||
```
|
||||
|
||||
The test scripts use [wp-scripts](https://github.com/WordPress/gutenberg/tree/master/packages/scripts) to run jest for component and unit testing.
|
||||
The test scripts use [wp-scripts](https://github.com/WordPress/gutenberg/tree/trunk/packages/scripts) to run jest for component and unit testing.
|
||||
|
||||
Additionally,
|
||||
|
||||
|
@ -59,7 +59,7 @@ When you're done, you may want to shut down the test environment:
|
|||
|
||||
- `npm run wp-env stop` to stop the test environment
|
||||
|
||||
**Note:** There are a number of other useful `wp-env` commands. You can find out more in the [wp-env docs](https://github.com/WordPress/gutenberg/blob/master/packages/env/README.md).
|
||||
**Note:** There are a number of other useful `wp-env` commands. You can find out more in the [wp-env docs](https://github.com/WordPress/gutenberg/blob/trunk/packages/env/README.md).
|
||||
|
||||
## How to run end-to-end tests
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: Fix Gutenberg links in the docs pointing to incorrect branch.
|
||||
|
Loading…
Reference in New Issue