You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1f951e5
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ For full architecture details, see `docs/explanations/architecture/`.
91
91
- Pages and routes are stable by default. Mark experimental pages with `"experimental": true` in `wpPlugin.pages`; WordPress Core builds exclude those pages and routes used only by experimental pages. Do not introduce separate `stable` or `core` flags for this distinction.
92
92
- Never invoke a CLI through `npx`. When the binary is missing locally, `npx` installs whatever the public registry serves under that name: WordPress ships its own `wp-prettier` fork, and a bare `npx wp-scripts` can resolve to an unrelated third-party package rather than `@wordpress/scripts`. Use the npm scripts (`npm run format`, `npm run lint:js`, `npm run lint:css` and so on), which run the binaries from local `node_modules`. Where no script fits, use `npm exec --no -- <binary>` (adding `--workspace <name>` when the workspace that declares the dependency is not the one you are in), which fails instead of downloading. A bare `npm exec` behaves exactly like `npx`, so it needs `--no` too. The exception is a doc example handing the reader a tool they have not installed, such as `npx @wordpress/create-block@latest`: it names an exact package rather than a hijackable bin name.
93
93
- PHP function and class names are renamed at build time (`gutenberg_*` prefix, `*_Gutenberg` suffix) to avoid conflicts with WordPress Core — the built names, not the source names, are what runs (and what tests must call). See `docs/contributors/code/build-system-function-prefixing.md`.
94
-
- Code changes in a package that have an external impact to consumers should be accompanied by an entry in that package's `CHANGELOG.md`. Entries in the changelog should have a PR reference. In some cases you may not know the PR reference, ask the user. See `docs/contributors/code/managing-packages.md`.
94
+
- Code changes in a package that have an external impact to consumers should be accompanied by an entry in that package's `CHANGELOG.md`. Follow the formatting structure described in [Maintaining Changelogs](packages/README.md#maintaining-changelogs).
95
95
- Packages with TypeScript dev files split their configs: `tsconfig.build.json` (src only, emits `build-types`) and the default `tsconfig.json` (dev project: tests and stories, `noEmit`, jest types). Packages without dev files keep a single `tsconfig.json` build project, and a few packages deviate (a dev-only project with handwritten declarations, or specialized build projects); see the TypeScript section in `packages/README.md`. Reference a split package by `../<pkg>/tsconfig.build.json` and an unsplit one by `../<pkg>`. `npm run build` never type checks (it emits declarations with `--noCheck`); use `npm run typecheck`, and never add jest types to a build project.
96
96
- A rejected `apiFetch` is not always an `Error`: a REST error arrives as a plain object (`{ code, message, data }`), `parse: false` rejects with the `Response` (which carries `status`, not `message`), an aborted request rethrows an `AbortError`, and a handler set via `setFetchHandler` can reject anything. Do not interpolate the rejection into a string (`` `${ error }` `` gives `[object Object]`) or branch on `instanceof Error`. Normalise it to a message before showing the user anything, and supply your own copy when there is none — `ensureError` in `packages/core-data/src/private-actions.js` is the reference implementation, though it is local to that file rather than exported.
Copy file name to clipboardExpand all lines: packages/README.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -268,11 +268,15 @@ See [Testing published packages across WordPress versions](/docs/contributors/co
268
268
269
269
## Maintaining Changelogs
270
270
271
-
When maintaining dozens of npm packages, it can be tough to keep track of changes. To simplify the release process, each package includes a `CHANGELOG.md` file which details all published releases and the unreleased ("Unreleased") changes, if any exist.
271
+
Each package keeps a `CHANGELOG.md` so the release process can see what changed since the last publish. Put new entries under `## Unreleased` at the top of the file, or create the heading if it is missing.
272
272
273
-
For each pull request, you should always include relevant changes under an "Unreleased" heading at the top of the file. You should add the heading if it doesn't already exist.
273
+
Prefer an entry for anything that affects package consumers. Changelog entries are optional for trivial or for changes that don't impact the user or consumer. Internal changes can be added under an **Internal** heading.
274
274
275
-
_Example:_
275
+
### Changelog Entry Format
276
+
277
+
Under the "Unreleased" heading, add entries as list items under an appropriate `###`subheading (see ["Changelog Subsections"](#changelog-subsections)). Each top-level bullet should end with a link to the pull request and a period.
278
+
279
+
Example:
276
280
277
281
```md
278
282
<!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. -->
@@ -281,16 +285,16 @@ _Example:_
281
285
282
286
### Bug Fixes
283
287
284
-
- Fixed an off-by-one error with the `sum` function.
288
+
- Fixed an off-by-one error with the `sum` function ([#12347](https://github.com/WordPress/gutenberg/pull/12347)).
285
289
```
286
290
291
+
You can verify the structure locally by running `npm run lint:changelogs`.
292
+
287
293
### Promoting a Pre-Release Package to Stable (1.0.0)
288
294
289
295
The automated package publishing workflow will at most bump the minor version of a pre-release package (those having a version like `0.x.x`), even if it includes breaking changes. This is consistent with semantic versioning, where `0.x` versions are intended for initial development where the API may change frequently.
290
296
291
-
When a package's API is considered stable and ready for production use, it should be promoted to version 1.0.0. This is done by adding a "Stable Release" section to the `CHANGELOG.md` file:
292
-
293
-
_Example:_
297
+
A`0.x`package is promoted to `1.0.0` by adding a **Stable Release** section.
294
298
295
299
```md
296
300
## Unreleased
@@ -301,7 +305,7 @@ This package is now considered stable and production-ready. The API will follow
301
305
302
306
### Breaking Changes
303
307
304
-
- Final API adjustments before 1.0.0 release.
308
+
- Final API adjustments before 1.0.0 release ([#12345](https://github.com/WordPress/gutenberg/pull/12345)).
305
309
```
306
310
307
311
The presence of the "Stable Release" heading will cause the automated release process to bump a pre-1.0package to 1.0.0. The"Stable Release" heading should only be used for pre-1.0 packages, and from that point forward breaking changes will result in major version bumps as expected.
@@ -310,17 +314,16 @@ The presence of the "Stable Release" heading will cause the automated release pr
310
314
311
315
There are a number of common release subsections you can follow. Each is intended to align to a specific meaning in the context of the [Semantic Versioning (`semver`) specification](https://semver.org/) the project adheres to. It is important that you describe your changes accurately, since this is used in the packages release process to help determine the version of the next release.
312
316
317
+
Use the following standardized section headings and ordering based on the type of change you are making:
318
+
319
+
-"Stable Release"- Marks a pre-1.0package as stable and production-ready. This should only be used for packages currently published as a 0.x pre-release, to intentionally communicate that a package's API is now stable and ready for production use.
313
320
- "Breaking Changes" - A backwards-incompatible change which requires specific attention of the impacted developers to reconcile (requires a major version bump for stable packages).
314
321
- "New Features" - The addition of a new backwards-compatible function or feature to the existing public API (requires a minor version bump).
315
322
- "Enhancements" - Backwards-compatible improvements to existing functionality (requires a minor version bump).
316
323
- "Deprecations" - Deprecation notices. These do not impact the public interface or behavior of the module (requires a minor version bump).
317
324
- "Bug Fixes" - Resolutions to existing buggy behavior (requires a patch version bump).
318
325
- "Internal" - Changes which do not have an impact on the public interface or behavior of the module (requires a patch version bump).
319
-
- "Stable Release" - Marks a pre-1.0 package as stable and production-ready. This should only be used for packages currently published as a 0.x pre-release, to intentionally communicate that a package's API is now stable and ready for production use.
320
-
321
-
While other section naming can be used when appropriate, it's important that are expressed clearly to avoid confusion for both the packages releaser and third-party consumers.
322
-
323
-
When in doubt, refer to [Semantic Versioning specification](https://semver.org/).
If you are publishing new versions of packages, note that there are versioning recommendations outlined in the [Gutenberg Release Process document](https://github.com/WordPress/gutenberg/blob/HEAD/docs/contributors/code/release/README.md) which prescribe _minimum_ version bumps for specific types of releases. The chosen version should be the greater of the two between the semantic versioning and Gutenberg release minimum version bumps.
Copy file name to clipboardExpand all lines: packages/block-editor/CHANGELOG.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,6 @@
2
2
3
3
## Unreleased
4
4
5
-
### Internal
6
-
7
-
- Remove the `crossorigin` MutationObserver. Under `Document-Isolation-Policy: isolate-and-credentialless` cross-origin resources load without the attribute, and adding it broke any resource served without CORS headers ([#82614](https://github.com/WordPress/gutenberg/pull/82614)).
8
-
9
5
### New Features
10
6
11
7
- Add a text shadow block support and its control in the typography panel ([#79584](https://github.com/WordPress/gutenberg/pull/79584)).
@@ -16,6 +12,7 @@
16
12
-`BlockCard`: Migrate the block-type badge from the private Components `Badge` to `@wordpress/ui``Badge`. ([#82503](https://github.com/WordPress/gutenberg/pull/82503)).
17
13
- Inspector controls in the standard block-supports panels (Typography, Dimensions, Border, Color, Background, Filters) reflect the value a block inherits from Global Styles when nothing is set on the block. The `gutenberg-global-styles-inheritance-ui` experiment now gates only the indicators for that value: the dotted underline on an inherited label, and the dot that resets a local override ([#82840](https://github.com/WordPress/gutenberg/pull/82840)).
18
14
-`TypographyPanel`: Setting a text color starts an unset link color tracking it whenever no link color is set on the block or inherited from Global Styles. Previously the link color was left alone ([#82840](https://github.com/WordPress/gutenberg/pull/82840)).
15
+
-`LinkControl`, `LinkPicker`: migrate the link preview badges from the private `@wordpress/components``Badge` to `@wordpress/ui``Badge` ([#82684](https://github.com/WordPress/gutenberg/pull/82684)).
19
16
20
17
### Bug Fixes
21
18
@@ -27,6 +24,7 @@
27
24
28
25
### Internal
29
26
27
+
- Remove the `crossorigin` MutationObserver. Under `Document-Isolation-Policy: isolate-and-credentialless` cross-origin resources load without the attribute, and adding it broke any resource served without CORS headers ([#82614](https://github.com/WordPress/gutenberg/pull/82614)).
30
28
- Block bindings and variation transforms: Use the public `Menu` from `@wordpress/ui` instead of the private Components API. ([#81925](https://github.com/WordPress/gutenberg/pull/81925))
31
29
- Layout hooks: Use `normalizeLegacyLayout` in `useLayoutClasses`, `useLayoutStyles`, the block layout styles wrapper and `isAxialBlockGapAllowed`, replacing four inline copies of the legacy `inherit` / size check ([#82710](https://github.com/WordPress/gutenberg/pull/82710)).
32
30
- Extract the populated pattern category computation from `usePatternCategories` into a `getPopulatedCategories` util, and expose it and `searchItems` through private APIs for reuse by the start page options modal ([#81396](https://github.com/WordPress/gutenberg/pull/81396)).
0 commit comments