Skip to content

Commit

Permalink
feat: update support for metaobject definition
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-phan committed Jan 9, 2024
1 parent 341deb3 commit d42301a
Show file tree
Hide file tree
Showing 15 changed files with 1,048 additions and 9,030 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
19 changes: 19 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [
[
"@weaverse/core",
"@weaverse/react",
"@weaverse/hydrogen",
"@weaverse/shopify"
]
],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
]
}
7 changes: 7 additions & 0 deletions .changeset/tame-mangos-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@weaverse/hydrogen": patch
"@weaverse/react": patch
"@weaverse/core": patch
---

Update support for metaobject definition.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weaverse-sdks",
"version": "2.8.8",
"version": "2.8.9",
"description": "Weaverse SDKs monorepo.",
"license": "MIT",
"scripts": {
Expand All @@ -17,7 +17,8 @@
"lint": "eslint packages --cache .",
"lint:fix": "eslint packages --fix --no-error-on-unmatched-pattern",
"typecheck": "turbo typecheck --parallel",
"format": "prettier --write --cache ."
"format": "prettier --write --cache .",
"changeset": "changeset"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
Expand Down Expand Up @@ -56,5 +57,8 @@
"prettier-plugin-tailwindcss",
"@ianvs/prettier-plugin-sort-imports"
]
},
"dependencies": {
"@changesets/cli": "^2.27.1"
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/core",
"author": "Weaverse Team",
"description": "Weaverse Core",
"version": "2.8.8",
"version": "2.8.9",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export type InputType =
| 'textarea'
| 'toggle-group'
| 'swatches'
| 'metaobject'

// Complex types
export type WeaverseCSSProperties = Stitches.CSS & Partial<Record<keyof typeof stitchesUtils, string | number>>
Expand Down
4 changes: 2 additions & 2 deletions packages/hydrogen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/hydrogen",
"author": "Weaverse Team",
"description": "Components, hooks, and utilities for building Shopify Hydrogen websites with Weaverse",
"version": "2.8.8",
"version": "2.8.9",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -40,7 +40,7 @@
"singleQuote": true
},
"dependencies": {
"@weaverse/react": "2.8.8",
"@weaverse/react": "2.8.9",
"react-error-boundary": "^4.0.11"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export type CreateWeaverseClientArgs = {
cache: Cache
waitUntil: ExecutionContext['waitUntil']
env: HydrogenThemeEnv
storefront: Storefront<I18nBase> | any
storefront: Storefront
}
export type WeaverseClientArgs = CreateWeaverseClientArgs & {
components: HydrogenComponent[]
Expand Down
3 changes: 0 additions & 3 deletions packages/hydrogen/src/weaverse-client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { createWithCache, generateCacheControlHeader } from '@shopify/hydrogen'

import pkg from '../package.json'

import type {
AllCacheOptions,
FetchProjectPayload,
Expand All @@ -19,7 +17,6 @@ import { getRequestQueries, getWeaverseConfigs } from './utils'

export class WeaverseClient {
API = 'api/public'
clientVersion = pkg.version
basePageConfigs: Omit<WeaverseProjectConfigs, 'requestInfo'>
basePageRequestBody: Omit<FetchProjectRequestBody, 'url' | 'countries'>
configs: WeaverseProjectConfigs
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/react",
"author": "Weaverse Team",
"description": "React bindings for Weaverse",
"version": "2.8.8",
"version": "2.8.9",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -38,7 +38,7 @@
"singleQuote": true
},
"dependencies": {
"@weaverse/core": "2.8.8",
"@weaverse/core": "2.8.9",
"clsx": "^2.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/react/src/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ const ItemComponent = memo(({ instance }: ItemComponentProps) => {

return (
<Component
{...rest}
key={id}
data-wv-type={type}
data-wv-id={id}
className={clsx(
platformType !== 'shopify-hydrogen' &&
generateItemClassName(instance, stitchesInstance),
rest?.data?.className,
rest.data?.className,
)}
style={style}
{...rest}
children={renderChildren.length ? renderChildren : undefined}
/>
)
Expand Down
4 changes: 2 additions & 2 deletions packages/shopify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/shopify",
"author": "Weaverse Team",
"description": "Weaverse Components for Shopify Online Store 2.0 Section builder",
"version": "2.8.8",
"version": "2.8.9",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -40,7 +40,7 @@
"dependencies": {
"@radix-ui/react-dialog": "^1.0.5",
"@stitches/react": "^1.2.8",
"@weaverse/react": "2.8.8",
"@weaverse/react": "2.8.9",
"clsx": "^2.0.0",
"keen-slider": "^6.8.6"
}
Expand Down
Loading

0 comments on commit d42301a

Please sign in to comment.