From 71657df205d9dcaab91ecb8eefb34a4a5cf84605 Mon Sep 17 00:00:00 2001 From: DuCanhGH <75556609+DuCanhGH@users.noreply.github.com> Date: Tue, 20 Jun 2023 00:23:24 +0700 Subject: [PATCH 1/4] fix(next-pwa): fixed swc causing vercel to reach serverless size limit --- packages/next-pwa/.eslintrc.cjs | 5 + packages/next-pwa/package.json | 4 +- packages/next-pwa/rollup.config.js | 8 + packages/next-pwa/src/build-custom-worker.ts | 5 +- .../src/build-fallback-worker/index.ts | 4 +- .../next-pwa/src/build-sw-entry-worker.ts | 4 +- packages/next-pwa/src/swc-loader.ts | 134 ++++++ pnpm-lock.yaml | 406 +++++++++--------- 8 files changed, 363 insertions(+), 207 deletions(-) create mode 100644 packages/next-pwa/src/swc-loader.ts diff --git a/packages/next-pwa/.eslintrc.cjs b/packages/next-pwa/.eslintrc.cjs index 6fed2097..bb2da992 100644 --- a/packages/next-pwa/.eslintrc.cjs +++ b/packages/next-pwa/.eslintrc.cjs @@ -1,4 +1,9 @@ +// @ts-check +/** @type {import("eslint").Linter.BaseConfig} */ module.exports = { extends: ["plugin:jsdoc/recommended"], plugins: ["jsdoc"], + rules: { + "jsdoc/require-param-type": "off", + }, }; diff --git a/packages/next-pwa/package.json b/packages/next-pwa/package.json index fe377934..1477653c 100644 --- a/packages/next-pwa/package.json +++ b/packages/next-pwa/package.json @@ -56,11 +56,10 @@ "typecheck": "tsc" }, "dependencies": { - "@swc/core": "1.3.62", + "babel-loader": "9.1.2", "clean-webpack-plugin": "4.0.0", "fast-glob": "3.2.12", "semver": "7.5.1", - "swc-loader": "0.2.3", "terser-webpack-plugin": "5.3.9", "workbox-build": "7.0.0", "workbox-core": "7.0.0", @@ -73,6 +72,7 @@ "@rollup/plugin-node-resolve": "15.1.0", "@rollup/plugin-terser": "0.4.3", "@rollup/plugin-typescript": "11.1.1", + "@swc/core": "1.3.62", "@types/node": "20.2.6", "@types/semver": "7.5.0", "chalk": "5.2.0", diff --git a/packages/next-pwa/rollup.config.js b/packages/next-pwa/rollup.config.js index a7202c17..b22a49db 100644 --- a/packages/next-pwa/rollup.config.js +++ b/packages/next-pwa/rollup.config.js @@ -68,6 +68,14 @@ const files = [ format: "esm", }, }, + { + input: "src/swc-loader.ts", + output: { + file: "dist/swc-loader.cjs", + format: "cjs", + }, + external: ["semver"], + }, ]; /** @type {FileEntry[]} */ diff --git a/packages/next-pwa/src/build-custom-worker.ts b/packages/next-pwa/src/build-custom-worker.ts index e0651bed..6ebefd6a 100644 --- a/packages/next-pwa/src/build-custom-worker.ts +++ b/packages/next-pwa/src/build-custom-worker.ts @@ -1,5 +1,4 @@ import fs from "node:fs"; -import { createRequire } from "node:module"; import path from "node:path"; import { CleanWebpackPlugin } from "clean-webpack-plugin"; @@ -11,8 +10,6 @@ import webpack from "webpack"; import swcRc from "./.swcrc.json"; -const require = createRequire(import.meta.url); - export const buildCustomWorker = ({ id, baseDir, @@ -103,7 +100,7 @@ export const buildCustomWorker = ({ }, resolveLoader: { alias: { - "swc-loader": require.resolve("swc-loader"), + "swc-loader": path.join(__dirname, "swc-loader.cjs"), }, }, module: { diff --git a/packages/next-pwa/src/build-fallback-worker/index.ts b/packages/next-pwa/src/build-fallback-worker/index.ts index b7959216..b47d5299 100644 --- a/packages/next-pwa/src/build-fallback-worker/index.ts +++ b/packages/next-pwa/src/build-fallback-worker/index.ts @@ -1,4 +1,3 @@ -import { createRequire } from "node:module"; import path from "node:path"; import { fileURLToPath } from "node:url"; @@ -12,7 +11,6 @@ import type { FallbackRoutes } from "../types.js"; import { getFallbackEnvs } from "./get-fallback-envs.js"; const __dirname = fileURLToPath(new URL(".", import.meta.url)); -const require = createRequire(import.meta.url); export const buildFallbackWorker = ({ id, @@ -63,7 +61,7 @@ export const buildFallbackWorker = ({ }, resolveLoader: { alias: { - "swc-loader": require.resolve("swc-loader"), + "swc-loader": path.join(__dirname, "swc-loader.cjs"), }, }, module: { diff --git a/packages/next-pwa/src/build-sw-entry-worker.ts b/packages/next-pwa/src/build-sw-entry-worker.ts index 94444998..f1f17f12 100644 --- a/packages/next-pwa/src/build-sw-entry-worker.ts +++ b/packages/next-pwa/src/build-sw-entry-worker.ts @@ -1,4 +1,3 @@ -import { createRequire } from "node:module"; import path from "node:path"; import { fileURLToPath } from "node:url"; @@ -10,7 +9,6 @@ import webpack from "webpack"; import swcRc from "./.swcrc.json"; const __dirname = fileURLToPath(new URL(".", import.meta.url)); -const require = createRequire(import.meta.url); export const buildSWEntryWorker = ({ id, @@ -55,7 +53,7 @@ export const buildSWEntryWorker = ({ }, resolveLoader: { alias: { - "swc-loader": require.resolve("swc-loader"), + "swc-loader": path.join(__dirname, "swc-loader.cjs"), }, }, module: { diff --git a/packages/next-pwa/src/swc-loader.ts b/packages/next-pwa/src/swc-loader.ts new file mode 100644 index 00000000..d09cdc8a --- /dev/null +++ b/packages/next-pwa/src/swc-loader.ts @@ -0,0 +1,134 @@ +import { createRequire } from "node:module"; + +import type { Compiler } from "@swc/core"; +import { logger } from "utils"; + +const require = createRequire(import.meta.url); + +/** + * swc-loader + * @param source Source code + * @param inputSourceMap Source map + */ +function swcLoader(this: any, source: string, inputSourceMap: string) { + // Make the loader async + const callback = this.async(); + const filename = this.resourcePath; + + let loaderOptions = + (typeof this.getOptions === "function" + ? this.getOptions() + : require("loader-utils").getOptions(this)) || {}; + + // Standardize on 'sourceMaps' as the key passed through to Webpack, so that + // users may safely use either one alongside our default use of + // 'this.sourceMap' below without getting error about conflicting aliases. + if ( + Object.prototype.hasOwnProperty.call(loaderOptions, "sourceMap") && + !Object.prototype.hasOwnProperty.call(loaderOptions, "sourceMaps") + ) { + loaderOptions = Object.assign({}, loaderOptions, { + sourceMaps: loaderOptions.sourceMap, + }); + delete loaderOptions.sourceMap; + } + + if (inputSourceMap && typeof inputSourceMap === "object") { + inputSourceMap = JSON.stringify(inputSourceMap); + } + + const programmaticOptions = Object.assign({}, loaderOptions, { + filename, + inputSourceMap: inputSourceMap || undefined, + + // Set the default sourcemap behavior based on Webpack's mapping flag, + // but allow users to override if they want. + sourceMaps: + loaderOptions.sourceMaps === undefined + ? this.sourceMap + : loaderOptions.sourceMaps, + + // Ensure that Webpack will get a full absolute path in the sourcemap + // so that it can properly map the module back to its internal cached + // modules. + sourceFileName: filename, + }); + if (!programmaticOptions.inputSourceMap) { + delete programmaticOptions.inputSourceMap; + } + const sync = programmaticOptions.sync; + const parseMap = programmaticOptions.parseMap; + + let swc: Compiler; + try { + // avoid installing @swc/core + swc = require("next/dist/build/swc"); + } catch { + logger.info( + "Using @swc/core to compile next-pwa's features. Please install it if you haven't." + ); + swc = require("@swc/core"); + } + + // Remove loader related options + delete programmaticOptions.sync; + delete programmaticOptions.parseMap; + delete programmaticOptions.customize; + delete programmaticOptions.cacheDirectory; + delete programmaticOptions.cacheIdentifier; + delete programmaticOptions.cacheCompression; + delete programmaticOptions.metadataSubscribers; + + // auto detect development mode + if ( + this.mode && + programmaticOptions.jsc && + programmaticOptions.jsc.transform && + programmaticOptions.jsc.transform.react && + !Object.prototype.hasOwnProperty.call( + programmaticOptions.jsc.transform.react, + "development" + ) + ) { + programmaticOptions.jsc.transform.react.development = + this.mode === "development"; + } + + if (programmaticOptions.sourceMaps === "inline") { + // Babel has this weird behavior where if you set "inline", we + // inline the sourcemap, and set 'result.map = null'. This results + // in bad behavior from Babel since the maps get put into the code, + // which Webpack does not expect, and because the map we return to + // Webpack is null, which is also bad. To avoid that, we override the + // behavior here so "inline" just behaves like 'true'. + programmaticOptions.sourceMaps = true; + } + + try { + if (sync) { + const output = swc.transformSync(source, programmaticOptions); + callback( + null, + output.code, + parseMap && output.map ? JSON.parse(output.map) : output.map + ); + } else { + swc.transform(source, programmaticOptions).then( + (output) => { + callback( + null, + output.code, + parseMap && output.map ? JSON.parse(output.map) : output.map + ); + }, + (err) => { + callback(err); + } + ); + } + } catch (e) { + callback(e); + } +} + +export default swcLoader; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae41a679..0481ee78 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -112,7 +112,7 @@ importers: dependencies: next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -149,10 +149,10 @@ importers: version: 11.8.0 next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) next-contentlayer: specifier: 0.3.3 - version: 0.3.3(esbuild@0.17.19)(next@13.4.5)(react-dom@18.2.0)(react@18.2.0) + version: 0.3.3(esbuild@0.17.19)(next@13.4.6)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -261,7 +261,7 @@ importers: version: link:../../packages/next-pwa next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -301,7 +301,7 @@ importers: version: 4.18.0 next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -344,7 +344,7 @@ importers: version: link:../../packages/next-pwa next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -375,7 +375,7 @@ importers: version: link:../../packages/next-pwa next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -418,10 +418,10 @@ importers: version: 22.5.1 next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) next-i18next: specifier: 13.3.0 - version: 13.3.0(i18next@22.5.1)(next@13.4.5)(react-i18next@12.3.1)(react@18.2.0) + version: 13.3.0(i18next@22.5.1)(next@13.4.6)(react-i18next@12.3.1)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -455,7 +455,7 @@ importers: version: link:../../packages/next-pwa next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -486,7 +486,7 @@ importers: version: link:../../packages/next-pwa next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -520,7 +520,7 @@ importers: version: link:../../packages/next-pwa next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -557,7 +557,7 @@ importers: version: link:../../packages/next-sw next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -580,9 +580,9 @@ importers: packages/next-pwa: dependencies: - '@swc/core': - specifier: 1.3.62 - version: 1.3.62 + babel-loader: + specifier: 9.1.2 + version: 9.1.2(@babel/core@7.20.5)(webpack@5.86.0) clean-webpack-plugin: specifier: 4.0.0 version: 4.0.0(webpack@5.86.0) @@ -592,9 +592,6 @@ importers: semver: specifier: 7.5.1 version: 7.5.1 - swc-loader: - specifier: 0.2.3 - version: 0.2.3(@swc/core@1.3.62)(webpack@5.86.0) terser-webpack-plugin: specifier: 5.3.9 version: 5.3.9(@swc/core@1.3.62)(webpack@5.86.0) @@ -626,6 +623,9 @@ importers: '@rollup/plugin-typescript': specifier: 11.1.1 version: 11.1.1(rollup@3.24.1)(tslib@2.5.3)(typescript@5.2.0-dev.20230610) + '@swc/core': + specifier: 1.3.62 + version: 1.3.62 '@types/node': specifier: 20.2.6 version: 20.2.6 @@ -637,7 +637,7 @@ importers: version: 5.2.0 next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -698,7 +698,7 @@ importers: version: 5.2.0 next: specifier: latest - version: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -775,11 +775,11 @@ packages: leven: 3.1.0 dev: false - /@babel/code-frame@7.18.6: - resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} + /@babel/code-frame@7.22.5: + resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.18.6 + '@babel/highlight': 7.22.5 /@babel/compat-data@7.20.5: resolution: {integrity: sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==} @@ -790,15 +790,15 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.0 - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.20.5 + '@babel/code-frame': 7.22.5 + '@babel/generator': 7.22.5 '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.20.5) '@babel/helper-module-transforms': 7.20.2 '@babel/helpers': 7.20.6 - '@babel/parser': 7.20.5 - '@babel/template': 7.18.10 - '@babel/traverse': 7.20.5 - '@babel/types': 7.20.5 + '@babel/parser': 7.22.5 + '@babel/template': 7.22.5 + '@babel/traverse': 7.22.5 + '@babel/types': 7.22.5 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -807,16 +807,17 @@ packages: transitivePeerDependencies: - supports-color - /@babel/generator@7.20.5: - resolution: {integrity: sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==} + /@babel/generator@7.22.5: + resolution: {integrity: sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.20.5 + '@babel/types': 7.22.5 '@jridgewell/gen-mapping': 0.3.2 + '@jridgewell/trace-mapping': 0.3.17 jsesc: 2.5.2 - /@babel/helper-annotate-as-pure@7.18.6: - resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} + /@babel/helper-annotate-as-pure@7.22.5: + resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 @@ -842,20 +843,22 @@ packages: browserslist: 4.21.6 semver: 6.3.0 - /@babel/helper-create-class-features-plugin@7.20.5(@babel/core@7.20.5): - resolution: {integrity: sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==} + /@babel/helper-create-class-features-plugin@7.22.5(@babel/core@7.20.5): + resolution: {integrity: sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-function-name': 7.19.0 - '@babel/helper-member-expression-to-functions': 7.18.9 - '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/helper-replace-supers': 7.19.1 - '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-member-expression-to-functions': 7.22.5 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers': 7.22.5 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.5 + semver: 6.3.0 transitivePeerDependencies: - supports-color dev: false @@ -867,7 +870,7 @@ packages: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-annotate-as-pure': 7.18.6 + '@babel/helper-annotate-as-pure': 7.22.5 regexpu-core: 5.2.2 dev: false @@ -887,8 +890,8 @@ packages: - supports-color dev: false - /@babel/helper-environment-visitor@7.18.9: - resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} + /@babel/helper-environment-visitor@7.22.5: + resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} engines: {node: '>=6.9.0'} /@babel/helper-explode-assignable-expression@7.18.6: @@ -898,28 +901,28 @@ packages: '@babel/types': 7.22.5 dev: false - /@babel/helper-function-name@7.19.0: - resolution: {integrity: sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==} + /@babel/helper-function-name@7.22.5: + resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.18.10 + '@babel/template': 7.22.5 '@babel/types': 7.22.5 - /@babel/helper-hoist-variables@7.18.6: - resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} + /@babel/helper-hoist-variables@7.22.5: + resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - /@babel/helper-member-expression-to-functions@7.18.9: - resolution: {integrity: sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==} + /@babel/helper-member-expression-to-functions@7.22.5: + resolution: {integrity: sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 dev: false - /@babel/helper-module-imports@7.18.6: - resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} + /@babel/helper-module-imports@7.22.5: + resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 @@ -928,29 +931,24 @@ packages: resolution: {integrity: sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-module-imports': 7.18.6 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-module-imports': 7.22.5 '@babel/helper-simple-access': 7.20.2 - '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-split-export-declaration': 7.22.5 '@babel/helper-validator-identifier': 7.22.5 - '@babel/template': 7.18.10 - '@babel/traverse': 7.20.5 + '@babel/template': 7.22.5 + '@babel/traverse': 7.22.5 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color - /@babel/helper-optimise-call-expression@7.18.6: - resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} + /@babel/helper-optimise-call-expression@7.22.5: + resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 dev: false - /@babel/helper-plugin-utils@7.20.2: - resolution: {integrity: sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-plugin-utils@7.22.5: resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} @@ -962,22 +960,23 @@ packages: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-wrap-function': 7.20.5 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color dev: false - /@babel/helper-replace-supers@7.19.1: - resolution: {integrity: sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==} + /@babel/helper-replace-supers@7.22.5: + resolution: {integrity: sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-member-expression-to-functions': 7.18.9 - '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/traverse': 7.20.5 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-member-expression-to-functions': 7.22.5 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/template': 7.22.5 + '@babel/traverse': 7.22.5 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color @@ -989,23 +988,19 @@ packages: dependencies: '@babel/types': 7.22.5 - /@babel/helper-skip-transparent-expression-wrappers@7.20.0: - resolution: {integrity: sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==} + /@babel/helper-skip-transparent-expression-wrappers@7.22.5: + resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 dev: false - /@babel/helper-split-export-declaration@7.18.6: - resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} + /@babel/helper-split-export-declaration@7.22.5: + resolution: {integrity: sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - /@babel/helper-string-parser@7.19.4: - resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} - engines: {node: '>=6.9.0'} - /@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} @@ -1022,9 +1017,9 @@ packages: resolution: {integrity: sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-function-name': 7.19.0 - '@babel/template': 7.18.10 - '@babel/traverse': 7.20.5 + '@babel/helper-function-name': 7.22.5 + '@babel/template': 7.22.5 + '@babel/traverse': 7.22.5 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color @@ -1034,34 +1029,26 @@ packages: resolution: {integrity: sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.18.10 - '@babel/traverse': 7.20.5 + '@babel/template': 7.22.5 + '@babel/traverse': 7.22.5 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color - /@babel/highlight@7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} + /@babel/highlight@7.22.5: + resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.5 chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser@7.20.5: - resolution: {integrity: sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.22.5 - /@babel/parser@7.22.5: resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==} engines: {node: '>=6.0.0'} hasBin: true dependencies: '@babel/types': 7.22.5 - dev: true /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6(@babel/core@7.20.5): resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==} @@ -1081,7 +1068,7 @@ packages: dependencies: '@babel/core': 7.20.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-proposal-optional-chaining': 7.18.9(@babel/core@7.20.5) dev: false @@ -1092,7 +1079,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.20.5) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.20.5) @@ -1107,7 +1094,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-create-class-features-plugin': 7.20.5(@babel/core@7.20.5) + '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.20.5) '@babel/helper-plugin-utils': 7.22.5 transitivePeerDependencies: - supports-color @@ -1120,7 +1107,7 @@ packages: '@babel/core': ^7.12.0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-create-class-features-plugin': 7.20.5(@babel/core@7.20.5) + '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.20.5) '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.20.5) transitivePeerDependencies: @@ -1226,7 +1213,7 @@ packages: dependencies: '@babel/core': 7.20.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.20.5) dev: false @@ -1237,7 +1224,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-create-class-features-plugin': 7.20.5(@babel/core@7.20.5) + '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.20.5) '@babel/helper-plugin-utils': 7.22.5 transitivePeerDependencies: - supports-color @@ -1250,8 +1237,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-create-class-features-plugin': 7.20.5(@babel/core@7.20.5) + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.20.5) '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.20.5) transitivePeerDependencies: @@ -1453,7 +1440,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-module-imports': 7.18.6 + '@babel/helper-module-imports': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.20.5) transitivePeerDependencies: @@ -1487,14 +1474,14 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-annotate-as-pure': 7.18.6 + '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.20.5) - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-function-name': 7.19.0 - '@babel/helper-optimise-call-expression': 7.18.6 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-optimise-call-expression': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.19.1 - '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-replace-supers': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.5 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -1570,7 +1557,7 @@ packages: dependencies: '@babel/core': 7.20.5 '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.20.5) - '@babel/helper-function-name': 7.19.0 + '@babel/helper-function-name': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 dev: false @@ -1628,7 +1615,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-module-transforms': 7.20.2 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-identifier': 7.22.5 @@ -1678,7 +1665,7 @@ packages: dependencies: '@babel/core': 7.20.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.19.1 + '@babel/helper-replace-supers': 7.22.5 transitivePeerDependencies: - supports-color dev: false @@ -1742,7 +1729,7 @@ packages: dependencies: '@babel/core': 7.20.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: false /@babel/plugin-transform-sticky-regex@7.18.6(@babel/core@7.20.5): @@ -1901,39 +1888,31 @@ packages: dependencies: regenerator-runtime: 0.13.11 - /@babel/template@7.18.10: - resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} + /@babel/template@7.22.5: + resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.18.6 - '@babel/parser': 7.20.5 + '@babel/code-frame': 7.22.5 + '@babel/parser': 7.22.5 '@babel/types': 7.22.5 - /@babel/traverse@7.20.5: - resolution: {integrity: sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==} + /@babel/traverse@7.22.5: + resolution: {integrity: sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.20.5 - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-function-name': 7.19.0 - '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.20.5 - '@babel/types': 7.20.5 + '@babel/code-frame': 7.22.5 + '@babel/generator': 7.22.5 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.5 + '@babel/parser': 7.22.5 + '@babel/types': 7.22.5 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color - /@babel/types@7.20.5: - resolution: {integrity: sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.19.4 - '@babel/helper-validator-identifier': 7.22.5 - to-fast-properties: 2.0.0 - /@babel/types@7.22.5: resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} engines: {node: '>=6.9.0'} @@ -3013,8 +2992,8 @@ packages: resolution: {integrity: sha512-q/y7VZj/9YpgzDe64Zi6rY1xPizx80JjlU2BTevlajtaE3w1LqweH1gGgxou2N7hdFosXHjGrI4OUvtFXXhGLg==} dev: true - /@next/env@13.4.5: - resolution: {integrity: sha512-SG/gKH6eij4vwQy87b/3mbpQ1X3x2vUdnpwq6/qL2IQWjtq58EY/UuNAp9CoEZoC9sI4L9AD1r+73Z9r4d3uug==} + /@next/env@13.4.6: + resolution: {integrity: sha512-nqUxEtvDqFhmV1/awSg0K2XHNwkftNaiUqCYO9e6+MYmqNObpKVl7OgMkGaQ2SZnFx5YqF0t60ZJTlyJIDAijg==} /@next/eslint-plugin-next@13.4.4: resolution: {integrity: sha512-5jnh7q6I15efnjR/rR+/TGTc9hn53g3JTbEjAMjmeQiExKqEUgIXqrHI5zlTNlNyzCPkBB860/ctxXheZaF2Vw==} @@ -3031,8 +3010,8 @@ packages: dev: true optional: true - /@next/swc-darwin-arm64@13.4.5: - resolution: {integrity: sha512-XvTzi2ASUN5bECFIAAcBiSoDb0xsq+KLj4F0bof4d4rdc+FgOqLvseGQaOXwVi1TIh5bHa7o4b6droSJMO5+2g==} + /@next/swc-darwin-arm64@13.4.6: + resolution: {integrity: sha512-ahi6VP98o4HV19rkOXPSUu+ovfHfUxbJQ7VVJ7gL2FnZRr7onEFC1oGQ6NQHpm8CxpIzSSBW79kumlFMOmZVjg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -3048,8 +3027,8 @@ packages: dev: true optional: true - /@next/swc-darwin-x64@13.4.5: - resolution: {integrity: sha512-NQdqal/VKAqlJTuzhjZmNtdo8QSqwmfO7b2xJSAengTEVxQvsH76oGEzQeIv8Ci4NP6DysAFtFrJq++TmIxcUA==} + /@next/swc-darwin-x64@13.4.6: + resolution: {integrity: sha512-13cXxKFsPJIJKzUqrU5XB1mc0xbUgYsRcdH6/rB8c4NMEbWGdtD4QoK9ShN31TZdePpD4k416Ur7p+deMIxnnA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -3065,8 +3044,8 @@ packages: dev: true optional: true - /@next/swc-linux-arm64-gnu@13.4.5: - resolution: {integrity: sha512-nB8TjtpJCXtzIFjYOMbnQu68ajkA8QK58TreHjTGojSQjsF0StDqo5zFHglVVVHrd8d3N/+EjC18yFNSWnd/ZA==} + /@next/swc-linux-arm64-gnu@13.4.6: + resolution: {integrity: sha512-Ti+NMHEjTNktCVxNjeWbYgmZvA2AqMMI2AMlzkXsU7W4pXCMhrryAmAIoo+7YdJbsx01JQWYVxGe62G6DoCLaA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -3082,8 +3061,8 @@ packages: dev: true optional: true - /@next/swc-linux-arm64-musl@13.4.5: - resolution: {integrity: sha512-W126XUW599OV3giSH9Co40VpT8VAOT47xONVHXZaYEpeca0qEevjj6WUr5IJu/8u+XGWm5xI1S0DYWjR6W+olw==} + /@next/swc-linux-arm64-musl@13.4.6: + resolution: {integrity: sha512-OHoC6gO7XfjstgwR+z6UHKlvhqJfyMtNaJidjx3sEcfaDwS7R2lqR5AABi8PuilGgi0BO0O0sCXqLlpp3a0emQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -3099,8 +3078,8 @@ packages: dev: true optional: true - /@next/swc-linux-x64-gnu@13.4.5: - resolution: {integrity: sha512-ZbPLO/oztQdtjGmWvGhRmtkZ6j9kQqg65kiO7F7Ijj7ojTtu3hh/vY+XRsHa/4Cse6HgyJ8XGZJMGoLb8ecQfQ==} + /@next/swc-linux-x64-gnu@13.4.6: + resolution: {integrity: sha512-zHZxPGkUlpfNJCboUrFqwlwEX5vI9LSN70b8XEb0DYzzlrZyCyOi7hwDp/+3Urm9AB7YCAJkgR5Sp1XBVjHdfQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -3116,8 +3095,8 @@ packages: dev: true optional: true - /@next/swc-linux-x64-musl@13.4.5: - resolution: {integrity: sha512-f+/h8KMNixVUoRB+2vza8I+jsthJ4KcvopGUsDIUHe7Q4t+m8nKwGFBeyNu9qNIenYK5g5QYEsSwYFEqZylrTQ==} + /@next/swc-linux-x64-musl@13.4.6: + resolution: {integrity: sha512-K/Y8lYGTwTpv5ME8PSJxwxLolaDRdVy+lOd9yMRMiQE0BLUhtxtCWC9ypV42uh9WpLjoaD0joOsB9Q6mbrSGJg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -3133,8 +3112,8 @@ packages: dev: true optional: true - /@next/swc-win32-arm64-msvc@13.4.5: - resolution: {integrity: sha512-dvtPQZ5+J+zUE1uq7gP853Oj63e+n0T1ydZ/yRdVh7d8zW9ZFuC9fFrg3MqP1cv1NPPur8rrTqDKN2mRBkSSBw==} + /@next/swc-win32-arm64-msvc@13.4.6: + resolution: {integrity: sha512-U6LtxEUrjBL2tpW+Kr1nHCSJWNeIed7U7l5o7FiKGGwGgIlFi4UHDiLI6TQ2lxi20fAU33CsruV3U0GuzMlXIw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -3150,8 +3129,8 @@ packages: dev: true optional: true - /@next/swc-win32-ia32-msvc@13.4.5: - resolution: {integrity: sha512-gK9zwGe25x31S4AjPy3Bf2niQvHIAbmwgkzmqWG3OmD4K2Z/Dh2ju4vuyzPzIt0pwQe4B520meP9NizTBmVWSg==} + /@next/swc-win32-ia32-msvc@13.4.6: + resolution: {integrity: sha512-eEBeAqpCfhdPSlCZCayjCiyIllVqy4tcqvm1xmg3BgJG0G5ITiMM4Cw2WVeRSgWDJqQGRyyb+q8Y2ltzhXOWsQ==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -3167,8 +3146,8 @@ packages: dev: true optional: true - /@next/swc-win32-x64-msvc@13.4.5: - resolution: {integrity: sha512-iyNQVc7eGehrik9RJt9xGcnO6b/pi8C7GCfg8RGenx1IlalEKbYRgBJloF7DQzwlrV47E9bQl8swT+JawaNcKA==} + /@next/swc-win32-x64-msvc@13.4.6: + resolution: {integrity: sha512-OrZs94AuO3ZS5tnqlyPRNgfWvboXaDQCi5aXGve3o3C+Sj0ctMUV9+Do+0zMvvLRumR8E0PTWKvtz9n5vzIsWw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -3542,7 +3521,7 @@ packages: optional: true dependencies: '@babel/core': 7.20.5 - '@babel/helper-module-imports': 7.18.6 + '@babel/helper-module-imports': 7.22.5 '@rollup/pluginutils': 3.1.0(rollup@2.79.1) rollup: 2.79.1 dev: false @@ -4442,6 +4421,15 @@ packages: dependencies: ajv: 6.12.6 + /ajv-keywords@5.1.0(ajv@8.11.2): + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} + peerDependencies: + ajv: ^8.8.2 + dependencies: + ajv: 8.11.2 + fast-deep-equal: 3.1.3 + dev: false + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -4729,11 +4717,24 @@ packages: - supports-color dev: true + /babel-loader@9.1.2(@babel/core@7.20.5)(webpack@5.86.0): + resolution: {integrity: sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA==} + engines: {node: '>= 14.15.0'} + peerDependencies: + '@babel/core': ^7.12.0 + webpack: '>=5' + dependencies: + '@babel/core': 7.20.5 + find-cache-dir: 3.3.2 + schema-utils: 4.2.0 + webpack: 5.86.0(@swc/core@1.3.62) + dev: false + /babel-plugin-istanbul@6.1.1: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} dependencies: - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.22.5 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.2.1 @@ -4746,7 +4747,7 @@ packages: resolution: {integrity: sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/template': 7.18.10 + '@babel/template': 7.22.5 '@babel/types': 7.22.5 '@types/babel__core': 7.20.1 '@types/babel__traverse': 7.20.1 @@ -5373,6 +5374,10 @@ packages: engines: {node: '>=4.0.0'} dev: false + /commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + dev: false + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -6727,6 +6732,15 @@ packages: - supports-color dev: false + /find-cache-dir@3.3.2: + resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} + engines: {node: '>=8'} + dependencies: + commondir: 1.0.1 + make-dir: 3.1.0 + pkg-dir: 4.2.0 + dev: false + /find-my-way@7.6.0: resolution: {integrity: sha512-H7berWdHJ+5CNVr4ilLWPai4ml7Y2qAsxjw3pfeBxPigZmaDTzF0wjJLj90xRCmGcWYcyt050yN+34OZDJm1eQ==} engines: {node: '>=14'} @@ -6742,7 +6756,6 @@ packages: dependencies: locate-path: 5.0.0 path-exists: 4.0.0 - dev: true /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} @@ -7960,7 +7973,7 @@ packages: engines: {node: '>=8'} dependencies: '@babel/core': 7.20.5 - '@babel/parser': 7.20.5 + '@babel/parser': 7.22.5 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 6.3.0 @@ -8205,7 +8218,7 @@ packages: resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.22.5 '@jest/types': 29.5.0 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -8331,11 +8344,11 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/core': 7.20.5 - '@babel/generator': 7.20.5 + '@babel/generator': 7.22.5 '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.20.5) '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.20.5) - '@babel/traverse': 7.20.5 - '@babel/types': 7.20.5 + '@babel/traverse': 7.22.5 + '@babel/types': 7.22.5 '@jest/expect-utils': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 @@ -8707,7 +8720,6 @@ packages: engines: {node: '>=8'} dependencies: p-locate: 4.1.0 - dev: true /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} @@ -8825,7 +8837,6 @@ packages: engines: {node: '>=8'} dependencies: semver: 6.3.0 - dev: true /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -9556,7 +9567,7 @@ packages: /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - /next-contentlayer@0.3.3(esbuild@0.17.19)(next@13.4.5)(react-dom@18.2.0)(react@18.2.0): + /next-contentlayer@0.3.3(esbuild@0.17.19)(next@13.4.6)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-XYHRtDWBZ6ZI4F5dJ3Zy0wD2VeNLyifXuGihlmInTVLCtMiACZMae9N7nuhSZtlpXW5xec5wOV9pYhjoICV52A==} peerDependencies: next: ^12 || ^13 @@ -9565,7 +9576,7 @@ packages: dependencies: '@contentlayer/core': 0.3.3(esbuild@0.17.19) '@contentlayer/utils': 0.3.3 - next: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) transitivePeerDependencies: @@ -9575,7 +9586,7 @@ packages: - supports-color dev: false - /next-i18next@13.3.0(i18next@22.5.1)(next@13.4.5)(react-i18next@12.3.1)(react@18.2.0): + /next-i18next@13.3.0(i18next@22.5.1)(next@13.4.6)(react-i18next@12.3.1)(react@18.2.0): resolution: {integrity: sha512-X4kgi51BCOoGdKbv87eZ8OU7ICQDg5IP+T5fNjqDY3os9ea0OKTY4YpAiVFiwcI9XimcUmSPbKO4a9jFUyYSgg==} engines: {node: '>=14'} peerDependencies: @@ -9590,7 +9601,7 @@ packages: hoist-non-react-statics: 3.3.2 i18next: 22.5.1 i18next-fs-backend: 2.1.1 - next: 13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-i18next: 12.3.1(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) dev: false @@ -9637,8 +9648,8 @@ packages: - babel-plugin-macros dev: true - /next@13.4.5(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-pfNsRLVM9e5Y1/z02VakJRfD6hMQkr24FaN2xc9GbcZDBxoOgiNAViSg5cXwlWCoMhtm4U315D7XYhgOr96Q3Q==} + /next@13.4.6(@babel/core@7.20.5)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-sjVqjxU+U2aXZnYt4Ud6CTLNNwWjdSfMgemGpIQJcN3Z7Jni9xRWbR0ie5fQzCg87aLqQVhKA2ud2gPoqJ9lGw==} engines: {node: '>=16.8.0'} hasBin: true peerDependencies: @@ -9655,7 +9666,7 @@ packages: sass: optional: true dependencies: - '@next/env': 13.4.5 + '@next/env': 13.4.6 '@opentelemetry/api': 1.4.1 '@swc/helpers': 0.5.1 busboy: 1.6.0 @@ -9667,15 +9678,15 @@ packages: watchpack: 2.4.0 zod: 3.21.4 optionalDependencies: - '@next/swc-darwin-arm64': 13.4.5 - '@next/swc-darwin-x64': 13.4.5 - '@next/swc-linux-arm64-gnu': 13.4.5 - '@next/swc-linux-arm64-musl': 13.4.5 - '@next/swc-linux-x64-gnu': 13.4.5 - '@next/swc-linux-x64-musl': 13.4.5 - '@next/swc-win32-arm64-msvc': 13.4.5 - '@next/swc-win32-ia32-msvc': 13.4.5 - '@next/swc-win32-x64-msvc': 13.4.5 + '@next/swc-darwin-arm64': 13.4.6 + '@next/swc-darwin-x64': 13.4.6 + '@next/swc-linux-arm64-gnu': 13.4.6 + '@next/swc-linux-arm64-musl': 13.4.6 + '@next/swc-linux-x64-gnu': 13.4.6 + '@next/swc-linux-x64-musl': 13.4.6 + '@next/swc-win32-arm64-msvc': 13.4.6 + '@next/swc-win32-ia32-msvc': 13.4.6 + '@next/swc-win32-x64-msvc': 13.4.6 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -10100,7 +10111,6 @@ packages: engines: {node: '>=6'} dependencies: p-try: 2.2.0 - dev: true /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} @@ -10114,7 +10124,6 @@ packages: engines: {node: '>=8'} dependencies: p-limit: 2.3.0 - dev: true /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} @@ -10137,7 +10146,6 @@ packages: /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} - dev: true /package-json@8.1.0: resolution: {integrity: sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==} @@ -10206,7 +10214,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.22.5 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -10244,7 +10252,6 @@ packages: /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - dev: true /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -10369,7 +10376,6 @@ packages: engines: {node: '>=8'} dependencies: find-up: 4.1.0 - dev: true /postcss-import@15.1.0(postcss@8.4.24): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} @@ -11130,7 +11136,7 @@ packages: rollup: 3.24.1 typescript: 5.2.0-dev.20230610 optionalDependencies: - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.22.5 dev: true /rollup-plugin-terser@7.0.2(rollup@2.79.1): @@ -11139,7 +11145,7 @@ packages: peerDependencies: rollup: ^2.0.0 dependencies: - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.22.5 jest-worker: 26.6.2 rollup: 2.79.1 serialize-javascript: 4.0.0 @@ -11220,6 +11226,16 @@ packages: ajv: 6.12.6 ajv-keywords: 3.5.2(ajv@6.12.6) + /schema-utils@4.2.0: + resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} + engines: {node: '>= 12.13.0'} + dependencies: + '@types/json-schema': 7.0.11 + ajv: 8.11.2 + ajv-formats: 2.1.1(ajv@8.11.2) + ajv-keywords: 5.1.0(ajv@8.11.2) + dev: false + /section-matter@1.0.0: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} From fa36fe9aabbfaaf68c5c75894f3512d4da27468e Mon Sep 17 00:00:00 2001 From: DuCanhGH <75556609+DuCanhGH@users.noreply.github.com> Date: Tue, 20 Jun 2023 00:25:23 +0700 Subject: [PATCH 2/4] fixed contributing/core/developing.md --- contributing/core/developing.md | 1 - 1 file changed, 1 deletion(-) diff --git a/contributing/core/developing.md b/contributing/core/developing.md index fdb2522e..1f325cc6 100644 --- a/contributing/core/developing.md +++ b/contributing/core/developing.md @@ -29,6 +29,5 @@ To develop locally: 1. When you are ready to push, make a fork and then run: ``` git remote set-url origin https://github.com/YOUR_NAME/next-pwa - git branch -m MY_BRANCH_NAME git push -u origin MY_BRANCH_NAME ``` From d55b09892b9ca3c0a3f511b1b7d0e1891b9090f3 Mon Sep 17 00:00:00 2001 From: DuCanhGH <75556609+DuCanhGH@users.noreply.github.com> Date: Tue, 20 Jun 2023 12:48:43 +0700 Subject: [PATCH 3/4] make next-sw use our custom swc-loader --- .changeset/hungry-yaks-lay.md | 14 ++ .changeset/serious-dodos-complain.md | 11 ++ packages/next-pwa/package.json | 4 +- packages/next-pwa/src/swc-loader.ts | 135 +----------------- packages/next-sw/package.json | 2 - packages/next-sw/rollup.config.js | 8 ++ .../next-sw/src/build/generate-sw/core.ts | 4 +- packages/next-sw/src/swc-loader.ts | 1 + packages/utils/package.json | 1 + packages/utils/src/index.ts | 1 + packages/utils/src/swc-loader.ts | 133 +++++++++++++++++ pnpm-lock.yaml | 72 ++-------- 12 files changed, 187 insertions(+), 199 deletions(-) create mode 100644 .changeset/hungry-yaks-lay.md create mode 100644 .changeset/serious-dodos-complain.md create mode 100644 packages/next-sw/src/swc-loader.ts create mode 100644 packages/utils/src/swc-loader.ts diff --git a/.changeset/hungry-yaks-lay.md b/.changeset/hungry-yaks-lay.md new file mode 100644 index 00000000..f961c7c7 --- /dev/null +++ b/.changeset/hungry-yaks-lay.md @@ -0,0 +1,14 @@ +--- +"@ducanh2912/next-pwa": major +"@ducanh2912/next-sw": minor +--- + +BREAKING CHANGE(next-pwa, next-sw): use next's swc bindings instead of swc/core + +What: From now on we will try to resolve `next/dist/build/swc` in `swc-loader` (needed to use `cacheOnFrontEndNav`, custom workers and offline fallbacks). If it can't be resolved, we will fallback to `@swc/core` (needed to be installed manually). + +Why: This is to save disk space (we don't need two `@swc/core`) and avoid exceeding Vercel's serverless size limit. + +Why use Next's `next/dist/build/swc`: it seems that `@next/mdx` is also doing the same for their `mdx` Rust compiler. + +How to upgrade: Usually you don't need to do anything. But if you see this line when you build your Next app: `Using @swc/core to compile next-pwa's features. Please install it if you haven't.`, please do as instructed. diff --git a/.changeset/serious-dodos-complain.md b/.changeset/serious-dodos-complain.md new file mode 100644 index 00000000..3a811017 --- /dev/null +++ b/.changeset/serious-dodos-complain.md @@ -0,0 +1,11 @@ +--- +"@ducanh2912/next-pwa": major +--- + +BREAKING CHANGE(requirements): bump minimum Next.js version to v11 + +What: `next-pwa`'s minimum supported Next.js version is now 11.0.0. + +Why: I noticed that `workbox-webpack-plugin` no longer works with Next.js 9 and 10, so this bumps the minimum supported Next.js version to v11. + +How to upgrade: Bump `next` to at least 11.0.0. diff --git a/packages/next-pwa/package.json b/packages/next-pwa/package.json index 1477653c..becb6ed3 100644 --- a/packages/next-pwa/package.json +++ b/packages/next-pwa/package.json @@ -56,7 +56,6 @@ "typecheck": "tsc" }, "dependencies": { - "babel-loader": "9.1.2", "clean-webpack-plugin": "4.0.0", "fast-glob": "3.2.12", "semver": "7.5.1", @@ -72,7 +71,6 @@ "@rollup/plugin-node-resolve": "15.1.0", "@rollup/plugin-terser": "0.4.3", "@rollup/plugin-typescript": "11.1.1", - "@swc/core": "1.3.62", "@types/node": "20.2.6", "@types/semver": "7.5.0", "chalk": "5.2.0", @@ -87,7 +85,7 @@ "webpack": "5.86.0" }, "peerDependencies": { - "next": ">=9.1.0", + "next": ">=11.0.0", "webpack": ">=5.9.0" } } diff --git a/packages/next-pwa/src/swc-loader.ts b/packages/next-pwa/src/swc-loader.ts index d09cdc8a..fd5e3a49 100644 --- a/packages/next-pwa/src/swc-loader.ts +++ b/packages/next-pwa/src/swc-loader.ts @@ -1,134 +1 @@ -import { createRequire } from "node:module"; - -import type { Compiler } from "@swc/core"; -import { logger } from "utils"; - -const require = createRequire(import.meta.url); - -/** - * swc-loader - * @param source Source code - * @param inputSourceMap Source map - */ -function swcLoader(this: any, source: string, inputSourceMap: string) { - // Make the loader async - const callback = this.async(); - const filename = this.resourcePath; - - let loaderOptions = - (typeof this.getOptions === "function" - ? this.getOptions() - : require("loader-utils").getOptions(this)) || {}; - - // Standardize on 'sourceMaps' as the key passed through to Webpack, so that - // users may safely use either one alongside our default use of - // 'this.sourceMap' below without getting error about conflicting aliases. - if ( - Object.prototype.hasOwnProperty.call(loaderOptions, "sourceMap") && - !Object.prototype.hasOwnProperty.call(loaderOptions, "sourceMaps") - ) { - loaderOptions = Object.assign({}, loaderOptions, { - sourceMaps: loaderOptions.sourceMap, - }); - delete loaderOptions.sourceMap; - } - - if (inputSourceMap && typeof inputSourceMap === "object") { - inputSourceMap = JSON.stringify(inputSourceMap); - } - - const programmaticOptions = Object.assign({}, loaderOptions, { - filename, - inputSourceMap: inputSourceMap || undefined, - - // Set the default sourcemap behavior based on Webpack's mapping flag, - // but allow users to override if they want. - sourceMaps: - loaderOptions.sourceMaps === undefined - ? this.sourceMap - : loaderOptions.sourceMaps, - - // Ensure that Webpack will get a full absolute path in the sourcemap - // so that it can properly map the module back to its internal cached - // modules. - sourceFileName: filename, - }); - if (!programmaticOptions.inputSourceMap) { - delete programmaticOptions.inputSourceMap; - } - const sync = programmaticOptions.sync; - const parseMap = programmaticOptions.parseMap; - - let swc: Compiler; - try { - // avoid installing @swc/core - swc = require("next/dist/build/swc"); - } catch { - logger.info( - "Using @swc/core to compile next-pwa's features. Please install it if you haven't." - ); - swc = require("@swc/core"); - } - - // Remove loader related options - delete programmaticOptions.sync; - delete programmaticOptions.parseMap; - delete programmaticOptions.customize; - delete programmaticOptions.cacheDirectory; - delete programmaticOptions.cacheIdentifier; - delete programmaticOptions.cacheCompression; - delete programmaticOptions.metadataSubscribers; - - // auto detect development mode - if ( - this.mode && - programmaticOptions.jsc && - programmaticOptions.jsc.transform && - programmaticOptions.jsc.transform.react && - !Object.prototype.hasOwnProperty.call( - programmaticOptions.jsc.transform.react, - "development" - ) - ) { - programmaticOptions.jsc.transform.react.development = - this.mode === "development"; - } - - if (programmaticOptions.sourceMaps === "inline") { - // Babel has this weird behavior where if you set "inline", we - // inline the sourcemap, and set 'result.map = null'. This results - // in bad behavior from Babel since the maps get put into the code, - // which Webpack does not expect, and because the map we return to - // Webpack is null, which is also bad. To avoid that, we override the - // behavior here so "inline" just behaves like 'true'. - programmaticOptions.sourceMaps = true; - } - - try { - if (sync) { - const output = swc.transformSync(source, programmaticOptions); - callback( - null, - output.code, - parseMap && output.map ? JSON.parse(output.map) : output.map - ); - } else { - swc.transform(source, programmaticOptions).then( - (output) => { - callback( - null, - output.code, - parseMap && output.map ? JSON.parse(output.map) : output.map - ); - }, - (err) => { - callback(err); - } - ); - } - } catch (e) { - callback(e); - } -} - -export default swcLoader; +export { swcLoader as default } from "utils"; diff --git a/packages/next-sw/package.json b/packages/next-sw/package.json index 6a739f9c..ebc772c3 100644 --- a/packages/next-sw/package.json +++ b/packages/next-sw/package.json @@ -39,9 +39,7 @@ "typecheck": "tsc" }, "dependencies": { - "@swc/core": "1.3.62", "clean-webpack-plugin": "4.0.0", - "swc-loader": "0.2.3", "terser-webpack-plugin": "5.3.9" }, "devDependencies": { diff --git a/packages/next-sw/rollup.config.js b/packages/next-sw/rollup.config.js index 91a4a662..f9b5281c 100644 --- a/packages/next-sw/rollup.config.js +++ b/packages/next-sw/rollup.config.js @@ -52,6 +52,14 @@ const files = [ }, external: ["workbox-window"], }, + { + input: "src/swc-loader.ts", + output: { + file: "dist/swc-loader.cjs", + format: "cjs", + }, + external: ["semver"], + }, ]; /** @type {FileEntry[]} */ diff --git a/packages/next-sw/src/build/generate-sw/core.ts b/packages/next-sw/src/build/generate-sw/core.ts index e9f5107a..f1889b01 100644 --- a/packages/next-sw/src/build/generate-sw/core.ts +++ b/packages/next-sw/src/build/generate-sw/core.ts @@ -1,4 +1,3 @@ -import { createRequire } from "node:module"; import path from "node:path"; import { fileURLToPath } from "node:url"; @@ -14,7 +13,6 @@ import { getFallbackEnvs } from "./core-utils.js"; import { runtimeCachingConverter } from "./runtime-caching-converter.js"; const __dirname = fileURLToPath(new URL(".", import.meta.url)); -const require = createRequire(import.meta.url); export type ImportScripts = string[] | undefined; @@ -94,7 +92,7 @@ export const generateSW = ({ }, resolveLoader: { alias: { - "swc-loader": require.resolve("swc-loader"), + "swc-loader": path.join(__dirname, "swc-loader.cjs"), }, }, module: { diff --git a/packages/next-sw/src/swc-loader.ts b/packages/next-sw/src/swc-loader.ts new file mode 100644 index 00000000..fd5e3a49 --- /dev/null +++ b/packages/next-sw/src/swc-loader.ts @@ -0,0 +1 @@ +export { swcLoader as default } from "utils"; diff --git a/packages/utils/package.json b/packages/utils/package.json index af697996..cc8c6bdb 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -24,6 +24,7 @@ "devDependencies": { "@rollup/plugin-node-resolve": "15.1.0", "@rollup/plugin-typescript": "11.1.1", + "@swc/core": "1.3.62", "@types/semver": "7.5.0", "rollup": "3.24.1", "type-fest": "3.11.1", diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 25bb475c..6b164f4c 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -3,3 +3,4 @@ export { findFirstTruthy } from "./find-first-truthy.js"; export { getPackageVersion } from "./get-package-version.js"; export { loadTSConfig } from "./load-tsconfig.js"; export * as logger from "./logger.js"; +export { swcLoader } from "./swc-loader.js"; diff --git a/packages/utils/src/swc-loader.ts b/packages/utils/src/swc-loader.ts new file mode 100644 index 00000000..2ffdd510 --- /dev/null +++ b/packages/utils/src/swc-loader.ts @@ -0,0 +1,133 @@ +import { createRequire } from "node:module"; + +import type { Compiler } from "@swc/core"; + +import * as logger from "./logger.js"; + +const require = createRequire(import.meta.url); + +/** + * swc-loader + * @param source Source code + * @param inputSourceMap Source map + */ +export function swcLoader(this: any, source: string, inputSourceMap: string) { + // Make the loader async + const callback = this.async(); + const filename = this.resourcePath; + + let loaderOptions = + (typeof this.getOptions === "function" + ? this.getOptions() + : require("loader-utils").getOptions(this)) || {}; + + // Standardize on 'sourceMaps' as the key passed through to Webpack, so that + // users may safely use either one alongside our default use of + // 'this.sourceMap' below without getting error about conflicting aliases. + if ( + Object.prototype.hasOwnProperty.call(loaderOptions, "sourceMap") && + !Object.prototype.hasOwnProperty.call(loaderOptions, "sourceMaps") + ) { + loaderOptions = Object.assign({}, loaderOptions, { + sourceMaps: loaderOptions.sourceMap, + }); + delete loaderOptions.sourceMap; + } + + if (inputSourceMap && typeof inputSourceMap === "object") { + inputSourceMap = JSON.stringify(inputSourceMap); + } + + const programmaticOptions = Object.assign({}, loaderOptions, { + filename, + inputSourceMap: inputSourceMap || undefined, + + // Set the default sourcemap behavior based on Webpack's mapping flag, + // but allow users to override if they want. + sourceMaps: + loaderOptions.sourceMaps === undefined + ? this.sourceMap + : loaderOptions.sourceMaps, + + // Ensure that Webpack will get a full absolute path in the sourcemap + // so that it can properly map the module back to its internal cached + // modules. + sourceFileName: filename, + }); + if (!programmaticOptions.inputSourceMap) { + delete programmaticOptions.inputSourceMap; + } + const sync = programmaticOptions.sync; + const parseMap = programmaticOptions.parseMap; + + let swc: Compiler; + try { + // avoid installing @swc/core + swc = require("next/dist/build/swc"); + } catch { + logger.info( + "Using @swc/core to compile next-pwa's features. Please install it if you haven't." + ); + swc = require("@swc/core"); + } + + // Remove loader related options + delete programmaticOptions.sync; + delete programmaticOptions.parseMap; + delete programmaticOptions.customize; + delete programmaticOptions.cacheDirectory; + delete programmaticOptions.cacheIdentifier; + delete programmaticOptions.cacheCompression; + delete programmaticOptions.metadataSubscribers; + + // auto detect development mode + if ( + this.mode && + programmaticOptions.jsc && + programmaticOptions.jsc.transform && + programmaticOptions.jsc.transform.react && + !Object.prototype.hasOwnProperty.call( + programmaticOptions.jsc.transform.react, + "development" + ) + ) { + programmaticOptions.jsc.transform.react.development = + this.mode === "development"; + } + + if (programmaticOptions.sourceMaps === "inline") { + // Babel has this weird behavior where if you set "inline", we + // inline the sourcemap, and set 'result.map = null'. This results + // in bad behavior from Babel since the maps get put into the code, + // which Webpack does not expect, and because the map we return to + // Webpack is null, which is also bad. To avoid that, we override the + // behavior here so "inline" just behaves like 'true'. + programmaticOptions.sourceMaps = true; + } + + try { + if (sync) { + const output = swc.transformSync(source, programmaticOptions); + callback( + null, + output.code, + parseMap && output.map ? JSON.parse(output.map) : output.map + ); + } else { + swc.transform(source, programmaticOptions).then( + (output) => { + callback( + null, + output.code, + parseMap && output.map ? JSON.parse(output.map) : output.map + ); + }, + (err) => { + callback(err); + } + ); + } + } catch (e) { + callback(e); + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0481ee78..8926dfef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -580,9 +580,6 @@ importers: packages/next-pwa: dependencies: - babel-loader: - specifier: 9.1.2 - version: 9.1.2(@babel/core@7.20.5)(webpack@5.86.0) clean-webpack-plugin: specifier: 4.0.0 version: 4.0.0(webpack@5.86.0) @@ -594,7 +591,7 @@ importers: version: 7.5.1 terser-webpack-plugin: specifier: 5.3.9 - version: 5.3.9(@swc/core@1.3.62)(webpack@5.86.0) + version: 5.3.9(webpack@5.86.0) workbox-build: specifier: 7.0.0 version: 7.0.0 @@ -623,9 +620,6 @@ importers: '@rollup/plugin-typescript': specifier: 11.1.1 version: 11.1.1(rollup@3.24.1)(tslib@2.5.3)(typescript@5.2.0-dev.20230610) - '@swc/core': - specifier: 1.3.62 - version: 1.3.62 '@types/node': specifier: 20.2.6 version: 20.2.6 @@ -661,7 +655,7 @@ importers: version: link:../utils webpack: specifier: 5.86.0 - version: 5.86.0(@swc/core@1.3.62) + version: 5.86.0 packages/next-sw: dependencies: @@ -736,6 +730,9 @@ importers: '@rollup/plugin-typescript': specifier: 11.1.1 version: 11.1.1(rollup@3.24.1)(tslib@2.5.3)(typescript@5.2.0-dev.20230610) + '@swc/core': + specifier: 1.3.62 + version: 1.3.62 '@types/semver': specifier: 7.5.0 version: 7.5.0 @@ -4421,15 +4418,6 @@ packages: dependencies: ajv: 6.12.6 - /ajv-keywords@5.1.0(ajv@8.11.2): - resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} - peerDependencies: - ajv: ^8.8.2 - dependencies: - ajv: 8.11.2 - fast-deep-equal: 3.1.3 - dev: false - /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -4717,19 +4705,6 @@ packages: - supports-color dev: true - /babel-loader@9.1.2(@babel/core@7.20.5)(webpack@5.86.0): - resolution: {integrity: sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA==} - engines: {node: '>= 14.15.0'} - peerDependencies: - '@babel/core': ^7.12.0 - webpack: '>=5' - dependencies: - '@babel/core': 7.20.5 - find-cache-dir: 3.3.2 - schema-utils: 4.2.0 - webpack: 5.86.0(@swc/core@1.3.62) - dev: false - /babel-plugin-istanbul@6.1.1: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} @@ -5202,7 +5177,7 @@ packages: webpack: '>=4.0.0 <6.0.0' dependencies: del: 4.1.1 - webpack: 5.86.0(@swc/core@1.3.62) + webpack: 5.86.0 dev: false /cli-boxes@3.0.0: @@ -5374,10 +5349,6 @@ packages: engines: {node: '>=4.0.0'} dev: false - /commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - dev: false - /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -6732,15 +6703,6 @@ packages: - supports-color dev: false - /find-cache-dir@3.3.2: - resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} - engines: {node: '>=8'} - dependencies: - commondir: 1.0.1 - make-dir: 3.1.0 - pkg-dir: 4.2.0 - dev: false - /find-my-way@7.6.0: resolution: {integrity: sha512-H7berWdHJ+5CNVr4ilLWPai4ml7Y2qAsxjw3pfeBxPigZmaDTzF0wjJLj90xRCmGcWYcyt050yN+34OZDJm1eQ==} engines: {node: '>=14'} @@ -6756,6 +6718,7 @@ packages: dependencies: locate-path: 5.0.0 path-exists: 4.0.0 + dev: true /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} @@ -8720,6 +8683,7 @@ packages: engines: {node: '>=8'} dependencies: p-locate: 4.1.0 + dev: true /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} @@ -8837,6 +8801,7 @@ packages: engines: {node: '>=8'} dependencies: semver: 6.3.0 + dev: true /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -10111,6 +10076,7 @@ packages: engines: {node: '>=6'} dependencies: p-try: 2.2.0 + dev: true /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} @@ -10124,6 +10090,7 @@ packages: engines: {node: '>=8'} dependencies: p-limit: 2.3.0 + dev: true /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} @@ -10146,6 +10113,7 @@ packages: /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + dev: true /package-json@8.1.0: resolution: {integrity: sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==} @@ -10252,6 +10220,7 @@ packages: /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + dev: true /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -10376,6 +10345,7 @@ packages: engines: {node: '>=8'} dependencies: find-up: 4.1.0 + dev: true /postcss-import@15.1.0(postcss@8.4.24): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} @@ -11226,16 +11196,6 @@ packages: ajv: 6.12.6 ajv-keywords: 3.5.2(ajv@6.12.6) - /schema-utils@4.2.0: - resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} - engines: {node: '>= 12.13.0'} - dependencies: - '@types/json-schema': 7.0.11 - ajv: 8.11.2 - ajv-formats: 2.1.1(ajv@8.11.2) - ajv-keywords: 5.1.0(ajv@8.11.2) - dev: false - /section-matter@1.0.0: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} @@ -12029,7 +11989,6 @@ packages: serialize-javascript: 6.0.1 terser: 5.17.6 webpack: 5.86.0 - dev: true /terser@5.17.6: resolution: {integrity: sha512-V8QHcs8YuyLkLHsJO5ucyff1ykrLVsR4dNnS//L5Y3NiSXpbK1J+WMVUs67eI0KTxs9JtHhgEQpXQVHlHI92DQ==} @@ -12789,7 +12748,6 @@ packages: - '@swc/core' - esbuild - uglify-js - dev: true /webpack@5.86.0(@swc/core@1.3.62): resolution: {integrity: sha512-3BOvworZ8SO/D4GVP+GoRC3fVeg5MO4vzmq8TJJEkdmopxyazGDxN8ClqN12uzrZW9Tv8EED8v5VSb6Sqyi0pg==} @@ -13075,7 +13033,7 @@ packages: fast-json-stable-stringify: 2.1.0 pretty-bytes: 5.6.0 upath: 1.2.0 - webpack: 5.86.0(@swc/core@1.3.62) + webpack: 5.86.0 webpack-sources: 1.4.3 workbox-build: 7.0.0 transitivePeerDependencies: From a26dac9477698886330c1682e36cca4bc3c0670f Mon Sep 17 00:00:00 2001 From: DuCanhGH <75556609+DuCanhGH@users.noreply.github.com> Date: Tue, 20 Jun 2023 12:50:43 +0700 Subject: [PATCH 4/4] fixed outdated lockfile --- pnpm-lock.yaml | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8926dfef..cc7079dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -659,18 +659,12 @@ importers: packages/next-sw: dependencies: - '@swc/core': - specifier: 1.3.62 - version: 1.3.62 clean-webpack-plugin: specifier: 4.0.0 version: 4.0.0(webpack@5.86.0) - swc-loader: - specifier: 0.2.3 - version: 0.2.3(@swc/core@1.3.62)(webpack@5.86.0) terser-webpack-plugin: specifier: 5.3.9 - version: 5.3.9(@swc/core@1.3.62)(webpack@5.86.0) + version: 5.3.9(webpack@5.86.0) devDependencies: '@rollup/plugin-json': specifier: 6.0.0 @@ -713,7 +707,7 @@ importers: version: link:../utils webpack: specifier: 5.86.0 - version: 5.86.0(@swc/core@1.3.62) + version: 5.86.0 packages/utils: dependencies: @@ -3686,6 +3680,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /@swc/core-darwin-x64@1.3.62: @@ -3694,6 +3689,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /@swc/core-linux-arm-gnueabihf@1.3.62: @@ -3702,6 +3698,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /@swc/core-linux-arm64-gnu@1.3.62: @@ -3710,6 +3707,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@swc/core-linux-arm64-musl@1.3.62: @@ -3718,6 +3716,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@swc/core-linux-x64-gnu@1.3.62: @@ -3726,6 +3725,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@swc/core-linux-x64-musl@1.3.62: @@ -3734,6 +3734,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@swc/core-win32-arm64-msvc@1.3.62: @@ -3742,6 +3743,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /@swc/core-win32-ia32-msvc@1.3.62: @@ -3750,6 +3752,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /@swc/core-win32-x64-msvc@1.3.62: @@ -3758,6 +3761,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /@swc/core@1.3.62: @@ -3780,6 +3784,7 @@ packages: '@swc/core-win32-arm64-msvc': 1.3.62 '@swc/core-win32-ia32-msvc': 1.3.62 '@swc/core-win32-x64-msvc': 1.3.62 + dev: true /@swc/helpers@0.5.1: resolution: {integrity: sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==} @@ -11833,16 +11838,6 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - /swc-loader@0.2.3(@swc/core@1.3.62)(webpack@5.86.0): - resolution: {integrity: sha512-D1p6XXURfSPleZZA/Lipb3A8pZ17fP4NObZvFCDjK/OKljroqDpPmsBdTraWhVBqUNpcWBQY1imWdoPScRlQ7A==} - peerDependencies: - '@swc/core': ^1.2.147 - webpack: '>=2' - dependencies: - '@swc/core': 1.3.62 - webpack: 5.86.0(@swc/core@1.3.62) - dev: false - /synckit@0.8.5: resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} engines: {node: ^14.18.0 || >=16.0.0} @@ -11966,6 +11961,7 @@ packages: serialize-javascript: 6.0.1 terser: 5.17.6 webpack: 5.86.0(@swc/core@1.3.62) + dev: true /terser-webpack-plugin@5.3.9(webpack@5.86.0): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} @@ -12787,6 +12783,7 @@ packages: - '@swc/core' - esbuild - uglify-js + dev: true /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}