@scayle/storefront-nuxt
7.95.0
Minor Changes
- Move test factories to separate entry point. They are now available via
@scayle/storefront-nuxt/dist/test/factories
(or@scayle/storefront-nuxt/test/factories
whenmoduleResolution
is set toBundler
.
The location of the test factories within the@scayle/storefront-nuxt
entry point unintentionally caused them to be included in the client build. This resulted in an error because the client build attempted to import the default export oflodash.mergewith
, which is not available.
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.94.7
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.94.6
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.94.5
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.94.4
Patch Changes
- Updated dependency
@scayle/[email protected]
to@scayle/[email protected]
Dependencies
- Updated dependency to @scayle/[email protected]
7.94.3
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.94.2
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.94.1
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.94.0
Minor Changes
- Move
vitest
to dev dependencies
Patch Changes
- Removed dependency
[email protected]
- Add
useNavigationTreeById
anduseNavigationTreeByName
to the list of keyed composables
7.93.0
Minor Changes
- Test factories are now exported via package source root (
./src/index.ts
). Now, all test factories can be imported as follows:import { categoryFactory } from '@scayle/storefront-nuxt'
- Add
product
,variant
,price
,attribute
androute
test factories.
Patch Changes
- Added dependency
[email protected]
7.92.0
Minor Changes
- Add nitropack as a peer dependency
Patch Changes
- Removed dependency
nitropack@^2.9.7
Dependencies
- Updated dependency to @scayle/[email protected]
7.91.0
Minor Changes
- Remove
category
utils
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.90.0
Minor Changes
- Fix RPC context test factory
Log
import
7.89.0
Minor Changes
- Add
category
test factory and expose all test factories. Moreover,fishery
has been added to thepeerDependencies
as it is main dependency for the test factories. They can be used as follows:import { categoryFactory } from '@scayle/storefront-nuxt/test-factories' categoryFactory.build()
- Introduce
seo
andcategory
utilities within the module and expose them as externals. The category utilities consist of various functions that manage category tree-structured data. The SEO utilities focus primarily on generating schemas and manipulating URLs for SEO purposes.
They are exposed externally and can be used as follows:import { sanitizeCanonicalURL } from '@scayle/storefront-nuxt' sanitizeCanonicalURL('/en/women-2045')
Patch Changes
- Added dependency
[email protected]
- Updated dependency
ufo@^1.5.3
toufo@^1.5.4
Dependencies
- Updated dependency to @scayle/[email protected]
7.88.1
Patch Changes
- Updated dependency
@vueuse/[email protected]
to@vueuse/[email protected]
- Handle error when reading from or saving to the redirect cache
With this change, when the application fails to read from the redirect cache it will log the error and fallback to using the SAPI endpoint.
Dependencies
- Updated dependency to @scayle/[email protected]
7.88.0
Minor Changes
- Add
useNavigationTreeByName
anduseNavigationTreeById
composables. DeprecateuseNavigationTree
composable in favor ofuseNavigationTreeById
.
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.87.2
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.87.1
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.87.0
Minor Changes
- Added export entry for "./composables".
Composables can now be directly imported using:import { useCurrentShop } from '@scayle/storefront-nuxt/composables';
7.86.0
Minor Changes
- Add
formatPercentage
touseFormatHelpers.ts
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.16
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.15
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.14
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.13
Patch Changes
- Updated dependency
@scayle/h3-session@^0.4.0
to@scayle/h3-session@^0.4.1
- Updated dependency
@scayle/unstorage-compression-driver@^0.1.3
to@scayle/unstorage-compression-driver@^0.1.4
7.85.12
Patch Changes
- Support passing an internal access header
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.11
Patch Changes
- Update @nuxt/module-builder to 0.8.4
7.85.10
Patch Changes
- Update @nuxt/module-builder to 0.7.1
7.85.9
Patch Changes
- Update @nuxt/module-builder to 0.6.0
7.85.8
Patch Changes
- Correct the types of
useOrder
anduseOrderConfirmation
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.7
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.6
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.5
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.4
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.3
Patch Changes
- Replaced
radash
utils with custom native implementations - Replace
yn
with customstringToBoolean
utility function. NOTE: As the parsing of boolean environment values has been changed, this might have unwanted effects if the respective values have been incorrectly defined within the environment.
Dependencies
- Updated dependency to @scayle/[email protected]
7.85.2
Patch Changes
- Fixed bootstrap middleware logging
[object Object]
by providing an appropriate log message and passing the object as optional data parameter
7.85.1
Patch Changes
- Fix
@vueuse/core
version to11.0.3
7.85.0
Minor Changes
- Fix typing when using
transform
,default
orpick
in RPC composables
NOTE: This update corrects some broken typings and as a result may require some code changes. Previously many composables asserted that the default value would match the response value even when relying on the fallback default
factory function: () => null
. Due to this, the data
property would be typed as Ref<T>
even when it would be Ref<null>
in case of error on a still pending request. The types have now been corrected to respect the default
factory function's return and accurately represent the behavior. This means that you may have to add additional null checks in your code for typechecking to pass.
For example:
In 7.84.6
useBrand({
params: { brandId: 1 },
}).data satisfies Ref<Brand>
useBrand({
params: { brandId: 1 },
options: {
pick: ['id', 'isActive'],
},
}).data satisfies Ref<Brand>
useBrand({
params: { brandId: 1 },
options: {
transform: (brand) => brand.slug,
},
}).data satisfies Ref<Brand>
useBrand({
params: { brandId: 1 },
options: {
default: () => 'Brand not found',
},
}).data satisfies Ref<Brand>
In 7.85.0
useBrand({
params: { brandId: 1 },
}).data satisfies Ref<Brand | null>
useBrand({
params: { brandId: 1 },
options: {
pick: ['id', 'isActive'],
},
}).data satisfies Ref<Pick<Brand, 'id' | 'isActive'> | null>
useBrand({
params: { brandId: 1 },
options: {
transform: (brand) => brand.slug,
},
}).data satisfies Ref<string | null>
useBrand({
params: { brandId: 1 },
options: {
default: () => 'Brand not found',
},
}).data satisfies Ref<Brand | string>
For more details on useAsyncData
usage check out the Nuxt Docs
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.84.6
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.84.5
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.84.4
Patch Changes
- Improve type definitions for exported composables
7.84.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.84.2
Patch Changes
- Add support for removing basket items using their item key
- Updated dependencies
- @scayle/[email protected]
7.84.1
Patch Changes
- Improve typing of
H3EventContext
andSession.data
7.84.0
Minor Changes
- Migrate from
ModuleBaseOptions.stores
toModuleBaseOptions.shops
7.83.0
Minor Changes
- Introduce
disableDefaultGetCachedDataOverride
flag in the public runtime configuration. Setting this to true preventsuseRpc
from sharing data across multiple instances. Important: ThedisableDefaultGetCachedDataOverride
flag currently does not affect theuseUser
,useBasket
, anduseWishlist
composables. These composables will continue to share a common cache even whendisableDefaultGetCachedDataOverride
is set to true. - Deprecate
useQueryFilterState
in the@scayle/storefront-nuxt
package
Patch Changes
- Remove
shopCampaignKeyword
from ShopConfigSchema - Migrate from using
RpcContext.bapiClient
to usingRpcContext.sapiClient
- Updated dependencies
- @scayle/[email protected]
7.82.2
Patch Changes
- Fix types of
useBasket
composable - Fix types for more composables
- Migrate from using
RpcContext.bapiClient
to usingRpcContext.sapiClient
- Updated dependencies
- @scayle/[email protected]
7.82.1
Patch Changes
- Fix types of
useBasket
composable - Updated dependencies
- @scayle/[email protected]
7.82.0
Minor Changes
- Add new
useRpcCall
composable to make imperative RPC calls more ergonomic<script lang="ts" setup> const getConfig = useRpcCall('getShopConfiguration) const getProduct = useRpcCall('getProductById') const config = await getConfig() const product = await getProduct({ id: 1 }) </script>
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.81.0
Minor Changes
- Support enabling or disabling optional server-side plugins
Plugins with optional behavior can now be disabled at build time throughenv
variables.SFC_PLUGIN_CONFIG_VALIDATION_ENABLED
This plugin executes during app startup and validates the runtime config, exiting with an error if a problem is found. It is enabled by default and can be disabled by setting this variable tofalse
.SFC_PLUGIN_POWERED_BY_ENABLED
This plugin sets theX-Powered-By-Header
on every HTTP response to incude SCAYLE. It is enabled by default and can be disabled by setting this variable tofalse
.SFC_PLUGIN_RUNTIME_PERFORMANCE_ENABLED
This plugin improves performance by computing the runtime configuration at startup rather than for every request. It is enabled by default and can be disabled by setting this variable tofalse
.
- Add a plugin to cache the runtime config
This change adds a Nitro plugin to calculate the runtime config at startup, rather than for every requests. It offers significant performance improvements for large runtime configs.
Patch Changes
- Add import for runtimeConfig plugin
- Revert type of
publicShopData
tostring[]
7.80.0
Minor Changes
- Do not set session cookie for cached pages
Patch Changes
- Updated to
[email protected]
- Fix the the type off
publicShopData
in the config. This restores it to(keyof ShopConfig)[]
instead ofstring[]
, allowing its elements to be used to index aShopConfig
7.79.1
Patch Changes
- Import
useNitroApp
from#imports
7.79.0
Minor Changes
- Add hooks before and after RPC execution (
storefront:rpc:before
andstorefront:rpc:after
) and when an RPC fails (storefront:rpc:error
)
These hooks allow you to execute extra logic before/after executing an RPC and even alter the properties of the RPC context/result.
Hooks can be registered by adding a nitro plugin inside ´server/plugins/´:import { defineNitroPlugin } from '#imports' export default defineNitroPlugin((nitroApp) => { nitroApp.hooks.hook('storefront:rpc:before', (rpcName, rpcContext) => { rpcContext.log.debug(`Before: ${rpcName}`) }) nitroApp.hooks.hook( 'storefront:rpc:after', (rpcName, rpcContext, result) => { rpcContext.log.debug(`After: ${rpcName} returned ${result}`) }, ) nitroApp.hooks.hook( 'storefront:rpc:error', (rpcName, rpcContext, error) => { rpcContext.log.error(`ERROR: ${rpcName} did throw ${error}`) }, ) })
AddedcallHook
,callHookParallel
andcallHookWith
toRpcContext
to allow triggering hooks within RPCs
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.78.1
Patch Changes
- Import
useNitroApp
from#imports
7.78.0
Minor Changes
- Support shops with multiple paths
Thepath
property in the shop config can now be defined as an array of strings. If this is the case, multiple path prefixes will point to the same shop. For example, with the config{ path: ['en', 'en-US'], shopId: 1001 }
bothexample.com/en
andexample.com/en-US
will use shop 1001. Because it is the same shop,/en
and/en-US
will have the same locale and share user sessions, baskets and wishlists. The first path in the array will be considered the default path and used for API calls.
7.77.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.77.2
Patch Changes
- Fix basket count calculation for basktets including item groups
7.77.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.77.0
Minor Changes
- Add default
getCachedData
implementation touseRpc
The default implementation looks like this:getCachedData(key, nuxtApp) { return nuxtApp._asyncData[key]?.data.value as TResult },
compared to the default inuseAsyncData
getCachedData(key, nuxtApp) { const hydrationData = nuxtApp.isHydrating ? nuxtApp.payload.data[key] : nuxtApp.static.data[key] return hydrationData ?? nuxtApp._asyncData[key]?.data.value as TResult }
With this change multiple calls to the same composable with the same key will reference the cache. Previously, for every call of a composable a request would be sent except in hydration. This should be more similar to the pre-7.75.0 behavior.
ThegetCachedData
implementation can be overridden when callinguseRpc
or any related composable.
7.76.6
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.76.5
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.76.4
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.76.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.76.2
Patch Changes
- Updated to
[email protected]
- Updated to
[email protected]
7.76.1
Patch Changes
useRpc
will watch nowparams
if it is a getter or ref, whereas previously it would only watch for refs
7.76.0
Minor Changes
useOrder
useOrderConfirmation
anduseIDP
are now optionally awaitable
7.75.1
Patch Changes
- Add
immediate
option touseUser
and deprecateautoFetch
- Log warning when deprecated
autoFetch
option is used
7.75.0
Minor Changes
- Configure
keyedComposables
to automatically create keys foruseRpc
wrapping composables instead of relying on hardcoded defaults - Export the
extendPromise
util - Restore the
useAsyncData
implementation ofuseRpc
Originally,useRpc
was based onuseAsyncData
but in order to fix an issue with wishlists, we restricted the API and changed it to a rough emulation ofuseAsyncData
. Because this emulation was similar, but not the same asuseAsyncData
it caused additional confusion. This change brings back theuseAsyncData
implementation.
For developers, this means thatuseRpc
will behave in the same manner asuseAsyncData
, be subject to the same restrictions and allow the same options.
This also means thatuseRpc
is now optionally awaitable.const { data } = await useRpc()
now works as well asconst { data } = useRpc()
. The difference is that the former will wait for the data to load, while the latter will initially be set to the default value.
Composables which are simply wrappers arounduseRpc
also inherit this new behavior. They accept the same options asuseAsyncData
, return the same properties (and possibly some additional ones) and are optionally awaitable.
This includes the following composables:useBrand
useBrands
useCategories
useCategoryById
useCategoryByPath
useCurrentPromotions
useFilters
useNavigationTree
useNavigationTrees
useProduct
useProducts
useProductsByIds
useProductsByReferenceKeys
useProductsCount
usePromotions
usePromotionsByIds
useShopConfiguration
useUserAddresses
useVariant
Patch Changes
- It is no longer mandatory to
await
calls touseFacet
,useUser
,useWishlist
anduseBasket
7.74.0
Minor Changes
- Support for
isDefault
to be an empty string. This resolves an issue where anundefined
value ofisDefault
within a shop config is changed to an empty string during build-time and fails the config validation.
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.73.0
Minor Changes
- Breaking: Renamed ModuleOptions to ModuleBaseOptions to differentiate it from other ModuleOptions used in different modules.
Patch Changes
- Fix construction of API base path: When setting up a
baseURL
in combination with path based shop selection, thebaseURL
is now the first path segment of the API base path. - Updated dependencies
- @scayle/[email protected]
7.72.5
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.72.4
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.72.3
Patch Changes
- Refactored composables to consistently use named exports rather than default exports and to use named functions instead of arrow functions
7.72.2
Patch Changes
- Add import alias
#storefront/composables
to package.json imports and explicitly added import alias to build transpilation to prevent potential build issues
7.72.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.72.0
Minor Changes
- Introduced a new feature that validates runtime configurations using Zod schemas upon server startup. The server will exit if validation fails.
- We now log a warning when an RPC method from
@scayle/storefront-nuxt
is overridden by an RPC custom implementation.
If the override is intentional, we provide a new config option calledrpcMethodOverrides
to silence this warning. In the future, the warning will become an error message if the RPC is not explicitly marked as an override.
7.71.2
Patch Changes
- Provide new import alias
#storefront/composables
to allow for explicit imports of composables provided by the@scayle/storefront-nuxt
package instead of only relying on the Nuxt auto-import functionality
7.71.1
Patch Changes
- Correctly set the
optimizeDeps
for the new@scayle/storefront-api
package - Updated dependencies
- @scayle/[email protected]
7.71.0
Minor Changes
- Add new shopSelector mode
path_or_default
Thepath_or_default
mode is similar topath
, but loading the root will open the default shop instead of redirecting to the first shop. So you can have a shop atexample.com/
andexample.com/de
instead ofexample.com/en
andexample.com/de
. To set a default shop, addisDefault: true
to the shop's configuration in thenuxt.config
. When usingnuxt-i18n
thestrategy
option should be set toprefix_except_default
. (This is the default value.)
7.70.0
Minor Changes
rpcContext.campaignKey
will now be set to the key of the first active campaign matching$shopConfig.storeCampaignKeyword
. When$shopConfig.storeCampaignKeyword
is set, campaign keys not starting with$shopConfig.storeCampaignKeyword
will be ignored.
This behavior, is now similar to the nuxt 2 implementation.- It is now also possible to extend the RPCContext using the
storefront:context:created
nitro runtime hook.import { defineNitroPlugin } from 'nitropack/runtime/plugin' // Augment RpxContext type declare module '@scayle/storefront-nuxt' { interface AdditionalRpcContext { myNewProp: string } } // Set new value on rpcContext export default defineNitroPlugin((nitroApp) => { nitroApp.hooks.hook('storefront:context:created', (rpcContext) => { rpcContext.myNewProp = 'My campaign key' }) })
Patch Changes
- Add campaignKey dependency to nitro
- Updated dependencies
- @scayle/[email protected]
7.69.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.69.0
Minor Changes
- Upgraded to
@scayle/[email protected]
and replaced@aboutyou/backbone
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.68.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.68.0
Minor Changes
- Use unique session cookie names for each shop
To simplify the implementation and improve the stability of session handling, we now use a differently named cookie for each shop instead of depending on thePath
attribute.
This is a change only to the framework internals, and should not have any visible impact or require any code changes.
Before:Set-Cookie: $session=s:fa3746f9-88c8-4065-a6c9-0c7bee473dd8.pSoaN6Q7iFHHyWKE7s9gQAqdDzGb9fS8a478P7PHLxw; Path=/de
After:Set-Cookie: $session-1001=s:fa3746f9-88c8-4065-a6c9-0c7bee473dd8.pSoaN6Q7iFHHyWKE7s9gQAqdDzGb9fS8a478P7PHLxw; Path=/
When a cookie is found that uses the old format, it will be migrated to the new.
Patch Changes
- We stop bootstrapping requests where we can't determine a shop based on the request parameters. Previously, we fell back to the first shop configuration, which has now been removed.
In this case, no$rpcContext
is available during the request event.
We also bootstrap the Nuxt Error Page with the correct shop config now. - Updated dependencies
- @scayle/[email protected]
7.67.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.67.1
Patch Changes
initialPath
option inuseFacet
should be optional- Updated dependencies
- @scayle/[email protected]
7.67.0
Minor Changes
- Support passing initial path to
useFacet
7.66.4
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.66.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.66.2
Patch Changes
- We fixed a bug where we would attach a session to a request for
/favicon.ico
when no favicon was present in the public directory.
This leads to a session conflict when using a path-based shop selector.
7.66.1
Patch Changes
- Fix RpcContext containing outdated data for the remainder of the request after mutating the session data
7.66.0
Minor Changes
- Fix the variable used before initialization in
useBasket
Breaking: This change removes theuseEventListener
call fromuseBasket
. This code was specific to the checkout page and it has been moved to that page in the Storefront Boilerplate (v1.0.0-rc.9). To make the necessary change in your project, add the following code tocheckout.vue
.import type { CheckoutEvent } from '@scayle/storefront-nuxt' const { fetching, fetch } = await useBasket() const onCheckoutUpdate = async ( event: MessageEvent<CheckoutEvent>, fetching: Boolean, fetchCallback: () => Promise<void>, ) => { if (fetching) { return } // prevent multiple fetches if (event?.data?.type === 'tracking') { const actionType = event.data.event?.event if (actionType === 'add_to_cart' || actionType === 'remove_from_cart') { await fetchCallback() } } } // Refresh basket if the user changes quantity or removes an item at checkout useEventListener( 'message', (event) => onCheckoutUpdate(event, fetching.value, fetch), )
Patch Changes
- Fixes an issue where the
refreshToken
was not exposed on theRPCContext
even if the user is logged in. - Updated dependencies
- @scayle/[email protected]
7.65.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.65.0
Minor Changes
- Add OpenTelemetry instrumentation to RPC methods
This release adds the beginning of native instrumentation to the@scayle/storefront-nuxt
package.
If you are using the OpenTelemetry SDK in your application, aSpan
will now be created for calls to RPC methods. TheSpan
will be namedstorefront-nuxt.rpc/[method]
and have the following attributes:rpc.method
the method namerpc.server
'storefront-nuxt.rpc'
rpc.payload
the payload passed to the RPCserver.address
the hostname of the serverserver.port
the port of the server
Additionally, theSpan
's status will be set toERROR
orOK
depending on the result of the RPC call.
If you are not using the@opentelemetry/sdk
in your application, this change will have no impact. A reference implementation of the OpenTelemetry SDK will be included in a future Storefront Boilerplate release.
7.64.1
Patch Changes
- Format code with dprint
- Updated dependencies
- @scayle/[email protected]
- @scayle/[email protected]
7.64.0
Minor Changes
- Add
useStorefrontSearch
composable
7.63.0
Minor Changes
- Add support for dynamically adding query parameters to the IDP redirect callback URLs to be read back when the user returns from the IDP.
const { data: externalIDPRedirects } = await useIDP({ queryParams: { redirectTo: '/account' }, })
Please note thatcode
andstate
are not supported as these are used by the SCAYLE Authentication API.
Patch Changes
- Avoid querying for redirects on pages matching the
/__nuxt_error
pattern. - Updated dependencies
- @scayle/[email protected]
7.62.4
Patch Changes
- Removed direct logging of
vm
inlog.client.ts
to fix a recursive/infinite logging issue, now loggingvm.$options
instead. - Updated dependencies
- @scayle/[email protected]
7.62.3
Patch Changes
- Ensure composables are not called asynchronously in
useBasket
anduseFacet
7.62.2
Patch Changes
- Error pages should be bootstrapped based on the URL where the error occurred
This resolves an issue where context properties such ascurrentShop
andavailableShops
were not available on the error page.
7.62.1
Patch Changes
- Revert breaking change in
handleIDPLoginCallback
signature - Updated dependencies
- @scayle/[email protected]
7.62.0
Minor Changes
- Add
useProductsByReferenceKeys
composable AdduseCategoryById
composable
Patch Changes
- Do not throw error in
useRpc
. This is the reversion of a change introduced in 7.61.5. If you need a thrown error when auseRpc
request fails, check theerror
property returned byuseRpc
andthrow
it. - Updated dependencies
- @scayle/[email protected]
7.61.5
Patch Changes
- Log errors that occur when attaching the session in bootstrap
- Update the type of
data
returned byuseRpc
to indicate that it may be undefined. Note: This may cause new typechecking errors. These cases should be corrected to handleundefined
. It was always possible fordata
to beundefined
, but the types did not represent that. - Updated dependencies
- @scayle/[email protected]
7.61.4
Patch Changes
- Fix the type of unitialized data in
useBasket
anduseWishlist
When the request for the basket/wishlist has not completed or has failed, thedata
property isundefined
. In the previous release this was inadvertently changed tonull
. Now it is once againundefined
.
7.61.3
Patch Changes
- Fix types of useBasket and useWishlist
7.61.2
Patch Changes
- Updated to
[email protected]
(​For more details check the Vue 3.4.21 Changelog - Updated to
[email protected]
(​For more details check the Nuxt 3.10.3 Release Notes​) - Updated dependencies
- @scayle/[email protected]
7.61.1
Patch Changes
useBasket
anduseWishlist
should no longer trigger duplicate requests when used in multiple components. Note: As part of this change, theoptions
parameter has been removed from both functions.
7.61.0
Minor Changes
- Expose the
loginWithIDP
function from theuseSession
composable. - Add error logging to the RPC handler
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.60.1
Patch Changes
- Prioritize the execution of
bootstrap
middleware so storefront server middleware can depend on the extendedevent.context
If your middleware depends on theevent.context
properties, it must be registered as aserverHandler
and not automatically scanned from the~/server/middleware
directory.
7.60.0
Minor Changes
- Log Configuration changes
Consolidate the logging configuration for@scayle/storefront-nuxt
.
Going forward, the logging needs to be configured on the public runtime that you can control through theNUXT_PUBLIC_STOREFRONT_LOG_NAME
andNUXT_PUBLIC_STOREFRONT_LOG_LEVEL
override parameters.
We have also removed this setting from the module options and the private runtime to prevent misconfigurations.
Authentication Config
We removed the authentication config as it's not required for the Storefront Nuxt application.
7.59.0
Minor Changes
- Breaking: Change the default
sameSite
cookie attribute fromnone
tolax
- Attach
headers
to the RPC context
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.58.3
Patch Changes
- Update
/api/up
endpoint to also support non-GET requests
7.58.2
Patch Changes
- Fix the missing IP address on the RpcContext
7.58.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.58.0
Minor Changes
- Add
useCategoryByPath
composable
Patch Changes
- Updated dependencies
- @scayle/[email protected]
- @scayle/[email protected]
7.57.4
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.57.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.57.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.57.1
Patch Changes
- Update to
[email protected]
7.57.0
Minor Changes
- Strip sensitive data from log messages
7.56.0
Minor Changes
- Updated to
[email protected]
and[email protected]
(For more details check the Nuxt 3.10.1 Release Notes and Vue 3.4.19 Changelogs)
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.55.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.55.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.55.1
Patch Changes
- Skip basic auth when
auth.username
orauth.password
is nullish
7.55.0
Minor Changes
- Export
unwrap()
from@scayle/storefront-core
7.54.0
Minor Changes
- Authentication RPC methods include status codes in error cases
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.53.1
Patch Changes
- Fix potential empty user after login
- Updated dependencies
- @scayle/[email protected]
7.53.0
Minor Changes
- Nest public
runtimeConfig
properties under thestorefront
key
Breaking:useRuntimeConfig().public.log
anduseRuntimeConfig().public.auth
should be replaced byuseRuntimeConfig().public.storefront.log
anduseRuntimeConfig().public.storefront.log
7.52.0
Minor Changes
- Allow the session of an
RpcContext
to be undefined
BREAKING: This changes the structure of theRpcContext
, so it may be a breaking change if you have written custom RPC methods.
The affected properties on theRpcContext
aresessionId
,wishlistKey
andbasketKey
and the affected methods aredestroySession
,createUserBoundSession
,updateUser
, andupdateTokens
. If you use these methods or properties in a custom RPC method, make sure that you handle the case where they might be undefined. TypeScript will also catch these cases if you havestrictNullChecks
enabled.
You can checkcontext.sessionId
(or another session-dependent property) to determine if the session is present. If one of these properties is present, all will be. Alternatively, you can callassertSession(context)
before referencing any properties on the context. If the session is not present, an error will be thrown. For any usage ofcontext
afterassertSession
is called, TypeScript will understand that the session properties are present. - Do not attach session for cached request
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.51.2
Patch Changes
- Updated to
[email protected]
and[email protected]
(_For more details check the Nuxt 3.9.3 Release Notes and Vue 3.4.15 Changelogs)
NOTE: The minimum supported versions of the@scayle/storefront-nuxt
package arenuxt >=3.9.0
andvue >=3.4.0
. Please update your application stack accordingly. - useRpc - clear error state when re-fetching
7.51.1
Patch Changes
- Updated to
[email protected]
and[email protected]
(For more details check the Nuxt 3.9.2 Release Notes and [Vue 3.4.14 Changelogs](https://github.com/vuejs/core/blob/main/CHANGELOG.md#3414-2024-01-15)
NOTE: The minimum supported versions of the@scayle/storefront-nuxt
package arenuxt >=3.9.0
andvue >=3.4.0
. Please update your application stack accordingly.
7.51.0
Minor Changes
- Update dependency
jose
to the latest5.2.0
version
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.50.1
Patch Changes
- Update to
[email protected]
(​For detailed changes see Changelog for Vue​)
7.50.0
Minor Changes
- Update to
[email protected]
and[email protected]
(For detailed changes see Blog post: Nuxt 3.9 and Blog post: Announcing Vue 3.4)
Please note that@scayle/storefront-nuxt
is now compatible with[email protected]
or higher!
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.49.0
Minor Changes
- Support
Response
returns in RPC methods - Handle 401 from CO and delete the session
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.48.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.48.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.48.0
Minor Changes
- We added support for Identity Provider (IDP), enhancing our authentication and identity management capabilities.
Patch Changes
- Fix runtime crash when using md5 for appKeys
- Updated dependencies
- @scayle/[email protected]
7.47.0
Minor Changes
- Create a shared logger instance per-server instead of per-request
7.46.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.46.0
Minor Changes
- Use new password change API when oauth is enabled
Patch Changes
- Locale is optional in formatCurrency
- Updated dependencies
- @scayle/[email protected]
7.45.0
Minor Changes
- Migrate currency formatters to a composable
Because the currency formatter functions depend on theuseCurrentShop
composable, they must also be initialized through a composable. Additionally, becauseformatPrice
was the same astoCurrency
except that it excluded the symbol, the two functions have been merged intoformatCurrency
. If you don't want the currency symbol to be displayed, set thestyle
option todecimal
. These changes requires a small migration step.
Before:toCurrency(100, { currency: 'EUR' }) formatPrice(100, { currencyFractionDigits: 2 })
After:const { formatCurrency } = useFormatHelpers() formatCurrency(100, { currency: 'EUR' }) formatCurrency(100, { style: 'decimal', currencyFractionDigits: 2 })
7.44.1
Patch Changes
- The api/up route should not be bootstrapped with the context
7.44.0
Minor Changes
- Update SAPI SDK to v16
Patch Changes
- Fix error when mounting vercelKV driver with default options
- Updated dependencies
- @scayle/[email protected]
7.43.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.43.0
Minor Changes
- Extend
StorageEntity
with optionalcompression: 'none' | 'deflate' | 'gzip' | 'brotli'
option. Modify unstorage driver creation during server startup to configure@scayle/unstorage-compression-driver
if value ofcompression
is set to a supported compression algorithm.
Patch Changes
- Ensure correct unstorage drivers are bundled
- Updated dependencies
- @scayle/[email protected]
- @scayle/[email protected]
7.42.3
Patch Changes
- Fix incorrect parsing of legacy config
- Include missing unstorage drivers in final build
- Updated dependencies
- @scayle/[email protected]
7.42.2
Patch Changes
- Ensure
useNuxtApp
is only called from a composable context inuseCategories
7.42.1
Patch Changes
- Ensure useNuxtApp is only called from a composable context
7.42.0
Minor Changes
- Unify Storefront Core cache handling using the Nitro Storage Layer - Mountpoints
This release changes how cache and session storage is managed in Storefront Core. Storefront Core will now use thestorefront-cache
mountpoint as the root for its cache storage, andstorefront-session
for sessions storage. These can be manually configured through Nitro, but Storefront Core also now includesstorefront.storage.cache
andstorefront.storage.session
config options to automatically create these mountpoints.storefront.storage.cache
is used to configure the primary global cache storage mounted understorefront-cache
. If not configured, a dedicated memory driver is used.storefront.storage.session
is used to configure the global session storage mounted understorefront-session
. If not configured, a dedicated memory driver is used.
The config optionsstorefront.redis
,storefront.stores[X].redis
,storefront.session.provider
andstorefront.cache.provider
have been deprecated in favor of the newstorage
config. In a future version, they will be replaced.
Patch Changes
- Update to Nuxt
v3.8.2
(See Nuxt v3.8.2 Release notes for details.)
7.41.0
Minor Changes
- Add
campaignKey
to the RPC context
7.40.6
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.40.5
Patch Changes
- Allow setting the log level in the module config
- Prevent infinite loops when log writing fails
- Updated dependencies
- @scayle/[email protected]
7.40.4
Patch Changes
- Resolve error with newly introduced
nitro
plugin during local dev mode
7.40.3
Patch Changes
- Introduce
nitro
server plugin to overridex-powered-by
header default value ofNuxt
withSCAYLE Storefront by SCAYLE Commerce Engine - www.scayle.com
7.40.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.40.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.40.0
Minor Changes
- Update to Nuxt
v3.8.1
(See Nuxt 3.8 Release Notes and Nuxt 3.8.1 Release Notes for more details.) - Refactored imports to be compatible with TypeScript
verbatimModuleSyntax
option (See TypeScript 5.0 - verbatimModuleSyntax for more details.) - Update to Vue
v3.3.8
(See Vue 3.3.8 Release notes for more details.)
7.39.0
Minor Changes
- Redirects should use the cache provider configured for the shop
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.38.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.38.0
Minor Changes
- Ensure the session is not shared between different country shops
7.37.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.37.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.37.0
Minor Changes
- Add
runtimeConfiguration
property to theRPCContext
- Breaking: Remove re-exported
useEventListener
composable
Import the composable directly from @vueuse/core
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.36.3
Patch Changes
- Add license file
- Updated dependencies
- @scayle/[email protected]
- @scayle/[email protected]
7.36.2
Patch Changes
- Fixed SFC_OMIT_MD5 not being respected
7.36.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.36.0
Minor Changes
- Breaking: Remove imageBaseUrl from the config. This property is no longer used in the Nuxt3 package.
7.35.0
Minor Changes
- Updated to latest Vue version
v3.3.7
7.34.0
Minor Changes
- Updated to latest Vue version
v3.3.6
7.33.0
Minor Changes
- Add promotion data to the
addItemToBasket
method - Add
usePromotions
,useCurrentPromotions
&usePromotionsByIds
composables
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.32.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.32.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.32.1
Patch Changes
- The
auth
config is optional - Updated dependencies
- @scayle/[email protected]
7.32.0
Minor Changes
- Make the
shop
param required inrpcCall
7.31.0
Minor Changes
- Support setting default
with
params in the module options
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.30.1
Patch Changes
- Add timing to RPC log message
7.30.0
Minor Changes
- Pass
withParams
through the private runtime storefront config
7.29.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.29.0
Minor Changes
- Improve
useFacet
&useQueryFilterState
computed types anduseRpc
error state type
Patch Changes
- Fix build warning caused by
createError
import - Updated dependencies
- @scayle/[email protected]
7.28.0
Minor Changes
- Handle errors and return proper status codes for RPC methods
7.27.0
Minor Changes
- Add
cbdExpiration
to the checkout config to support expiring CBD tokens
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.26.0
Minor Changes
- Breaking: Minimum node version is 20.7.0
- Import
computed
fromvue
instead of#imports
- Use default withParams config for
useProducts
,useProduct
,useProductsByIds
,useVariant
andusSearch
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.25.3
Patch Changes
- Avoid pulling in
redis
package as an accidental dependency - Add sideEffects false
- Updated dependencies
- @scayle/[email protected]
7.25.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.25.1
Patch Changes
- Improve imports of useBasket
7.25.0
Minor Changes
- Mark
autoFetch
as an optional option foruseRpc
. The default istrue
.
7.24.0
Minor Changes
- Always
await
autoFetcheduseRpc
during SSR
7.23.0
Minor Changes
- Add
lazy
option touseRpc
options. This will allow fetching data without blocking client-side navigation.
7.22.4
Patch Changes
- Use unstorage for all redis caches
- Updated dependencies
- @scayle/[email protected]
7.22.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.22.2
Patch Changes
- Remove useCurrentShop from rpcCall
- Allow setting apiBasePath on shop config
7.22.1
Patch Changes
- Fix Redis connection in redirects module
7.22.0
Minor Changes
- Change storefront composables signatures to be an options object
7.21.0
Minor Changes
- Support apiBasePath option
7.20.2
Patch Changes
- AddAPI/up handler
7.20.1
Patch Changes
- Fix issue where errors within
useRpc
could not be serialized.
7.20.0
Minor Changes
useRpc
and composables that are based onuseRpc
now exposestatus
anderror
, to allow error handling.
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.19.0
Minor Changes
- Set OAuth settings when building the context to support runtime OAuth configuration
- Support enabling/disabling the cache using the runtime config
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.18.2
Patch Changes
runtimeConfig.storefront.stores
now only acceptsShopConfigIndexed
objects as value to simplify the usage. Passing aShopConfig[]
array intoruntimeConfig.storefront.stores
can lead to runtime errors.
7.18.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.18.0
Minor Changes
- Provide the option to pass
shopConfig
either as an array/list (shopConfig[]
) or as an object (shopConfigIndexed
) to make them overridable as part of theruntimeConfig
. Internally they are still processed as an array/list.
Patch Changes
- Add sub dependencies
isomorphic-dompurify
andslugify
tooptimizeDeps
list
7.17.0
Minor Changes
- Add explicit vue/nuxt specific stuff imports
- Make
ToCurrencyOptions
oftoCurrency
andFormatOptions
offormatPrice
optional. They use the currentShop config as default.
7.16.0
Minor Changes
runtimeConfig.$storefront
is now justruntimeConfig.storefront
7.15.1
Patch Changes
- added missing slash for bapi.host default
- add missing auth section for PublicRuntimeConfig module declaration
- extend vite config as part of module setup and include storefront and axios (sapi) package for optimizeDeps include list
- set module nuxt compatibility to [email protected] or higher
- Updated dependencies
- @scayle/[email protected]
7.15.0
Minor Changes
- Replace
lodash
withradash
7.14.0
Minor Changes
- Add auth options within the module options
Patch Changes
- Support server-side autoFetch for useUser, useWishlist and useBasket
- Updated dependencies
- @scayle/[email protected]
7.13.0
Minor Changes
withParams
are now exposed thoughuseRuntimeConfig().public
instead ofuseRuntimeConfig().$storefront
Patch Changes
- Remove usages of
event.node.req
- Updated dependencies
- @scayle/[email protected]
7.12.0
Minor Changes
- Make composables share state across every instance.
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.11.0
Minor Changes
- Support top-level and shop-level definitions for bapi, appKeys, and redis configs
Patch Changes
- Add isEnabled to ShopConfig options
- Update
rpcCall
to accept aNuxtApp
instance as its first parameter
7.10.0
Minor Changes
- Add useUserAddresses composable
- Add useNavigationTree and useNavigationTrees composables
- Add useOrder and useOrderConfirmation composables
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.9.0
Minor Changes
- Wrap
refreshProductCount
inuseFacet
composable so that have proper where condition typing
Patch Changes
- Prevent nuxt from setting wrong default value to
session.maxAge
in module options - Add
refreshProductCount
filter params default
7.8.1
Patch Changes
- Make selection of fetch function in
rpcCall
null safe - Make
params
parameter within theuseBasket
anduseWishlist
optional - Ensure that the accessing
withParams
is null safe within theuseBasket
anduseWishlist
composables
7.8.0
Minor Changes
- Add sessions module
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.7.0
Minor Changes
- Introduce
withParams
storefront option
7.6.1
Patch Changes
- Share context between RPC requests
- Updated dependencies
- @scayle/[email protected]
7.6.0
Minor Changes
- Adjust
fetching
prop of useRpc to reflect more nuxt2 behavior - Move
deserializeFilters
andserializeFilters
to@scayle/storefront-core
- Extend existing composables return object with
status
anderror
- Add
price
utils - Add useFacet and useQueryFilterState composable
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.5.0
Minor Changes
- Add
useBasket
,useWishlist
anduseEventListener
composables
7.4.0
Minor Changes
- Add redirects module
7.3.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.3.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.3.1
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.3.0
Minor Changes
- Add cache module
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.2.0
Minor Changes
- Support client- and server-side RPC calls
- Add useCurrentShop and useAvailableShops composables
- Add useSearch composable
- Add logging module and useLog composable
- Add useRpc composable
- Allow passing AsyncDataOptions to useRpc
- Add useShopConfiguration composable
- Add useFilters, useProduct, useProductsCount, useProductsByIds and useVariant composables
- Add useBrand and useBrands composables
Patch Changes
- Add useProducts composable
- Add useCategories composable
- Updated dependencies
- @scayle/[email protected]
7.1.5
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.1.4
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.1.3
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.1.2
Patch Changes
- Updated dependencies
- @scayle/[email protected]
7.1.1
Patch Changes
- Add exports from storefront-core
7.1.0
Minor Changes
- Add possibility to define the session config on application and store level.
- Add possibility to configure the
domain
attribute of the session cookie
7.0.0
Major Changes
- Changed NPM package names
- Breaking: Change package scope and name of
@aboutyou/scayle-sfc-nuxt
to@scayle/storefront-nuxt2
- Breaking: Change package scope and name of
@aboutyou/sfc-nuxt3
to@scayle/storefront-nuxt
- Breaking: Change package scope and name of
@aboutyou/scayle-sfc-lib
to@scayle/storefront-core
- Breaking: Change package scope and name of
@aboutyou/eslint-config-sfc
to@scayle/eslint-config-storefront
- Breaking: Change package scope and name of
@aboutyou/prettier-config-sfc
to@scayle/prettier-config-storefront
NOTE: Due to the changes of the NPM package scope from@aboutyou
to@scayle
, it is required to change the consuming projects local.npmrc
file as follows:- Before:
@aboutyou:registry=https://gitlab.com/api/v4/packages/npm/
- After:
@aboutyou:registry=https://gitlab.com/api/v4/projects/29746107/packages/npm/ @scayle:registry=https://gitlab.com/api/v4/projects/29746107/packages/npm/
- Breaking: Change package scope and name of
- Breaking: Minimum
node
version raised to18.15.0
7.0.0-alpha.0
Major Changes
- Changed NPM package names
- Breaking: Change package scope and name of
@aboutyou/scayle-sfc-nuxt
to@scayle/storefront-nuxt2
- Breaking: Change package scope and name of
@aboutyou/sfc-nuxt3
to@scayle/storefront-nuxt
- Breaking: Change package scope and name of
@aboutyou/scayle-sfc-lib
to `@scayle/storefront-core - Breaking: Change package scope and name of
@aboutyou/eslint-config-sfc
to@scayle/eslint-config-storefront
- Breaking: Change package scope and name of
@aboutyou/prettier-config-sfc
to@scayle/prettier-config-storefront
Due to the changes of the NPM package scope from@aboutyou
to@scayle
, it is required to change the consuming projects local.npmrc
file as follows:- Before:
@aboutyou:registry=https://gitlab.com/api/v4/packages/npm/
- After:
@scayle:registry=https://gitlab.com/api/v4/packages/npm/
- Breaking: Change package scope and name of
- Minimum node version is 18.15.0