diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98175eecf5..097b8aab78 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,6 +16,9 @@ jobs: test_repository: name: Run linter, build and test all packages runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14, 16, 18] steps: - name: Checkout code uses: actions/checkout@v2 @@ -23,7 +26,7 @@ jobs: - name: Setup node uses: actions/setup-node@v2 with: - node-version: '14' + node-version: ${{ matrix.node-version }} cache: 'yarn' - name: Install dependencies diff --git a/package.json b/package.json index 7dd7744af6..319fe6f9b2 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "dev:docs": "cd packages/docs && yarn dev", "link-packages": "lerna link --force-local", "lint": "eslint . --ext .js,.ts,.vue", + "test": "lerna run test", "test:cache": "cd packages/cache && yarn test", "test:http-cache": "cd packages/http-cache && yarn test", "test:cli": "cd packages/cli && yarn test", @@ -49,7 +50,7 @@ "rimraf": "^3.0.2", "rollup": "^2.59.0", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.30.0", + "rollup-plugin-typescript2": "^0.33", "ts-jest": "^27.0.3", "ts-node": "^8.4.1", "tslib": "^2.1.0", diff --git a/packages/cache/__tests__/nuxtModule.spec.ts b/packages/cache/__tests__/nuxtModule.spec.ts index 32faaf327f..1464f7836c 100644 --- a/packages/cache/__tests__/nuxtModule.spec.ts +++ b/packages/cache/__tests__/nuxtModule.spec.ts @@ -14,8 +14,9 @@ const mockNuxt = { addPlugin: jest.fn(), addServerMiddleware: jest.fn(({ handler }) => { - // Simulate request to invalidation endpoint - handler({}, { writeHead: jest.fn(), end: jest.fn() }); + const responseMock = { writeHead: jest.fn(), end: jest.fn(), status: jest.fn(() => responseMock), send: jest.fn() }; + + handler({}, responseMock); }) }; diff --git a/packages/cache/jest.config.js b/packages/cache/jest.config.js index f96d74f708..22b8b7a0ca 100644 --- a/packages/cache/jest.config.js +++ b/packages/cache/jest.config.js @@ -1,3 +1,5 @@ const baseConfig = require('../jest.base.config'); -module.exports = baseConfig; +module.exports = { + ...baseConfig +}; diff --git a/packages/cache/package.json b/packages/cache/package.json index d2564760a6..64ecf39585 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/cache", - "version": "2.7.5", + "version": "2.8.0", "license": "MIT", "main": "lib/index.cjs.js", "module": "lib/index.es.js", @@ -12,7 +12,7 @@ "prepublish": "yarn build" }, "dependencies": { - "@vue-storefront/core": "~2.7.5" + "@vue-storefront/core": "^2.8.0" }, "peerDependencies": { "@nuxtjs/composition-api": "^0.29.3" diff --git a/packages/cli/package.json b/packages/cli/package.json index d694b73348..4b1dc189f0 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/cli", - "version": "4.2.2", + "version": "4.3.0", "description": "Vue Storefront's CLI.", "bin": "./bin/run", "homepage": "https://github.com/vuestorefront/vue-storefront", diff --git a/packages/core/__tests__/factories/_mountComposable.ts b/packages/core/__tests__/factories/_mountComposable.ts deleted file mode 100644 index 4272687e8b..0000000000 --- a/packages/core/__tests__/factories/_mountComposable.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable */ - -import { shallowMount, VueClass } from '@vue/test-utils'; -import { createComponent } from '@nuxtjs/composition-api'; - -const mountComposable: any = (composableFn: Function) => { - const component = createComponent({ - template: '
my component
', - setup() { - return composableFn(); - } - }); - - return shallowMount(component as VueClass); -}; - -export default mountComposable; diff --git a/packages/core/package.json b/packages/core/package.json index ccf4fc6199..f785cf0c84 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/core", - "version": "2.7.6", + "version": "2.8.0", "sideEffects": false, "main": "lib/index.cjs.js", "module": "lib/index.es.js", @@ -37,6 +37,6 @@ "access": "public" }, "engines": { - "node": ">=14 <=16" + "node": ">= 14" } } diff --git a/packages/docs/changelog/6869.js b/packages/docs/changelog/6869.js deleted file mode 100644 index edb223902a..0000000000 --- a/packages/docs/changelog/6869.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - description: 'feat!: plugins pass X-Forwarded-Host header with fallback to the Host header in server to server communication #6869.', - link: 'https://github.com/vuestorefront/vue-storefront/pull/6869', - isBreaking: false, - author: 'Filip Jędrasik', - linkToGitHubAccount: 'https://github.com/Fifciu' -}; diff --git a/packages/docs/reference/changelog.md b/packages/docs/reference/changelog.md index 0435d9a06e..06495e8c5e 100644 --- a/packages/docs/reference/changelog.md +++ b/packages/docs/reference/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 2.8.0 + +- feat: add support for the Node 18 ([6943](https://github.com/vuestorefront/vue-storefront/pull/6943)) - [Bartosz Herba](https://github.com/bartoszherba) + ## 2.7.6 - chore: enhance custom query to allow sending metadata as object ([6928](https://github.com/vuestorefront/vue-storefront/pull/6928)) @@ -52,7 +56,7 @@ Date: 05.07.2022 - Docs update / corrects / fixes -- All new CLI `3.0.0` +- All new CLI `3.0.0` ## 2.5.13 diff --git a/packages/health-check/package.json b/packages/health-check/package.json index f3db64f69c..4f0e932142 100644 --- a/packages/health-check/package.json +++ b/packages/health-check/package.json @@ -1,10 +1,10 @@ { "name": "@vue-storefront/health-check", - "version": "2.7.5", + "version": "2.8.0", "description": "", "main": "lib/module.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\"" }, "author": "Vue Storefront", "license": "MIT", @@ -20,6 +20,6 @@ }, "homepage": "https://github.com/vuestorefront/vue-storefront#readme", "engines": { - "node": ">=14 <=16" + "node": ">= 14" } } diff --git a/packages/http-cache/package.json b/packages/http-cache/package.json index c40dddc899..2f4b3c31de 100644 --- a/packages/http-cache/package.json +++ b/packages/http-cache/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/http-cache", - "version": "2.7.5", + "version": "2.8.0", "license": "MIT", "scripts": { "test": "jest" @@ -20,6 +20,6 @@ }, "homepage": "https://github.com/vuestorefront/vue-storefront#readme", "engines": { - "node": ">=14 <=16" + "node": ">= 14" } } diff --git a/packages/middleware/jest.config.js b/packages/middleware/jest.config.js index b3c781423b..22b8b7a0ca 100644 --- a/packages/middleware/jest.config.js +++ b/packages/middleware/jest.config.js @@ -1,6 +1,5 @@ const baseConfig = require('../jest.base.config'); module.exports = { - ...baseConfig, - collectCoverage: true + ...baseConfig }; diff --git a/packages/middleware/package.json b/packages/middleware/package.json index 23fad33564..03af018479 100644 --- a/packages/middleware/package.json +++ b/packages/middleware/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/middleware", - "version": "2.7.5", + "version": "2.8.0", "description": "", "main": "lib/index.cjs.js", "module": "lib/index.es.js", @@ -15,7 +15,7 @@ "author": "Vue Storefront", "license": "MIT", "dependencies": { - "@vue-storefront/core": "~2.7.5", + "@vue-storefront/core": "^2.8.0", "consola": "2.15.3", "cookie-parser": "^1.4.5", "cors": "^2.8.5", diff --git a/packages/nuxt-module/package.json b/packages/nuxt-module/package.json index 40685d79d5..99a9f6ac4b 100644 --- a/packages/nuxt-module/package.json +++ b/packages/nuxt-module/package.json @@ -1,12 +1,12 @@ { "name": "@vue-storefront/nuxt", - "version": "2.7.5", + "version": "2.8.0", "main": "lib/index.cjs.js", "module": "lib/index.es.js", "types": "lib/src/index.d.ts", "scripts": { "build": "rimraf lib && rollup -c", - "test": "echo \"Error: no test specified\" && exit 1", + "test": "echo \"Error: no test specified\"", "prepublish": "yarn build" }, "author": "Vue Storefront", @@ -33,6 +33,6 @@ "plugins/**/*" ], "engines": { - "node": ">=14 <=16" + "node": ">= 14" } } diff --git a/packages/nuxt-theme-module/package.json b/packages/nuxt-theme-module/package.json index 83b2752b94..4744e85dae 100644 --- a/packages/nuxt-theme-module/package.json +++ b/packages/nuxt-theme-module/package.json @@ -1,10 +1,10 @@ { "name": "@vue-storefront/nuxt-theme", - "version": "2.7.5", + "version": "2.8.0", "description": "", "main": "lib/module.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\"" }, "author": "Vue Storefront", "license": "MIT", @@ -29,6 +29,6 @@ "@nuxtjs/composition-api": "^0.29.3" }, "engines": { - "node": ">=14 <=16" + "node": ">= 14" } } diff --git a/yarn.lock b/yarn.lock index 3c6c118de9..24b3f545bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2945,7 +2945,7 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rollup/pluginutils@^4.1.0", "@rollup/pluginutils@^4.1.1": +"@rollup/pluginutils@^4.1.1", "@rollup/pluginutils@^4.1.2": version "4.2.1" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ== @@ -8444,7 +8444,7 @@ find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.3.1: +find-cache-dir@^3.3.1, find-cache-dir@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== @@ -10204,7 +10204,7 @@ is-color-stop@^1.0.0, is-color-stop@^1.1.0: rgb-regex "^1.0.1" rgba-regex "^1.0.0" -is-core-module@^2.1.0, is-core-module@^2.2.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.1.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== @@ -15123,14 +15123,6 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@1.20.0: - version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" @@ -15245,16 +15237,15 @@ rollup-plugin-terser@^7.0.2: serialize-javascript "^4.0.0" terser "^5.0.0" -rollup-plugin-typescript2@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.30.0.tgz#1cc99ac2309bf4b9d0a3ebdbc2002aecd56083d3" - integrity sha512-NUFszIQyhgDdhRS9ya/VEmsnpTe+GERDMmFo0Y+kf8ds51Xy57nPNGglJY+W6x1vcouA7Au7nsTgsLFj2I0PxQ== +rollup-plugin-typescript2@^0.33: + version "0.33.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.33.0.tgz#2bb943f83e9d3a4c61a19aed5bee5bcff28d16a3" + integrity sha512-7ZXoZeX93kNb4/ICzOi2AlperVV6cAsNz8THqrbz+KNvpn47P2F/nFdK/BGhkoOsOwuYDuY57vccdZZrcd8/dA== dependencies: - "@rollup/pluginutils" "^4.1.0" - find-cache-dir "^3.3.1" - fs-extra "8.1.0" - resolve "1.20.0" - tslib "2.1.0" + "@rollup/pluginutils" "^4.1.2" + find-cache-dir "^3.3.2" + fs-extra "^10.0.0" + tslib "^2.4.0" rollup@^2.59.0: version "2.75.7" @@ -16963,11 +16954,6 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" - integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== - tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"