Skip to content

Commit

Permalink
Merge release/1.0.0-beta.6 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored May 10, 2021
2 parents c8a7f98 + 5e35bf3 commit cba644f
Show file tree
Hide file tree
Showing 18 changed files with 534 additions and 373 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conventionalPrName.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Validate PR Title (conventional)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Install Dependencies
run: npm install @commitlint/config-conventional
- uses: JulienKode/[email protected]
8 changes: 5 additions & 3 deletions .github/workflows/gitflow.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
name: GitFlow AutoMerge
on:
pull_request:
types: [labeled]
jobs:
automerge:
name: GitFlow AutoMerge
if: github.event.label.name == 'release'
if: contains(github.event.pull_request.labels.*.name, 'release')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Extract branch name
uses: mdecoleman/[email protected]
id: extract_branch
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Extract tag name
shell: bash
run: |
branch=${{ steps.extract_branch.outputs.branch }}
echo "##[set-output name=tag;]$(echo ${branch#release/})"
id: extract_tag

- uses: yanamura/git-flow-merge-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish Packages on NPM
on:
pull_request:
types: [ labeled ]
jobs:
prepare_dependencies:
if: contains(github.event.pull_request.labels.*.name, 'release')
name: Prepare dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Extract branch name
uses: mdecoleman/[email protected]
id: extract_branch
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '14'

- name: Get cached dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn --frozen-lockfile

publishing:
name: Package Publishing
if: contains(github.event.pull_request.labels.*.name, 'release')
runs-on: ubuntu-latest
steps:
- name: Build - API-Client
run: yarn build:api-client

- name: Build - Composeables
run: yarn build:composables

- name: Publish Packages
run: yarn publish:packages "${{ github.event.pull_request.labels.*.name }}" "${{ secrets.NPM_TOKEN }}"
18 changes: 2 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run tests
name: Run Tests

on:
push:
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '12'
node-version: '14'

- name: Get cached dependencies
uses: actions/cache@v2
Expand Down Expand Up @@ -59,20 +59,6 @@ jobs:
needs: prepare_dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Get cached dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Build api-client
run: yarn build:api-client

Expand Down
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,24 @@
"graphql:codegen": "graphql-codegen --config codegen.yml",
"lint": "eslint . --ext .ts,.vue --fix",
"prepare": "husky install",
"publish:packages": "node ./scripts/publish.js",
"start": "cd packages/theme && yarn start",
"test": "yarn test:api-client && yarn test:composables && yarn test:theme",
"test:api-client": "cd packages/api-client && yarn test --passWithNoTests",
"test:composables": "cd packages/composables && yarn test --passWithNoTests",
"test:theme": "cd packages/theme && yarn test --passWithNoTests",
"update:check": "ncu",
"update:update": "ncu -u"
"update:check": "ncu && lerna run update:check --stream",
"update:update": "ncu -u && lerna run update:update --stream && yarn install --force"
},
"devDependencies": {
"@graphql-codegen/cli": "1.21.4",
"@graphql-codegen/typescript": "1.22.0",
"@graphql-codegen/typescript-operations": "^1.17.16",
"@babel/core": "^7.14.0",
"@commitlint/cli": "^12.1.1",
"@commitlint/config-conventional": "^12.1.1",
"@commitlint/config-lerna-scopes": "^12.1.1",
"@graphql-codegen/cli": "1.21.4",
"@graphql-codegen/typescript": "1.22.0",
"@graphql-codegen/typescript-operations": "^1.17.16",
"@jsdevtools/npm-publish": "^1.4.3",
"@manypkg/cli": "^0.17.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@semantic-release/git": "^9.0.0",
Expand All @@ -47,9 +49,9 @@
"@typescript-eslint/parser": "^4.22.1",
"@vue/eslint-config-typescript": "^7.0.0",
"babel-eslint": "^10.1.0",
"commitizen": "^4.2.3",
"commitizen": "^4.2.4",
"ejs": "^3.1.6",
"eslint": "7.25.0",
"eslint": "7.26.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.3.0",
Expand All @@ -60,7 +62,7 @@
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-unicorn": "31.0.0",
"eslint-plugin-unicorn": "32.0.1",
"eslint-plugin-vue": "^7.9.0",
"husky": "^6.0.0",
"jest": "^26.6.3",
Expand All @@ -72,7 +74,7 @@
"jest-watch-toggle-config": "^2.0.1",
"jest-watch-typeahead": "^0.6.3",
"lerna": "^4.0.0",
"lint-staged": "^10.5.4",
"lint-staged": "^11.0.0",
"majestic": "^1.8.0",
"npm-check-updates": "^11.5.10",
"rimraf": "^3.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/magento-api",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"sideEffects": false,
"license": "MIT",
"server": "server/index.js",
Expand Down Expand Up @@ -40,7 +40,7 @@
"@rollup/plugin-json": "^4.1.0",
"@types/isomorphic-fetch": "^0.0.35",
"apollo-link-schema": "^1.2.5",
"dotenv": "^9.0.0",
"dotenv": "^9.0.1",
"graphql-tools": "^7.0.4",
"jest-transform-graphql": "^2.1.0",
"node-fetch": "^2.6.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/api-client/src/api/createCustomer/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {
CreateCustomerMutation,
CreateCustomerMutationVariables,
CustomerCreateInput,
CustomerDataFragment as Customer,
CustomerInput,
} from '../../types/GraphQL';
import mutation from './mutation.graphql';
import { Context } from '../../types/context';

export default async (
context: Context,
input: CustomerInput,
input: CustomerCreateInput,
): Promise<Customer> => {
const response = await context
.client
Expand All @@ -21,5 +21,5 @@ export default async (

const { data } = response;

return data?.createCustomer?.customer;
return data?.createCustomerV2?.customer;
};
8 changes: 5 additions & 3 deletions packages/api-client/src/types/API.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
CustomerAddress as CustomerAddressInterface,
CustomerAddressInput,
CustomerAvailablePaymentMethodsQuery,
CustomerCartQuery,
CustomerCartQuery, CustomerCreateInput,
CustomerDataFragment as CustomerFragment,
CustomerInput,
CustomerOrder as CustomerOrderInterface,
Expand Down Expand Up @@ -132,7 +132,7 @@ export interface MagentoApiMethods {

cmsPage(indentifier: string): Promise<ApolloQueryResult<CmsPageQuery>>;

createCustomer(input: CustomerInput): Promise<CustomerFragment>;
createCustomer(input: CustomerCreateInput): Promise<CustomerFragment>;

createCustomerAddress(input: CustomerAddressInput): Promise<FetchResult<CreateCustomerAddressMutation>>;

Expand Down Expand Up @@ -160,7 +160,9 @@ export interface MagentoApiMethods {

productDetail(searchParams: GetProductSearchParams, customQuery?: CustomQuery): Promise<ApolloQueryResult<ProductDetailsQuery>>;

configurableProductDetail(searchParams: GetProductSearchParams, customQuery?: CustomQuery): Promise<ApolloQueryResult<ConfigurableProductDetailQuery>>;
configurableProductDetail(
searchParams: GetProductSearchParams,
customQuery?: CustomQuery): Promise<ApolloQueryResult<ConfigurableProductDetailQuery>>;

relatedProduct(searchParams: GetProductSearchParams, customQuery?: CustomQuery): Promise<ApolloQueryResult<RelatedProductQuery>>;

Expand Down
4 changes: 2 additions & 2 deletions packages/composables/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/magento",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"license": "MIT",
"sideEffects": false,
"main": "lib/index.cjs.js",
Expand All @@ -24,7 +24,7 @@
"access": "public"
},
"dependencies": {
"@vue-storefront/magento-api": "^1.0.0-beta.5",
"@vue-storefront/magento-api": "^1.0.0-beta.6",
"@vue-storefront/core": "^2.3.1",
"vue": "^2.6.x"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/composables/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export { default as useConfig } from './composables/useConfig';
export { default as useFacet } from './composables/useFacet';
export { default as useMakeOrder } from './composables/useMakeOrder';
export { default as useMenuCategory } from './composables/useMenuCategory';
export { default as usePage } from './composables/usePage';
export { default as usePage } from './composables/useContent';
export { default as useProduct } from './composables/useProduct';
export { default as useReview } from './composables/useReview';
export { default as useRouter } from './composables/useRouter';
export { default as useRouter } from './composables/useUrlResolver';
export { default as useShipping } from './composables/useShipping';
export { default as useShippingProvider } from './composables/useShippingProvider';
export { default as useUser } from './composables/useUser';
Expand Down
14 changes: 7 additions & 7 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/magento-theme",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"private": true,
"license": "MIT",
"scripts": {
Expand All @@ -24,16 +24,16 @@
"@nuxtjs/style-resources": "^1.0.0",
"@storefront-ui/vue": "^0.10.5",
"@vue-storefront/core": "^2.3.1",
"@vue-storefront/magento": "^1.0.0-beta.5",
"@vue-storefront/magento": "^1.0.0-beta.6",
"@vue-storefront/middleware": "^2.3.1",
"@vue-storefront/nuxt": "^2.3.1",
"@vue-storefront/nuxt-theme": "^2.3.1",
"cookie-universal-nuxt": "^2.1.4",
"core-js": "^3.12.0",
"core-js": "^3.12.1",
"lodash.debounce": "^4.0.8",
"lodash.merge": "^4.6.2",
"nuxt": "^2.15.4",
"nuxt-i18n": "^6.26.0",
"nuxt": "^2.15.5",
"nuxt-i18n": "^6.27.0",
"vee-validate": "^3.4.5",
"vue-dompurify-html": "^2.3.0",
"vue-lazy-hydration": "^2.0.0-beta.4",
Expand All @@ -50,7 +50,7 @@
"cypress": "^7.2.0",
"cypress-pipe": "^2.0.0",
"cypress-tags": "^0.0.21",
"dotenv": "^9.0.0",
"dotenv": "^9.0.1",
"ejs": "^3.1.6",
"jest": "^26.6.3",
"jest-date-mock": "^1.0.8",
Expand All @@ -60,7 +60,7 @@
"jest-transform-stub": "^2.0.0",
"jest-watch-toggle-config": "^2.0.1",
"jest-watch-typeahead": "^0.6.3",
"lint-staged": "^10.5.4",
"lint-staged": "^11.0.0",
"majestic": "^1.8.0",
"mochawesome": "^6.2.2",
"mochawesome-merge": "^4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/pages/Category.vue
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ import {
useCategory,
categoryGetters,
facetGetters,
useRouter,
useUrlResolver,
} from '@vue-storefront/magento';
import { onSSR } from '@vue-storefront/core';
import LazyHydrate from 'vue-lazy-hydration';
Expand Down Expand Up @@ -422,7 +422,7 @@ export default {
const { categories, search: categoriesSearch, loading: categoriesLoading } = useCategory(`categoryList:${path}`);
// @TODO: Fix when URL Factory is Working
const { search: routeSearch } = useRouter(`router:${path}`);
const { search: routeSearch } = useUrlResolver(`router:${path}`);
const currentCategory = ref({});
const products = computed(() => facetGetters.getProducts(result.value));
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/pages/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
SfLoader,
SfHeading,
} from '@storefront-ui/vue';
import { usePage } from '@vue-storefront/magento';
import { useContent } from '@vue-storefront/magento';
import { onSSR } from '@vue-storefront/core';
export default {
Expand All @@ -30,7 +30,7 @@ export default {
},
},
setup(props) {
const { page, loadPage, loading } = usePage('cmsPage');
const { page, loadPage, loading } = useContent('cmsPage');
onSSR(async () => {
await loadPage(props.identifier);
});
Expand Down
Loading

0 comments on commit cba644f

Please sign in to comment.