From 1c3a7d2d7fa3c262633e4b5ca116230171c81ea2 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Sun, 8 Dec 2024 12:37:53 +0100 Subject: [PATCH 1/3] Update @plone/* packages info --- PACKAGES.md | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/PACKAGES.md b/PACKAGES.md index 5e12ae1955..cadac655e6 100644 --- a/PACKAGES.md +++ b/PACKAGES.md @@ -2,17 +2,37 @@ This document describes the packages that come with Volto, the default frontend for Plone 6. +These packages are part of Plone's API-first story. +Most of them are experimental and are marked in their respective `README` files. +Plone 6.1 (Volto 18) depends on: +- `@plone/registry` +- `@plone/scripts` +- `@plone/volto-slate` + +and as a development dependency: +- `@plone/types` + +Plone 6 (Volto 17 and below) does not use any of them. + +These packages are expected to be used and part of Plone 7. +Could be that some of them will be part of the upcoming Plone minor versions prior to Plone 7. + +The packages are divided in three categories or types: + +- core +- utilities +- add-ons + ## `@plone/types` Plone types is a special development package. It contains the Plone typings for TypeScript. -It's considered a core package, and it's the only package that the other core packages can rely on as -a `devDependency` in your project configuration. +It's considered a core package, and it's the only package that the other core packages can rely on as a `devDependency` in your project configuration. This package contains `.d.ts` typing definitions, curated by hand. -Due to the nature of this package, it does not need bundling. -It's published "as is", so you can import the type definitions from anywhere in your code. +Due to the nature of this package, it does not need to be built nor bundled. +It is published "as is", so you can import the type definitions from anywhere in your code. ## Core packages @@ -29,11 +49,11 @@ They must be published and bundled in a traditional (transpiled) way. The bundle of these packages must work on both CommonJS and ECMAScript Module (ESM) environments. -## Utility packages +## Utilities packages -- `@plone/drivers` -- `@plone/helpers` - `@plone/providers` +- `@plone/helpers` +- `@plone/drivers` - `@plone/rsc` @@ -44,19 +64,22 @@ They must be published in the traditional way, as a bundle. This bundle must work on both CommonJS and ESM environments. -## Feature packages +## Add-on packages - `@plone/blocks` -- `@plone/contents` - `@plone/slots` +- `@plone/theming` +- `@plone/contents` ### Rules -Feature packages, or add-on packages, can depend on any other package. +Add-on or feature packages, can depend on any other package. You must distribute them as source code, and not transpile them. They must provide a default configuration registry loader as the default main entry point export. -They must be loadable as any other add-on. +Unlike Volto add-ons, it is preferibly *NOT* to place the code in `src` folder. +If the package is not being transpiled, the direct resolution must work OOTB, so the bundlers resolution is direct, as well as the TypeScript resolution. +They must be loadable as any other add-on and contain an add-on registry compatible `install`-able default export. ## Development utility packages From 431c991046da78e26234537c7a1b010957baf82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Sun, 8 Dec 2024 12:55:32 +0100 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Steve Piercy --- PACKAGES.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PACKAGES.md b/PACKAGES.md index cadac655e6..86addfa2ec 100644 --- a/PACKAGES.md +++ b/PACKAGES.md @@ -4,7 +4,7 @@ This document describes the packages that come with Volto, the default frontend These packages are part of Plone's API-first story. Most of them are experimental and are marked in their respective `README` files. -Plone 6.1 (Volto 18) depends on: +Plone 6.1.x (Volto 18) depends on: - `@plone/registry` - `@plone/scripts` - `@plone/volto-slate` @@ -12,12 +12,12 @@ Plone 6.1 (Volto 18) depends on: and as a development dependency: - `@plone/types` -Plone 6 (Volto 17 and below) does not use any of them. +Plone 6.0.x (Volto 17 and below) does not use any of them. -These packages are expected to be used and part of Plone 7. -Could be that some of them will be part of the upcoming Plone minor versions prior to Plone 7. +These packages are expected to be used and become part of Plone 7. +Some of them might become part of Plone 6.1.x minor versions. -The packages are divided in three categories or types: +The packages are divided into three categories or types: - core - utilities @@ -77,9 +77,9 @@ This bundle must work on both CommonJS and ESM environments. Add-on or feature packages, can depend on any other package. You must distribute them as source code, and not transpile them. They must provide a default configuration registry loader as the default main entry point export. -Unlike Volto add-ons, it is preferibly *NOT* to place the code in `src` folder. -If the package is not being transpiled, the direct resolution must work OOTB, so the bundlers resolution is direct, as well as the TypeScript resolution. -They must be loadable as any other add-on and contain an add-on registry compatible `install`-able default export. +Unlike Volto add-ons, do *NOT* place the code in the `src` folder. +If you do not transpile the package, the direct resolution must work out of the box, where both the bundler and TypeScript resolution are direct. +They must be loadable as any other add-on, and contain an add-on registry compatible `install`-able default export. ## Development utility packages From 6f3ba7d3009897afeeba8eef32f0fe2414e6069c Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Sun, 8 Dec 2024 15:06:06 +0100 Subject: [PATCH 3/3] Remove non-existing yet packages --- PACKAGES.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/PACKAGES.md b/PACKAGES.md index 86addfa2ec..5f72ef477c 100644 --- a/PACKAGES.md +++ b/PACKAGES.md @@ -53,8 +53,6 @@ The bundle of these packages must work on both CommonJS and ECMAScript Module (E - `@plone/providers` - `@plone/helpers` -- `@plone/drivers` -- `@plone/rsc` ### Rules