From 091537cea8c4eaf6b1cd29c7e058874cafbc7666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Thu, 1 Sep 2022 01:35:46 +0900 Subject: [PATCH] chore!: bump esbuild to 0.15.6 (#9934) --- packages/vite/package.json | 2 +- .../src/node/optimizer/esbuildDepPlugin.ts | 26 -- pnpm-lock.yaml | 243 +++++++++++++++++- 3 files changed, 242 insertions(+), 29 deletions(-) diff --git a/packages/vite/package.json b/packages/vite/package.json index 5781eeb7a3ee23..532844adddfd3b 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -58,7 +58,7 @@ }, "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!", "dependencies": { - "esbuild": "^0.14.47", + "esbuild": "^0.15.6", "postcss": "^8.4.16", "resolve": "^1.22.1", "rollup": "~2.78.0" diff --git a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts index f646e3815758d1..66b0bcdbe050a9 100644 --- a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts +++ b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts @@ -1,5 +1,4 @@ import path from 'node:path' -import { promises as fs } from 'node:fs' import type { ImportKind, Plugin } from 'esbuild' import { KNOWN_ASSET_TYPES } from '../constants' import { getDepOptimizationConfig } from '..' @@ -8,7 +7,6 @@ import { flattenId, isBuiltin, isExternalUrl, - isRunningWithYarnPnp, moduleListContains, normalizePath } from '../utils' @@ -300,30 +298,6 @@ module.exports = Object.create(new Proxy({}, { } } ) - - // yarn 2 pnp compat - if (isRunningWithYarnPnp) { - build.onResolve( - { filter: /.*/ }, - async ({ path: id, importer, kind, resolveDir, namespace }) => { - const resolved = await resolve( - id, - importer, - kind, - // pass along resolveDir for entries - namespace === 'dep' ? resolveDir : undefined - ) - if (resolved) { - return resolveResult(id, resolved) - } - } - ) - - build.onLoad({ filter: /.*/ }, async (args) => ({ - contents: await fs.readFile(args.path), - loader: 'default' - })) - } } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cbe3f6bbf6e4c3..1d459cc2893bd6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -234,7 +234,7 @@ importers: dotenv: ^14.3.2 dotenv-expand: ^5.1.0 es-module-lexer: ^1.0.3 - esbuild: ^0.14.47 + esbuild: ^0.15.6 estree-walker: ^3.0.1 etag: ^1.8.1 fast-glob: ^3.2.11 @@ -269,7 +269,7 @@ importers: ufo: ^0.8.5 ws: ^8.8.1 dependencies: - esbuild: 0.14.47 + esbuild: 0.15.6 postcss: 8.4.16 resolve: 1.22.1 rollup: 2.78.0 @@ -2258,6 +2258,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64/0.15.6: + resolution: {integrity: sha512-hqmVU2mUjH6J2ZivHphJ/Pdse2ZD+uGCHK0uvsiLDk/JnSedEVj77CiVUnbMKuU4tih1TZZL8tG9DExQg/GZsw==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@eslint/eslintrc/1.3.1: resolution: {integrity: sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -4429,6 +4438,7 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: true optional: true /esbuild-android-64/0.14.50: @@ -4449,12 +4459,22 @@ packages: dev: true optional: true + /esbuild-android-64/0.15.6: + resolution: {integrity: sha512-Z1CHSgB1crVQi2LKSBwSkpaGtaloVz0ZIYcRMsvHc3uSXcR/x5/bv9wcZspvH/25lIGTaViosciS/NS09ERmVA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: false + optional: true + /esbuild-android-arm64/0.14.47: resolution: {integrity: sha512-OkwOjj7ts4lBp/TL6hdd8HftIzOy/pdtbrNA4+0oVWgGG64HrdVzAF5gxtJufAPOsEjkyh1oIYvKAUinKKQRSQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true + dev: true optional: true /esbuild-android-arm64/0.14.50: @@ -4475,12 +4495,22 @@ packages: dev: true optional: true + /esbuild-android-arm64/0.15.6: + resolution: {integrity: sha512-mvM+gqNxqKm2pCa3dnjdRzl7gIowuc4ga7P7c3yHzs58Im8v/Lfk1ixSgQ2USgIywT48QWaACRa3F4MG7djpSw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: false + optional: true + /esbuild-darwin-64/0.14.47: resolution: {integrity: sha512-R6oaW0y5/u6Eccti/TS6c/2c1xYTb1izwK3gajJwi4vIfNs1s8B1dQzI1UiC9T61YovOQVuePDcfqHLT3mUZJA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /esbuild-darwin-64/0.14.50: @@ -4501,12 +4531,22 @@ packages: dev: true optional: true + /esbuild-darwin-64/0.15.6: + resolution: {integrity: sha512-BsfVt3usScAfGlXJiGtGamwVEOTM8AiYiw1zqDWhGv6BncLXCnTg1As+90mxWewdTZKq3iIy8s9g8CKkrrAXVw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /esbuild-darwin-arm64/0.14.47: resolution: {integrity: sha512-seCmearlQyvdvM/noz1L9+qblC5vcBrhUaOoLEDDoLInF/VQ9IkobGiLlyTPYP5dW1YD4LXhtBgOyevoIHGGnw==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /esbuild-darwin-arm64/0.14.50: @@ -4527,12 +4567,22 @@ packages: dev: true optional: true + /esbuild-darwin-arm64/0.15.6: + resolution: {integrity: sha512-CnrAeJaEpPakUobhqO4wVSA4Zm6TPaI5UY4EsI62j9mTrjIyQPXA1n4Ju6Iu5TVZRnEqV6q8blodgYJ6CJuwCA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /esbuild-freebsd-64/0.14.47: resolution: {integrity: sha512-ZH8K2Q8/Ux5kXXvQMDsJcxvkIwut69KVrYQhza/ptkW50DC089bCVrJZZ3sKzIoOx+YPTrmsZvqeZERjyYrlvQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true + dev: true optional: true /esbuild-freebsd-64/0.14.50: @@ -4553,12 +4603,22 @@ packages: dev: true optional: true + /esbuild-freebsd-64/0.15.6: + resolution: {integrity: sha512-+qFdmqi+jkAsxsNJkaWVrnxEUUI50nu6c3MBVarv3RCDCbz7ZS1a4ZrdkwEYFnKcVWu6UUE0Kkb1SQ1yGEG6sg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + /esbuild-freebsd-arm64/0.14.47: resolution: {integrity: sha512-ZJMQAJQsIOhn3XTm7MPQfCzEu5b9STNC+s90zMWe2afy9EwnHV7Ov7ohEMv2lyWlc2pjqLW8QJnz2r0KZmeAEQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true + dev: true optional: true /esbuild-freebsd-arm64/0.14.50: @@ -4579,12 +4639,22 @@ packages: dev: true optional: true + /esbuild-freebsd-arm64/0.15.6: + resolution: {integrity: sha512-KtQkQOhnNciXm2yrTYZMD3MOm2zBiiwFSU+dkwNbcfDumzzUprr1x70ClTdGuZwieBS1BM/k0KajRQX7r504Xw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-32/0.14.47: resolution: {integrity: sha512-FxZOCKoEDPRYvq300lsWCTv1kcHgiiZfNrPtEhFAiqD7QZaXrad8LxyJ8fXGcWzIFzRiYZVtB3ttvITBvAFhKw==} engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-32/0.14.50: @@ -4605,12 +4675,22 @@ packages: dev: true optional: true + /esbuild-linux-32/0.15.6: + resolution: {integrity: sha512-IAkDNz3TpxwISTGVdQijwyHBZrbFgLlRi5YXcvaEHtgbmayLSDcJmH5nV1MFgo/x2QdKcHBkOYHdjhKxUAcPwg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-64/0.14.47: resolution: {integrity: sha512-nFNOk9vWVfvWYF9YNYksZptgQAdstnDCMtR6m42l5Wfugbzu11VpMCY9XrD4yFxvPo9zmzcoUL/88y0lfJZJJw==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-64/0.14.50: @@ -4631,12 +4711,22 @@ packages: dev: true optional: true + /esbuild-linux-64/0.15.6: + resolution: {integrity: sha512-gQPksyrEYfA4LJwyfTQWAZaVZCx4wpaLrSzo2+Xc9QLC+i/sMWmX31jBjrn4nLJCd79KvwCinto36QC7BEIU/A==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-arm/0.14.47: resolution: {integrity: sha512-ZGE1Bqg/gPRXrBpgpvH81tQHpiaGxa8c9Rx/XOylkIl2ypLuOcawXEAo8ls+5DFCcRGt/o3sV+PzpAFZobOsmA==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-arm/0.14.50: @@ -4657,12 +4747,22 @@ packages: dev: true optional: true + /esbuild-linux-arm/0.15.6: + resolution: {integrity: sha512-xZ0Bq2aivsthDjA/ytQZzxrxIZbG0ATJYMJxNeOIBc1zUjpbVpzBKgllOZMsTSXMHFHGrow6TnCcgwqY0+oEoQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-arm64/0.14.47: resolution: {integrity: sha512-ywfme6HVrhWcevzmsufjd4iT3PxTfCX9HOdxA7Hd+/ZM23Y9nXeb+vG6AyA6jgq/JovkcqRHcL9XwRNpWG6XRw==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-arm64/0.14.50: @@ -4683,12 +4783,22 @@ packages: dev: true optional: true + /esbuild-linux-arm64/0.15.6: + resolution: {integrity: sha512-aovDkclFa6C9EdZVBuOXxqZx83fuoq8097xZKhEPSygwuy4Lxs8J4anHG7kojAsR+31lfUuxzOo2tHxv7EiNHA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-mips64le/0.14.47: resolution: {integrity: sha512-mg3D8YndZ1LvUiEdDYR3OsmeyAew4MA/dvaEJxvyygahWmpv1SlEEnhEZlhPokjsUMfRagzsEF/d/2XF+kTQGg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-mips64le/0.14.50: @@ -4709,12 +4819,22 @@ packages: dev: true optional: true + /esbuild-linux-mips64le/0.15.6: + resolution: {integrity: sha512-wVpW8wkWOGizsCqCwOR/G3SHwhaecpGy3fic9BF1r7vq4djLjUcA8KunDaBCjJ6TgLQFhJ98RjDuyEf8AGjAvw==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-ppc64le/0.14.47: resolution: {integrity: sha512-WER+f3+szmnZiWoK6AsrTKGoJoErG2LlauSmk73LEZFQ/iWC+KhhDsOkn1xBUpzXWsxN9THmQFltLoaFEH8F8w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-ppc64le/0.14.50: @@ -4735,12 +4855,22 @@ packages: dev: true optional: true + /esbuild-linux-ppc64le/0.15.6: + resolution: {integrity: sha512-z6w6gsPH/Y77uchocluDC8tkCg9rfkcPTePzZKNr879bF4tu7j9t255wuNOCE396IYEGxY7y8u2HJ9i7kjCLVw==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-riscv64/0.14.47: resolution: {integrity: sha512-1fI6bP3A3rvI9BsaaXbMoaOjLE3lVkJtLxsgLHqlBhLlBVY7UqffWBvkrX/9zfPhhVMd9ZRFiaqXnB1T7BsL2g==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-riscv64/0.14.50: @@ -4761,12 +4891,22 @@ packages: dev: true optional: true + /esbuild-linux-riscv64/0.15.6: + resolution: {integrity: sha512-pfK/3MJcmbfU399TnXW5RTPS1S+ID6ra+CVj9TFZ2s0q9Ja1F5A1VirUUvViPkjiw+Kq3zveyn6U09Wg1zJXrw==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-s390x/0.14.47: resolution: {integrity: sha512-eZrWzy0xFAhki1CWRGnhsHVz7IlSKX6yT2tj2Eg8lhAwlRE5E96Hsb0M1mPSE1dHGpt1QVwwVivXIAacF/G6mw==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-s390x/0.14.50: @@ -4787,12 +4927,22 @@ packages: dev: true optional: true + /esbuild-linux-s390x/0.15.6: + resolution: {integrity: sha512-OZeeDu32liefcwAE63FhVqM4heWTC8E3MglOC7SK0KYocDdY/6jyApw0UDkDHlcEK9mW6alX/SH9r3PDjcCo/Q==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-netbsd-64/0.14.47: resolution: {integrity: sha512-Qjdjr+KQQVH5Q2Q1r6HBYswFTToPpss3gqCiSw2Fpq/ua8+eXSQyAMG+UvULPqXceOwpnPo4smyZyHdlkcPppQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true + dev: true optional: true /esbuild-netbsd-64/0.14.50: @@ -4813,12 +4963,22 @@ packages: dev: true optional: true + /esbuild-netbsd-64/0.15.6: + resolution: {integrity: sha512-kaxw61wcHMyiEsSsi5ut1YYs/hvTC2QkxJwyRvC2Cnsz3lfMLEu8zAjpBKWh9aU/N0O/gsRap4wTur5GRuSvBA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: false + optional: true + /esbuild-openbsd-64/0.14.47: resolution: {integrity: sha512-QpgN8ofL7B9z8g5zZqJE+eFvD1LehRlxr25PBkjyyasakm4599iroUpaj96rdqRlO2ShuyqwJdr+oNqWwTUmQw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true + dev: true optional: true /esbuild-openbsd-64/0.14.50: @@ -4839,12 +4999,22 @@ packages: dev: true optional: true + /esbuild-openbsd-64/0.15.6: + resolution: {integrity: sha512-CuoY60alzYfIZapUHqFXqXbj88bbRJu8Fp9okCSHRX2zWIcGz4BXAHXiG7dlCye5nFVrY72psesLuWdusyf2qw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: false + optional: true + /esbuild-sunos-64/0.14.47: resolution: {integrity: sha512-uOeSgLUwukLioAJOiGYm3kNl+1wJjgJA8R671GYgcPgCx7QR73zfvYqXFFcIO93/nBdIbt5hd8RItqbbf3HtAQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true + dev: true optional: true /esbuild-sunos-64/0.14.50: @@ -4865,12 +5035,22 @@ packages: dev: true optional: true + /esbuild-sunos-64/0.15.6: + resolution: {integrity: sha512-1ceefLdPWcd1nW/ZLruPEYxeUEAVX0YHbG7w+BB4aYgfknaLGotI/ZvPWUZpzhC8l1EybrVlz++lm3E6ODIJOg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: false + optional: true + /esbuild-windows-32/0.14.47: resolution: {integrity: sha512-H0fWsLTp2WBfKLBgwYT4OTfFly4Im/8B5f3ojDv1Kx//kiubVY0IQunP2Koc/fr/0wI7hj3IiBDbSrmKlrNgLQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-32/0.14.50: @@ -4891,12 +5071,22 @@ packages: dev: true optional: true + /esbuild-windows-32/0.15.6: + resolution: {integrity: sha512-pBqdOsKqCD5LRYiwF29PJRDJZi7/Wgkz46u3d17MRFmrLFcAZDke3nbdDa1c8YgY78RiemudfCeAemN8EBlIpA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + /esbuild-windows-64/0.14.47: resolution: {integrity: sha512-/Pk5jIEH34T68r8PweKRi77W49KwanZ8X6lr3vDAtOlH5EumPE4pBHqkCUdELanvsT14yMXLQ/C/8XPi1pAtkQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-64/0.14.50: @@ -4917,12 +5107,22 @@ packages: dev: true optional: true + /esbuild-windows-64/0.15.6: + resolution: {integrity: sha512-KpPOh4aTOo//g9Pk2oVAzXMpc9Sz9n5A9sZTmWqDSXCiiachfFhbuFlsKBGATYCVitXfmBIJ4nNYYWSOdz4hQg==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /esbuild-windows-arm64/0.14.47: resolution: {integrity: sha512-HFSW2lnp62fl86/qPQlqw6asIwCnEsEoNIL1h2uVMgakddf+vUuMcCbtUY1i8sst7KkgHrVKCJQB33YhhOweCQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-arm64/0.14.50: @@ -4943,6 +5143,15 @@ packages: dev: true optional: true + /esbuild-windows-arm64/0.15.6: + resolution: {integrity: sha512-DB3G2x9OvFEa00jV+OkDBYpufq5x/K7a6VW6E2iM896DG4ZnAvJKQksOsCPiM1DUaa+DrijXAQ/ZOcKAqf/3Hg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /esbuild/0.14.47: resolution: {integrity: sha512-wI4ZiIfFxpkuxB8ju4MHrGwGLyp1+awEHAHVpx6w7a+1pmYIq8T9FGEVVwFo0iFierDoMj++Xq69GXWYn2EiwA==} engines: {node: '>=12'} @@ -4969,6 +5178,7 @@ packages: esbuild-windows-32: 0.14.47 esbuild-windows-64: 0.14.47 esbuild-windows-arm64: 0.14.47 + dev: true /esbuild/0.14.50: resolution: {integrity: sha512-SbC3k35Ih2IC6trhbMYW7hYeGdjPKf9atTKwBUHqMCYFZZ9z8zhuvfnZihsnJypl74FjiAKjBRqFkBkAd0rS/w==} @@ -5027,6 +5237,35 @@ packages: esbuild-windows-arm64: 0.15.5 dev: true + /esbuild/0.15.6: + resolution: {integrity: sha512-sgLOv3l4xklvXzzczhRwKRotyrfyZ2i1fCS6PTOLPd9wevDPArGU8HFtHrHCOcsMwTjLjzGm15gvC8uxVzQf+w==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/linux-loong64': 0.15.6 + esbuild-android-64: 0.15.6 + esbuild-android-arm64: 0.15.6 + esbuild-darwin-64: 0.15.6 + esbuild-darwin-arm64: 0.15.6 + esbuild-freebsd-64: 0.15.6 + esbuild-freebsd-arm64: 0.15.6 + esbuild-linux-32: 0.15.6 + esbuild-linux-64: 0.15.6 + esbuild-linux-arm: 0.15.6 + esbuild-linux-arm64: 0.15.6 + esbuild-linux-mips64le: 0.15.6 + esbuild-linux-ppc64le: 0.15.6 + esbuild-linux-riscv64: 0.15.6 + esbuild-linux-s390x: 0.15.6 + esbuild-netbsd-64: 0.15.6 + esbuild-openbsd-64: 0.15.6 + esbuild-sunos-64: 0.15.6 + esbuild-windows-32: 0.15.6 + esbuild-windows-64: 0.15.6 + esbuild-windows-arm64: 0.15.6 + dev: false + /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'}