diff --git a/package.json b/package.json index 60c8578753..6bc84e41e1 100644 --- a/package.json +++ b/package.json @@ -37,12 +37,12 @@ "@ls-lint/ls-lint": "^1.8.1", "@nuxtjs/eslint-config": "^3.0.0", "@rollup/plugin-alias": "^3.1.0", - "@rollup/plugin-commonjs": "^11.0.2", + "@rollup/plugin-commonjs": "^11.1.0", "@rollup/plugin-json": "^4.0.3", "@rollup/plugin-node-resolve": "^7.1.3", "@rollup/plugin-replace": "^2.3.2", - "@vue/server-test-utils": "^1.0.2", - "@vue/test-utils": "^1.0.2", + "@vue/server-test-utils": "^1.0.3", + "@vue/test-utils": "^1.0.3", "babel-eslint": "^10.1.0", "babel-jest": "^26.0.1", "consola": "^2.12.1", @@ -56,8 +56,8 @@ "fs-extra": "^8.1.0", "get-port": "^5.1.1", "glob": "^7.1.6", - "got": "^11.1.3", - "improved-yarn-audit": "^2.0.0", + "got": "^11.1.4", + "improved-yarn-audit": "^2.1.0", "is-wsl": "^2.2.0", "jest": "^26.0.1", "jsdom": "^16.2.2", diff --git a/test/utils/index.js b/test/utils/index.js index b8e7a373c7..7c210e2bd2 100644 --- a/test/utils/index.js +++ b/test/utils/index.js @@ -1,13 +1,13 @@ import klawSync from 'klaw-sync' +import got from 'got' export { getNuxtConfig } from '../../packages/config' export { default as getPort } from 'get-port' -export { default as rp } from 'got' export * from './nuxt' export * from './resource-size' -export const listPaths = function listPaths (dir, pathsBefore = [], options = {}) { +export function listPaths (dir, pathsBefore = [], options = {}) { if (Array.isArray(pathsBefore) && pathsBefore.length) { // Only return files that didn't exist before building // and files that have been changed @@ -23,6 +23,8 @@ export const listPaths = function listPaths (dir, pathsBefore = [], options = {} return klawSync(dir, options) } -export const equalOrStartsWith = function equalOrStartsWith (string1, string2) { +export function equalOrStartsWith (string1, string2) { return string1 === string2 || string2.startsWith(string1) } + +export const rp = got.extend({ decompress: false }) diff --git a/yarn.lock b/yarn.lock index 7060093ef1..bb6de99267 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1992,7 +1992,7 @@ dependencies: slash "^3.0.0" -"@rollup/plugin-commonjs@^11.0.2": +"@rollup/plugin-commonjs@^11.1.0": version "11.1.0" resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz#60636c7a722f54b41e419e1709df05c7234557ef" integrity sha512-Ycr12N3ZPN96Fw2STurD21jMqzKwL9QuFhms3SD7KKRK7oaXUsBU9Zt0jL/rOPHiPYisI21/rXGO3jr9BnLHUA== @@ -2418,18 +2418,18 @@ optionalDependencies: prettier "^1.18.2" -"@vue/server-test-utils@^1.0.2": - version "1.0.2" - resolved "https://registry.npmjs.org/@vue/server-test-utils/-/server-test-utils-1.0.2.tgz#b9d11ae5fe08185270dee309c348f3608d6f91fe" - integrity sha512-71IDCsVjZ9CsuBd2aQqdGacncYYglfhhOlb4OBlV7pYZdPD9yoHGoW2HPbxxE7qvcPjie/52Z9PUE0mdNGznrA== +"@vue/server-test-utils@^1.0.3": + version "1.0.3" + resolved "https://registry.npmjs.org/@vue/server-test-utils/-/server-test-utils-1.0.3.tgz#7ece4789ce01a3622debf2cc365a0078e9978158" + integrity sha512-PCMNKoBxbXUow0ZDI4x+HZwQ/RFbFG0+UrrgBZLpzqKdDMZX9s71P9/MVEvE7fopLOP9esE+P+7f93H76cUssw== dependencies: "@types/cheerio" "^0.22.10" cheerio "^1.0.0-rc.2" -"@vue/test-utils@^1.0.2": - version "1.0.2" - resolved "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.2.tgz#68134747cb88d996e4c9703ca4b103b4d23fda14" - integrity sha512-pnRWJbb0cLqjSJIKRpqoSISeYtufEn8D16VmhlCrDWIVt4iAY4Og4JpOPmFytvtQVz96p6n7T6ERI55ue6n0Ew== +"@vue/test-utils@^1.0.3": + version "1.0.3" + resolved "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.3.tgz#587c4dd9b424b66022f188c19bc605da2ce91c6f" + integrity sha512-mmsKXZSGfvd0bH05l4SNuczZ2MqlJH2DWhiul5wJXFxbf/gRRd2UL4QZgozEMQ30mRi9i4/+p4JJat8S4Js64Q== dependencies: dom-event-types "^1.0.0" lodash "^4.17.15" @@ -3530,10 +3530,10 @@ cache-loader@^4.1.0: neo-async "^2.6.1" schema-utils "^2.0.0" -cacheable-lookup@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-4.3.0.tgz#86ff1cb38f648cc6aba28feffe008f808b403550" - integrity sha512-PTUoCeIjj2awloqyVRUL33SjquU1Qv5xuDalYY8WAzd9NnUMUivZnGsOzVsMfg2YuMsWXaXkd/hjnsVoWc/3YA== +cacheable-lookup@^5.0.3: + version "5.0.3" + resolved "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.3.tgz#049fdc59dffdd4fc285e8f4f82936591bd59fec3" + integrity sha512-W+JBqF9SWe18A72XFzN/V/CULFzPm7sBXzzR6ekkE+3tLG72wFZrBiBZhrZuDoYexop4PHJVdFAKb/Nj9+tm9w== cacheable-request@^7.0.1: version "7.0.1" @@ -4675,12 +4675,12 @@ decode-uri-component@^0.2.0: resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= -decompress-response@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-5.0.0.tgz#7849396e80e3d1eba8cb2f75ef4930f76461cb0f" - integrity sha512-TLZWWybuxWgoW7Lykv+gq9xvzOsUjQ9tF09Tj6NSTYGMTCHNXzrPnD6Hi+TgZq19PyTAGH4Ll/NIM/eTGglnMw== +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== dependencies: - mimic-response "^2.0.0" + mimic-response "^3.1.0" dedent@^0.7.0: version "0.7.0" @@ -6224,18 +6224,18 @@ globule@^1.0.0: lodash "~4.17.12" minimatch "~3.0.2" -got@^11.1.3: - version "11.1.3" - resolved "https://registry.npmjs.org/got/-/got-11.1.3.tgz#bcb624c636f9c4da5a82a7d7c9017fcad6e2905a" - integrity sha512-JnGxEHZiy0ZArb/zhfu1Gxoksy9PjhQ4GAk6N4UArV/m1JdE7cGNVXbUDnrQk+nU7UPMDX+BHQAP0daMjsnTtQ== +got@^11.1.4: + version "11.1.4" + resolved "https://registry.npmjs.org/got/-/got-11.1.4.tgz#ecf0064aab26ae4b2989ab52aadd31a17e7bad63" + integrity sha512-z94KIXHhFSpJONuY6C6w1wC+igE7P1d0b5h3H2CvrOXn0/tum/OgFblIGUAxI5PBXukGLvKb9MJXVHW8vsYaBA== dependencies: "@sindresorhus/is" "^2.1.1" "@szmarczak/http-timer" "^4.0.5" "@types/cacheable-request" "^6.0.1" "@types/responselike" "^1.0.0" - cacheable-lookup "^4.3.0" + cacheable-lookup "^5.0.3" cacheable-request "^7.0.1" - decompress-response "^5.0.0" + decompress-response "^6.0.0" get-stream "^5.1.0" http2-wrapper "^1.0.0-beta.4.5" lowercase-keys "^2.0.0" @@ -6712,10 +6712,10 @@ import-modules@^2.0.0: resolved "https://registry.npmjs.org/import-modules/-/import-modules-2.0.0.tgz#9c1e13b4e7a15682f70a6e3fa29534e4540cfc5d" integrity sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw== -improved-yarn-audit@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/improved-yarn-audit/-/improved-yarn-audit-2.0.0.tgz#8819a7c22c0fd9c6df4b49a4c2f88a33e31c469e" - integrity sha512-IfySlTAOEEdI/MDSgH0WO8K28K1z4KQr5eEpUJyvuF1aAfWp/PTxuonboRxd0oKWuPZcrUsMZxwKvN4jpEIJeg== +improved-yarn-audit@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/improved-yarn-audit/-/improved-yarn-audit-2.1.0.tgz#de87f6960ef53a867c5bc031f155a2cda909deff" + integrity sha512-Aus0dM+kbWm1srPkWunnQh1ddfyBRM8I43ACx+blzazBvlw4fC9IRBs3HDQwFOtJZh1gNTgMHSEH8xagpSmzSg== imurmurhash@^0.1.4: version "0.1.4" @@ -8401,10 +8401,10 @@ mimic-response@^1.0.0: resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== -mimic-response@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" - integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== min-indent@^1.0.0: version "1.0.0"