Skip to content

Commit

Permalink
chore: Migrate envelop core to v5 (#2480)
Browse files Browse the repository at this point in the history
## What's the purpose of this pull request?

Update the Envelop to v5.

## How it works?

Like the v4 migration, this one did not require any changes other than
changing the version.

## How to test it?

Run the project and check if it continues working the same.

### Starters Deploy Preview

Here is the preview of the starter store:
https://sfj-b81808d--starter.preview.vtex.app/
([PR](vtex-sites/starter.store#568)).

I've also updated the playground store to test in a store with some
level of customization (API extension for example):
https://sfj-1dad18a--playground.preview.vtex.app/
([PR](vtex-sites/playground.store#99)).

## References

- [Envelop
release](https://github.com/n1ru4l/envelop/releases/tag/release-1697443919030)
- [Jira task](https://vtex-dev.atlassian.net/browse/SFS-1561)
  • Loading branch information
lariciamota authored Oct 10, 2024
1 parent 8de84b1 commit 67b50bd
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 60 deletions.
6 changes: 3 additions & 3 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"generate": "graphql-codegen --config codegen.yml"
},
"dependencies": {
"@envelop/on-resolve": "^3.0.0",
"@envelop/on-resolve": "^4.1.1",
"@graphql-tools/load-files": "^7.0.0",
"@graphql-tools/schema": "^9.0.0",
"@opentelemetry/exporter-logs-otlp-grpc": "^0.39.1",
Expand All @@ -50,7 +50,7 @@
"sanitize-html": "^2.11.0"
},
"devDependencies": {
"@envelop/core": "^4.0.0",
"@envelop/core": "^5.0.2",
"@faststore/eslint-config": "^3.0.116",
"@faststore/shared": "^3.0.116",
"@graphql-codegen/cli": "2.2.0",
Expand All @@ -73,7 +73,7 @@
"typescript": "^5.3.2"
},
"peerDependencies": {
"@envelop/core": "^4",
"@envelop/core": "^5",
"graphql": "^15.6.0"
},
"volta": {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"dependencies": {
"@antfu/ni": "^0.21.12",
"@builder.io/partytown": "^0.6.1",
"@envelop/core": "^4.0.0",
"@envelop/graphql-jit": "^4.0.0",
"@envelop/parser-cache": "^4.0.0",
"@envelop/validation-cache": "^4.0.0",
"@envelop/core": "^5.0.2",
"@envelop/graphql-jit": "^8.0.3",
"@envelop/parser-cache": "^6.0.2",
"@envelop/validation-cache": "^6.0.2",
"@faststore/api": "^3.0.129",
"@faststore/components": "^3.0.116",
"@faststore/graphql-utils": "^3.0.116",
Expand Down
161 changes: 108 additions & 53 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -867,35 +867,35 @@
debug "^3.1.0"
lodash.once "^4.1.1"

"@envelop/core@^4.0.0":
version "4.0.3"
resolved "https://registry.yarnpkg.com/@envelop/core/-/core-4.0.3.tgz#6bc3e1ed3b31aa41d81106eb5071a9b8eec188d0"
integrity sha512-O0Vz8E0TObT6ijAob8jYFVJavcGywKThM3UAsxUIBBVPYZTMiqI9lo2gmAnbMUnrDcAYkUTZEW9FDYPRdF5l6g==
"@envelop/core@^5.0.2":
version "5.0.2"
resolved "https://registry.yarnpkg.com/@envelop/core/-/core-5.0.2.tgz#f9649c72e66d78b55aafa0d2d2cfa5f9c3bfc127"
integrity sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw==
dependencies:
"@envelop/types" "4.0.1"
"@envelop/types" "5.0.0"
tslib "^2.5.0"

"@envelop/graphql-jit@^4.0.0":
version "4.6.0"
resolved "https://registry.yarnpkg.com/@envelop/graphql-jit/-/graphql-jit-4.6.0.tgz#3b771d1fa7c6907f7d64120382a3e9f405a8cbaa"
integrity sha512-6RM+uSfKN7i9rlEcaAvraF/GsFNB4JoCuEUDEdMjOxJVoADvg1MsmzgGPoIAlpZZIQ//A8Pp+A+qWkJW4Wn4PA==
"@envelop/graphql-jit@^8.0.3":
version "8.0.3"
resolved "https://registry.yarnpkg.com/@envelop/graphql-jit/-/graphql-jit-8.0.3.tgz#6b3fe0fcf9b0dfbfb02571327dd60ebd5ef74d6e"
integrity sha512-IZnKc7dVOQV9jEi5s5RkG8fVKqc6Ss/mBN9PRt2iYFa9o6XkL/haPLJRfWFsS/CSJfFOQuzLyxYuALA8DaoOYw==
dependencies:
graphql-jit "^0.7.0"
lru-cache "^6.0.0"
tslib "^2.4.0"
graphql-jit "0.8.6"
tslib "^2.5.0"
value-or-promise "^1.0.12"

"@envelop/on-resolve@^3.0.0":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@envelop/on-resolve/-/on-resolve-3.0.3.tgz#cfba1726c2b79b6b2d9e7333878a5b6e1c95e3f5"
integrity sha512-Mo2w3CHmyLCScFuIO2VS2Co44vlPSc4zwujz0x+/zyaJ+eCwBQMRuE9u+9ORjvKImNxrbXI9FQVNlbF0iDk4iQ==
"@envelop/on-resolve@^4.1.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@envelop/on-resolve/-/on-resolve-4.1.1.tgz#e4eba4588cfc877954125c69278384ce10a66474"
integrity sha512-Zkc+OJMpmxStcx7DlCf/IqnKhCag8LJCfE0rzjnECdSQMBfdTY/9V5CtwdCM8kOAZAC0B4o9tVMwc/I8PfthqQ==

"@envelop/parser-cache@^4.0.0":
version "4.7.0"
resolved "https://registry.yarnpkg.com/@envelop/parser-cache/-/parser-cache-4.7.0.tgz#fc438d8ed390c88fa24bf56da3e4da36f088e3fc"
integrity sha512-63NfXDcW/vGn4U6NFxaZ0JbYWAcJb9A6jhTvghsSz1ZS+Dny/ci8bVSgVmM1q+N56hPyGsVPuyI+rIc71mPU5g==
"@envelop/parser-cache@^6.0.2":
version "6.0.4"
resolved "https://registry.yarnpkg.com/@envelop/parser-cache/-/parser-cache-6.0.4.tgz#56eb6e2b86641f557165892d5b502dc5921b8d15"
integrity sha512-u1cDAFlZ8hGU/F5b/Xeu/OlCGhMfN6Wcdo+KXcOJBL+Uh+0AHNCoD0FJXavwX1KhLpT03dSjFPgl1KDRx8HSYQ==
dependencies:
lru-cache "^6.0.0"
tslib "^2.4.0"
lru-cache "^10.0.0"
tslib "^2.5.0"

"@envelop/testing@^6.0.0":
version "6.0.0"
Expand All @@ -905,20 +905,21 @@
"@graphql-tools/utils" "^10.0.0"
tslib "^2.5.0"

"@envelop/types@4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@envelop/types/-/types-4.0.1.tgz#145690d8266a003cdb06dd58fa1236e3c80050a9"
integrity sha512-ULo27/doEsP7uUhm2iTnElx13qTO6I5FKvmLoX41cpfuw8x6e0NUFknoqhEsLzAbgz8xVS5mjwcxGCXh4lDYzg==
"@envelop/types@5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@envelop/types/-/types-5.0.0.tgz#3ae59b50ec31d4bdcc7bd0b47e9c8cf2ac44b0ff"
integrity sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA==
dependencies:
tslib "^2.5.0"

"@envelop/validation-cache@^4.0.0":
version "4.7.0"
resolved "https://registry.yarnpkg.com/@envelop/validation-cache/-/validation-cache-4.7.0.tgz#6871116c5387cd7c310b9ae9187d29c2793ae33f"
integrity sha512-PzL+GfWJRT+JjsJqZAIxHKEkvkM3hxkeytS5O0QLXT8kURNBV28r+Kdnn2RCF5+6ILhyGpiDb60vaquBi7g4lw==
"@envelop/validation-cache@^6.0.2":
version "6.0.4"
resolved "https://registry.yarnpkg.com/@envelop/validation-cache/-/validation-cache-6.0.4.tgz#4a40dda3344c0ea5a435ee6866b7a5b407a2d839"
integrity sha512-yNGi46zD1ES2DmKLnMp0JUy4g7exKrgC4y4C4rRfhZIt3TGy/J0Tae5BJ2vVvsZKX/AVSrPI7iLnIVyCXQQrcg==
dependencies:
lru-cache "^6.0.0"
tslib "^2.4.0"
hash-it "^6.0.0"
lru-cache "^10.0.0"
tslib "^2.5.0"

"@esbuild/android-arm64@0.18.20":
version "0.18.20"
Expand Down Expand Up @@ -1050,6 +1051,13 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"

"@fastify/merge-json-schemas@^0.1.0":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@fastify/merge-json-schemas/-/merge-json-schemas-0.1.1.tgz#3551857b8a17a24e8c799e9f51795edb07baa0bc"
integrity sha512-fERDVz7topgNjtXsJTTW1JKLy0rhuLRcquYqNR9rF7OcVpCa2OVW49ZPDIhaRRCaUuvVxI+N416xUoF76HNSXA==
dependencies:
fast-deep-equal "^3.1.3"

"@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3":
version "1.1.3"
resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz"
Expand Down Expand Up @@ -4697,12 +4705,19 @@ aggregate-error@^3.0.0:
clean-stack "^2.0.0"
indent-string "^4.0.0"

ajv-formats@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-3.0.1.tgz#3d5dc762bca17679c3c2ea7e90ad6b7532309578"
integrity sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==
dependencies:
ajv "^8.0.0"

ajv-keywords@^3.5.2:
version "3.5.2"
resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz"
integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==

ajv@^6.10.0, ajv@^6.11.0, ajv@^6.12.4:
ajv@^6.10.0, ajv@^6.12.4:
version "6.12.6"
resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz"
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
Expand All @@ -4712,6 +4727,16 @@ ajv@^6.10.0, ajv@^6.11.0, ajv@^6.12.4:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"

ajv@^8.0.0, ajv@^8.10.0:
version "8.17.1"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6"
integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==
dependencies:
fast-deep-equal "^3.1.3"
fast-uri "^3.0.1"
json-schema-traverse "^1.0.0"
require-from-string "^2.0.2"

ajv@^8.0.1:
version "8.12.0"
resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz"
Expand Down Expand Up @@ -8580,14 +8605,18 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-sta
resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==

fast-json-stringify@^1.21.0:
version "1.21.0"
resolved "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.21.0.tgz"
integrity sha512-xY6gyjmHN3AK1Y15BCbMpeO9+dea5ePVsp3BouHCdukcx0hOHbXwFhRodhcI0NpZIgDChSeAKkHW9YjKvhwKBA==
fast-json-stringify@^5.8.0:
version "5.16.1"
resolved "https://registry.yarnpkg.com/fast-json-stringify/-/fast-json-stringify-5.16.1.tgz#a6d0c575231a3a08c376a00171d757372f2ca46e"
integrity sha512-KAdnLvy1yu/XrRtP+LJnxbBGrhN+xXu+gt3EUvZhYGKCr3lFHq/7UFJHHFgmJKoqlh6B40bZLEv7w46B0mqn1g==
dependencies:
ajv "^6.11.0"
deepmerge "^4.2.2"
string-similarity "^4.0.1"
"@fastify/merge-json-schemas" "^0.1.0"
ajv "^8.10.0"
ajv-formats "^3.0.1"
fast-deep-equal "^3.1.3"
fast-uri "^2.1.0"
json-schema-ref-resolver "^1.0.1"
rfdc "^1.2.0"

fast-levenshtein@^2.0.6:
version "2.0.6"
Expand All @@ -8608,6 +8637,16 @@ fast-querystring@^1.1.1:
dependencies:
fast-decode-uri-component "^1.0.1"

fast-uri@^2.1.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-2.4.0.tgz#67eae6fbbe9f25339d5d3f4c4234787b65d7d55e"
integrity sha512-ypuAmmMKInk5q7XcepxlnUWDLWv4GFtaJqAzWKqn62IpQ3pejtr5dTVbt3vwqVaMKmkNR55sTT+CqUKIaT21BA==

fast-uri@^3.0.1:
version "3.0.2"
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.2.tgz#d78b298cf70fd3b752fd951175a3da6a7b48f024"
integrity sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==

fast-url-parser@^1.1.3:
version "1.1.3"
resolved "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz"
Expand Down Expand Up @@ -9438,15 +9477,14 @@ graphql-config@^5.0.2:
string-env-interpolation "^1.0.1"
tslib "^2.4.0"

graphql-jit@^0.7.0:
version "0.7.4"
resolved "https://registry.npmjs.org/graphql-jit/-/graphql-jit-0.7.4.tgz"
integrity sha512-kWyHmsQtKMD6xcKDgf4dgPLyIZhviqA6IWGdnA0ElL9wgrIOTxf3eI4c0/U3tnoAU3t09zliVCfDkfIptzYjIA==
graphql-jit@0.8.6:
version "0.8.6"
resolved "https://registry.yarnpkg.com/graphql-jit/-/graphql-jit-0.8.6.tgz#c8bf91842670cd3153e09f789884c2192d0e770c"
integrity sha512-oVJteh/uYDpIA/M4UHrI+DmzPnX1zTD0a7Je++JA8q8P68L/KbuepimDyrT5FhL4HAq3filUxaFvfsL6/A4msw==
dependencies:
"@graphql-typed-document-node/core" "^3.1.1"
fast-json-stringify "^1.21.0"
"@graphql-typed-document-node/core" "^3.2.0"
fast-json-stringify "^5.8.0"
generate-function "^2.3.1"
json-schema "^0.4.0"
lodash.memoize "^4.1.2"
lodash.merge "4.6.2"
lodash.mergewith "4.6.2"
Expand Down Expand Up @@ -9588,6 +9626,11 @@ has@^1.0.3:
dependencies:
function-bind "^1.1.1"

hash-it@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/hash-it/-/hash-it-6.0.0.tgz#188df5a8ca2f8e036690e35f2ef88bd9417ff334"
integrity sha512-KHzmSFx1KwyMPw0kXeeUD752q/Kfbzhy6dAZrjXV9kAIXGqzGvv8vhkUqj+2MGZldTo0IBpw6v7iWE7uxsvH0w==

hash-obj@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/hash-obj/-/hash-obj-4.0.0.tgz"
Expand Down Expand Up @@ -11477,6 +11520,13 @@ json-parse-even-better-errors@^3.0.0:
resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz"
integrity sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==

json-schema-ref-resolver@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-schema-ref-resolver/-/json-schema-ref-resolver-1.0.1.tgz#6586f483b76254784fc1d2120f717bdc9f0a99bf"
integrity sha512-EJAj1pgHc1hxF6vo2Z3s69fMjO1INq6eGHXZ8Z6wCQeldCuwxGK9Sxf4/cScGn3FZubCVUehfWtcDM/PLteCQw==
dependencies:
fast-deep-equal "^3.1.3"

json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz"
Expand All @@ -11487,7 +11537,7 @@ json-schema-traverse@^1.0.0:
resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz"
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==

json-schema@0.4.0, json-schema@^0.4.0:
json-schema@0.4.0:
version "0.4.0"
resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz"
integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==
Expand Down Expand Up @@ -12213,6 +12263,11 @@ lowercase-keys@^2.0.0:
resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz"
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==

lru-cache@^10.0.0:
version "10.4.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119"
integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==

lru-cache@^10.0.1, lru-cache@^10.2.0:
version "10.2.1"
resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.1.tgz"
Expand Down Expand Up @@ -15844,6 +15899,11 @@ reusify@^1.0.4:
resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz"
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==

rfdc@^1.2.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca"
integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==

rfdc@^1.3.0:
version "1.3.0"
resolved "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz"
Expand Down Expand Up @@ -16642,11 +16702,6 @@ string-length@^4.0.1:
char-regex "^1.0.2"
strip-ansi "^6.0.0"

string-similarity@^4.0.1:
version "4.0.4"
resolved "https://registry.npmjs.org/string-similarity/-/string-similarity-4.0.4.tgz"
integrity sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==

"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
Expand Down

0 comments on commit 67b50bd

Please sign in to comment.