From 3b40c3b58dcf55649a7dc7265ce345f4eaaeb1d2 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 7 Feb 2022 11:44:59 +0100 Subject: [PATCH] meta: add support for ESM sources in build script --- .eslintrc.js | 12 +++ bin/build-lib.js | 73 +++++++++++++-- package.json | 6 +- private/dev/vite.config.js | 19 +++- yarn.lock | 183 ++++++++++++++++++++++++++++++++++++- 5 files changed, 280 insertions(+), 13 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index fd86afb0c5..88658d6771 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -157,6 +157,18 @@ module.exports = { sourceType: 'module', }, }, + { + files: [ + 'packages/@uppy/*/src/**/*.jsx', + 'packages/uppy/src/**/*.jsx', + ], + parserOptions: { + sourceType: 'module', + ecmaFeatures: { + jsx: true, + }, + }, + }, { files: ['./packages/@uppy/companion/**/*.js'], rules: { diff --git a/bin/build-lib.js b/bin/build-lib.js index a3e6dca8c8..9213e87d96 100644 --- a/bin/build-lib.js +++ b/bin/build-lib.js @@ -1,5 +1,6 @@ const chalk = require('chalk') const babel = require('@babel/core') +const t = require('@babel/types') const { promisify } = require('util') const glob = promisify(require('glob')) const fs = require('fs') @@ -7,7 +8,7 @@ const path = require('path') const { mkdir, stat, writeFile } = fs.promises -const SOURCE = 'packages/{*,@uppy/*}/src/**/*.js' +const SOURCE = 'packages/{*,@uppy/*}/src/**/*.js?(x)' // Files not to build (such as tests) const IGNORE = /\.test\.js$|__mocks__|svelte|angular|companion\// // Files that should trigger a rebuild of everything on change @@ -19,15 +20,41 @@ const META_FILES = [ 'bin/build-lib.js', ] -function lastModified (file) { - return stat(file).then((s) => s.mtime, (err) => { +function lastModified (file, createParentDir = false) { + return stat(file).then((s) => s.mtime, async (err) => { if (err.code === 'ENOENT') { + if (createParentDir) { + await mkdir(path.dirname(file), { recursive: true }) + } return 0 } throw err }) } +const moduleTypeCache = new Map() +const versionCache = new Map() +async function isTypeModule (file) { + const packageFolder = file.slice(0, file.indexOf('/src/')) + + const cachedValue = moduleTypeCache.get(packageFolder) + if (cachedValue != null) return cachedValue + + // eslint-disable-next-line import/no-dynamic-require, global-require + const { type, version } = require(path.join(__dirname, '..', packageFolder, 'package.json')) + const typeModule = type === 'module' + if (process.env.FRESH) { + // in case it hasn't been done before. + await mkdir(path.join(packageFolder, 'lib'), { recursive: true }) + } + if (typeModule) { + await writeFile(path.join(packageFolder, 'lib', 'package.json'), '{"type":"commonjs"}') + } + moduleTypeCache.set(packageFolder, typeModule) + versionCache.set(packageFolder, version) + return typeModule +} + async function buildLib () { const metaMtimes = await Promise.all(META_FILES.map((filename) => lastModified(path.join(__dirname, '..', filename)))) const metaMtime = Math.max(...metaMtimes) @@ -38,21 +65,49 @@ async function buildLib () { if (IGNORE.test(file)) { continue } - const libFile = file.replace('/src/', '/lib/') + const libFile = file.replace('/src/', '/lib/').replace(/\.jsx$/, '.js') // on a fresh build, rebuild everything. if (!process.env.FRESH) { - const srcMtime = await lastModified(file) - const libMtime = await lastModified(libFile) - .catch(() => 0) // probably doesn't exist + const [srcMtime, libMtime] = await Promise.all([ + lastModified(file), + lastModified(libFile, true), + ]) // Skip files that haven't changed if (srcMtime < libMtime && metaMtime < libMtime) { continue } } - const { code, map } = await babel.transformFileAsync(file, { sourceMaps: true }) - await mkdir(path.dirname(libFile), { recursive: true }) + const plugins = await isTypeModule(file) ? [['@babel/plugin-transform-modules-commonjs', { + importInterop: 'none', + }], { + visitor: { + // eslint-disable-next-line no-shadow + ImportDeclaration (path) { + const { value } = path.node.source + if (value.endsWith('.jsx') && value.startsWith('./')) { + // Rewrite .jsx imports to .js: + path.node.source.value = value.slice(0, -1) // eslint-disable-line no-param-reassign + } else if (value === '../package.json' + && path.node.specifiers.length === 1 + && path.node.specifiers[0].type === 'ImportDefaultSpecifier') { + // Vendor-in version number: + const version = versionCache.get(file.slice(0, file.indexOf('/src/'))) + if (version != null) { + const [{ local }] = path.node.specifiers + path.replaceWith( + t.variableDeclaration('const', [t.variableDeclarator(local, + t.objectExpression([ + t.objectProperty(t.stringLiteral('version'), t.stringLiteral(version)), + ]))]), + ) + } + } + }, + }, + }] : undefined + const { code, map } = await babel.transformFileAsync(file, { sourceMaps: true, plugins }) await Promise.all([ writeFile(libFile, code), writeFile(`${libFile}.map`, JSON.stringify(map)), diff --git a/package.json b/package.json index 3902eeb4a7..e2d3b03db1 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", "lint-staged": { "*.js": "eslint", + "*.jsx": "eslint --fix", "*.md": [ "remark --silently-ignore -i .remarkignore -foq", "eslint --fix" @@ -44,9 +45,11 @@ "@babel/eslint-plugin": "^7.11.3", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", "@babel/plugin-proposal-optional-chaining": "^7.16.0", + "@babel/plugin-transform-modules-commonjs": "^7.16.8", "@babel/plugin-transform-react-jsx": "^7.10.4", "@babel/preset-env": "^7.14.7", "@babel/register": "^7.10.5", + "@babel/types": "^7.17.0", "@goto-bus-stop/envify": "^5.0.0", "@parcel/transformer-vue": "^2.2.1", "@size-limit/preset-big-lib": "7.0.5", @@ -152,10 +155,11 @@ "test:companion": "yarn workspace @uppy/companion test", "test:endtoend:local": "yarn workspace @uppy-tests/end2end test:endtoend:local", "test:endtoend": "yarn workspace @uppy-tests/end2end test:endtoend", + "test:locale-packs": "yarn locale-packs:unused && yarn locale-packs:warnings", "test:locale-packs:unused": "yarn workspace @uppy-dev/locale-pack test unused", "test:locale-packs:warnings": "yarn workspace @uppy-dev/locale-pack test warnings", "test:type": "yarn workspaces foreach -piv --include '@uppy/*' --exclude '@uppy/{angular,react-native,locales,companion,provider-views,robodog,svelte}' exec tsd", - "test:unit": "yarn run build:lib && jest --env jsdom", + "test:unit": "yarn run build:lib && NODE_OPTIONS=--experimental-vm-modules jest --env jsdom", "test:watch": "jest --env jsdom --watch", "test:size": "yarn build:lib && size-limit --why", "test": "npm-run-all lint test:locale-packs test:unit test:type test:companion", diff --git a/private/dev/vite.config.js b/private/dev/vite.config.js index c4af1b9bc3..2180933e9b 100644 --- a/private/dev/vite.config.js +++ b/private/dev/vite.config.js @@ -1,4 +1,5 @@ import { fileURLToPath } from 'node:url' +import { createRequire } from 'node:module' import { transformAsync } from '@babel/core' import autoprefixer from 'autoprefixer' import postcssLogical from 'postcss-logical' @@ -12,6 +13,20 @@ const PACKAGES_ROOT = fileURLToPath(new URL('./packages/', ROOT)) // else. This hack can be removed when we get rid of JSX inside of .js files. let counter = 0 +const moduleTypeCache = new Map() +function isTypeModule (file) { + const packageFolder = file.slice(0, file.indexOf('/src/') + 1) + + const cachedValue = moduleTypeCache.get(packageFolder) + if (cachedValue != null) return cachedValue + + // eslint-disable-next-line import/no-dynamic-require, global-require + const { type } = createRequire(packageFolder)('./package.json') + const typeModule = type === 'module' + moduleTypeCache.set(packageFolder, typeModule) + return typeModule +} + /** * @type {import('vite').UserConfig} */ @@ -63,7 +78,7 @@ const config = { enforce: 'pre', // eslint-disable-next-line consistent-return resolveId (id) { - if (id.startsWith(PACKAGES_ROOT) && id.endsWith('.js')) { + if (id.startsWith(PACKAGES_ROOT) && id.endsWith('.js') && !isTypeModule(id)) { return id } // TODO: remove this hack when we get rid of JSX inside .js files. @@ -72,7 +87,7 @@ const config = { } }, transform (code, id) { - if (id.startsWith(PACKAGES_ROOT) && id.endsWith('.js')) { + if (id.startsWith(PACKAGES_ROOT) && id.endsWith('.js') && !isTypeModule(id)) { return transformAsync(code, { plugins: [ ['@babel/plugin-transform-react-jsx', { pragma: 'h' }], diff --git a/yarn.lock b/yarn.lock index df63dd2539..1bfd2464b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -564,6 +564,15 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/code-frame@npm:7.16.7" + dependencies: + "@babel/highlight": ^7.16.7 + checksum: db2f7faa31bc2c9cf63197b481b30ea57147a5fc1a6fab60e5d6c02cdfbf6de8e17b5121f99917b3dabb5eeb572da078312e70697415940383efc140d4e0808b + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.12.13, @babel/compat-data@npm:^7.13.11, @babel/compat-data@npm:^7.15.0, @babel/compat-data@npm:^7.16.0, @babel/compat-data@npm:^7.16.4": version: 7.16.4 resolution: "@babel/compat-data@npm:7.16.4" @@ -713,6 +722,17 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.17.0": + version: 7.17.0 + resolution: "@babel/generator@npm:7.17.0" + dependencies: + "@babel/types": ^7.17.0 + jsesc: ^2.5.1 + source-map: ^0.5.0 + checksum: 2987dbebb484727a227f1ce3db90810320986cfb3ffd23e6d1d87f75bbd8e7871b5bc44252822d4d5f048a2d872a5702b2a9bf7bab7e07f087d7f306f0ea6c0a + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:7.15.4": version: 7.15.4 resolution: "@babel/helper-annotate-as-pure@npm:7.15.4" @@ -837,6 +857,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-environment-visitor@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-environment-visitor@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: c03a10105d9ebd1fe632a77356b2e6e2f3c44edba9a93b0dc3591b6a66bd7a2e323dd9502f9ce96fc6401234abff1907aa877b6674f7826b61c953f7c8204bbe + languageName: node + linkType: hard + "@babel/helper-explode-assignable-expression@npm:^7.16.0": version: 7.16.0 resolution: "@babel/helper-explode-assignable-expression@npm:7.16.0" @@ -857,6 +886,17 @@ __metadata: languageName: node linkType: hard +"@babel/helper-function-name@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-function-name@npm:7.16.7" + dependencies: + "@babel/helper-get-function-arity": ^7.16.7 + "@babel/template": ^7.16.7 + "@babel/types": ^7.16.7 + checksum: fc77cbe7b10cfa2a262d7a37dca575c037f20419dfe0c5d9317f589599ca24beb5f5c1057748011159149eaec47fe32338c6c6412376fcded68200df470161e1 + languageName: node + linkType: hard + "@babel/helper-get-function-arity@npm:^7.16.0": version: 7.16.0 resolution: "@babel/helper-get-function-arity@npm:7.16.0" @@ -866,6 +906,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-get-function-arity@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-get-function-arity@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: 25d969fb207ff2ad5f57a90d118f6c42d56a0171022e200aaa919ba7dc95ae7f92ec71cdea6c63ef3629a0dc962ab4c78e09ca2b437185ab44539193f796e0c3 + languageName: node + linkType: hard + "@babel/helper-hoist-variables@npm:^7.16.0": version: 7.16.0 resolution: "@babel/helper-hoist-variables@npm:7.16.0" @@ -875,6 +924,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-hoist-variables@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-hoist-variables@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: 6ae1641f4a751cd9045346e3f61c3d9ec1312fd779ab6d6fecfe2a96e59a481ad5d7e40d2a840894c13b3fd6114345b157f9e3062fc5f1580f284636e722de60 + languageName: node + linkType: hard + "@babel/helper-member-expression-to-functions@npm:^7.16.0": version: 7.16.0 resolution: "@babel/helper-member-expression-to-functions@npm:7.16.0" @@ -893,6 +951,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-imports@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-module-imports@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: ddd2c4a600a2e9a4fee192ab92bf35a627c5461dbab4af31b903d9ba4d6b6e59e0ff3499fde4e2e9a0eebe24906f00b636f8b4d9bd72ff24d50e6618215c3212 + languageName: node + linkType: hard + "@babel/helper-module-transforms@npm:^7.12.1, @babel/helper-module-transforms@npm:^7.15.8, @babel/helper-module-transforms@npm:^7.16.0, @babel/helper-module-transforms@npm:^7.9.0": version: 7.16.0 resolution: "@babel/helper-module-transforms@npm:7.16.0" @@ -909,6 +976,22 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-module-transforms@npm:7.16.7" + dependencies: + "@babel/helper-environment-visitor": ^7.16.7 + "@babel/helper-module-imports": ^7.16.7 + "@babel/helper-simple-access": ^7.16.7 + "@babel/helper-split-export-declaration": ^7.16.7 + "@babel/helper-validator-identifier": ^7.16.7 + "@babel/template": ^7.16.7 + "@babel/traverse": ^7.16.7 + "@babel/types": ^7.16.7 + checksum: 6e930ce776c979f299cdbeaf80187f4ab086d75287b96ecc1c6896d392fcb561065f0d6219fc06fa79b4ceb4bbdc1a9847da8099aba9b077d0a9e583500fb673 + languageName: node + linkType: hard + "@babel/helper-optimise-call-expression@npm:^7.16.0": version: 7.16.0 resolution: "@babel/helper-optimise-call-expression@npm:7.16.0" @@ -932,6 +1015,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-plugin-utils@npm:7.16.7" + checksum: d08dd86554a186c2538547cd537552e4029f704994a9201d41d82015c10ed7f58f9036e8d1527c3760f042409163269d308b0b3706589039c5f1884619c6d4ce + languageName: node + linkType: hard + "@babel/helper-remap-async-to-generator@npm:^7.14.5, @babel/helper-remap-async-to-generator@npm:^7.15.4, @babel/helper-remap-async-to-generator@npm:^7.16.0, @babel/helper-remap-async-to-generator@npm:^7.16.4": version: 7.16.4 resolution: "@babel/helper-remap-async-to-generator@npm:7.16.4" @@ -964,6 +1054,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-simple-access@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-simple-access@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: 8d22c46c5ec2ead0686c4d5a3d1d12b5190c59be676bfe0d9d89df62b437b51d1a3df2ccfb8a77dded2e585176ebf12986accb6d45a18cff229eef3b10344f4b + languageName: node + linkType: hard + "@babel/helper-skip-transparent-expression-wrappers@npm:^7.16.0": version: 7.16.0 resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.16.0" @@ -982,6 +1081,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-split-export-declaration@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-split-export-declaration@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: e10aaf135465c55114627951b79115f24bc7af72ecbb58d541d66daf1edaee5dde7cae3ec8c3639afaf74526c03ae3ce723444e3b5b3dc77140c456cd84bcaa1 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.15.7": version: 7.15.7 resolution: "@babel/helper-validator-identifier@npm:7.15.7" @@ -989,6 +1097,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-validator-identifier@npm:7.16.7" + checksum: dbb3db9d184343152520a209b5684f5e0ed416109cde82b428ca9c759c29b10c7450657785a8b5c5256aa74acc6da491c1f0cf6b784939f7931ef82982051b69 + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.12.17, @babel/helper-validator-option@npm:^7.14.5": version: 7.14.5 resolution: "@babel/helper-validator-option@npm:7.14.5" @@ -1030,6 +1145,17 @@ __metadata: languageName: node linkType: hard +"@babel/highlight@npm:^7.16.7": + version: 7.16.10 + resolution: "@babel/highlight@npm:7.16.10" + dependencies: + "@babel/helper-validator-identifier": ^7.16.7 + chalk: ^2.0.0 + js-tokens: ^4.0.0 + checksum: 1f1bdd752a90844f4efc22166a46303fb651ba0fd75a06daba3ebae2575ab3edc1da9827c279872a3aaf305f50a18473c5fa1966752726a2b253065fd4c0745e + languageName: node + linkType: hard + "@babel/parser@npm:^7.0.0, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.11, @babel/parser@npm:^7.12.7, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.15.0, @babel/parser@npm:^7.15.4, @babel/parser@npm:^7.15.8, @babel/parser@npm:^7.16.0, @babel/parser@npm:^7.16.3, @babel/parser@npm:^7.7.2, @babel/parser@npm:^7.9.0": version: 7.16.4 resolution: "@babel/parser@npm:7.16.4" @@ -1039,7 +1165,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.16.4": +"@babel/parser@npm:^7.16.4, @babel/parser@npm:^7.16.7, @babel/parser@npm:^7.17.0": version: 7.17.0 resolution: "@babel/parser@npm:7.17.0" bin: @@ -1793,6 +1919,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-commonjs@npm:^7.16.8": + version: 7.16.8 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.16.8" + dependencies: + "@babel/helper-module-transforms": ^7.16.7 + "@babel/helper-plugin-utils": ^7.16.7 + "@babel/helper-simple-access": ^7.16.7 + babel-plugin-dynamic-import-node: ^2.3.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c0ac00f5457e12cac7825b14725b6fc787bef78945181469ff79f07ef0fd7df021cb00fe1d3a9f35fc9bc92ae59e6e3fc9075a70b627dfe10e00d0907892aace + languageName: node + linkType: hard + "@babel/plugin-transform-modules-systemjs@npm:^7.12.13, @babel/plugin-transform-modules-systemjs@npm:^7.15.4, @babel/plugin-transform-modules-systemjs@npm:^7.16.0": version: 7.16.0 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.16.0" @@ -2469,6 +2609,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/template@npm:7.16.7" + dependencies: + "@babel/code-frame": ^7.16.7 + "@babel/parser": ^7.16.7 + "@babel/types": ^7.16.7 + checksum: 10cd112e89276e00f8b11b55a51c8b2f1262c318283a980f4d6cdb0286dc05734b9aaeeb9f3ad3311900b09bc913e02343fcaa9d4a4f413964aaab04eb84ac4a + languageName: node + linkType: hard + "@babel/traverse@npm:^7.0.0, @babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.12.11, @babel/traverse@npm:^7.12.9, @babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.15.4, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.16.3, @babel/traverse@npm:^7.7.2, @babel/traverse@npm:^7.9.0": version: 7.16.3 resolution: "@babel/traverse@npm:7.16.3" @@ -2486,6 +2637,24 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.16.7": + version: 7.17.0 + resolution: "@babel/traverse@npm:7.17.0" + dependencies: + "@babel/code-frame": ^7.16.7 + "@babel/generator": ^7.17.0 + "@babel/helper-environment-visitor": ^7.16.7 + "@babel/helper-function-name": ^7.16.7 + "@babel/helper-hoist-variables": ^7.16.7 + "@babel/helper-split-export-declaration": ^7.16.7 + "@babel/parser": ^7.17.0 + "@babel/types": ^7.17.0 + debug: ^4.1.0 + globals: ^11.1.0 + checksum: 9b7de053d8a29453fd7b9614a028d8dc811817f02948eaee02093274b67927a1cfb0513b521bc4a9328c9b6e5b021fd343b358c3526bbb6ee61ec078d4110c0c + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.11, @babel/types@npm:^7.12.13, @babel/types@npm:^7.12.17, @babel/types@npm:^7.12.7, @babel/types@npm:^7.15.4, @babel/types@npm:^7.15.6, @babel/types@npm:^7.16.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3, @babel/types@npm:^7.9.0": version: 7.16.0 resolution: "@babel/types@npm:7.16.0" @@ -2496,6 +2665,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.16.7, @babel/types@npm:^7.17.0": + version: 7.17.0 + resolution: "@babel/types@npm:7.17.0" + dependencies: + "@babel/helper-validator-identifier": ^7.16.7 + to-fast-properties: ^2.0.0 + checksum: 12e5a287986fe557188e87b2c5202223f1dc83d9239a196ab936fdb9f8c1eb0be717ff19f934b5fad4e29a75586d5798f74bed209bccea1c20376b9952056f0e + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -8328,9 +8507,11 @@ __metadata: "@babel/eslint-plugin": ^7.11.3 "@babel/plugin-proposal-nullish-coalescing-operator": ^7.14.5 "@babel/plugin-proposal-optional-chaining": ^7.16.0 + "@babel/plugin-transform-modules-commonjs": ^7.16.8 "@babel/plugin-transform-react-jsx": ^7.10.4 "@babel/preset-env": ^7.14.7 "@babel/register": ^7.10.5 + "@babel/types": ^7.17.0 "@goto-bus-stop/envify": ^5.0.0 "@parcel/transformer-vue": ^2.2.1 "@size-limit/preset-big-lib": 7.0.5