Skip to content

Commit

Permalink
ci: release (rc) (#7228)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Jul 30, 2024
1 parent 30941ae commit b65b92b
Show file tree
Hide file tree
Showing 32 changed files with 268 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"@vue-storefront/sdk-axios-request-sender": "2.0.0",
"@storefront/shared": "0.0.1"
},
"changesets": []
"changesets": [
"curly-years-help",
"giant-dogs-crash"
]
}
1 change: 1 addition & 0 deletions .turbo/cache/2022d2f62c9cfb43-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"2022d2f62c9cfb43","duration":8798}
Binary file added .turbo/cache/2022d2f62c9cfb43.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/cache/23b28561290ffbf8-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"23b28561290ffbf8","duration":7274}
Binary file added .turbo/cache/23b28561290ffbf8.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/cache/4a696e6ff26972f7-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"4a696e6ff26972f7","duration":5312}
Binary file added .turbo/cache/4a696e6ff26972f7.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/cache/5d3d0564d6cc9d20-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"5d3d0564d6cc9d20","duration":3521}
Binary file added .turbo/cache/5d3d0564d6cc9d20.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/cache/83197e266a69c9d7-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"83197e266a69c9d7","duration":7007}
Binary file added .turbo/cache/83197e266a69c9d7.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/cache/8bb3a08cb588d77f-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"8bb3a08cb588d77f","duration":7083}
Binary file added .turbo/cache/8bb3a08cb588d77f.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/cache/dce1156da84f7f28-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"dce1156da84f7f28","duration":4812}
Binary file added .turbo/cache/dce1156da84f7f28.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/cache/f34bd7ba2876e54e-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"f34bd7ba2876e54e","duration":7991}
Binary file added .turbo/cache/f34bd7ba2876e54e.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/cache/faf8b3d573392f42-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"faf8b3d573392f42","duration":4924}
Binary file added .turbo/cache/faf8b3d573392f42.tar.zst
Binary file not shown.
3 changes: 3 additions & 0 deletions engineering-toolkit/rollup-config/.turbo/turbo-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn run v1.22.22
$ rimraf ./lib && tsc
Done in 4.51s.
10 changes: 10 additions & 0 deletions packages/changesets/.turbo/turbo-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
yarn run v1.22.22
$ rimraf lib && rollup -c && yarn update-root-changelog

src/index.ts → lib/index.cjs.js, lib/index.es.js...
(!) Entry module "src/index.ts" is implicitly using "default" export mode, which means for CommonJS output that its default export is assigned to "module.exports". For many tools, such CommonJS output will not be interchangeable with the original ES module. If this is intended, explicitly set "output.exports" to either "auto" or "default", otherwise you might want to consider changing the signature of "src/index.ts" to use named exports only.
https://rollupjs.org/guide/en/#outputexports
src/index.ts
created lib/index.cjs.js, lib/index.es.js in 5.4s
$ cp ./lib/index.cjs.js ../../.changeset/changelog.js
Done in 6.74s.
3 changes: 3 additions & 0 deletions packages/cli/.turbo/turbo-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn run v1.22.22
$ rimraf lib && tsc
Done in 7.77s.
6 changes: 6 additions & 0 deletions packages/middleware/.turbo/turbo-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
yarn run v1.22.22
$ rimraf lib && rollup -c

src/index.ts → lib/index.cjs.js, lib/index.es.js...
created lib/index.cjs.js, lib/index.es.js in 7.1s
Done in 8.54s.
6 changes: 6 additions & 0 deletions packages/multistore/.turbo/turbo-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
yarn run v1.22.22
$ rimraf lib && rollup -c

src/index.ts → lib/index.cjs.js, lib/index.es.js...
created lib/index.cjs.js, lib/index.es.js in 2.8s
Done in 3.37s.
26 changes: 26 additions & 0 deletions packages/next/.turbo/turbo-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
yarn run v1.22.22
$ tsup
CLI Building entry: {"index":"src/index.ts","client":"src/client.ts"}
CLI Using tsconfig: tsconfig.json
CLI tsup v8.0.1
CLI Using tsup config: /home/runner/work/vue-storefront/vue-storefront/packages/next/tsup.config.ts
CLI Target: es2015
CJS Build start
ESM Build start
ESM dist/index.mjs 3.21 KB
ESM dist/client.mjs 4.08 KB
ESM dist/chunk-FUJQIYOF.mjs 1.30 KB
ESM ⚡️ Build success in 33ms
CJS dist/index.js 4.94 KB
CJS dist/client.js 7.03 KB
CJS ⚡️ Build success in 33ms
DTS Build start
"PropsWithChildren" is imported from external module "react" but never used in "src/state.tsx" and "src/sdk/types.ts".
DTS ⚡️ Build success in 4314ms
DTS dist/index.d.ts 3.38 KB
DTS dist/client.d.ts 1.27 KB
DTS dist/types-TuCCvExK.d.ts 6.30 KB
DTS dist/index.d.mts 3.38 KB
DTS dist/client.d.mts 1.27 KB
DTS dist/types-TuCCvExK.d.mts 6.30 KB
Done in 5.14s.
101 changes: 101 additions & 0 deletions packages/next/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,106 @@
# Change log

## 4.0.0-rc.0

### Major Changes

- **[ADDED]** global state management with Zustand. This will allow you to keep your global state in a more organized way.
It shares the data about:
- cart
- customer
- currency
- locale

This change will require you to refactor your hooks to make use of the introduced state manager.
As this is only a state management, you will still need to use the hooks to fetch the data and put it into the state.

To make use of the new state solution you will need to change the file `sdk/sdk-context.ts`.

```ts
// before
"use client";

import { createSdkContext } from "@vue-storefront/next/client";

import type { Sdk } from "./sdk.server";

export const [SdkProvider, useSdk] = createSdkContext<Sdk>();
```

```ts
// after
"use client";

import { createAlokaiContext } from "@vue-storefront/next/client";
import type { SfContract } from "storefront-middleware/types";

import type { Sdk } from "./sdk.server";

export const {
AlokaiProvider,
useSdk,
useSfCartState,
useSfCurrenciesState,
useSfCurrencyState,
useSfCustomerState,
useSfLocaleState,
useSfLocalesState,
} = createAlokaiContext<Sdk, SfContract>();
```

The type `SfContract` is a type that represents the contract between the middleware and the state manager.
It is delivered out of the box.

Example of usage:

```tsx
import { useQuery } from "@tanstack/react-query";
import {
useSdk,
useSfCartState,
useSfCustomerState,
useSfCurrencyState,
useSfLocaleState,
} from "@/sdk/alokai-context";

function Component() {
const sdk = useSdk();
const [cart, setCart] = useSfCartState();
const [customer] = useSfCustomerState();
const [currency] = useSfCurrencyState();
const [locale] = useSfLocaleState();

const result = useQuery({
queryFn: () => sdk.unified.getCart(),
queryKey: ["cart", "main"],
});
// updating the cart state
useEffect(() => {
setCart(result.data);
}, [result.data]);

return (
<div>
<p>Cart total: {cart.total}</p>
<p>
Customer name: {customer.firstName} {customer.lastName}
</p>
<p>Currency: {currency}</p>
<p>Locale: {locale}</p>
</div>
);
}
```

- **[BREAKING]** [CHANGED] the function `createSdkContext` exported from the `client` is changed to `createAlokaiContext`.
Also, it no longer returns an array with two elements, but an object with multiple properties.
This change is related to the fact that now it not only provide SDK context but also global state management context and hooks for handling it.

```diff
- import { createSdkContext } from '@vue-storefront/next/client';
+ import { createAlokaiContext } from '@vue-storefront/next/client';
```

## 3.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@vue-storefront/next",
"description": "Vue Storefront dedicated features for Next.js",
"license": "MIT",
"version": "3.0.1",
"version": "4.0.0-rc.0",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
22 changes: 22 additions & 0 deletions packages/nuxt/.turbo/turbo-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
yarn run v1.22.22
$ nuxt-module-build build
[info] Building nuxt
[info] Cleaning dist directory: `./dist`
[nuxt] Expected `@nuxt/kit` to be at least `3.12.2` but got `3.11.2`. This might lead to unexpected behavior. Check your package.json or refresh your lockfile.
[nuxt] Expected `@nuxt/schema` to be at least `3.12.2` but got `3.11.2`. This might lead to unexpected behavior. Check your package.json or refresh your lockfile.
[success] Build succeeded for nuxt
[log] dist/runtime (total size: 7.33 kB)
└─ dist/runtime/utils/composeMiddlewareUrl.d.ts (404 B)
└─ dist/runtime/defineSdkConfig.template (2.85 kB)
└─ dist/runtime/utils/composeMiddlewareUrl.js (862 B)
└─ dist/runtime/utils/defaults.js (487 B)
└─ dist/runtime/utils/defaults.d.ts (887 B)
└─ dist/runtime/plugin.template (302 B)
└─ dist/runtime/types.template (786 B)
└─ dist/runtime/useSdk.template (295 B)
└─ dist/runtime/useSfState.template (458 B)
[log] dist/module.mjs (total size: 2.93 kB, chunk size: 2.93 kB, exports: default)

Σ Total dist size (byte size): 13.9 kB
[log]
Done in 7.12s.
63 changes: 63 additions & 0 deletions packages/nuxt/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,68 @@
# Change log

## 5.0.0-rc.0

### Major Changes

- **[ADDED]** global state management with Pinia. This will allow you to keep your global state in a more organized way.
It shares the data about:
- cart
- customer
- currency
- locale

This change will require you to refactor your composables to make use of the introduced state manager.
As this is only a state management, you will still need to use the composables to fetch the data and put it into the state.

Every part of global state can now be used as refs so reading and writing to them is more straightforward.

Example of usage:

```vue
<template>
<div>
<p>Cart total: {{ cart.total }}</p>
<p>Customer name: {{ customer.firstName }} {{ customer.lastName }}</p>
<p>Currency: {{ currency }}</p>
<p>Locale: {{ locale }}</p>
</div>
</template>
<script setup>
const { cart, customer, currency, currencies, locale, locales } = storeToRefs(
useSfState()
);
// updating the currency state
currency.value = "USD";
// updating the cart state
onMounted(async () => {
cart.value = await useSdk().unified.getCart();
});
</script>
```

- **[BREAKING]** [CHANGED] module configKey is changed from `vsf` to `alokai`. Also, the support for the `vsf` key in Runtime Envs has been changed to `alokai`.

```diff
meta: {
name: "@vue-storefront/nuxt",
- configKey: "vsf",
+ configKey: "alokai",
compatibility: {
nuxt: "^3.0.0",
},
```

```diff
nuxt.options.runtimeConfig.public.alokai = defu(
- nuxt.options.runtimeConfig.public?.vsf as any,
+ nuxt.options.runtimeConfig.public?.alokai as any,
options
);
```

## 4.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/nuxt",
"version": "4.1.1",
"version": "5.0.0-rc.0",
"description": "Vue Storefront dedicated features for Nuxt",
"license": "MIT",
"type": "module",
Expand Down
7 changes: 7 additions & 0 deletions packages/sdk-axios-request-sender/.turbo/turbo-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
yarn run v1.22.22
warning package.json: License should be a valid SPDX license expression
$ rimraf lib && rollup -c

src/index.ts → lib/index.cjs.js, lib/index.es.js...
created lib/index.cjs.js, lib/index.es.js in 5.9s
Done in 6.78s.
6 changes: 6 additions & 0 deletions packages/sdk/.turbo/turbo-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
yarn run v1.22.22
$ rimraf lib && rollup -c

src/index.ts → lib/index.cjs.js, lib/index.es.js...
created lib/index.cjs.js, lib/index.es.js in 4.1s
Done in 4.78s.

0 comments on commit b65b92b

Please sign in to comment.