Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
feat: add build step to allow for nullish coalescing and optional chaining
Andrew Bastinf8bbf6613f10
diff --git a/packages/hoppscotch-app/jest.config.js b/packages/hoppscotch-app/jest.config.jsindex d52b88f4f..8248e4c49 100644--- a/packages/hoppscotch-app/jest.config.js+++ b/packages/hoppscotch-app/jest.config.js@@ -11,6 +11,13 @@ module.exports = {"^.+\\.js$": "babel-jest",".*\\.(vue)$": "vue-jest",},+ globals: {+ "vue-jest": {+ templateCompiler: {+ compiler: require("vue-template-babel-compiler"),+ },+ },+ },setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],snapshotSerializers: ["jest-serializer-vue"],collectCoverage: true,diff --git a/packages/hoppscotch-app/nuxt.config.js b/packages/hoppscotch-app/nuxt.config.jsindex 7a1255eda..c2867febb 100644--- a/packages/hoppscotch-app/nuxt.config.js+++ b/packages/hoppscotch-app/nuxt.config.js@@ -251,6 +251,11 @@ export default {// Build Configuration (https://go.nuxtjs.dev/config-build)build: {+ loaders: {+ vue: {+ compiler: require("vue-template-babel-compiler"),+ },+ },// You can extend webpack config hereextend(config, { isDev, isClient }) {// Sets webpack's mode to development if `isDev` is true.diff --git a/packages/hoppscotch-app/package.json b/packages/hoppscotch-app/package.jsonindex e5f426318..d2d6d6d56 100644--- a/packages/hoppscotch-app/package.json+++ b/packages/hoppscotch-app/package.json@@ -167,6 +167,7 @@"ts-jest": "^27.1.2","typescript": "^4.5.4","vue-jest": "^3.0.7",+ "vue-template-babel-compiler": "^1.0.8","worker-loader": "^3.0.8"}}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 508d68204..8fcd4d339 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -167,6 +167,7 @@ importers:vue-functional-data-merge: ^3.1.0vue-github-button: ^1.3.0vue-jest: ^3.0.7+ vue-template-babel-compiler: ^1.0.8vue-textarea-autosize: ^1.1.1vue-tippy: ^4.13.0vuejs-auto-complete: ^0.9.0@@ -307,6 +308,7 @@ importers:ts-jest: 27.1.2_ec062b4b172ee90337481ff2b9700ebctypescript: 4.5.4vue-jest: [email protected]+ vue-template-babel-compiler: 1.0.8worker-loader: 3.0.8packages/hoppscotch-data:@@ -452,7 +454,7 @@ packages:resolution: {integrity: sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==}engines: {node: '>=6.9.0'}dependencies:- '@babel/types': 7.16.0+ '@babel/types': 7.16.7jsesc: 2.5.2source-map: 0.5.7@@ -483,7 +485,7 @@ packages:peerDependencies:'@babel/core': ^7.0.0dependencies:- '@babel/compat-data': 7.16.0+ '@babel/compat-data': 7.16.4'@babel/core': 7.16.7'@babel/helper-validator-option': 7.16.7browserslist: 4.17.5@@ -502,23 +504,6 @@ packages:browserslist: 4.19.1semver: 6.3.0- /@babel/helper-create-class-features-plugin/7.16.0_@[email protected]:- resolution: {integrity: sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA==}- engines: {node: '>=6.9.0'}- peerDependencies:- '@babel/core': ^7.0.0- dependencies:- '@babel/core': 7.16.7- '@babel/helper-annotate-as-pure': 7.16.7- '@babel/helper-function-name': 7.16.7- '@babel/helper-member-expression-to-functions': 7.16.0- '@babel/helper-optimise-call-expression': 7.16.7- '@babel/helper-replace-supers': 7.16.7- '@babel/helper-split-export-declaration': 7.16.7- transitivePeerDependencies:- - supports-color- dev: false-/@babel/helper-create-class-features-plugin/7.16.7_@[email protected]:resolution: {integrity: sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==}engines: {node: '>=6.9.0'}@@ -552,8 +537,8 @@ packages:'@babel/core': ^7.4.0-0dependencies:'@babel/core': 7.16.7- '@babel/helper-compilation-targets': 7.16.0_@[email protected]- '@babel/helper-module-imports': 7.16.0+ '@babel/helper-compilation-targets': 7.16.7_@[email protected]+ '@babel/helper-module-imports': 7.16.7'@babel/helper-plugin-utils': 7.16.7'@babel/traverse': 7.16.7debug: 4.3.3@@ -599,8 +584,7 @@ packages:dependencies:'@babel/helper-get-function-arity': 7.16.0'@babel/template': 7.16.0- '@babel/types': 7.16.0- dev: false+ '@babel/types': 7.16.7/@babel/helper-function-name/7.16.7:resolution: {integrity: sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==}@@ -614,8 +598,7 @@ packages:resolution: {integrity: sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==}engines: {node: '>=6.9.0'}dependencies:- '@babel/types': 7.16.0- dev: false+ '@babel/types': 7.16.7/@babel/helper-get-function-arity/7.16.7:resolution: {integrity: sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==}@@ -627,8 +610,7 @@ packages:resolution: {integrity: sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==}engines: {node: '>=6.9.0'}dependencies:- '@babel/types': 7.16.0- dev: false+ '@babel/types': 7.16.7/@babel/helper-hoist-variables/7.16.7:resolution: {integrity: sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==}@@ -636,13 +618,6 @@ packages:dependencies:'@babel/types': 7.16.7- /@babel/helper-member-expression-to-functions/7.16.0:- resolution: {integrity: sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==}- engines: {node: '>=6.9.0'}- dependencies:- '@babel/types': 7.16.7- dev: false-/@babel/helper-member-expression-to-functions/7.16.7:resolution: {integrity: sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==}engines: {node: '>=6.9.0'}@@ -729,8 +704,7 @@ packages:resolution: {integrity: sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==}engines: {node: '>=6.9.0'}dependencies:- '@babel/types': 7.16.0- dev: false+ '@babel/types': 7.16.7/@babel/helper-split-export-declaration/7.16.7:resolution: {integrity: sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==}@@ -841,19 +815,6 @@ packages:transitivePeerDependencies:- supports-color- /@babel/plugin-proposal-class-properties/7.16.0_@[email protected]:- resolution: {integrity: sha512-mCF3HcuZSY9Fcx56Lbn+CGdT44ioBMMvjNVldpKtj8tpniETdLjnxdHI1+sDWXIM1nNt+EanJOZ3IG9lzVjs7A==}- engines: {node: '>=6.9.0'}- peerDependencies:- '@babel/core': ^7.0.0-0- dependencies:- '@babel/core': 7.16.7- '@babel/helper-create-class-features-plugin': 7.16.0_@[email protected]- '@babel/helper-plugin-utils': 7.16.7- transitivePeerDependencies:- - supports-color- dev: false-/@babel/plugin-proposal-class-properties/7.16.7_@[email protected]:resolution: {integrity: sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==}engines: {node: '>=6.9.0'}@@ -886,7 +847,7 @@ packages:'@babel/core': ^7.0.0-0dependencies:'@babel/core': 7.16.7- '@babel/helper-create-class-features-plugin': 7.16.0_@[email protected]+ '@babel/helper-create-class-features-plugin': 7.16.7_@[email protected]'@babel/helper-plugin-utils': 7.16.7'@babel/plugin-syntax-decorators': 7.16.0_@[email protected]transitivePeerDependencies:@@ -933,8 +894,8 @@ packages:'@babel/helper-plugin-utils': 7.16.7'@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@[email protected]- /@babel/plugin-proposal-nullish-coalescing-operator/7.16.0_@[email protected]:- resolution: {integrity: sha512-3bnHA8CAFm7cG93v8loghDYyQ8r97Qydf63BeYiGgYbjKKB/XP53W15wfRC7dvKfoiJ34f6Rbyyx2btExc8XsQ==}+ /@babel/plugin-proposal-nullish-coalescing-operator/7.16.5_@[email protected]:+ resolution: {integrity: sha512-YwMsTp/oOviSBhrjwi0vzCUycseCYwoXnLiXIL3YNjHSMBHicGTz7GjVU/IGgz4DtOEXBdCNG72pvCX22ehfqg==}engines: {node: '>=6.9.0'}peerDependencies:'@babel/core': ^7.0.0-0@@ -942,7 +903,6 @@ packages:'@babel/core': 7.16.7'@babel/helper-plugin-utils': 7.16.7'@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@[email protected]- dev: false/@babel/plugin-proposal-nullish-coalescing-operator/7.16.7_@[email protected]:resolution: {integrity: sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==}@@ -987,8 +947,8 @@ packages:'@babel/helper-plugin-utils': 7.16.7'@babel/plugin-syntax-optional-catch-binding': 7.8.3_@[email protected]- /@babel/plugin-proposal-optional-chaining/7.16.0_@[email protected]:- resolution: {integrity: sha512-Y4rFpkZODfHrVo70Uaj6cC1JJOt3Pp0MdWSwIKtb8z1/lsjl9AmnB7ErRFV+QNGIfcY1Eruc2UMx5KaRnXjMyg==}+ /@babel/plugin-proposal-optional-chaining/7.16.5_@[email protected]:+ resolution: {integrity: sha512-kzdHgnaXRonttiTfKYnSVafbWngPPr2qKw9BWYBESl91W54e+9R5pP70LtWxV56g0f05f/SQrwHYkfvbwcdQ/A==}engines: {node: '>=6.9.0'}peerDependencies:'@babel/core': ^7.0.0-0@@ -997,7 +957,6 @@ packages:'@babel/helper-plugin-utils': 7.16.7'@babel/helper-skip-transparent-expression-wrappers': 7.16.0'@babel/plugin-syntax-optional-chaining': 7.8.3_@[email protected]- dev: false/@babel/plugin-proposal-optional-chaining/7.16.7_@[email protected]:resolution: {integrity: sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==}@@ -1010,19 +969,6 @@ packages:'@babel/helper-skip-transparent-expression-wrappers': 7.16.0'@babel/plugin-syntax-optional-chaining': 7.8.3_@[email protected]- /@babel/plugin-proposal-private-methods/7.16.0_@[email protected]:- resolution: {integrity: sha512-IvHmcTHDFztQGnn6aWq4t12QaBXTKr1whF/dgp9kz84X6GUcwq9utj7z2wFCUfeOup/QKnOlt2k0zxkGFx9ubg==}- engines: {node: '>=6.9.0'}- peerDependencies:- '@babel/core': ^7.0.0-0- dependencies:- '@babel/core': 7.16.7- '@babel/helper-create-class-features-plugin': 7.16.0_@[email protected]- '@babel/helper-plugin-utils': 7.16.7- transitivePeerDependencies:- - supports-color- dev: false-/@babel/plugin-proposal-private-methods/7.16.7_@[email protected]:resolution: {integrity: sha512-7twV3pzhrRxSwHeIvFE6coPgvo+exNDOiGUMg39o2LiLo1Y+4aKpfkcLGcg1UHonzorCt7SNXnoMyCnnIOA8Sw==}engines: {node: '>=6.9.0'}@@ -1073,7 +1019,7 @@ packages:'@babel/core': ^7.0.0-0dependencies:'@babel/core': 7.16.7- '@babel/helper-plugin-utils': 7.16.5+ '@babel/helper-plugin-utils': 7.16.7dev: true/@babel/plugin-syntax-class-properties/7.12.13_@[email protected]:@@ -1135,7 +1081,7 @@ packages:'@babel/core': ^7.0.0-0dependencies:'@babel/core': 7.16.7- '@babel/helper-plugin-utils': 7.16.5+ '@babel/helper-plugin-utils': 7.16.7dev: true/@babel/plugin-syntax-json-strings/7.8.3_@[email protected]:@@ -1547,7 +1493,7 @@ packages:'@babel/core': ^7.0.0-0dependencies:'@babel/core': 7.16.7- '@babel/helper-module-imports': 7.16.0+ '@babel/helper-module-imports': 7.16.7'@babel/helper-plugin-utils': 7.16.7babel-plugin-polyfill-corejs2: 0.2.3_@[email protected]babel-plugin-polyfill-corejs3: 0.3.0_@[email protected]@@ -1736,15 +1682,21 @@ packages:dependencies:'@babel/code-frame': 7.16.0'@babel/parser': 7.16.6- '@babel/types': 7.16.0+ '@babel/types': 7.16.7/@babel/template/7.16.7:resolution: {integrity: sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==}engines: {node: '>=6.9.0'}dependencies:'@babel/code-frame': 7.16.7+ '@babel/generator': 7.16.5+ '@babel/helper-function-name': 7.16.0+ '@babel/helper-hoist-variables': 7.16.0+ '@babel/helper-split-export-declaration': 7.16.0'@babel/parser': 7.16.7'@babel/types': 7.16.7+ debug: 4.3.3+ globals: 11.12.0/@babel/traverse/7.16.0:resolution: {integrity: sha512-qQ84jIs1aRQxaGaxSysII9TuDaguZ5yVrEuC0BN2vcPlalwfLovVmCjbFDPECPXcYM/wLvNFfp8uDOliLxIoUQ==}@@ -1773,7 +1725,7 @@ packages:'@babel/helper-hoist-variables': 7.16.7'@babel/helper-split-export-declaration': 7.16.7'@babel/parser': 7.16.4- '@babel/types': 7.16.0+ '@babel/types': 7.16.7debug: 4.3.3globals: 11.12.0transitivePeerDependencies:@@ -3571,11 +3523,11 @@ packages:'@babel/core': 7.16.7'@babel/helper-compilation-targets': 7.16.0_@[email protected]'@babel/helper-module-imports': 7.16.0- '@babel/plugin-proposal-class-properties': 7.16.0_@[email protected]+ '@babel/plugin-proposal-class-properties': 7.16.7_@[email protected]'@babel/plugin-proposal-decorators': 7.16.0_@[email protected]- '@babel/plugin-proposal-nullish-coalescing-operator': 7.16.0_@[email protected]- '@babel/plugin-proposal-optional-chaining': 7.16.0_@[email protected]- '@babel/plugin-proposal-private-methods': 7.16.0_@[email protected]+ '@babel/plugin-proposal-nullish-coalescing-operator': 7.16.5_@[email protected]+ '@babel/plugin-proposal-optional-chaining': 7.16.5_@[email protected]+ '@babel/plugin-proposal-private-methods': 7.16.7_@[email protected]'@babel/plugin-transform-runtime': 7.16.0_@[email protected]'@babel/preset-env': 7.16.7_@[email protected]'@babel/runtime': 7.16.3@@ -4510,20 +4462,20 @@ packages:/@types/babel__generator/7.6.3:resolution: {integrity: sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA==}dependencies:- '@babel/types': 7.16.0+ '@babel/types': 7.16.7dev: true/@types/babel__template/7.4.1:resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==}dependencies:'@babel/parser': 7.16.6- '@babel/types': 7.16.0+ '@babel/types': 7.16.7dev: true/@types/babel__traverse/7.14.2:resolution: {integrity: sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==}dependencies:- '@babel/types': 7.16.0+ '@babel/types': 7.16.7dev: true/@types/body-parser/1.19.1:@@ -6124,7 +6076,7 @@ packages:engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}dependencies:'@babel/template': 7.16.0- '@babel/types': 7.16.0+ '@babel/types': 7.16.7'@types/babel__core': 7.1.17'@types/babel__traverse': 7.14.2dev: true@@ -6134,7 +6086,7 @@ packages:peerDependencies:'@babel/core': ^7.0.0-0dependencies:- '@babel/compat-data': 7.16.0+ '@babel/compat-data': 7.16.4'@babel/core': 7.16.7'@babel/helper-define-polyfill-provider': 0.2.4_@[email protected]semver: 6.3.0@@ -6161,7 +6113,7 @@ packages:dependencies:'@babel/core': 7.16.7'@babel/helper-define-polyfill-provider': 0.2.4_@[email protected]- core-js-compat: 3.19.0+ core-js-compat: 3.20.1transitivePeerDependencies:- supports-colordev: false@@ -17897,6 +17849,25 @@ packages:svg-to-vue: 0.7.0dev: true+ /vue-template-babel-compiler/1.0.8:+ resolution: {integrity: sha512-V4mgSIep9wJRFKP1t1V+C+wUh1pgcmjxayRldd/KeuU5Sa4oZNEH1MOo+zcB8uugV7G9vIJSeGELBFQmLRgixA==}+ engines: {node: '>=12.0.0'}+ dependencies:+ '@babel/core': 7.16.7+ '@babel/plugin-proposal-nullish-coalescing-operator': 7.16.5_@[email protected]+ '@babel/plugin-proposal-object-rest-spread': 7.16.7_@[email protected]+ '@babel/plugin-proposal-optional-chaining': 7.16.5_@[email protected]+ '@babel/plugin-transform-arrow-functions': 7.16.7_@[email protected]+ '@babel/plugin-transform-block-scoping': 7.16.7_@[email protected]+ '@babel/plugin-transform-computed-properties': 7.16.7_@[email protected]+ '@babel/plugin-transform-destructuring': 7.16.7_@[email protected]+ '@babel/plugin-transform-parameters': 7.16.7_@[email protected]+ '@babel/plugin-transform-spread': 7.16.7_@[email protected]+ '@babel/types': 7.16.0+ transitivePeerDependencies:+ - supports-color+ dev: true+/vue-template-compiler/2.6.14:resolution: {integrity: sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==}dependencies: