Skip to content

Commit

Permalink
Fix error in SearchResults.vue and update Boilerplate build command (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsobol committed Mar 2, 2021
1 parent 3309a19 commit 6c27af8
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 59 deletions.
4 changes: 1 addition & 3 deletions packages/boilerplate/api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"module": "lib/index.es.js",
"types": "lib/index.d.ts",
"scripts": {
"build:server": "rimraf server && rollup -c rollup-server.config.js",
"build:universal": "rimraf lib && rollup -c rollup-main.config.js",
"build": "yarn build:universal && yarn build:server",
"build": "rimraf lib server && rollup -c",
"dev": "rollup -c -w",
"test": "jest",
"prepublish": "yarn build"
Expand Down
4 changes: 0 additions & 4 deletions packages/boilerplate/api-client/rollup-main.config.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pkg from './package.json';
import typescript from 'rollup-plugin-typescript2';
import graphql from 'rollup-plugin-graphql';
import { generateBaseConfig } from '../../rollup.base.config';

export default {
const server = {
input: 'src/index.server.ts',
output: [
{
Expand All @@ -11,12 +11,19 @@ export default {
sourcemap: true
}
],
external: [...Object.keys(pkg.dependencies || {})],
external: [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.peerDependencies || {})
],
plugins: [
typescript({
// eslint-disable-next-line global-require
typescript: require('typescript')
}),
graphql()
})
]
};

export default [
generateBaseConfig(pkg),
server
];
12 changes: 12 additions & 0 deletions packages/core/docs/changelog/5566.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ module.exports = {
before: '',
after: '{ getSearchTermFromUrl } = useUiHelpers();',
comment: 'Created new function'
},
{
module: '@vue-storefront/nuxt-theme',
before: '',
after: 'SearchResults.vue',
comment: 'Added new \'SearchResults.vue\' component'
},
{
module: '@vue-storefront/nuxt-theme',
before: 'AppHeader.vue',
after: 'AppHeader.vue',
comment: 'Modified \'AppHeader.vue\' to add use new \'SearchResults.vue\' component'
}
],
author: 'Justyna Gieracka',
Expand Down
6 changes: 3 additions & 3 deletions packages/core/nuxt-module/lib/plugins/composition-api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Vue from 'vue'
import VueCompositionApi from '@vue/composition-api'
import Vue from 'vue';
import VueCompositionApi from '@vue/composition-api';

Vue.use(VueCompositionApi)
Vue.use(VueCompositionApi);
16 changes: 14 additions & 2 deletions packages/core/nuxt-theme-module/theme/components/SearchResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,22 @@
:link="`/p/${productGetters.getId(product)}/${productGetters.getSlug(product)}`"
/>
</div>
<SfButton class="sf-button--text see-all desktop-only" :link="`/c/${categories.slug}/${categories.items[0].slug}`">{{ $t('See all results') }}</SfButton>
<SfButton
v-if="categories.items && categories.items.length"
:link="`/c/${categories.slug}/${categories.items[0].slug}`"
class="sf-button--text see-all desktop-only"
>
{{ $t('See all results') }}
</SfButton>
</SfMegaMenuColumn>
<div class="action-buttons smartphone-only">
<SfButton class="action-buttons__button color-secondary" :link="`/c/${categories.slug}/${categories.items[0].slug}`">{{ $t('See all results') }}</SfButton>
<SfButton
v-if="categories.items && categories.items.length"
class="action-buttons__button color-secondary"
:link="`/c/${categories.slug}/${categories.items[0].slug}`"
>
{{ $t('See all results') }}
</SfButton>
<SfButton class="action-buttons__button color-light" @click="$emit('close')">{{ $t('Cancel') }}</SfButton>
</div>
</div>
Expand Down
90 changes: 48 additions & 42 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -999,10 +999,10 @@
resolved "https://registrynpm.storefrontcloud.io/@csstools%2fconvert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==

"@eslint/eslintrc@^0.3.0":
version "0.3.0"
resolved "https://registrynpm.storefrontcloud.io/@eslint%2feslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318"
integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==
"@eslint/eslintrc@^0.4.0":
version "0.4.0"
resolved "https://registrynpm.storefrontcloud.io/@eslint%2feslintrc/-/eslintrc-0.4.0.tgz#99cc0a0584d72f1df38b900fb062ba995f395547"
integrity sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==
dependencies:
ajv "^6.12.4"
debug "^4.1.1"
Expand All @@ -1011,7 +1011,6 @@
ignore "^4.0.6"
import-fresh "^3.2.1"
js-yaml "^3.13.1"
lodash "^4.17.20"
minimatch "^3.0.4"
strip-json-comments "^3.1.1"

Expand Down Expand Up @@ -2366,9 +2365,9 @@
defu "^3.2.2"
normalize-path "^3.0.0"

"@nuxtjs/composition-api@https://github.com/andrzejewsky/composition-api.git#ssr-ref-concurrent-fix":
"@nuxtjs/composition-api@git+https://github.com/andrzejewsky/composition-api.git#ssr-ref-concurrent-fix":
version "0.16.4"
resolved "https://github.com/andrzejewsky/composition-api.git#f1908d57a18f18feffcec0fd44de949c5dab65d3"
resolved "git+https://github.com/andrzejewsky/composition-api.git#f1908d57a18f18feffcec0fd44de949c5dab65d3"
dependencies:
"@vue/composition-api" "1.0.0-beta.21"
defu "^3.2.2"
Expand Down Expand Up @@ -2423,10 +2422,10 @@
is-plain-object "^5.0.0"
universal-user-agent "^6.0.0"

"@octokit/openapi-types@^5.2.0":
version "5.2.0"
resolved "https://registrynpm.storefrontcloud.io/@octokit%2fopenapi-types/-/openapi-types-5.2.0.tgz#54e6ca0bc2cd54cd93f0a64658e893c32a5e69ec"
integrity sha512-MInMij2VK5o96Ei6qaHjxBglSZWOXQs9dTZfnGX2Xnr2mhA+yk9L/QCH4RcJGISJJCBclLHuY3ytq+iRgDfX7w==
"@octokit/openapi-types@^5.2.1":
version "5.2.1"
resolved "https://registrynpm.storefrontcloud.io/@octokit%2fopenapi-types/-/openapi-types-5.2.1.tgz#5e846f86104aef96ace20091d8afb6be27979d8a"
integrity sha512-Bf7MBvQ1nMpv15ANaQtRBsC7YnwQFPM0eUztp3luQs9L6sBEiQ6ArM1Wx5CG+N7tXETtd0oE0DMcU4wbLlCZIw==

"@octokit/plugin-enterprise-rest@^6.0.1":
version "6.0.1"
Expand Down Expand Up @@ -2515,11 +2514,11 @@
"@types/node" ">= 8"

"@octokit/types@^6.0.3", "@octokit/types@^6.7.1":
version "6.11.0"
resolved "https://registrynpm.storefrontcloud.io/@octokit%2ftypes/-/types-6.11.0.tgz#830a608882cde659be19a6e86568abaa619e2ee7"
integrity sha512-RMLAmpPZf/a33EsclBazKg02NCCj4rC69V9sUgf0SuWTjmnBD2QC1nIVtJo7RJrGnwG1+aoFBb2yTrWm/8AS7w==
version "6.11.1"
resolved "https://registrynpm.storefrontcloud.io/@octokit%2ftypes/-/types-6.11.1.tgz#54ece128029526fa99bd71e757b9e35478403d95"
integrity sha512-UiSRTG2lrFbMUMwhKNR0uSV33Fzv4bNu1n5iFuuNOg80XCh0VYNhR4TQWgrkLhVxdDuej6s61aP3eQvVm6K6uA==
dependencies:
"@octokit/openapi-types" "^5.2.0"
"@octokit/openapi-types" "^5.2.1"

"@polka/url@^1.0.0-next.9":
version "1.0.0-next.11"
Expand Down Expand Up @@ -2910,6 +2909,11 @@
resolved "https://registrynpm.storefrontcloud.io/@types%2frelateurl/-/relateurl-0.2.28.tgz#6bda7db8653fa62643f5ee69e9f69c11a392e3a6"
integrity sha1-a9p9uGU/piZD9e5p6facEaOS46Y=

"@types/semver@^7.3.4":
version "7.3.4"
resolved "https://registrynpm.storefrontcloud.io/@types%2fsemver/-/semver-7.3.4.tgz#43d7168fec6fa0988bb1a513a697b29296721afb"
integrity sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==

"@types/serve-static@*", "@types/serve-static@^1.13.4":
version "1.13.9"
resolved "https://registrynpm.storefrontcloud.io/@types%2fserve-static/-/serve-static-1.13.9.tgz#aacf28a85a05ee29a11fb7c3ead935ac56f33e4e"
Expand Down Expand Up @@ -5669,9 +5673,9 @@ copy-webpack-plugin@^5.0.2:
webpack-log "^2.0.0"

core-js-compat@^3.6.5, core-js-compat@^3.8.0, core-js-compat@^3.8.1, core-js-compat@^3.9.0:
version "3.9.0"
resolved "https://registrynpm.storefrontcloud.io/core-js-compat/-/core-js-compat-3.9.0.tgz#29da39385f16b71e1915565aa0385c4e0963ad56"
integrity sha512-YK6fwFjCOKWwGnjFUR3c544YsnA/7DoLL0ysncuOJ4pwbriAtOpvM2bygdlcXbvQCQZ7bBU9CL4t7tGl7ETRpQ==
version "3.9.1"
resolved "https://registrynpm.storefrontcloud.io/core-js-compat/-/core-js-compat-3.9.1.tgz#4e572acfe90aff69d76d8c37759d21a5c59bb455"
integrity sha512-jXAirMQxrkbiiLsCx9bQPJFA6llDadKMpYrBJQJ3/c4/vsPP/fAf29h24tviRlvwUL6AmY5CHLu2GvjuYviQqA==
dependencies:
browserslist "^4.16.3"
semver "7.0.0"
Expand All @@ -5682,9 +5686,9 @@ core-js@^2.5.3, core-js@^2.6.5:
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==

core-js@^3.0.1, core-js@^3.6.4, core-js@^3.6.5:
version "3.9.0"
resolved "https://registrynpm.storefrontcloud.io/core-js/-/core-js-3.9.0.tgz#790b1bb11553a2272b36e2625c7179db345492f8"
integrity sha512-PyFBJaLq93FlyYdsndE5VaueA9K5cNB7CGzeCj191YYLhkQM0gdZR2SKihM70oF0wdqKSKClv/tEBOpoRmdOVQ==
version "3.9.1"
resolved "https://registrynpm.storefrontcloud.io/core-js/-/core-js-3.9.1.tgz#cec8de593db8eb2a85ffb0dbdeb312cb6e5460ae"
integrity sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg==

core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
Expand Down Expand Up @@ -6915,12 +6919,12 @@ eslint-visitor-keys@^2.0.0:
integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==

eslint@^7.20.0:
version "7.20.0"
resolved "https://registrynpm.storefrontcloud.io/eslint/-/eslint-7.20.0.tgz#db07c4ca4eda2e2316e7aa57ac7fc91ec550bdc7"
integrity sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==
version "7.21.0"
resolved "https://registrynpm.storefrontcloud.io/eslint/-/eslint-7.21.0.tgz#4ecd5b8c5b44f5dedc9b8a110b01bbfeb15d1c83"
integrity sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==
dependencies:
"@babel/code-frame" "7.12.11"
"@eslint/eslintrc" "^0.3.0"
"@eslint/eslintrc" "^0.4.0"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
Expand All @@ -6933,7 +6937,7 @@ eslint@^7.20.0:
espree "^7.3.1"
esquery "^1.4.0"
esutils "^2.0.2"
file-entry-cache "^6.0.0"
file-entry-cache "^6.0.1"
functional-red-black-tree "^1.0.1"
glob-parent "^5.0.0"
globals "^12.1.0"
Expand Down Expand Up @@ -7045,9 +7049,9 @@ events@^1.1.0:
integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=

events@^3.0.0:
version "3.2.0"
resolved "https://registrynpm.storefrontcloud.io/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379"
integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==
version "3.3.0"
resolved "https://registrynpm.storefrontcloud.io/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==

eventsource-polyfill@^0.9.6:
version "0.9.6"
Expand Down Expand Up @@ -7332,7 +7336,7 @@ figures@^3.0.0, figures@^3.2.0:
dependencies:
escape-string-regexp "^1.0.5"

file-entry-cache@^6.0.0:
file-entry-cache@^6.0.1:
version "6.0.1"
resolved "https://registrynpm.storefrontcloud.io/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==
Expand Down Expand Up @@ -8146,9 +8150,9 @@ has-flag@^4.0.0:
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==

has-symbols@^1.0.1:
version "1.0.1"
resolved "https://registrynpm.storefrontcloud.io/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
version "1.0.2"
resolved "https://registrynpm.storefrontcloud.io/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423"
integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==

has-unicode@^2.0.0, has-unicode@^2.0.1:
version "2.0.1"
Expand Down Expand Up @@ -9700,9 +9704,11 @@ jimp-compact@^0.16.1:
integrity sha512-dZ6Ra7u1G8c4Letq/B5EzAxj4tLFHL+cGtdpR+PVm4yzPDj+lCk+AbivWt1eOM+ikzkowtyV7qSqX6qr3t71Ww==

jiti@^1.3.0:
version "1.3.0"
resolved "https://registrynpm.storefrontcloud.io/jiti/-/jiti-1.3.0.tgz#9c6b8bde5744f732f33c1aa27108fd03b9a49d0d"
integrity sha512-CrRtGy3v7PE5dGWtMBe+FMaViXX2eUa7I+Cyo0WmyggVm61lfpEs1orBQalHx9KDIp0Kl5mNaXGHZCMgTpNDXw==
version "1.4.0"
resolved "https://registrynpm.storefrontcloud.io/jiti/-/jiti-1.4.0.tgz#2cc3df19003785cd700f5f5fd0292dc6ef1c2751"
integrity sha512-riTFltg08xtufghxm4Ve6ITghk+rtg7gqD4YvH0LyjqMSxREG9sJmXGbJ2spNkUPdpl37QqjeQ0w0BtS70yNPA==
dependencies:
"@types/semver" "^7.3.4"

js-base64@^2.1.8:
version "2.6.4"
Expand Down Expand Up @@ -14654,9 +14660,9 @@ string-width@^3.0.0, string-width@^3.1.0:
strip-ansi "^5.1.0"

string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0:
version "4.2.1"
resolved "https://registrynpm.storefrontcloud.io/string-width/-/string-width-4.2.1.tgz#1933ce1f470973d224368009bd1316cad81d5f4f"
integrity sha512-LL0OLyN6AnfV9xqGQpDBwedT2Rt63737LxvsRxbcwpa2aIeynBApG2Sm//F3TaLHIR1aJBN52DWklc06b94o5Q==
version "4.2.2"
resolved "https://registrynpm.storefrontcloud.io/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"
integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
Expand Down Expand Up @@ -16289,9 +16295,9 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3:
iconv-lite "0.4.24"

whatwg-fetch@>=0.10.0:
version "3.6.1"
resolved "https://registrynpm.storefrontcloud.io/whatwg-fetch/-/whatwg-fetch-3.6.1.tgz#93bc4005af6c2cc30ba3e42ec3125947c8f54ed3"
integrity sha512-IEmN/ZfmMw6G1hgZpVd0LuZXOQDisrMOZrzYd5x3RAK4bMPlJohKUZWZ9t/QsTvH0dV9TbPDcc2OSuIDcihnHA==
version "3.6.2"
resolved "https://registrynpm.storefrontcloud.io/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c"
integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==

whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0:
version "2.3.0"
Expand Down

0 comments on commit 6c27af8

Please sign in to comment.