From a8ed62939dc2dbf308e2b9be16d2be92cca49984 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 4 Oct 2022 10:39:51 +0200 Subject: [PATCH 1/8] build(deps-dev): bump undici from 5.10.0 to 5.11.0 Bumps [undici](https://github.com/nodejs/undici) from 5.10.0 to 5.11.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v5.10.0...v5.11.0) --- updated-dependencies: - dependency-name: undici dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/primitives/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 99e681b4..2dd8ffcd 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -33,7 +33,7 @@ "formdata-node": "4.4.1", "text-encoding": "0.7.0", "tsup": "6", - "undici": "5.10.0", + "undici": "5.11.0", "urlpattern-polyfill": "6.0.1", "uuid": "9.0.0", "web-streams-polyfill": "4.0.0-beta.3", From 46ced0bf032a34a414486e95d5eaa3fa7e0a3d9c Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 4 Oct 2022 10:41:46 +0200 Subject: [PATCH 2/8] Update pnpm-lock.yaml --- pnpm-lock.yaml | 140 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 96 insertions(+), 44 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 782e0619..1b40f59b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,7 +25,7 @@ importers: '@changesets/cli': 2.25.0 '@jest/types': 28.1.3 '@svitejs/changesets-changelog-github-compact': 0.1.1 - '@types/jest': 29.1.1 + '@types/jest': 29.0.3 '@types/node': 12.20.55 c8: 7.12.0 finepack: 2.10.15 @@ -35,10 +35,10 @@ importers: nano-staged: 0.8.0 prettier: 2.7.1 simple-git-hooks: 2.8.0 - ts-jest: 28.0.8_4esyfkp2qzonkb2ytxtegnki3u - ts-node: 10.9.1_sr2pz56bp3b65zhkgg3zdvf4ny - turbo: 1.5.5 - typescript: 4.8.4 + ts-jest: 28.0.8_x3los2wlfa22ikjhpajy5qodwi + ts-node: 10.9.1_645mub5f5ozux7a7hk7ogoo7xi + turbo: 1.5.3 + typescript: 4.8.3 docs: specifiers: @@ -67,7 +67,7 @@ importers: '@mdx-js/react': 2.1.3_react@18.2.0 autoprefixer: 10.4.8_postcss@8.4.16 postcss: 8.4.16 - tailwindcss: 3.1.8_postcss@8.4.16 + tailwindcss: 3.1.8 packages/cookies: specifiers: @@ -132,7 +132,7 @@ importers: formdata-node: 4.4.1 text-encoding: 0.7.0 tsup: '6' - undici: 5.10.0 + undici: 5.11.0 urlpattern-polyfill: 6.0.1 uuid: 9.0.0 web-streams-polyfill: 4.0.0-beta.3 @@ -149,7 +149,7 @@ importers: formdata-node: 4.4.1 text-encoding: 0.7.0 tsup: 6.2.2 - undici: 5.10.0 + undici: 5.11.0 urlpattern-polyfill: 6.0.1 uuid: 9.0.0 web-streams-polyfill: 4.0.0-beta.3 @@ -821,14 +821,14 @@ packages: '@jest/test-result': 28.1.3 '@jest/transform': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 12.20.55 + '@types/node': 18.7.14 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.3.2 exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 28.1.3 - jest-config: 28.1.3_ul4bw7p6zpcbqc5ta2hjpidvwy + jest-config: 28.1.3_gsb7asu77en4txj3es3i65pxci jest-haste-map: 28.1.3 jest-message-util: 28.1.3 jest-regex-util: 28.0.2 @@ -1590,8 +1590,8 @@ packages: dependencies: '@types/istanbul-lib-report': 3.0.0 - /@types/jest/29.1.1: - resolution: {integrity: sha512-U9Ey07dGWl6fUFaIaUQUKWG5NoKi/zizeVQCGV8s4nSU0jPgqphVZvS64+8BtWYvrc3ZGw6wo943NSYPxkrp/g==} + /@types/jest/29.0.3: + resolution: {integrity: sha512-F6ukyCTwbfsEX5F2YmVYmM5TcTHy1q9P5rWlRbrk56KyMh3v9xRGUO3aa8+SkvMi0SHXtASJv1283enXimC0Og==} dependencies: expect: 29.0.3 pretty-format: 29.0.3 @@ -2102,6 +2102,13 @@ packages: load-tsconfig: 0.2.3 dev: true + /busboy/1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + dependencies: + streamsearch: 1.1.0 + dev: true + /c8/7.12.0: resolution: {integrity: sha512-CtgQrHOkyxr5koX1wEUmN/5cfDa2ckbHRA4Gy5LAL0zaCFtVWJS5++n+w4/sr2GWGerBxgTjpKeDclk/Qk6W/A==} engines: {node: '>=10.12.0'} @@ -4055,6 +4062,46 @@ packages: - ts-node dev: true + /jest-config/28.1.3_gsb7asu77en4txj3es3i65pxci: + resolution: {integrity: sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==} + engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.18.10 + '@jest/test-sequencer': 28.1.3 + '@jest/types': 28.1.3 + '@types/node': 18.7.14 + babel-jest: 28.1.3_@babel+core@7.18.10 + chalk: 4.1.2 + ci-info: 3.3.2 + deepmerge: 4.2.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-circus: 28.1.3 + jest-environment-node: 28.1.3 + jest-get-type: 28.0.2 + jest-regex-util: 28.0.2 + jest-resolve: 28.1.3 + jest-runner: 28.1.3 + jest-util: 28.1.3 + jest-validate: 28.1.3 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 28.1.3 + slash: 3.0.0 + strip-json-comments: 3.1.1 + ts-node: 10.9.1_645mub5f5ozux7a7hk7ogoo7xi + transitivePeerDependencies: + - supports-color + dev: true + /jest-config/28.1.3_ul4bw7p6zpcbqc5ta2hjpidvwy: resolution: {integrity: sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -4090,7 +4137,7 @@ packages: pretty-format: 28.1.3 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1_sr2pz56bp3b65zhkgg3zdvf4ny + ts-node: 10.9.1_645mub5f5ozux7a7hk7ogoo7xi transitivePeerDependencies: - supports-color dev: true @@ -6610,6 +6657,11 @@ packages: mixme: 0.5.4 dev: true + /streamsearch/1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + dev: true + /string-length/4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -6829,12 +6881,10 @@ packages: react: 18.2.0 dev: false - /tailwindcss/3.1.8_postcss@8.4.16: + /tailwindcss/3.1.8: resolution: {integrity: sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==} engines: {node: '>=12.13.0'} hasBin: true - peerDependencies: - postcss: ^8.0.9 dependencies: arg: 5.0.2 chokidar: 3.5.3 @@ -6999,7 +7049,7 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-jest/28.0.8_4esyfkp2qzonkb2ytxtegnki3u: + /ts-jest/28.0.8_x3los2wlfa22ikjhpajy5qodwi: resolution: {integrity: sha512-5FaG0lXmRPzApix8oFG8RKjAz4ehtm8yMKOTy5HX3fY6W8kmvOrmcY0hKDElW52FJov+clhUbrKAqofnj4mXTg==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} hasBin: true @@ -7029,11 +7079,11 @@ packages: lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.3.7 - typescript: 4.8.4 + typescript: 4.8.3 yargs-parser: 21.1.1 dev: true - /ts-node/10.9.1_sr2pz56bp3b65zhkgg3zdvf4ny: + /ts-node/10.9.1_645mub5f5ozux7a7hk7ogoo7xi: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -7059,7 +7109,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.8.4 + typescript: 4.8.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -7121,65 +7171,65 @@ packages: yargs: 17.5.1 dev: true - /turbo-darwin-64/1.5.5: - resolution: {integrity: sha512-HvEn6P2B+NXDekq9LRpRgUjcT9/oygLTcK47U0qsAJZXRBSq/2hvD7lx4nAwgY/4W3rhYJeWtHTzbhoN6BXqGQ==} + /turbo-darwin-64/1.5.3: + resolution: {integrity: sha512-MBS8b/3DuMY6v3ljEX9qssHGQXnI4VDWLqvQ6FGfZFMp8lqa7mfoXv1U/MNR9OhSczaftsIS1e9mnD9m/qv7TQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64/1.5.5: - resolution: {integrity: sha512-Dmxr09IUy6M0nc7/xWod9galIO2DD500B75sJSkHeT+CCdJOWnlinux0ZPF8CSygNqymwYO8AO2l15/6yxcycg==} + /turbo-darwin-arm64/1.5.3: + resolution: {integrity: sha512-XNSV6SaxS8dAvGx2BF3H7MsKZ4zchj2kP/eXTss/vUcSRsS+zx0urZcEgxeGUeMk7V7fJq/5Ow7thApNojpwpw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64/1.5.5: - resolution: {integrity: sha512-wd07TZ4zXXWjzZE00FcFMLmkybQQK/NV9ff66vvAV0vdiuacSMBCNLrD6Mm4ncfrUPW/rwFW5kU/7hyuEqqtDw==} + /turbo-linux-64/1.5.3: + resolution: {integrity: sha512-YhYu50CUvy5m80l6dEXEgC3CvjjTelQb14fknAzIXoKztbWhBZqUCucR6jLRZpKgODwP4Fo4LUzz478EMwqy/Q==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64/1.5.5: - resolution: {integrity: sha512-q3q33tuo74R7gicnfvFbnZZvqmlq7Vakcvx0eshifnJw4PR+oMnTCb4w8ElVFx070zsb8DVTibq99y8NJH8T1Q==} + /turbo-linux-arm64/1.5.3: + resolution: {integrity: sha512-JjJjxy0kkr/xAWAAE8t7UaTBc3GUc5Tz/Bupbve2VzG0w75md0LqXUV34WpyxMiNTNLmK8Dq7bIczG6OkJ29xQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64/1.5.5: - resolution: {integrity: sha512-lPp9kHonNFfqgovbaW+UAPO5cLmoAN+m3G3FzqcrRPnlzt97vXYsDhDd/4Zy3oAKoAcprtP4CGy0ddisqsKTVw==} + /turbo-windows-64/1.5.3: + resolution: {integrity: sha512-PS7+Isy7OX9xWWvtg2FKmh/eN4fTNR2r6RW5m+b+zR7t04QLWYOya1R8CeqgA6GyeFpn4KUxC+AeZ0wOi8RSPw==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64/1.5.5: - resolution: {integrity: sha512-3AfGULKNZiZVrEzsIE+W79ZRW1+f5r4nM4wLlJ1PTBHyRxBZdD6KTH1tijGfy/uTlcV5acYnKHEkDc6Q9PAXGQ==} + /turbo-windows-arm64/1.5.3: + resolution: {integrity: sha512-DQzjFbPRd/Db5kkJtCER5DNcbY4ez5Bh8usemNlPZQ7I/5XwEUl9Rn3ss2LJsiv/pR7PkY92TUvmyFtBnqao8Q==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo/1.5.5: - resolution: {integrity: sha512-PVQSDl0STC9WXIyHcYUWs9gXsf8JjQig/FuHfuB8N6+XlgCGB3mPbfMEE6zrChGz2hufH4/guKRX1XJuNL6XTA==} + /turbo/1.5.3: + resolution: {integrity: sha512-/94cswfhXr6wWD6CFyF7E8bjEdjar4O+gzCJ3d49X9t9u9aDYFoQH/TlYTSNbAwXYiGqzJoodhf3kXRyrAiqSg==} hasBin: true requiresBuild: true optionalDependencies: - turbo-darwin-64: 1.5.5 - turbo-darwin-arm64: 1.5.5 - turbo-linux-64: 1.5.5 - turbo-linux-arm64: 1.5.5 - turbo-windows-64: 1.5.5 - turbo-windows-arm64: 1.5.5 + turbo-darwin-64: 1.5.3 + turbo-darwin-arm64: 1.5.3 + turbo-linux-64: 1.5.3 + turbo-linux-arm64: 1.5.3 + turbo-windows-64: 1.5.3 + turbo-windows-arm64: 1.5.3 dev: true /type-detect/4.0.8: @@ -7227,8 +7277,8 @@ packages: is-typedarray: 1.0.0 dev: true - /typescript/4.8.4: - resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + /typescript/4.8.3: + resolution: {integrity: sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==} engines: {node: '>=4.2.0'} hasBin: true dev: true @@ -7250,9 +7300,11 @@ packages: resolution: {integrity: sha512-z4o1fvKUojIWh9XuaVLUDdf86RQiq13AC1dmHbTpoyuu+bquHms76v16CjycCbec87J7z0k//SiQVk0sMdFmpQ==} dev: true - /undici/5.10.0: - resolution: {integrity: sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==} + /undici/5.11.0: + resolution: {integrity: sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==} engines: {node: '>=12.18'} + dependencies: + busboy: 1.6.0 dev: true /unified/10.1.2: From 70d72efcd6ef43d4e386de00685b60d29848de57 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 4 Oct 2022 10:49:39 +0200 Subject: [PATCH 3/8] build: lock @types/jest version --- package.json | 2 +- pnpm-lock.yaml | 60 +++++--------------------------------------------- 2 files changed, 7 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index 95e99121..bc45cd8f 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@changesets/cli": "latest", "@jest/types": "28.1.3", "@svitejs/changesets-changelog-github-compact": "latest", - "@types/jest": "latest", + "@types/jest": "28.1.3", "@types/node": "12", "c8": "latest", "finepack": "latest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b40f59b..cecb86d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,7 +7,7 @@ importers: '@changesets/cli': latest '@jest/types': 28.1.3 '@svitejs/changesets-changelog-github-compact': latest - '@types/jest': latest + '@types/jest': 28.1.3 '@types/node': '12' c8: latest finepack: latest @@ -25,7 +25,7 @@ importers: '@changesets/cli': 2.25.0 '@jest/types': 28.1.3 '@svitejs/changesets-changelog-github-compact': 0.1.1 - '@types/jest': 29.0.3 + '@types/jest': 28.1.3 '@types/node': 12.20.55 c8: 7.12.0 finepack: 2.10.15 @@ -866,13 +866,6 @@ packages: jest-get-type: 28.0.2 dev: true - /@jest/expect-utils/29.0.3: - resolution: {integrity: sha512-i1xUkau7K/63MpdwiRqaxgZOjxYs4f0WMTGJnYwUKubsNRZSeQbLorS7+I4uXVF9KQ5r61BUPAUMZ7Lf66l64Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.0.0 - dev: true - /@jest/expect/28.1.3: resolution: {integrity: sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -1590,11 +1583,11 @@ packages: dependencies: '@types/istanbul-lib-report': 3.0.0 - /@types/jest/29.0.3: - resolution: {integrity: sha512-F6ukyCTwbfsEX5F2YmVYmM5TcTHy1q9P5rWlRbrk56KyMh3v9xRGUO3aa8+SkvMi0SHXtASJv1283enXimC0Og==} + /@types/jest/28.1.3: + resolution: {integrity: sha512-Tsbjk8Y2hkBaY/gJsataeb4q9Mubw9EOz7+4RjPkzD5KjTvHHs7cpws22InaoXxAVAhF5HfFbzJjo6oKWqSZLw==} dependencies: - expect: 29.0.3 - pretty-format: 29.0.3 + jest-matcher-utils: 28.1.3 + pretty-format: 28.1.3 dev: true /@types/keyv/3.1.4: @@ -2624,11 +2617,6 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dev: true - /diff-sequences/29.0.0: - resolution: {integrity: sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - /diff/4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} @@ -3100,17 +3088,6 @@ packages: jest-util: 28.1.3 dev: true - /expect/29.0.3: - resolution: {integrity: sha512-t8l5DTws3212VbmPL+tBFXhjRHLmctHB0oQbL8eUc6S7NzZtYUhycrFO9mkxA0ZUC6FAWdNi7JchJSkODtcu1Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/expect-utils': 29.0.3 - jest-get-type: 29.0.0 - jest-matcher-utils: 29.0.3 - jest-message-util: 29.0.3 - jest-util: 29.0.3 - dev: true - /extend-shallow/2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -4152,16 +4129,6 @@ packages: pretty-format: 28.1.3 dev: true - /jest-diff/29.0.3: - resolution: {integrity: sha512-+X/AIF5G/vX9fWK+Db9bi9BQas7M9oBME7egU7psbn4jlszLFCu0dW63UgeE6cs/GANq4fLaT+8sGHQQ0eCUfg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 29.0.0 - jest-get-type: 29.0.0 - pretty-format: 29.0.3 - dev: true - /jest-docblock/28.1.1: resolution: {integrity: sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -4197,11 +4164,6 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dev: true - /jest-get-type/29.0.0: - resolution: {integrity: sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - /jest-haste-map/28.1.3: resolution: {integrity: sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -4239,16 +4201,6 @@ packages: pretty-format: 28.1.3 dev: true - /jest-matcher-utils/29.0.3: - resolution: {integrity: sha512-RsR1+cZ6p1hDV4GSCQTg+9qjeotQCgkaleIKLK7dm+U4V/H2bWedU3RAtLm8+mANzZ7eDV33dMar4pejd7047w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - jest-diff: 29.0.3 - jest-get-type: 29.0.0 - pretty-format: 29.0.3 - dev: true - /jest-message-util/28.1.3: resolution: {integrity: sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} From 79d3aeb353675ab1c06c768e270c13590a7ba1c4 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 4 Oct 2022 11:34:35 +0200 Subject: [PATCH 4/8] fix(primitive): fetch as fetchImpl --- packages/primitives/src/primitives/fetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/src/primitives/fetch.js b/packages/primitives/src/primitives/fetch.js index ce8e2e12..33bb83af 100644 --- a/packages/primitives/src/primitives/fetch.js +++ b/packages/primitives/src/primitives/fetch.js @@ -8,7 +8,7 @@ import * as ResponseModule from 'undici/lib/fetch/response' import * as UtilModule from 'undici/lib/fetch/util' import * as WebIDLModule from 'undici/lib/fetch/webidl' -import fetchImpl from 'undici/lib/fetch' +import { fetch as fetchImpl } from 'undici/lib/fetch' import Agent from 'undici/lib/agent' global.AbortController = AbortController From 7009a46e0d73044d4e3b7d81edf8122d1bd3f48a Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 4 Oct 2022 11:34:56 +0200 Subject: [PATCH 5/8] test(primitives): add multipart/form-data case --- packages/primitives/tests/fetch.test.ts | 32 +++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/packages/primitives/tests/fetch.test.ts b/packages/primitives/tests/fetch.test.ts index 7e58d766..3a0b62bc 100644 --- a/packages/primitives/tests/fetch.test.ts +++ b/packages/primitives/tests/fetch.test.ts @@ -1,4 +1,4 @@ -import { fetch } from '../fetch' +import { FormData, fetch } from '../fetch' import { URL } from '../url' test('perform a POST as application/json', async () => { @@ -10,9 +10,10 @@ test('perform a POST as application/json', async () => { }, }) - expect(response.status).toEqual(200) + expect(response.status).toBe(200) const json = await response.json() - expect(JSON.parse(json.data).foo).toBe('bar') + expect(JSON.parse(json.data)).toEqual({ foo: 'bar' }) + expect(json.headers['Content-Type']).toBe('application/json') }) test('perform a POST as application/x-www-form-urlencoded', async () => { @@ -24,15 +25,32 @@ test('perform a POST as application/x-www-form-urlencoded', async () => { body: new URLSearchParams({ foo: 'bar' }), }) - expect(response.status).toEqual(200) + expect(response.status).toBe(200) const json = await response.json() - expect(json.form.foo).toBe('bar') + expect(json.form).toEqual({ foo: 'bar' }) + expect(json.headers['Content-Type']).toBe('application/x-www-form-urlencoded') +}) + +test('perform a POST as multipart/form-data', async () => { + const formData = new FormData() + formData.append('company', 'vercel') + formData.append('project', 'edge-runtime') + + const response = await fetch('https://httpbin.org/post', { + method: 'POST', + body: formData, + }) + + expect(response.status).toBe(200) + const json = await response.json() + expect(json.form).toEqual({ company: 'vercel', project: 'edge-runtime' }) + expect(json.headers['Content-Type']).toContain('multipart/form-data') }) test('sets header calling Headers constructor', async () => { const url = new URL('/about', 'https://vercel.com') const response = await fetch(url) - expect(response.status).toEqual(200) + expect(response.status).toBe(200) }) test('sets headers unsupported in undici', async () => { @@ -44,5 +62,5 @@ test('sets headers unsupported in undici', async () => { 'Transfer-Encoding': 'gzip', }, }) - expect(response.status).toEqual(200) + expect(response.status).toBe(200) }) From 91d32516a0674420f7225c4beeee0e20af46055b Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 4 Oct 2022 11:59:26 +0200 Subject: [PATCH 6/8] test(primitives): update assertion --- packages/primitives/src/primitives/cache.js | 4 +--- packages/primitives/tests/cache.test.ts | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/primitives/src/primitives/cache.js b/packages/primitives/src/primitives/cache.js index f2fc5c4b..def71706 100644 --- a/packages/primitives/src/primitives/cache.js +++ b/packages/primitives/src/primitives/cache.js @@ -142,9 +142,7 @@ export function createCaches() { }) } catch (error) { if (error.message === 'disturbed') { - throw new TypeError( - "Failed to execute 'put' on 'Cache': Response body is already used" - ) + throw new TypeError('The body has already been consumed.') } throw error } diff --git a/packages/primitives/tests/cache.test.ts b/packages/primitives/tests/cache.test.ts index 66c268b3..d7660f4b 100644 --- a/packages/primitives/tests/cache.test.ts +++ b/packages/primitives/tests/cache.test.ts @@ -178,9 +178,7 @@ test('cache.put throws an error if response body is used or locked', async () => await cache.put(request, response) } catch (error: any) { expect(error instanceof Error).toBe(true) - expect(error.message).toBe( - "Failed to execute 'put' on 'Cache': Response body is already used" - ) + expect(error.message).toBe('The body has already been consumed.') } }) From b8f6de1d8fbcc54e182c4220713b53f07ad3ac5f Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 4 Oct 2022 12:08:11 +0200 Subject: [PATCH 7/8] fix(vm): expose querystring for undici --- packages/vm/src/edge-vm.ts | 1 + packages/vm/tests/integration/body.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/vm/src/edge-vm.ts b/packages/vm/src/edge-vm.ts index 5d21fa79..0410e325 100644 --- a/packages/vm/src/edge-vm.ts +++ b/packages/vm/src/edge-vm.ts @@ -179,6 +179,7 @@ function addPrimitives(context: VMContext) { ['http', { exports: require('http') }], ['net', { exports: require('net') }], ['perf_hooks', { exports: require('perf_hooks') }], + ['querystring', { exports: require('querystring') }], ['stream', { exports: require('stream') }], ['tls', { exports: require('tls') }], ['util', { exports: require('util') }], diff --git a/packages/vm/tests/integration/body.test.ts b/packages/vm/tests/integration/body.test.ts index 9ce0b26d..0d42dffa 100644 --- a/packages/vm/tests/integration/body.test.ts +++ b/packages/vm/tests/integration/body.test.ts @@ -42,7 +42,7 @@ it('throws when the body was directly consumed', async () => { const error = await response.text().catch((err) => err) expect(error).toBeInstanceOf(TypeError) - expect(error.message).toEqual('locked') + expect(error.message).toEqual('The stream is locked.') }) test('throws when the body was indirectly consumed', async () => { @@ -64,7 +64,7 @@ test('throws when the body was indirectly consumed', async () => { const error = await response.text().catch((err) => err) expect(error).toBeInstanceOf(TypeError) - expect(error.message).toEqual('disturbed') + expect(error.message).toEqual('The body has already been consumed.') }) test('allows to read a FormData body as text', async () => { From 37e790188ae27375bdd3a1d2795babd2432038a0 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 4 Oct 2022 14:13:14 +0200 Subject: [PATCH 8/8] Create tasty-paws-yell.md --- .changeset/tasty-paws-yell.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/tasty-paws-yell.md diff --git a/.changeset/tasty-paws-yell.md b/.changeset/tasty-paws-yell.md new file mode 100644 index 00000000..2e11e061 --- /dev/null +++ b/.changeset/tasty-paws-yell.md @@ -0,0 +1,6 @@ +--- +"@edge-runtime/primitives": patch +"@edge-runtime/vm": patch +--- + +build(deps-dev): bump undici from 5.10.0 to 5.11.0