diff --git a/.github/workflows/docsearch.yml b/.github/workflows/docsearch.yml new file mode 100644 index 0000000000..d35e23bff1 --- /dev/null +++ b/.github/workflows/docsearch.yml @@ -0,0 +1,24 @@ +name: Index docs to Typesense + +on: + push: + branches: + - docs + +jobs: + index_docs: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Index docs to Typesense + run: | + docker run \ + -e TYPESENSE_API_KEY=${{ vars.TYPESENSE_API_KEY }} \ + -e TYPESENSE_HOST="${{ vars.TYPESENSE_HOST }}" \ + -e TYPESENSE_PORT="443" \ + -e TYPESENSE_PROTOCOL="https" \ + -e CONFIG="$(cat docs/scraper/config.json | jq -r tostring)" \ + typesense/docsearch-scraper diff --git a/CHANGELOG.md b/CHANGELOG.md index a73d6d3d8d..91acedbcf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,95 @@ +## 2.1.0 (2023-10-11) + + +#### Fixes + +* **admin-ui** Correctly display job retries ([d3107fd](https://github.com/vendure-ecommerce/vendure/commit/d3107fd)), closes [#1467](https://github.com/vendure-ecommerce/vendure/issues/1467) +* **admin-ui** Fix back/forward nav issues with data table filters ([58cb5a5](https://github.com/vendure-ecommerce/vendure/commit/58cb5a5)) +* **admin-ui** Fix border colour of affixed input ([e2cb74b](https://github.com/vendure-ecommerce/vendure/commit/e2cb74b)) +* **admin-ui** Fix component for new Angular extension route API ([6fe1bd0](https://github.com/vendure-ecommerce/vendure/commit/6fe1bd0)) +* **admin-ui** Fix error when data table filters not defined ([2425a33](https://github.com/vendure-ecommerce/vendure/commit/2425a33)) +* **admin-ui** Give all data table columns immutable ids ([73a78db](https://github.com/vendure-ecommerce/vendure/commit/73a78db)) +* **admin-ui** Improve RTL styles ([056d205](https://github.com/vendure-ecommerce/vendure/commit/056d205)) +* **admin-ui** Limit FacetValues in Facet list component ([b445955](https://github.com/vendure-ecommerce/vendure/commit/b445955)), closes [#1257](https://github.com/vendure-ecommerce/vendure/issues/1257) +* **admin-ui** Reinstate serialized filter state in url ([a5bc0c1](https://github.com/vendure-ecommerce/vendure/commit/a5bc0c1)) +* **admin-ui** Update active filter preset on back/forward navigation ([844876e](https://github.com/vendure-ecommerce/vendure/commit/844876e)) +* **admin-ui** Use correct defaults for nullable custom fields (#2360) ([88430e5](https://github.com/vendure-ecommerce/vendure/commit/88430e5)), closes [#2360](https://github.com/vendure-ecommerce/vendure/issues/2360) +* **core** Downgrade ForbiddenError from Error to Warn log level ([c186392](https://github.com/vendure-ecommerce/vendure/commit/c186392)), closes [#2383](https://github.com/vendure-ecommerce/vendure/issues/2383) +* **core** Export EntityId and Money decorators ([4664dee](https://github.com/vendure-ecommerce/vendure/commit/4664dee)) +* **core** Fix circular dependency issue in SQLiteSearchStrategy ([f2e2e32](https://github.com/vendure-ecommerce/vendure/commit/f2e2e32)) +* **core** Fix resolution of facet valueList for postgres ([1d8fe47](https://github.com/vendure-ecommerce/vendure/commit/1d8fe47)) +* **job-queue-plugin** Correct behaviour of job list query with BullMQ ([c148a92](https://github.com/vendure-ecommerce/vendure/commit/c148a92)), closes [#2120](https://github.com/vendure-ecommerce/vendure/issues/2120) [#1327](https://github.com/vendure-ecommerce/vendure/issues/1327) +* **job-queue-plugin** Correct retry setting for BullMQ jobs ([972ba0e](https://github.com/vendure-ecommerce/vendure/commit/972ba0e)), closes [#1467](https://github.com/vendure-ecommerce/vendure/issues/1467) +* **ui-devkit** Fix scaffold logic for custom providers ([2f2ddb5](https://github.com/vendure-ecommerce/vendure/commit/2f2ddb5)) + +#### Features + +* **admin-ui** Add data table filter presets functionality ([a656ef2](https://github.com/vendure-ecommerce/vendure/commit/a656ef2)) +* **admin-ui** Add filter preset support to Collection list ([cbfb402](https://github.com/vendure-ecommerce/vendure/commit/cbfb402)) +* **admin-ui** Add image carousel to asset preview dialog (#2370) ([cd7b2bf](https://github.com/vendure-ecommerce/vendure/commit/cd7b2bf)), closes [#2370](https://github.com/vendure-ecommerce/vendure/issues/2370) [#2129](https://github.com/vendure-ecommerce/vendure/issues/2129) +* **admin-ui** Add initial React support for UI extensions ([1075dd7](https://github.com/vendure-ecommerce/vendure/commit/1075dd7)) +* **admin-ui** Add more native React UI components ([04e03f8](https://github.com/vendure-ecommerce/vendure/commit/04e03f8)) +* **admin-ui** Add Persian/Farsi i18n messages (#2418) ([1193863](https://github.com/vendure-ecommerce/vendure/commit/1193863)), closes [#2418](https://github.com/vendure-ecommerce/vendure/issues/2418) +* **admin-ui** Add useRouteParams react hook ([b63fb7f](https://github.com/vendure-ecommerce/vendure/commit/b63fb7f)) +* **admin-ui** Admin UI rtl with Arabic translation improvements (#2322) ([44ea12b](https://github.com/vendure-ecommerce/vendure/commit/44ea12b)), closes [#2322](https://github.com/vendure-ecommerce/vendure/issues/2322) +* **admin-ui** Allow custom components in data table columns ([d3474dd](https://github.com/vendure-ecommerce/vendure/commit/d3474dd)), closes [#2347](https://github.com/vendure-ecommerce/vendure/issues/2347) [#2353](https://github.com/vendure-ecommerce/vendure/issues/2353) +* **admin-ui** Allow custom React components in data table columns ([5cde775](https://github.com/vendure-ecommerce/vendure/commit/5cde775)), closes [#2347](https://github.com/vendure-ecommerce/vendure/issues/2347) [#2353](https://github.com/vendure-ecommerce/vendure/issues/2353) +* **admin-ui** Display original quantity after order has been modified ([a36c6e0](https://github.com/vendure-ecommerce/vendure/commit/a36c6e0)) +* **admin-ui** Enable Nepali translations ([342fafa](https://github.com/vendure-ecommerce/vendure/commit/342fafa)) +* **admin-ui** Expose providers to nav menu routerLink function ([1bae40e](https://github.com/vendure-ecommerce/vendure/commit/1bae40e)) +* **admin-ui** Implement custom components in Collection data table ([4ab7c1e](https://github.com/vendure-ecommerce/vendure/commit/4ab7c1e)) +* **admin-ui** Implement custom components in order detail data table (#2420) ([e92e820](https://github.com/vendure-ecommerce/vendure/commit/e92e820)), closes [#2420](https://github.com/vendure-ecommerce/vendure/issues/2420) +* **admin-ui** Implement drag-and-drop reorder of filter presets ([8e06705](https://github.com/vendure-ecommerce/vendure/commit/8e06705)) +* **admin-ui** Implement filter preset renaming ([8b52e6f](https://github.com/vendure-ecommerce/vendure/commit/8b52e6f)) +* **admin-ui** Implement job queue filtering by status ([baeb036](https://github.com/vendure-ecommerce/vendure/commit/baeb036)) +* **admin-ui** Implement react Card component ([c588a1f](https://github.com/vendure-ecommerce/vendure/commit/c588a1f)) +* **admin-ui** Implement relative date filtering ([d07a5f3](https://github.com/vendure-ecommerce/vendure/commit/d07a5f3)) +* **admin-ui** Implement simplified API for UI route extensions ([b9ca367](https://github.com/vendure-ecommerce/vendure/commit/b9ca367)) +* **admin-ui** Implement values pagination for Facet detail view ([4cf1826](https://github.com/vendure-ecommerce/vendure/commit/4cf1826)), closes [#1257](https://github.com/vendure-ecommerce/vendure/issues/1257) +* **admin-ui** Improve dev mode extension point display ([4678930](https://github.com/vendure-ecommerce/vendure/commit/4678930)) +* **admin-ui** Improve naming & layout of catalog & stock locations ([8452300](https://github.com/vendure-ecommerce/vendure/commit/8452300)) +* **admin-ui** Improved control over ActionBar buttons ([065a2b4](https://github.com/vendure-ecommerce/vendure/commit/065a2b4)) +* **admin-ui** Initial support for React UI extensions ([83d5756](https://github.com/vendure-ecommerce/vendure/commit/83d5756)) +* **admin-ui** Style improvements to table and form input borders ([5287287](https://github.com/vendure-ecommerce/vendure/commit/5287287)) +* **admin-ui** Support for React-based custom detail components ([55d9ffc](https://github.com/vendure-ecommerce/vendure/commit/55d9ffc)) +* **admin-ui** Update to Angular v16.2 ([608d5d3](https://github.com/vendure-ecommerce/vendure/commit/608d5d3)) +* **cli** Implement plugin scaffold command ([a6df4c1](https://github.com/vendure-ecommerce/vendure/commit/a6df4c1)) +* **cli** Include custom CRUD permissions with plugin scaffold ([0c62b6f](https://github.com/vendure-ecommerce/vendure/commit/0c62b6f)) +* **core** Add `Facet.valueList` resolver for paginated values ([09c7175](https://github.com/vendure-ecommerce/vendure/commit/09c7175)), closes [#1257](https://github.com/vendure-ecommerce/vendure/issues/1257) +* **core** Add maximum coupon usage (#2331) ([bdd2720](https://github.com/vendure-ecommerce/vendure/commit/bdd2720)), closes [#2331](https://github.com/vendure-ecommerce/vendure/issues/2331) [#2330](https://github.com/vendure-ecommerce/vendure/issues/2330) +* **core** Pass variant to ProductVariantPriceCalculationStrategy ([fee995c](https://github.com/vendure-ecommerce/vendure/commit/fee995c)), closes [#2398](https://github.com/vendure-ecommerce/vendure/issues/2398) +* **core** Support bi-directional relations in customFields (#2365) ([0313ce5](https://github.com/vendure-ecommerce/vendure/commit/0313ce5)), closes [#2365](https://github.com/vendure-ecommerce/vendure/issues/2365) +* **core** Update NestJS to v10, Apollo Server v4 ([b675fda](https://github.com/vendure-ecommerce/vendure/commit/b675fda)) +* **create** Allow selection of package manager ([6561bb7](https://github.com/vendure-ecommerce/vendure/commit/6561bb7)) +* **create** Better defaults for project scaffold ([fa683e7](https://github.com/vendure-ecommerce/vendure/commit/fa683e7)) +* **email-plugin** Expose template vars to template loader (#2243) ([78ea016](https://github.com/vendure-ecommerce/vendure/commit/78ea016)), closes [#2243](https://github.com/vendure-ecommerce/vendure/issues/2243) [#2242](https://github.com/vendure-ecommerce/vendure/issues/2242) +* **job-queue-plugin** Implement default cleanup of old BullMQ jobs ([6c1d7bb](https://github.com/vendure-ecommerce/vendure/commit/6c1d7bb)), closes [#1425](https://github.com/vendure-ecommerce/vendure/issues/1425) +* **payments-plugin** Allow custom params to be passed to Stripe API ([1b29097](https://github.com/vendure-ecommerce/vendure/commit/1b29097)), closes [#2412](https://github.com/vendure-ecommerce/vendure/issues/2412) +* **ui-devkit** Add experimental wrapper for shared ui providers ([daf6f8c](https://github.com/vendure-ecommerce/vendure/commit/daf6f8c)) + + +### BREAKING CHANGE + +* In the Admin UI, the "stock locations" list and detail views +have been moved from the "catalog" module to the "settings" module. Also, the +menu item & breadcrumb for "inventory" has been renamed to "products". This is an end-user breaking change rather than a code breaking change. Any UI +extensions that link to a `/catalog/inventory/...` route will still work as there is a redirect in place to `/catalog/products/...`. + +* The update of Apollo Server to v4 includes some breaking changes if you have +defined any custom ApolloServerPlugins. See the Apollo migration guide for full details: +https://www.apollographql.com/docs/apollo-server/migration/ +* The new Promotion.usageLimit field will require a non-destructive database migration to be performed. You should not need to do any manual migration work - it is a straightforward addition of a field to a table. + +* The ForbiddenError now defaults to a "warning" rather than "error" log level. Previously this was causing too much noise in logging services and the new level better reflects the severity of the error. + +## 2.0.10 (2023-10-11) + + +#### Fixes + +* **core** Use correct Money type on ProductVariantPrice.price field ([446f61c](https://github.com/vendure-ecommerce/vendure/commit/446f61c)) +* **payments-plugin** List missing available Mollie payment methods for orders api (#2435) ([23a0499](https://github.com/vendure-ecommerce/vendure/commit/23a0499)), closes [#2435](https://github.com/vendure-ecommerce/vendure/issues/2435) + ## 2.0.9 (2023-09-29) diff --git a/CHANGELOG_NEXT.md b/CHANGELOG_NEXT.md index ac37fa8271..2c58321389 100644 --- a/CHANGELOG_NEXT.md +++ b/CHANGELOG_NEXT.md @@ -1,85 +1,13 @@ ## 2.1.0-next.7 (2023-09-29) - #### Features -* **admin-ui** Add data table filter presets functionality ([a656ef2](https://github.com/vendure-ecommerce/vendure/commit/a656ef2)) -* **admin-ui** Add filter preset support to Collection list ([cbfb402](https://github.com/vendure-ecommerce/vendure/commit/cbfb402)) -* **admin-ui** Add image carousel to asset preview dialog (#2370) ([cd7b2bf](https://github.com/vendure-ecommerce/vendure/commit/cd7b2bf)), closes [#2370](https://github.com/vendure-ecommerce/vendure/issues/2370) [#2129](https://github.com/vendure-ecommerce/vendure/issues/2129) -* **admin-ui** Add initial React support for UI extensions ([1075dd7](https://github.com/vendure-ecommerce/vendure/commit/1075dd7)) -* **admin-ui** Add more native React UI components ([04e03f8](https://github.com/vendure-ecommerce/vendure/commit/04e03f8)) * **admin-ui** Add Persian/Farsi i18n messages (#2418) ([1193863](https://github.com/vendure-ecommerce/vendure/commit/1193863)), closes [#2418](https://github.com/vendure-ecommerce/vendure/issues/2418) -* **admin-ui** Add useRouteParams react hook ([b63fb7f](https://github.com/vendure-ecommerce/vendure/commit/b63fb7f)) -* **admin-ui** Admin UI rtl with Arabic translation improvements (#2322) ([44ea12b](https://github.com/vendure-ecommerce/vendure/commit/44ea12b)), closes [#2322](https://github.com/vendure-ecommerce/vendure/issues/2322) -* **admin-ui** Allow custom components in data table columns ([d3474dd](https://github.com/vendure-ecommerce/vendure/commit/d3474dd)), closes [#2347](https://github.com/vendure-ecommerce/vendure/issues/2347) [#2353](https://github.com/vendure-ecommerce/vendure/issues/2353) -* **admin-ui** Allow custom React components in data table columns ([5cde775](https://github.com/vendure-ecommerce/vendure/commit/5cde775)), closes [#2347](https://github.com/vendure-ecommerce/vendure/issues/2347) [#2353](https://github.com/vendure-ecommerce/vendure/issues/2353) -* **admin-ui** Display original quantity after order has been modified ([a36c6e0](https://github.com/vendure-ecommerce/vendure/commit/a36c6e0)) -* **admin-ui** Expose providers to nav menu routerLink function ([1bae40e](https://github.com/vendure-ecommerce/vendure/commit/1bae40e)) -* **admin-ui** Implement custom components in Collection data table ([4ab7c1e](https://github.com/vendure-ecommerce/vendure/commit/4ab7c1e)) -* **admin-ui** Implement drag-and-drop reorder of filter presets ([8e06705](https://github.com/vendure-ecommerce/vendure/commit/8e06705)) -* **admin-ui** Implement filter preset renaming ([8b52e6f](https://github.com/vendure-ecommerce/vendure/commit/8b52e6f)) -* **admin-ui** Implement job queue filtering by status ([baeb036](https://github.com/vendure-ecommerce/vendure/commit/baeb036)) -* **admin-ui** Implement react Card component ([c588a1f](https://github.com/vendure-ecommerce/vendure/commit/c588a1f)) -* **admin-ui** Implement relative date filtering ([d07a5f3](https://github.com/vendure-ecommerce/vendure/commit/d07a5f3)) -* **admin-ui** Implement simplified API for UI route extensions ([b9ca367](https://github.com/vendure-ecommerce/vendure/commit/b9ca367)) -* **admin-ui** Implement values pagination for Facet detail view ([4cf1826](https://github.com/vendure-ecommerce/vendure/commit/4cf1826)), closes [#1257](https://github.com/vendure-ecommerce/vendure/issues/1257) -* **admin-ui** Improve dev mode extension point display ([4678930](https://github.com/vendure-ecommerce/vendure/commit/4678930)) -* **admin-ui** Improve naming & layout of catalog & stock locations ([8452300](https://github.com/vendure-ecommerce/vendure/commit/8452300)) -* **admin-ui** Improved control over ActionBar buttons ([065a2b4](https://github.com/vendure-ecommerce/vendure/commit/065a2b4)) -* **admin-ui** Initial support for React UI extensions ([83d5756](https://github.com/vendure-ecommerce/vendure/commit/83d5756)) -* **admin-ui** Style improvements to table and form input borders ([5287287](https://github.com/vendure-ecommerce/vendure/commit/5287287)) -* **admin-ui** Support for React-based custom detail components ([55d9ffc](https://github.com/vendure-ecommerce/vendure/commit/55d9ffc)) -* **admin-ui** Update to Angular v16.2 ([608d5d3](https://github.com/vendure-ecommerce/vendure/commit/608d5d3)) -* **cli** Implement plugin scaffold command ([a6df4c1](https://github.com/vendure-ecommerce/vendure/commit/a6df4c1)) -* **cli** Include custom CRUD permissions with plugin scaffold ([0c62b6f](https://github.com/vendure-ecommerce/vendure/commit/0c62b6f)) -* **core** Add `Facet.valueList` resolver for paginated values ([09c7175](https://github.com/vendure-ecommerce/vendure/commit/09c7175)), closes [#1257](https://github.com/vendure-ecommerce/vendure/issues/1257) -* **core** Add maximum coupon usage (#2331) ([bdd2720](https://github.com/vendure-ecommerce/vendure/commit/bdd2720)), closes [#2331](https://github.com/vendure-ecommerce/vendure/issues/2331) [#2330](https://github.com/vendure-ecommerce/vendure/issues/2330) -* **core** Pass variant to ProductVariantPriceCalculationStrategy ([fee995c](https://github.com/vendure-ecommerce/vendure/commit/fee995c)), closes [#2398](https://github.com/vendure-ecommerce/vendure/issues/2398) -* **core** Support bi-directional relations in customFields (#2365) ([0313ce5](https://github.com/vendure-ecommerce/vendure/commit/0313ce5)), closes [#2365](https://github.com/vendure-ecommerce/vendure/issues/2365) -* **core** Update NestJS to v10, Apollo Server v4 ([b675fda](https://github.com/vendure-ecommerce/vendure/commit/b675fda)) -* **create** Allow selection of package manager ([6561bb7](https://github.com/vendure-ecommerce/vendure/commit/6561bb7)) -* **create** Better defaults for project scaffold ([fa683e7](https://github.com/vendure-ecommerce/vendure/commit/fa683e7)) -* **email-plugin** Expose template vars to template loader (#2243) ([78ea016](https://github.com/vendure-ecommerce/vendure/commit/78ea016)), closes [#2243](https://github.com/vendure-ecommerce/vendure/issues/2243) [#2242](https://github.com/vendure-ecommerce/vendure/issues/2242) -* **job-queue-plugin** Implement default cleanup of old BullMQ jobs ([6c1d7bb](https://github.com/vendure-ecommerce/vendure/commit/6c1d7bb)), closes [#1425](https://github.com/vendure-ecommerce/vendure/issues/1425) -* **payments-plugin** Allow custom params to be passed to Stripe API ([1b29097](https://github.com/vendure-ecommerce/vendure/commit/1b29097)), closes [#2412](https://github.com/vendure-ecommerce/vendure/issues/2412) -* **ui-devkit** Add experimental wrapper for shared ui providers ([daf6f8c](https://github.com/vendure-ecommerce/vendure/commit/daf6f8c)) #### Fixes -* **admin-ui** Add custom field support to Customer list ([97ba022](https://github.com/vendure-ecommerce/vendure/commit/97ba022)) -* **admin-ui** Correct handling of ID filters in data tables ([0e05496](https://github.com/vendure-ecommerce/vendure/commit/0e05496)) -* **admin-ui** Correctly display job retries ([d3107fd](https://github.com/vendure-ecommerce/vendure/commit/d3107fd)), closes [#1467](https://github.com/vendure-ecommerce/vendure/issues/1467) -* **admin-ui** Data table filters react to page navigation ([39832bd](https://github.com/vendure-ecommerce/vendure/commit/39832bd)) -* **admin-ui** Fix channel switcher icon style ([7f30361](https://github.com/vendure-ecommerce/vendure/commit/7f30361)) -* **admin-ui** Fix component for new Angular extension route API ([6fe1bd0](https://github.com/vendure-ecommerce/vendure/commit/6fe1bd0)) -* **admin-ui** Fix error when data table filters not defined ([2425a33](https://github.com/vendure-ecommerce/vendure/commit/2425a33)) -* **admin-ui** Fix styling of custom field tabs ([57f47df](https://github.com/vendure-ecommerce/vendure/commit/57f47df)) -* **admin-ui** Give all data table columns immutable ids ([73a78db](https://github.com/vendure-ecommerce/vendure/commit/73a78db)) -* **admin-ui** Improve RTL styles ([056d205](https://github.com/vendure-ecommerce/vendure/commit/056d205)) -* **admin-ui** Limit FacetValues in Facet list component ([b445955](https://github.com/vendure-ecommerce/vendure/commit/b445955)), closes [#1257](https://github.com/vendure-ecommerce/vendure/issues/1257) -* **admin-ui** Use correct defaults for nullable custom fields (#2360) ([88430e5](https://github.com/vendure-ecommerce/vendure/commit/88430e5)), closes [#2360](https://github.com/vendure-ecommerce/vendure/issues/2360) -* **core** Downgrade ForbiddenError from Error to Warn log level ([c186392](https://github.com/vendure-ecommerce/vendure/commit/c186392)), closes [#2383](https://github.com/vendure-ecommerce/vendure/issues/2383) -* **core** Export EntityId and Money decorators ([4664dee](https://github.com/vendure-ecommerce/vendure/commit/4664dee)) -* **core** Fix channel association on promotion update (#2376) ([e1ff2c7](https://github.com/vendure-ecommerce/vendure/commit/e1ff2c7)), closes [#2376](https://github.com/vendure-ecommerce/vendure/issues/2376) -* **core** Fix circular dependency issue in SQLiteSearchStrategy ([f2e2e32](https://github.com/vendure-ecommerce/vendure/commit/f2e2e32)) -* **core** Fix resolution of facet valueList for postgres ([1d8fe47](https://github.com/vendure-ecommerce/vendure/commit/1d8fe47)) -* **job-queue-plugin** Correct behaviour of job list query with BullMQ ([c148a92](https://github.com/vendure-ecommerce/vendure/commit/c148a92)), closes [#2120](https://github.com/vendure-ecommerce/vendure/issues/2120) [#1327](https://github.com/vendure-ecommerce/vendure/issues/1327) -* **job-queue-plugin** Correct retry setting for BullMQ jobs ([972ba0e](https://github.com/vendure-ecommerce/vendure/commit/972ba0e)), closes [#1467](https://github.com/vendure-ecommerce/vendure/issues/1467) -* **ui-devkit** Fix scaffold logic for custom providers ([2f2ddb5](https://github.com/vendure-ecommerce/vendure/commit/2f2ddb5)) +* **core** Fix discount calculation error edge-case ([7549aad](https://github.com/vendure-ecommerce/vendure/commit/7549aad)), closes [#2385](https://github.com/vendure-ecommerce/vendure/issues/2385) - -### BREAKING CHANGE - -* In the Admin UI, the "stock locations" list and detail views -have been moved from the "catalog" module to the "settings" module. Also, the -menu item & breadcrumb for "inventory" has been renamed to "products". - -This is an end-user breaking change rather than a code breaking change. Any UI -extensions that link to a `/catalog/inventory/...` route will still work as there -is a redirect in place to `/catalog/products/...`. -* The update of Apollo Server to v4 includes some breaking changes if you have -defined any custom ApolloServerPlugins. See the Apollo migration guide for full details: -https://www.apollographql.com/docs/apollo-server/migration/ ## 2.1.0-next.6 (2023-09-27) diff --git a/docs/docs/guides/developer-guide/cli/index.md b/docs/docs/guides/developer-guide/cli/index.md new file mode 100644 index 0000000000..07e750a23a --- /dev/null +++ b/docs/docs/guides/developer-guide/cli/index.md @@ -0,0 +1,53 @@ +--- +title: "CLI" +--- + +The Vendure CLI is a command-line tool for boosting your productivity as a developer. + +Currently, it provides functionality for rapidly scaffolding a new plugin, and in future we will be expanding the capabilities to include other common tasks. + +:::info +The Vendure CLI package was introduced with Vendure v2.1.0 +::: + +## Installation + +You can install the CLI locally in your Vendure project, or you can run it without installation using `npx`. The advantage of installing locally is that you can more easily control the installed version, and you can reference the CLI using the `vendure` command. + +```bash +npm install -D @vendure/cli + +# or + +yarn add -D @vendure/cli +``` + +and then from your project directory you can run: + +```bash +vendure --version +``` + +### Running without installation + +If you want to use the Vendure CLI without installing it in your project, you can run + +```bash +npx @vendure/cli --version +``` + +## Scaffold a new plugin + +The Vendure CLI can be used to quickly scaffold a new [plugin](/guides/developer-guide/plugins). + +1. Navigate to your plugins directory + ```bash + cd src/plugins + ``` +2. Run the `new plugin` command + ```bash + vendure new plugin + ``` +3. Answer the questions to configure your new plugin + +![Plugin creation flow](./new-plugin.webp) diff --git a/docs/docs/guides/developer-guide/cli/new-plugin.webp b/docs/docs/guides/developer-guide/cli/new-plugin.webp new file mode 100644 index 0000000000..48e60b27d4 Binary files /dev/null and b/docs/docs/guides/developer-guide/cli/new-plugin.webp differ diff --git a/docs/docs/guides/developer-guide/custom-fields/index.md b/docs/docs/guides/developer-guide/custom-fields/index.md index fdb9f4044e..9241b16f69 100644 --- a/docs/docs/guides/developer-guide/custom-fields/index.md +++ b/docs/docs/guides/developer-guide/custom-fields/index.md @@ -868,7 +868,7 @@ const config = { }; ``` -In the above example, the `CmsArticle` entity is being used as a related entity. Howeer, the GraphQL type name is `BlogPost`, so we must specify this in the `graphQLType` property, otherwise Vendure will try to extend the GraphQL schema with reference to a non-existent "CmsArticle" type. +In the above example, the `CmsArticle` entity is being used as a related entity. However, the GraphQL type name is `BlogPost`, so we must specify this in the `graphQLType` property, otherwise Vendure will try to extend the GraphQL schema with reference to a non-existent "CmsArticle" type. ### `inverseSide` diff --git a/docs/docs/guides/developer-guide/migrations/index.md b/docs/docs/guides/developer-guide/migrations/index.md index e5dad5fa3d..1f5dd494c6 100644 --- a/docs/docs/guides/developer-guide/migrations/index.md +++ b/docs/docs/guides/developer-guide/migrations/index.md @@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem'; Database migrations are needed whenever the database schema changes. This can be caused by: -* changes to the [custom fields](/guides/developer-guide/custom-fields/) configuration. +* changes to the [custom fields](/guides/developer-guide/custom-fields/) configuration * new [database entities defined by plugins](/guides/developer-guide/database-entity//) * occasional changes to the core Vendure database schema when updating to newer versions diff --git a/docs/docs/guides/developer-guide/overview/index.md b/docs/docs/guides/developer-guide/overview/index.md index 05a86e0120..2fff5d6d84 100644 --- a/docs/docs/guides/developer-guide/overview/index.md +++ b/docs/docs/guides/developer-guide/overview/index.md @@ -13,7 +13,7 @@ These are the major parts of a Vendure application: * **Server**: The Vendure server is the part that handles requests coming in to the GraphQL APIs. It serves both the [Shop API](/reference/graphql-api/shop/queries) and [Admin API](/reference/graphql-api/admin/queries), and can send jobs to the Job Queue to be processed by the Worker. * **Worker**: The Worker runs in the background and deals with tasks such as updating the search index, sending emails, and other tasks which may be long-running, resource-intensive or require retries. -* **Admin UI**: The Admin UI is how shop administrators manage orders, customers, products, settings and so on. It is not actually part of the Vendure core, but is provided as a plugin (the [AdminUiPlugin](/reference/core-plugins/admin-ui-plugin/)) which is installed for you in a standard Vendure installation. The Admin UI can be further extended to support custom functionality, as detailed in the +* **Admin UI**: The Admin UI is how shop administrators manage orders, customers, products, settings and so on. It is not actually part of the Vendure core, but is provided as a plugin (the [AdminUiPlugin](/reference/core-plugins/admin-ui-plugin/)) which is installed for you in a standard Vendure installation. The Admin UI can be further extended to support custom functionality, as detailed in the [Extending the Admin UI](/guides/extending-the-admin-ui/getting-started/) section * **Storefront**: With headless commerce, you are free to implement your storefront exactly as you see fit, unconstrained by the back-end, using any technologies that you like. To make this process easier, we have created a number of [storefront starter kits](/guides/storefront/storefront-starters/), as well as [guides on building a storefront](/guides/storefront/connect-api/). ![./Vendure_docs-architecture.webp](./Vendure_docs-architecture.webp) diff --git a/docs/docs/guides/developer-guide/plugins/index.mdx b/docs/docs/guides/developer-guide/plugins/index.mdx index 8b66ebdfc0..93c9469de3 100644 --- a/docs/docs/guides/developer-guide/plugins/index.mdx +++ b/docs/docs/guides/developer-guide/plugins/index.mdx @@ -154,6 +154,8 @@ For any unit of functionality that you need to add to your project, you'll be wr :::info For a complete working example of a Vendure plugin, see the [real-world-vendure Reviews plugin](https://github.com/vendure-ecommerce/real-world-vendure/tree/master/src/plugins/reviews) +You can also use the [Vendure CLI](/guides/developer-guide/cli) to quickly scaffold a new plugin. + If you intend to write a shared plugin to be distributed as an npm package, see the [vendure plugin-template repo](https://github.com/vendure-ecommerce/plugin-template) ::: diff --git a/docs/docs/guides/developer-guide/the-service-layer/index.mdx b/docs/docs/guides/developer-guide/the-service-layer/index.mdx index 2bed39c98f..5c96bd3809 100644 --- a/docs/docs/guides/developer-guide/the-service-layer/index.mdx +++ b/docs/docs/guides/developer-guide/the-service-layer/index.mdx @@ -17,7 +17,7 @@ follow all the rules of NestJS providers, including dependency injection, scopin Services are generally scoped to a specific domain or entity. For instance, in the Vendure core, there is a [`Product` entity](/reference/typescript-api/entities/product), and a corresponding [`ProductService`](/reference/typescript-api/services/product-service) which contains all the methods for interacting with products. -Here's a simplified example of a the `ProductService`, including an implementation of the `findOne()` method that was +Here's a simplified example of a `ProductService`, including an implementation of the `findOne()` method that was used in the example in the [previous section](/guides/developer-guide/the-api-layer/#resolvers): ```ts title="src/services/product.service.ts" diff --git a/docs/docs/guides/developer-guide/updating/index.md b/docs/docs/guides/developer-guide/updating/index.md index b8a992fe0e..65caeee02a 100644 --- a/docs/docs/guides/developer-guide/updating/index.md +++ b/docs/docs/guides/developer-guide/updating/index.md @@ -33,15 +33,21 @@ Then run `npm install` or `yarn install` depending on which package manager you If you are using UI extensions to create your own custom Admin UI using the [`compileUiExtensions`](/reference/admin-ui-api/ui-devkit/compile-ui-extensions/) function, then you'll need to **delete and re-compile your admin-ui directory after upgrading** (this is the directory specified by the [`outputPath`](/reference/admin-ui-api/ui-devkit/ui-extension-compiler-options#outputpath) property). -## Breaking changes +## Versioning Policy & Breaking changes -Vendure follows the [SemVer convention](https://semver.org/) for version numbering. This means that breaking changes will only be introduced with changes to the major version (the first of the 3 digits in the version). +Vendure generally follows the [SemVer convention](https://semver.org/) for version numbering. This means that breaking API changes will only be introduced with changes to the major version (the first of the 3 digits in the version). -However, we will occasionally upgrade underlying dependencies on minor versions, which may also require changes to your code in certain circumstances. If so, this will -also be clearly noted in the changelog. +However, there are some exceptions to this rule: + +- In minor versions, (e.g. v2.0 to v2.1) we may update underlying dependencies to new major versions, which may in turn introduce breaking changes. These will be clearly noted in the changelog. +- In minor versions we may also occasionally introduce non-destructive changes to the database schema. For instance, we may add a new column which would then require a database migration. We will _not_ introduce database schema changes that could potentially result in data loss in a minor version. + +Any instances of these exceptions will be clearly indicated in the [Changelog](https://github.com/vendure-ecommerce/vendure/blob/master/CHANGELOG.md). The reasoning for these exceptions is discussed in the [Versioning policy RFC](https://github.com/vendure-ecommerce/vendure/issues/1846). ### What kinds of breaking changes can be expected? +Major version upgrades (e.g. v1.x to v2.x) can include: + * Changes to the database schema * Changes to the GraphQL schema * Updates of major underlying libraries, such as upgrading NestJS to a new major version diff --git a/docs/docs/guides/extending-the-admin-ui/admin-ui-theming-branding/index.md b/docs/docs/guides/extending-the-admin-ui/admin-ui-theming-branding/index.md index 37fbbc6096..6897489caa 100644 --- a/docs/docs/guides/extending-the-admin-ui/admin-ui-theming-branding/index.md +++ b/docs/docs/guides/extending-the-admin-ui/admin-ui-theming-branding/index.md @@ -108,7 +108,7 @@ Some customizable styles in [Clarity](https://clarity.design/), the Admin UI's u ```css title="my-variables.scss" $clr-header-height: 4rem; ``` -3. Set this as a sassVariableOverrides extension: +3. Set this as a `sassVariableOverrides` extension: ```ts title="src/vendure-config.ts" import path from 'path'; import { AdminUiPlugin } from '@vendure/admin-ui-plugin'; @@ -130,4 +130,4 @@ Some customizable styles in [Clarity](https://clarity.design/), the Admin UI's u } ``` -globalStyles and sassVariableOverrides extensions can be used in conjunction or separately. +`globalStyles` and `sassVariableOverrides` extensions can be used in conjunction or separately. diff --git a/docs/docs/guides/extending-the-admin-ui/getting-started/index.md b/docs/docs/guides/extending-the-admin-ui/getting-started/index.md index 285c972612..ee58610e14 100644 --- a/docs/docs/guides/extending-the-admin-ui/getting-started/index.md +++ b/docs/docs/guides/extending-the-admin-ui/getting-started/index.md @@ -20,14 +20,23 @@ UI extensions fall into two categories: To extend the Admin UI, install the [`@vendure/ui-devkit` package](https://www.npmjs.com/package/@vendure/ui-devkit) as a dev dependency: + + + ```bash -yarn add --save-dev @vendure/ui-devkit +npm install --save-dev @vendure/ui-devkit +``` -# or + + -npm install --save-dev @vendure/ui-devkit +```bash +yarn add --save-dev @vendure/ui-devkit ``` + + + You can then create the following folder structure to hold your UI extensions: ``` @@ -274,10 +283,23 @@ compileUiExtensions({ This can then be run from the command line: + + + +```bash +npm run ts-node compile-admin-ui.ts +``` + + + + ```bash yarn ts-node compile-admin-ui.ts ``` + + + Once complete, the production-ready app bundle will be output to `admin-ui/dist`. This method is suitable for a production setup, so that the Admin UI can be compiled ahead-of-time as part of your deployment process. This ensures that your Vendure server starts up as quickly as possible. In this case, you can pass the path of the compiled app to the AdminUiPlugin: ```ts title="src/vendure-config.ts" @@ -314,10 +336,23 @@ To compile the angular app ahead of time (for production) and copy the dist fold "build:admin" will remove the admin-ui folder and run the compileUiExtensions function to generate the admin-ui Angular app. Make sure to install copyfiles before running the "copy" command: + + + +```bash +npm install copyfiles +``` + + + + ```bash -yarn install copyfiles +yarn add copyfiles ``` + + + ::: ## Using other frameworks @@ -478,7 +513,7 @@ export const config: VendureConfig = { If you have existing UI extensions written using the legacy API, you can migrate them to the new API as follows: -1. Convert all components to be [standalone components](https://angular.io/guide/standalone-components). Standalone components were introduced in recent versions of Angular and allow components to be defined without the need for a module. To convert an existing component, you need to set `standalone: true` and add an `imports` array containing any components, directives or pipes you are using in that component. Typically you can import `SharedModule` to get access to all the common Angular directives and pipes, as well as the shared Admin UI components. +1. Convert all components to be [standalone components](https://angular.io/guide/standalone-components). Standalone components were introduced in recent versions of Angular and allow components to be defined without the need for a module. To convert an existing component, you need to set `standalone: true` and add an `imports` array containing any components, directives or pipes you are using in that component. Typically, you can import `SharedModule` to get access to all the common Angular directives and pipes, as well as the shared Admin UI components. ```ts import { Component } from '@angular/core'; // highlight-next-line @@ -496,6 +531,18 @@ If you have existing UI extensions written using the legacy API, you can migrate greeting = 'Hello!'; } ``` -2. Remove any `NgModule` files, and replace lazy modules with `routes.ts`, and shared modules with `providers.ts` (see above). - +2. In templates for page components, remove the `` and `` components, as they are included by default now when using +the `registeRouteComponent()` function: + ```html + // highlight-start + + + + + // highlight-end + This content should remain + // highlight-next-line + + ``` +3. Remove any `NgModule` files, and replace lazy modules with `routes.ts`, and shared modules with `providers.ts` (see above). diff --git a/docs/docs/guides/extending-the-admin-ui/ui-library/index.md b/docs/docs/guides/extending-the-admin-ui/ui-library/index.md index 00b050a67d..08bc94cc05 100644 --- a/docs/docs/guides/extending-the-admin-ui/ui-library/index.md +++ b/docs/docs/guides/extending-the-admin-ui/ui-library/index.md @@ -121,22 +121,22 @@ import { CdsIcon } from '@vendure/admin-ui/react'; export function DemoComponent() { return ( <> - - - - - - + + + + + + - - - - + + + + - - - - + + + + ); } @@ -207,12 +207,12 @@ export function DemoComponent() { - +