diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 96045c4c2cf7..363a6269924f 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -17,7 +17,6 @@ "access": "public" }, "dependencies": { - "@babel/parser": "^7.18.10", "@rollup/plugin-sucrase": "4.0.4", "@sentry/core": "7.12.1", "@sentry/hub": "7.12.1", @@ -29,14 +28,11 @@ "@sentry/utils": "7.12.1", "@sentry/webpack-plugin": "1.19.0", "chalk": "3.0.0", - "jscodeshift": "^0.13.1", "rollup": "2.78.0", "tslib": "^1.9.3" }, "devDependencies": { - "@babel/types": "7.18.10", "@sentry/nextjs": "7.12.1", - "@types/jscodeshift": "^0.11.5", "@types/webpack": "^4.41.31", "next": "10.1.3" }, diff --git a/packages/nextjs/rollup.npm.config.js b/packages/nextjs/rollup.npm.config.js index 46224cfd600e..b5083370fe3d 100644 --- a/packages/nextjs/rollup.npm.config.js +++ b/packages/nextjs/rollup.npm.config.js @@ -14,17 +14,12 @@ export default [ ), ...makeNPMConfigVariants( makeBaseNPMConfig({ - entrypoints: [ - 'src/config/templates/prefixLoaderTemplate.ts', - 'src/config/templates/proxyLoaderTemplate.ts', - 'src/config/templates/dataFetchersLoaderTemplate.ts', - ], + entrypoints: ['src/config/templates/prefixLoaderTemplate.ts', 'src/config/templates/proxyLoaderTemplate.ts'], packageSpecificConfig: { plugins: [plugins.makeRemoveMultiLineCommentsPlugin()], output: { - // Preserve the original file structure (i.e., so that everything is still relative to `src`). (Not entirely - // clear why this is necessary here and not for other entrypoints in this file.) + // Preserve the original file structure (i.e., so that everything is still relative to `src`) entryFileNames: 'config/templates/[name].js', // this is going to be add-on code, so it doesn't need the trappings of a full module (and in fact actively @@ -47,6 +42,9 @@ export default [ packageSpecificConfig: { output: { + // Preserve the original file structure (i.e., so that everything is still relative to `src`) + entryFileNames: 'config/loaders/[name].js', + // make it so Rollup calms down about the fact that we're combining default and named exports exports: 'named', }, diff --git a/packages/nextjs/src/config/loaders/ast.ts b/packages/nextjs/src/config/loaders/ast.ts deleted file mode 100644 index a84ee60af0aa..000000000000 --- a/packages/nextjs/src/config/loaders/ast.ts +++ /dev/null @@ -1,527 +0,0 @@ -/* eslint-disable max-lines */ -import * as jscsTypes from 'jscodeshift'; -import { default as jscodeshiftDefault } from 'jscodeshift'; - -import { parser } from './parser'; - -// In `jscodeshift`, the exports look like this: -// -// function core(...) { ... } -// core.ABC = ... -// core.XYZ = ... -// module.exports = core -// -// In other words, when required/imported, the module is both a callable function and an object containing all sorts of -// properties. Meanwhile, its TS export is a namespace continaing the types of all of the properties attached to `core`. -// In order to use the types, we thus need to use `import *` syntax. But when we do that, Rollup only sees it as a -// namespace, and will complain if we try to use it as a function. In order to get around this, we take advantage of the -// fact that Rollup wraps imports in its own version of TS's `esModuleInterop` functions, aliasing the export to a -// `default` property inside the export. (So, here, we basically end up with `core.default = core`.) When referenced -// through that alias, `core` is correctly seen as callable by Rollup. Outside of a Rollup context, however, that -// `default` alias doesn't exist. So, we try both and use whichever one is defined. (See -// https://github.com/rollup/rollup/issues/1267.) -const jscodeshiftNamespace = jscsTypes; -const jscs = jscodeshiftDefault || jscodeshiftNamespace; - -// These are types not in the TS sense, but in the instance-of-a-Type-class sense -const { - ArrayPattern, - ClassDeclaration, - ExportAllDeclaration, - ExportDefaultDeclaration, - ExportDefaultSpecifier, - ExportNamedDeclaration, - ExportSpecifier, - FunctionDeclaration, - Identifier, - ImportSpecifier, - JSXIdentifier, - MemberExpression, - Node, - ObjectExpression, - ObjectPattern, - Property, - RestElement, - TSTypeParameter, - VariableDeclaration, - VariableDeclarator, -} = jscs; - -type ASTNode = jscsTypes.ASTNode; -export type AST = jscsTypes.Collection; -// `parentPath` is on the prototype, but not included in the type for some reason. (`parent`, which is an instance -// property referencing the same object as `parentPath`, is in the type, and we could use that instead. But the -// `parentPath` name makes it clearer that said object is in fact a `NodePath`, not a `Node`, so we choose to use it -// over `parent`, even if it means adding it to the type.) -interface ASTPath extends jscsTypes.ASTPath { - parentPath: ASTPath; -} -type IdentifierNode = jscsTypes.Identifier; -type ExportSpecifierNode = jscsTypes.ExportSpecifier; -type VariableDeclarationNode = jscsTypes.VariableDeclaration; - -/** - * Create an AST based on the given code. - * - * @param code The code to convert to an AST. - * @throws Throws parsing error if the code is unparsable - * @returns The AST - */ -export function makeAST(code: string): AST { - // If this errors, it will be caught in the calling function, where we know more information and can construct a - // better warning message - return jscs(code, { parser }); -} - -/** - * Find all nodes which represent Identifiers with the given name - * - * @param ast The code, in AST form - * @param name The Identifier name to search for - * @returns A collection of NodePaths pointing to any nodes which were found - */ -function findIdentifiers(ast: AST, name: string): AST { - const identifierFilter = function (path: ASTPath): boolean { - // Check that what we have is indeed an Identifier, and that the name matches - // - // Note: If we were being super precise about this, we'd also check the context in which the identifier is being - // used, because there are some cases where we actually don't want to be renaming things (if the identifier is being - // used to name a class property, for example). But the chances that someone is going to have a class property in a - // nextjs page file with the same name as one of the canonical functions are slim to none, so for simplicity we can - // stop filtering here. If this ever becomes a problem, more precise filter checks can be found in a comment at the - // bottom of this file. - return path.node.name === name; - }; - - return ast.find(Identifier).filter(identifierFilter); -} - -/** - * Find all nodes which are declarations of variables with the given name - * - * @param ast The code, in AST form - * @param name The variable name to search for - * @returns A collection of NodePaths pointing to any nodes which were found - */ -export function findDeclarations(ast: AST, name: string): AST { - // Check for a structure of the form - // - // node: VariableDeclaration - // \ - // declarations: VariableDeclarator[] - // \ - // 0 : VariableDeclarator - // \ - // id: Identifier - // \ - // name: string - // - // where `name` matches the given name. - const declarationFilter = function (path: ASTPath): boolean { - return ( - path.node.declarations.length === 1 && - VariableDeclarator.check(path.node.declarations[0]) && - Identifier.check(path.node.declarations[0].id) && - path.node.declarations[0].id.name === name - ); - }; - - return ast.find(VariableDeclaration).filter(declarationFilter); -} - -/** - * Find all nodes which are exports of variables with the given name - * - * @param ast The code, in AST form - * @param name The variable name to search for - * @returns A collection of NodePaths pointing to any nodes which were found - */ -export function findExports(ast: AST, name: string): AST { - const exportFilter = function (path: ASTPath): boolean { - return ExportSpecifier.check(path.node) && path.node.exported.name === name; - }; - - return ast.find(ExportSpecifier).filter(exportFilter); -} - -/** - * Rename all identifiers with the given name, except in cases where it would break outside references. - * - * @param ast The AST representing the code - * @param origName The name being replaced - * @param newName The new name to use, if already chosen (one will be generated if not given) - * @returns The new name assigned to the identifiers, or undefined if no identifiers were renamed - */ -export function renameIdentifiers(ast: AST, origName: string, newName?: string): string | undefined { - const matchingNodes = findIdentifiers(ast, origName); - - if (matchingNodes.length > 0) { - // Find an available new name for the function by prefixing all references to it with an underscore (or a few - // underscores, if that's what it takes to avoid a name collision). - const alias = newName || findAvailibleAlias(ast, origName); - matchingNodes.forEach(nodePath => { - // Rename the node, except in cases where it might break an outside reference to it. - maybeRenameNode(ast, nodePath, alias); - }); - return alias; - } - - // technically redundant, but needed to keep TS happy - return undefined; -} - -/** - * Find an unused identifier name in the AST by repeatedly adding underscores to the beginning of the given original - * name until we find one which hasn't already been taken. - * - * @param userAST The AST to search - * @param origName The original name we want to alias - * @returns - */ -function findAvailibleAlias(userAST: AST, origName: string): string { - let foundAvailableName = false; - let newName = origName; - - while (!foundAvailableName) { - // Prefix the original function name (or the last name we tried) with an underscore and search for identifiers with - // the new name in the AST - newName = `_${newName}`; - const existingIdentifiers = findIdentifiers(userAST, newName); - - // If we haven't found anything, we're good to go - foundAvailableName = existingIdentifiers.length === 0; - } - - return newName; -} - -// When we're searching for and renaming the user's data-fetching functions, the general idea is to rename all -// identifiers matching the function names, but there are a few things to watch out for: -// - We can't rename any identifiers that refer to something outside of the module, because then we'd break the link -// between the external thing and the module's reference to it. The two key examples of this are named imports and -// property access in objects instantiated outside of the module. -// - What nextjs cares about is just the identifier which gets exported, which may or may not be what it's called -// locally. In other words, if we find something like `export { something as getServerSideProps }`, we have to -// rename both `something` and `getServerSideProps`, the former so we can wrap it and the latter so as not to -// conflict with the wrapped function of the same name we're planning to export. -// - Shorthand object notation is a thing. Specifically, it's a thing which makes two separate identifiers appear as -// one, even though they have separate functions and may need to be treated differently from one another. This shows -// up not just in object literals but also when destructuring and in imports and exports. - -function maybeRenameNode(ast: AST, identifierPath: ASTPath, alias: string): void { - const node = identifierPath.node; - const parent = identifierPath.parentPath.node; - const grandparent = identifierPath.parentPath.parentPath.node; - - // In general we want to rename all nodes, unless we're in one of a few specific situations. (Anything which doesn't - // get handled by one of these checks will be renamed at the end of this function.) In all of the scenarios below, - // we'll use `gSSP` as our stand-in for either of `getServerSideProps` and `getStaticProps`. - - // Imports: - // - // - `import { gSSP } from 'yyy'`, which is equivalent (in AST terms) to `import { gSSP as gSSP } from 'yyy'` - // - `import { xxx as gSSP } from 'yyy'` - // - // The `xxx as gSSP` corresponds to an ImportSpecifier, with `imported = xxx` and `local = gSSP`. In both of these - // cases, we want to rename `local` (the thing on the right; that will happen below) but not `imported` (the thing on - // the left). - if (ImportSpecifier.check(parent)) { - if (node === parent.imported) return; - // The only other option is that `node === parent.local`. This will get renamed below. - } - - // Destructuring: - // - // - `const { gSSP } = yyy`, which is equivalent (in AST terms) to `const { gSSP:gSSP } = yyy` - // - `const { xxx:gSSP } = yyy` - // - // This would come up if, for example, we were grabbing something from a namespace (`import * as yyy from 'zzz'; const - // { xxx:gSSP } = yyy`). Here the `xxx:gSSP` corresponds to a Property (inside of an array inside of an ObjectPatten - // inside of a VariableDeclarator), with `key = xxx` and `value = gSSP`. In both of these cases, we want to rename - // `value` but not `key`. (Again here we're renaming the righthand thing but leaving the lefthand thing alone.) - - // And - // though it's unlikely to be as relevant here, it's worth noting that we see the exact same pattern when - // instantiating an object literal - `{ xxx }` or `{ xxx: yyy }` - where we rename the value but not the key. The only - // difference there is that it's an `ObjectExpression` rather than an `ObjectPattern`.) - if (Property.check(parent) && ObjectPattern.check(grandparent)) { - if (node === parent.key) return; - // The only other option is that `node === parent.value`. This will get renamed below. When it does, the names of - // `parent.key` and `parent.value` won't match (if they ever did), so we need to make sure to update `shorthand`. - parent.shorthand = false; - } - - // Object literal instantiation: - // - // - `const xxx = { gSSP }`, which is equivalent (in AST terms) to `const xxx = { gSSP: gSSP }` - // - `const xxx = { yyy: gSSP }` - // - // This is the same as destructuring in every way, with the exception that where there it was an `ObjectPattern`, here - // it's an `ObjectExpression`. - if (Property.check(parent) && ObjectExpression.check(grandparent)) { - if (node === parent.key) return; - // The only other option is that `node === parent.value`. This will get renamed below. When it does, the names of - // `parent.key` and `parent.value` won't match (if they ever did), so we need to make sure to update `shorthand`. - parent.shorthand = false; - } - - // Object property access: - // - // - xxx.yyy - // - // This is similar to destructuring (in that we we don't want to rename object keys), and would come up in similar - // circumstances: `import * as xxx from 'abc'; const zzz = xxx.yyy`. In this case the `xxx.yyy` corresponds to a - // `MemberExpression`, with `object = xxx` and `property = yyy`. (This is unlikely to be relevant in our case with - // data-fetching functions, which is why none of the part of this example are `gSSP`. Nonetheless, good to be accurate - // with these things.) - if (MemberExpression.check(parent)) { - if (node === parent.property) return; - // The only other option is that `node === parent.object`. This will get renamed below. - } - - // Exports: - // - // - `export { gSSP }, which is equivalent (in AST terms) to `export { gSSP as gSSP }` - // - `export { xxx as gSSP }` - // - // Similar to the `import` cases, here the `xxx as gSSP` corresponds to an `ExportSpecifier`, with `local = xxx` and - // `exported = gSSP`. And as before, we want to change `local`, but this time there's a twist. (Two of them, - // actually.) - // - // First, if we care about this ExportSpecifier at all, it's because it's the export of one of our data-fetching - // functions, as in the example above. Because we want to export a replacement version of said function, we need to - // rename `exported`, to prevent a name conflict. (This is different than what you'd expect from a simple "rename a - // variable" algorithm, because in that case you normally wouldn't rename the thing which could be referred to outside - // of the module.) - // - // Second, because need to wrap the object using its local name, we need to rename `local`. This tracks with how we - // thought about `import` statements above, but is different from everything else we're doing in this function in that - // it means we potentially need to rename something *not* already named `getServerSideProps` or `getStaticProps`, - // meaning we need to rename nodes outside of the collection upon which we're currently acting. - if (ExportSpecifier.check(parent)) { - if (parent.exported.name !== parent.local?.name && node === parent.exported) { - const currentLocalName = parent.local?.name || ''; - renameIdentifiers(ast, currentLocalName, alias); - } - - // The only other options are that a) the names match, in which case both `local` and `exported` both have the name - // of the function we're trying to wrap, and will get renamed below, or b) the names are different but `node` is - // `local`, meaning this must be the second go-round of `renameIdentifiers`, where we're renaming everything with - // the local name, not the name of our wrapped data-fetching function, in which case `node` (a.k.a. `local`) will - // also get renamed below. - } - - // handle any node which hasn't gotten otherwise dealt with above - node.name = alias; -} - -/** - * Remove comments from all nodes in the given AST. - * - * Note: Comments are not nodes in and of themselves, but are instead attached to the nodes above and below them. - * - * @param ast The code, in AST form - */ -export function removeComments(ast: AST): void { - const nodesWithComments = ast.find(Node).filter(nodePath => !!nodePath.node.comments); - nodesWithComments.forEach(nodePath => (nodePath.node.comments = null)); -} - -/** - * Determines from a given AST of a file whether the file has a default export or not. - */ -export function hasDefaultExport(ast: AST): boolean { - const defaultExports = ast.find(Node, value => { - return ( - ExportDefaultDeclaration.check(value) || - ExportDefaultSpecifier.check(value) || - (ExportSpecifier.check(value) && value.exported.name === 'default') - ); - }); - - // In theory there should only ever be 0 or 1, but who knows what people do - return defaultExports.length > 0; -} - -/** - * Extracts all identifier names (`'constName'`) from an destructuringassignment'sArrayPattern (the `[constName]` in`const [constName] = [1]`). - * - * This function recursively calls itself and `getExportIdentifiersFromObjectPattern` since destructuring assignments - * can be deeply nested with objects and arrays. - * - * Example - take the following program: - * - * ```js - * export const [{ foo: name1 }, [{ bar: [name2]}, name3]] = [{ foo: 1 }, [{ bar: [2] }, 3]]; - * ``` - * - * The `ArrayPattern` node in question for this program is the left hand side of the assignment: - * `[{ foo: name1 }, [{ bar: [name2]}, name3]]` - * - * Applying this function to this `ArrayPattern` will return the following: `["name1", "name2", "name3"]` - * - * DISCLAIMER: This function only correcly extracts identifiers of `ArrayPatterns` in the context of export statements. - * Using this for `ArrayPattern` outside of exports would require us to handle more edgecases. Hence the "Export" in - * this function's name. - */ -function getExportIdentifiersFromArrayPattern(arrayPattern: jscsTypes.ArrayPattern): string[] { - const identifiers: string[] = []; - - arrayPattern.elements.forEach(element => { - if (Identifier.check(element)) { - identifiers.push(element.name); - } else if (ObjectPattern.check(element)) { - identifiers.push(...getExportIdentifiersFromObjectPattern(element)); - } else if (ArrayPattern.check(element)) { - identifiers.push(...getExportIdentifiersFromArrayPattern(element)); - } else if (RestElement.check(element) && Identifier.check(element.argument)) { - // `RestElements` are spread operators - identifiers.push(element.argument.name); - } - }); - - return identifiers; -} - -/** - * Grabs all identifiers from an ObjectPattern within a destructured named export declaration - * statement (`name` in "export const { val: name } = { val: 1 }"). - * - * This function recursively calls itself and `getExportIdentifiersFromArrayPattern` since destructuring assignments - * can be deeply nested with objects and arrays. - * - * Example - take the following program: - * - * ```js - * export const { foo: [{ bar: name1 }], name2, ...name3 } = { foo: [{}] }; - * ``` - * - * The `ObjectPattern` node in question for this program is the left hand side of the assignment: - * `{ foo: [{ bar: name1 }], name2, ...name3 } = { foo: [{}] }` - * - * Applying this function to this `ObjectPattern` will return the following: `["name1", "name2", "name3"]` - * - * DISCLAIMER: This function only correcly extracts identifiers of `ObjectPatterns` in the context of export statements. - * Using this for `ObjectPatterns` outside of exports would require us to handle more edgecases. Hence the "Export" in - * this function's name. - */ -function getExportIdentifiersFromObjectPattern(objectPatternNode: jscsTypes.ObjectPattern): string[] { - const identifiers: string[] = []; - - objectPatternNode.properties.forEach(property => { - // An `ObjectPattern`'s properties can be either `Property`s or `RestElement`s. - if (Property.check(property)) { - if (Identifier.check(property.value)) { - identifiers.push(property.value.name); - } else if (ObjectPattern.check(property.value)) { - identifiers.push(...getExportIdentifiersFromObjectPattern(property.value)); - } else if (ArrayPattern.check(property.value)) { - identifiers.push(...getExportIdentifiersFromArrayPattern(property.value)); - } else if (RestElement.check(property.value) && Identifier.check(property.value.argument)) { - // `RestElements` are spread operators - identifiers.push(property.value.argument.name); - } - // @ts-ignore AST types are wrong here - } else if (RestElement.check(property) && Identifier.check(property.argument)) { - // `RestElements` are spread operators - // @ts-ignore AST types are wrong here - identifiers.push(property.argument.name as string); - } - }); - - return identifiers; -} - -/** - * Given the AST of a file, this function extracts all named exports from the file. - * - * @returns a list of deduplicated identifiers. - */ -export function getExportIdentifierNames(ast: AST): string[] { - // We'll use a set to dedupe at the end, but for now we use an array as our accumulator because you can add multiple elements to it at once. - const identifiers: string[] = []; - - // The following variable collects all export statements that double as named declaration, e.g.: - // - export function myFunc() {} - // - export var myVar = 1337 - // - export const myConst = 1337 - // - export const { a, ..rest } = { a: 1, b: 2, c: 3 } - // We will narrow those situations down in subsequent code blocks. - const namedExportDeclarationNodeDeclarations = ast - .find(ExportNamedDeclaration) - .nodes() - .map(namedExportDeclarationNode => namedExportDeclarationNode.declaration); - - namedExportDeclarationNodeDeclarations - .filter((declarationNode): declarationNode is jscsTypes.VariableDeclaration => - // Narrow down to varible declarations, e.g.: - // export const a = ...; - // export var b = ...; - // export let c = ...; - // export let c, d = 1; - VariableDeclaration.check(declarationNode), - ) - .map( - variableDeclarationNode => - // Grab all declarations in a single export statement. - // There can be multiple in the case of for example in `export let a, b;`. - variableDeclarationNode.declarations, - ) - .reduce((prev, curr) => [...prev, ...curr], []) // flatten - now we have all declaration nodes in one flat array - .forEach(declarationNode => { - if ( - Identifier.check(declarationNode) || // should never happen - JSXIdentifier.check(declarationNode) || // JSX like `` - we don't care about these - TSTypeParameter.check(declarationNode) // type definitions - we don't care about those - ) { - // We should never have to enter this branch, it is just for type narrowing. - } else if (Identifier.check(declarationNode.id)) { - // If it's a simple declaration with an identifier we collect it. (e.g. `const myIdentifier = 1;` -> "myIdentifier") - identifiers.push(declarationNode.id.name); - } else if (ObjectPattern.check(declarationNode.id)) { - // If we encounter a destructuring export like `export const { foo: name1, bar: name2 } = { foo: 1, bar: 2 };`, - // we try collecting the identifiers from the pattern `{ foo: name1, bar: name2 }`. - identifiers.push(...getExportIdentifiersFromObjectPattern(declarationNode.id)); - } else if (ArrayPattern.check(declarationNode.id)) { - // If we encounter a destructuring export like `export const [name1, name2] = [1, 2];`, - // we try collecting the identifiers from the pattern `[name1, name2]`. - identifiers.push(...getExportIdentifiersFromArrayPattern(declarationNode.id)); - } - }); - - namedExportDeclarationNodeDeclarations - .filter( - // Narrow down to class and function declarations, e.g.: - // export class Foo {}; - // export function bar() {}; - (declarationNode): declarationNode is jscsTypes.ClassDeclaration | jscsTypes.FunctionDeclaration => - ClassDeclaration.check(declarationNode) || FunctionDeclaration.check(declarationNode), - ) - .map(node => node.id) // Grab the identifier of the function/class - Note: it might be `null` when it's anonymous - .filter((id): id is jscsTypes.Identifier => Identifier.check(id)) // Elaborate way of null-checking - .forEach(id => identifiers.push(id.name)); // Collect the name of the identifier - - ast - .find(ExportSpecifier) // Find stuff like `export {} [from ...];` - .nodes() - .forEach(specifier => { - // Taking the example above `specifier.exported.name` always contains `id` unless `name` is specified, then it's `name`; - if (specifier.exported.name !== 'default') { - // You can do default exports "export { something as default };" but we do not want to collect "default" in this - // function since it only wants to collect named exports. - identifiers.push(specifier.exported.name); - } - }); - - ast - .find(ExportAllDeclaration) // Find stuff like `export * from ..." and "export * as someVariable from ...` - .nodes() - .forEach(declaration => { - // Narrow it down to only find `export * as someVariable from ...` (emphasis on "as someVariable") - if (declaration.exported) { - identifiers.push(declaration.exported.name); // `declaration.exported.name` contains "someVariable" - } - }); - - return [...new Set(identifiers)]; // dedupe -} diff --git a/packages/nextjs/src/config/loaders/dataFetchersLoader.ts b/packages/nextjs/src/config/loaders/dataFetchersLoader.ts deleted file mode 100644 index dc6d2e3a71a4..000000000000 --- a/packages/nextjs/src/config/loaders/dataFetchersLoader.ts +++ /dev/null @@ -1,223 +0,0 @@ -/** - * This loader auto-wraps a user's page-level data-fetching functions (`getStaticProps` and `getServerSideProps`) in - * order to instrument them for tracing. At a high level, this is done by finding the relevant functions, renaming them - * so as not to create a name collision, and then creating a new version of each function which is a wrapped version of - * the original. We do this by parsing the user's code and some template code into ASTs, manipulating them, and then - * turning them back into strings and appending our template code to the user's (modified) page code. Greater detail and - * explanations can be found in situ in the functions below and in the helper functions in `ast.ts`. - * - * For `getInitialProps` we create a virtual proxy-module that re-exports all the exports and default exports of the - * original file and wraps `getInitialProps`. We do this since it allows us to very generically wrap `getInitialProps` - * for all kinds ways users might define default exports (which are a lot of ways). - */ -import { logger } from '@sentry/utils'; -import * as fs from 'fs'; -import * as path from 'path'; - -import { isESM } from '../../utils/isESM'; -import type { AST } from './ast'; -import { - findDeclarations, - findExports, - getExportIdentifierNames, - hasDefaultExport, - makeAST, - removeComments, - renameIdentifiers, -} from './ast'; -import type { LoaderThis } from './types'; - -// Map to keep track of each function's placeholder in the template and what it should be replaced with. (The latter -// will get added as we process the user code. Setting it to an empty string here means TS won't complain when we set it -// to a non-empty string later.) -const DATA_FETCHING_FUNCTIONS = { - getServerSideProps: { placeholder: '__ORIG_GSSP__', alias: '' }, - getStaticProps: { placeholder: '__ORIG_GSPROPS__', alias: '' }, -}; - -type LoaderOptions = { - projectDir: string; - pagesDir: string; -}; - -/** - * Find any data-fetching functions the user's code contains and rename them to prevent clashes, then whittle the - * template exporting wrapped versions instead down to only the functions found. - * - * @param userCode The source code of the current page file - * @param templateCode The source code of the full template, including all functions - * @param filepath The path to the current pagefile, within the project directory - * @returns A tuple of modified user and template code - */ -function wrapFunctions(userCode: string, templateCode: string, filepath: string): string[] { - let userAST: AST, templateAST: AST; - - try { - userAST = makeAST(userCode); - templateAST = makeAST(templateCode); - } catch (err) { - logger.warn(`Couldn't add Sentry to ${filepath} because there was a parsing error: ${err}`); - // Replace the template code with an empty string, so in the end the user code is untouched - return [userCode, '']; - } - - // Comments are useful to have in the template for anyone reading it, but don't make sense to be injected into user - // code, because they're about the template-i-ness of the template, not the code itself - // TODO: Move this to our rollup build - removeComments(templateAST); - - for (const functionName of Object.keys(DATA_FETCHING_FUNCTIONS)) { - // Find and rename all identifiers whose name is `functionName` - const alias = renameIdentifiers(userAST, functionName); - - // `alias` will be defined iff the user code contains the function in question and renaming has been done - if (alias) { - // We keep track of the alias for each function, so that later on we can fill it in for the placeholder in the - // template. (Not doing that now because it's much more easily done once the template code has gone back to being - // a string.) - DATA_FETCHING_FUNCTIONS[functionName as keyof typeof DATA_FETCHING_FUNCTIONS].alias = alias; - } - - // Otherwise, if the current function doesn't exist anywhere in the user's code, delete the code in the template - // wrapping that function - // - // Note: We start with all of the possible wrapper lines in the template and delete the ones we don't need (rather - // than starting with none and adding in the ones we do need) because it allows them to live in our souce code as - // *code*. If we added them in, they'd have to be strings containing code, and we'd lose all of the benefits of - // syntax highlighting, linting, etc. - else { - // We have to look for declarations and exports separately because when we build the SDK, Rollup turns - // export const XXX = ... - // into - // const XXX = ... - // export { XXX } - findExports(templateAST, functionName).remove(); - findDeclarations(templateAST, functionName).remove(); - } - } - - return [userAST.toSource(), templateAST.toSource()]; -} - -/** - * Wrap `getInitialProps`, `getStaticProps`, and `getServerSideProps` (if they exist) in the given page code - */ -export default function wrapDataFetchersLoader(this: LoaderThis, userCode: string): string { - // For now this loader only works for ESM code - if (!isESM(userCode)) { - return userCode; - } - - // We know one or the other will be defined, depending on the version of webpack being used - const { projectDir, pagesDir } = 'getOptions' in this ? this.getOptions() : this.query; - - // Get the parameterized route name from this page's filepath - const parameterizedRouteName = path - // Get the path of the file insde of the pages directory - .relative(pagesDir, this.resourcePath) - // Add a slash at the beginning - .replace(/(.*)/, '/$1') - // Pull off the file extension - .replace(/\.(jsx?|tsx?)/, '') - // Any page file named `index` corresponds to root of the directory its in, URL-wise, so turn `/xyz/index` into - // just `/xyz` - .replace(/\/index$/, '') - // In case all of the above have left us with an empty string (which will happen if we're dealing with the - // homepage), sub back in the root route - .replace(/^$/, '/'); - - // In the following branch we will proxy the user's file. This means we return code (basically an entirely new file) - // that re - exports all the user file's originial export, but with a "sentry-proxy-loader" query in the module - // string. - // This looks like the following: `export { a, b, c } from "[imagine userfile path here]?sentry-proxy-loader";` - // Additionally, in this proxy file we import the userfile's default export, wrap `getInitialProps` on that default - // export, and re -export the now modified default export as default. - // Webpack will resolve the module with the "sentry-proxy-loader" query to the original file, but will give us access - // to the query via`this.resourceQuery`. If we see that `this.resourceQuery` includes includes "sentry-proxy-loader" - // we know we're in a proxied file and do not need to proxy again. - - if (!this.resourceQuery.includes('sentry-proxy-loader')) { - const ast = makeAST(userCode); - const exportedIdentifiers = getExportIdentifierNames(ast); - - let outputFileContent = ''; - - if (exportedIdentifiers.length > 0) { - outputFileContent += `export { ${exportedIdentifiers.join(', ')} } from "${ - this.resourcePath - }?sentry-proxy-loader";`; - } - - if (hasDefaultExport(ast)) { - outputFileContent += ` - import { default as _sentry_default } from "${this.resourcePath}?sentry-proxy-loader"; - import { - withSentryServerSideGetInitialProps, - withSentryServerSideAppGetInitialProps, - withSentryServerSideDocumentGetInitialProps, - withSentryServerSideErrorGetInitialProps, - } from "@sentry/nextjs";`; - - if (parameterizedRouteName === '/_app') { - outputFileContent += ` - if (typeof _sentry_default.getInitialProps === 'function') { - _sentry_default.getInitialProps = withSentryServerSideAppGetInitialProps(_sentry_default.getInitialProps); - }`; - } else if (parameterizedRouteName === '/_document') { - outputFileContent += ` - if (typeof _sentry_default.getInitialProps === 'function') { - _sentry_default.getInitialProps = withSentryServerSideDocumentGetInitialProps(_sentry_default.getInitialProps); - }`; - } else if (parameterizedRouteName === '/_error') { - outputFileContent += ` - if (typeof _sentry_default.getInitialProps === 'function') { - _sentry_default.getInitialProps = withSentryServerSideErrorGetInitialProps(_sentry_default.getInitialProps); - }`; - } else { - // We enter this branch for any "normal" Next.js page - outputFileContent += ` - if (typeof _sentry_default.getInitialProps === 'function') { - _sentry_default.getInitialProps = withSentryServerSideGetInitialProps(_sentry_default.getInitialProps); - }`; - } - - outputFileContent += 'export default _sentry_default;'; - } - - return outputFileContent; - } else { - // If none of the functions we want to wrap appears in the page's code, there's nothing to do. (Note: We do this as a - // simple substring match (rather than waiting until we've parsed the code) because it's meant to be an - // as-fast-as-possible fail-fast. It's possible for user code to pass this check, even if it contains none of the - // functions in question, just by virtue of the correct string having been found, be it in a comment, as part of a - // longer variable name, etc. That said, when we actually do the code manipulation we'll be working on the code's AST, - // meaning we'll be able to differentiate between code we actually want to change and any false positives which might - // come up here.) - if (Object.keys(DATA_FETCHING_FUNCTIONS).every(functionName => !userCode.includes(functionName))) { - return userCode; - } - - const templatePath = path.resolve(__dirname, '../templates/dataFetchersLoaderTemplate.js'); - // make sure the template is included when runing `webpack watch` - this.addDependency(templatePath); - - const templateCode = fs.readFileSync(templatePath).toString(); - - const [modifiedUserCode, modifiedTemplateCode] = wrapFunctions( - userCode, - templateCode, - // Relative path to the page we're currently processing, for use in error messages - path.relative(projectDir, this.resourcePath), - ); - - // Fill in template placeholders - let injectedCode = modifiedTemplateCode; - - injectedCode = injectedCode.replace('__FILEPATH__', parameterizedRouteName); - for (const { placeholder, alias } of Object.values(DATA_FETCHING_FUNCTIONS)) { - injectedCode = injectedCode.replace(new RegExp(placeholder, 'g'), alias); - } - - return `${modifiedUserCode}\n${injectedCode}`; - } -} diff --git a/packages/nextjs/src/config/loaders/index.ts b/packages/nextjs/src/config/loaders/index.ts index bdd71281707d..00bf268fdc91 100644 --- a/packages/nextjs/src/config/loaders/index.ts +++ b/packages/nextjs/src/config/loaders/index.ts @@ -1,3 +1,2 @@ export { default as prefixLoader } from './prefixLoader'; -export { default as dataFetchersLoader } from './dataFetchersLoader'; export { default as proxyLoader } from './proxyLoader'; diff --git a/packages/nextjs/src/config/loaders/parser.ts b/packages/nextjs/src/config/loaders/parser.ts deleted file mode 100644 index 450deb5ca6c5..000000000000 --- a/packages/nextjs/src/config/loaders/parser.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Note: The implementation here is loosely based on the jsx and tsx parsers in 'jscodeshift'. It doesn't expose its - * parsers, so we have to provide our own if we want to use anything besides the default. Fortunately, its parsers turn - * out to just be wrappers around `babel.parse` with certain options set. The options chosen here are different from the - * `jscodeshift` parsers in that a) unrecognized and deprecated options and options set to default values have been - * removed, and b) all standard plugins are included, meaning the widest range of user code is able to be parsed. - */ - -import * as babel from '@babel/parser'; -import { File } from '@babel/types'; - -type Parser = { - parse: (code: string) => babel.ParseResult; -}; - -const options: babel.ParserOptions = { - // Nextjs supports dynamic import, so this seems like a good idea - allowImportExportEverywhere: true, - // We're only supporting wrapping in ESM pages - sourceType: 'module', - // Without `tokens`, jsx parsing breaks - tokens: true, - // The maximal set of non-mutually-exclusive standard plugins, so as to support as much weird syntax in our users' - // code as possible - plugins: [ - 'asyncDoExpressions', - 'decimal', - ['decorators', { decoratorsBeforeExport: false }], - 'decoratorAutoAccessors', - 'destructuringPrivate', - 'doExpressions', - 'estree', - 'exportDefaultFrom', - 'functionBind', - 'importMeta', - 'importAssertions', - 'jsx', - 'moduleBlocks', - 'partialApplication', - ['pipelineOperator', { proposal: 'hack', topicToken: '^' }], - 'regexpUnicodeSets', - 'throwExpressions', - 'typescript', - ] as babel.ParserPlugin[], -}; - -export const parser: Parser = { - parse: code => babel.parse(code, options), -}; diff --git a/packages/nextjs/src/config/templates/dataFetchersLoaderTemplate.ts b/packages/nextjs/src/config/templates/dataFetchersLoaderTemplate.ts deleted file mode 100644 index 4f9984f3f136..000000000000 --- a/packages/nextjs/src/config/templates/dataFetchersLoaderTemplate.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { GetServerSideProps as GetServerSidePropsFunction, GetStaticProps as GetStaticPropsFunction } from 'next'; - -declare const __ORIG_GSSP__: GetServerSidePropsFunction; -declare const __ORIG_GSPROPS__: GetStaticPropsFunction; - -// We import the SDK under a purposefully clunky name, to lessen to near zero the chances of a name collision in case -// the user has also imported Sentry for some reason. (In the future, we could check for such a collision using the AST, -// but this is a lot simpler.) -// -// TODO: This import line is here because it needs to be in the injected code, but it also would (ideally) -// let us take advantage of typechecking, via the linter (both eslint and the TS linter), using intellisense, and when -// building. Solving for all five simultaneously seems to be tricky, however, because of the circular dependency. This -// is one of a number of possible compromise options, which seems to hit everything except eslint linting and -// typechecking via `tsc`. (TS linting and intellisense both work, though, so we do get at least some type safety.) See -// https://github.com/getsentry/sentry-javascript/pull/5503#discussion_r936827996 for more details. -// -// eslint-disable-next-line import/no-extraneous-dependencies, import/no-unresolved -import * as ServerSideSentryNextjsSDK from '@sentry/nextjs'; - -const PARAMETERIZED_ROUTE = '__FILEPATH__'; - -export const getServerSideProps = - typeof __ORIG_GSSP__ === 'function' - ? ServerSideSentryNextjsSDK.withSentryGetServerSideProps(__ORIG_GSSP__, PARAMETERIZED_ROUTE) - : __ORIG_GSSP__; - -export const getStaticProps = - typeof __ORIG_GSPROPS__ === 'function' - ? ServerSideSentryNextjsSDK.withSentryGetStaticProps(__ORIG_GSPROPS__, PARAMETERIZED_ROUTE) - : __ORIG_GSPROPS__; diff --git a/packages/nextjs/test/config/ast.test.ts b/packages/nextjs/test/config/ast.test.ts deleted file mode 100644 index c84b2ca6f7ed..000000000000 --- a/packages/nextjs/test/config/ast.test.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { getExportIdentifierNames, hasDefaultExport, makeAST } from '../../src/config/loaders/ast'; - -test.each([ - // examples taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export - // Exporting declarations - ['export let name1, name2; export var name3, name4;', false], - ['export const name1 = 1, name2 = 2;', false], - ['export var name1 = 1, name2 = 2;', false], - ['export let name1 = 1, name2 = 2;', false], - ['export function functionName() {}', false], - ['export class ClassName {}', false], - ['export function* generatorFunctionName() {}', false], - ['export const { name1, bar: name2, someValue: { someNestedValue: name3 }, ...name4 } = {};', false], - ['export const [ name1, name2, ...name3 ] = [1, 2, 3, 4];', false], - ['export const { foo: { bar: [{ baz: [name1, ...name2], ...name3 }, name4, name5]} } = {};', false], - ['export const [{ a: { ...name1 }, b: [,name2] }, name3] = [];', false], - // Export list - ['var name1, name2, name3; export { name1, name2, name3 };', false], - ['var variable1, variable2, name3; export { variable1 as name1, variable2 as name2, name3 };', false], - ['var name1, name2, name3; export { name1 as default, name1, name2 };', true], - // Default exports - ['export default 1;', true], - ['export default function functionName() {}', true], - ['export default class ClassName {}', true], - ['export default function* generatorFunctionName() {}', true], - ['export default function () {}', true], - ['export default class {}', true], - ['export default function* () {}', true], - ['const someObj = { a: { b: 1 }}; export default a.b', true], - // Aggregating modules - ['export * from "module-name";', false], - ['export * as name1 from "module-name";', false], - ['export { name1, name2 } from "module-name";', false], - ['export { import1 as name1, import2 as name2, name3 } from "module-name";', false], - ['export { default } from "module-name";', true], - ['export { default, name1 } from "module-name";', true], -])('hasDefaultExport(%s) should return %p', (program, expectedResult) => { - const ast = makeAST(program); - expect(hasDefaultExport(ast)).toBe(expectedResult); -}); - -test.each([ - // examples taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export - // Exporting declarations - ['export let name1, name2; export var name3, name4;', ['name1', 'name2', 'name3', 'name4']], - ['export const name1 = 1, name2 = 2;', ['name1', 'name2']], - ['export var name1 = 1, name2 = 2;', ['name1', 'name2']], - ['export let name1 = 1, name2 = 2;', ['name1', 'name2']], - ['export function functionName() {}', ['functionName']], - ['export class ClassName {}', ['ClassName']], - ['export function* generatorFunctionName() {}', ['generatorFunctionName']], - [ - 'export const { name1, bar: name2, someValue: { someNestedValue: name3 }, ...name4 } = {};', - ['name1', 'name2', 'name3', 'name4'], - ], - ['export const [ name1, name2, ...name3 ] = [1, 2, 3, 4];', ['name1', 'name2', 'name3']], - [ - 'export const { foo: { bar: [{ baz: [name1, ...name2], ...name3 }, name4, name5]} } = {};', - ['name1', 'name2', 'name3', 'name4', 'name5'], - ], - ['export const [{ a: { ...name1 }, b: [,name2] }, name3] = [];', ['name1', 'name2', 'name3']], - // Export list - [ - ` - var name1, name2, name3; - export { name1, name2, name3 };`, - ['name1', 'name2', 'name3'], - ], - [ - ` - var variable1, variable2, name3; - export { variable1 as name1, variable2 as name2, name3 };`, - ['name1', 'name2', 'name3'], - ], - [ - ` - var name1, name2, name3; - export { name1 as default, name1, name2 };`, - ['name1', 'name2'], - ], - // Default exports - ['export default 1;', []], - ['export default function functionName() {}', []], - ['export default class ClassName {}', []], - ['export default function* generatorFunctionName() {}', []], - ['export default function () {}', []], - ['export default class {}', []], - ['export default function* () {}', []], - ['const someObj = { a: { b: 1 }}; export default a.b', []], - // Aggregating modules - ['export * from "module-name";', []], - ['export * as name1 from "module-name";', ['name1']], - ['export { name1, name2 } from "module-name";', ['name1', 'name2']], - ['export { import1 as name1, import2 as name2, name3 } from "module-name";', ['name1', 'name2', 'name3']], - ['export { default } from "module-name";', []], - ['export { default, name1 } from "module-name";', ['name1']], -])('getExportIdentifiers(%s) should return %p', (program, expectedIdentifiers) => { - const ast = makeAST(program); - expect(getExportIdentifierNames(ast)).toStrictEqual(expectedIdentifiers); -}); diff --git a/yarn.lock b/yarn.lock index 544d08cb0d27..382e402862b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -312,13 +312,6 @@ dependencies: "@babel/highlight" "^7.16.7" -"@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - "@babel/compat-data@^7.11.0", "@babel/compat-data@^7.17.0", "@babel/compat-data@^7.17.7": version "7.17.7" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.7.tgz#078d8b833fbbcc95286613be8c716cef2b519fa2" @@ -334,11 +327,6 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.0.tgz#ea269d7f78deb3a7826c39a4048eecda541ebdaa" integrity sha512-DGjt2QZse5SGd9nfOSqO4WLJ8NN/oHkijbXbPrxuoJO3oIPJL3TciZs9FX+cOHNiY9E9l0opL8g7BmLe3T+9ew== -"@babel/compat-data@^7.18.6": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" - integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== - "@babel/core@7.11.1": version "7.11.1" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.1.tgz#2c55b604e73a40dc21b0e52650b11c65cf276643" @@ -424,27 +412,6 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/core@^7.13.16": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.6.tgz#54a107a3c298aee3fe5e1947a6464b9b6faca03d" - integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.6" - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helpers" "^7.18.6" - "@babel/parser" "^7.18.6" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - "@babel/core@^7.14.8": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.0.tgz#c4ff44046f5fe310525cc9eb4ef5147f0c5374d4" @@ -511,15 +478,6 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.18.6", "@babel/generator@^7.18.7": - version "7.18.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd" - integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== - dependencies: - "@babel/types" "^7.18.7" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" - "@babel/helper-annotate-as-pure@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab" @@ -541,13 +499,6 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - "@babel/helper-builder-binary-assignment-operator-visitor@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.12.13.tgz#6bc20361c88b0a74d05137a65cac8d3cbf6f61fc" @@ -594,16 +545,6 @@ browserslist "^4.17.5" semver "^6.3.0" -"@babel/helper-compilation-targets@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz#18d35bfb9f83b1293c22c55b3d576c1315b6ed96" - integrity sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg== - dependencies: - "@babel/compat-data" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.20.2" - semver "^6.3.0" - "@babel/helper-create-class-features-plugin@^7.13.0", "@babel/helper-create-class-features-plugin@^7.5.5": version "7.13.11" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz#30d30a005bca2c953f5653fc25091a492177f4f6" @@ -653,19 +594,6 @@ "@babel/helper-replace-supers" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" -"@babel/helper-create-class-features-plugin@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz#6f15f8459f3b523b39e00a99982e2c040871ed72" - integrity sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" - "@babel/helper-member-expression-to-functions" "^7.18.6" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-create-regexp-features-plugin@^7.12.13": version "7.12.17" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.17.tgz#a2ac87e9e319269ac655b8d4415e94d38d663cb7" @@ -703,11 +631,6 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-environment-visitor@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz#b7eee2b5b9d70602e59d1a6cad7dd24de7ca6cd7" - integrity sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q== - "@babel/helper-explode-assignable-expression@^7.12.13": version "7.13.0" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.13.0.tgz#17b5c59ff473d9f956f40ef570cf3a76ca12657f" @@ -757,14 +680,6 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.17.0" -"@babel/helper-function-name@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz#8334fecb0afba66e6d87a7e8c6bb7fed79926b83" - integrity sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw== - dependencies: - "@babel/template" "^7.18.6" - "@babel/types" "^7.18.6" - "@babel/helper-get-function-arity@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz#098818934a137fce78b536a3e015864be1e2879b" @@ -807,13 +722,6 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - "@babel/helper-member-expression-to-functions@^7.13.0", "@babel/helper-member-expression-to-functions@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz#bfd34dc9bba9824a4658b0317ec2fd571a51e6ef" @@ -842,13 +750,6 @@ dependencies: "@babel/types" "^7.17.0" -"@babel/helper-member-expression-to-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz#44802d7d602c285e1692db0bad9396d007be2afc" - integrity sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng== - dependencies: - "@babel/types" "^7.18.6" - "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" @@ -870,13 +771,6 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - "@babel/helper-module-transforms@^7.11.0", "@babel/helper-module-transforms@^7.16.7", "@babel/helper-module-transforms@^7.17.7": version "7.17.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz#3943c7f777139e7954a5355c815263741a9c1cbd" @@ -919,20 +813,6 @@ "@babel/traverse" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/helper-module-transforms@^7.18.6": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz#4f8408afead0188cfa48672f9d0e5787b61778c8" - integrity sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.18.6" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.8" - "@babel/types" "^7.18.8" - "@babel/helper-optimise-call-expression@^7.12.13", "@babel/helper-optimise-call-expression@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz#f310a5121a3b9cc52d9ab19122bd729822dee171" @@ -954,13 +834,6 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" @@ -971,11 +844,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== -"@babel/helper-plugin-utils@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz#9448974dd4fb1d80fefe72e8a0af37809cd30d6d" - integrity sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg== - "@babel/helper-remap-async-to-generator@^7.13.0": version "7.13.0" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.13.0.tgz#376a760d9f7b4b2077a9dd05aa9c3927cadb2209" @@ -1025,17 +893,6 @@ "@babel/traverse" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/helper-replace-supers@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz#efedf51cfccea7b7b8c0f00002ab317e7abfe420" - integrity sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g== - dependencies: - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-member-expression-to-functions" "^7.18.6" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" - "@babel/helper-simple-access@^7.12.13", "@babel/helper-simple-access@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz#ac368905abf1de8e9781434b635d8f8674bcc13b" @@ -1057,13 +914,6 @@ dependencies: "@babel/types" "^7.17.0" -"@babel/helper-simple-access@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" - integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== - dependencies: - "@babel/types" "^7.18.6" - "@babel/helper-skip-transparent-expression-wrappers@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf" @@ -1099,18 +949,6 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" - integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== - "@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": version "7.14.9" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" @@ -1126,11 +964,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== -"@babel/helper-validator-identifier@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" - integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== - "@babel/helper-validator-option@^7.12.17", "@babel/helper-validator-option@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" @@ -1141,11 +974,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - "@babel/helper-wrap-function@^7.13.0": version "7.13.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.13.0.tgz#bdb5c66fda8526ec235ab894ad53a1235c79fcc4" @@ -1193,15 +1021,6 @@ "@babel/traverse" "^7.15.4" "@babel/types" "^7.15.4" -"@babel/helpers@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.6.tgz#4c966140eaa1fcaa3d5a8c09d7db61077d4debfd" - integrity sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ== - dependencies: - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" - "@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" @@ -1229,15 +1048,6 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - "@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.13.13", "@babel/parser@^7.4.3", "@babel/parser@^7.4.5", "@babel/parser@^7.7.0": version "7.14.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.2.tgz#0c1680aa44ad4605b16cbdcc5c341a61bde9c746" @@ -1248,11 +1058,6 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef" integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== -"@babel/parser@^7.13.16", "@babel/parser@^7.18.6", "@babel/parser@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.8.tgz#822146080ac9c62dac0823bb3489622e0bc1cbdf" - integrity sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA== - "@babel/parser@^7.15.4", "@babel/parser@^7.15.5": version "7.15.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" @@ -1268,11 +1073,6 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.8.tgz#61c243a3875f7d0b0962b0543a33ece6ff2f1f17" integrity sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw== -"@babel/parser@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.10.tgz#94b5f8522356e69e8277276adf67ed280c90ecc1" - integrity sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg== - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.13.12": version "7.13.12" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.13.12.tgz#a3484d84d0b549f3fc916b99ee4783f26fabad2a" @@ -1626,13 +1426,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz#774d825256f2379d06139be0c723c4dd444f3ca1" - integrity sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" @@ -1731,13 +1524,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-syntax-typescript@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz#1c09cd25795c7c2b8a4ba9ae49394576d4133285" - integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-transform-arrow-functions@^7.10.4": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz#44125e653d94b98db76369de9c396dc14bef4154" @@ -1899,14 +1685,6 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.12.13" "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-transform-flow-strip-types@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.18.6.tgz#6d3dd9f9c0fe13349428569fef00b31310bb3f9f" - integrity sha512-wE0xtA7csz+hw4fKPwxmu5jnzAsXPIO57XnRwzXP3T19jWh1BODnPGoG9xKYwvAwusP7iUktHayRFbMPGtODaQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-flow" "^7.18.6" - "@babel/plugin-transform-for-of@^7.10.4": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz#649d639d4617dff502a9a158c479b3b556728d8c" @@ -2280,15 +2058,6 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-typescript" "^7.16.7" -"@babel/plugin-transform-typescript@^7.18.6": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.8.tgz#303feb7a920e650f2213ef37b36bbf327e6fa5a0" - integrity sha512-p2xM8HI83UObjsZGofMV/EdYjamsDm6MoN3hXPYIT0+gxIoopE+B7rPYKAxfrz9K9PK7JafTTjqYC6qipLExYA== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-typescript" "^7.18.6" - "@babel/plugin-transform-typescript@~7.4.0": version "7.4.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.5.tgz#ab3351ba35307b79981993536c93ff8be050ba28" @@ -2493,15 +2262,6 @@ core-js-compat "^3.9.0" semver "^6.3.0" -"@babel/preset-flow@^7.13.13": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.18.6.tgz#83f7602ba566e72a9918beefafef8ef16d2810cb" - integrity sha512-E7BDhL64W6OUqpuyHnSroLnqyRTcG6ZdOBl1OKI/QK/HJfplqK/S3sq1Cckx7oTodJ5yOXyfw7rEADJ6UjoQDQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-flow-strip-types" "^7.18.6" - "@babel/preset-modules@^0.1.3": version "0.1.5" resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" @@ -2524,15 +2284,6 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-typescript@^7.13.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399" - integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-typescript" "^7.18.6" - "@babel/preset-typescript@^7.14.5": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.16.0.tgz#b0b4f105b855fb3d631ec036cdc9d1ffd1fa5eac" @@ -2551,17 +2302,6 @@ "@babel/helper-validator-option" "^7.16.7" "@babel/plugin-transform-typescript" "^7.16.7" -"@babel/register@^7.13.16": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.18.6.tgz#48a4520f1b2a7d7ac861e8148caeb0cefe6c59db" - integrity sha512-tkYtONzaO8rQubZzpBnvZPFcHgh8D9F55IjOsYton4X2IBoyRn2ZSWQqySTZnUn2guZbxbQiAB27hJEbvXamhQ== - dependencies: - clone-deep "^4.0.1" - find-cache-dir "^2.0.0" - make-dir "^2.1.0" - pirates "^4.0.5" - source-map-support "^0.5.16" - "@babel/runtime@7.11.2": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" @@ -2633,15 +2373,6 @@ "@babel/parser" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/template@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" - integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.6" - "@babel/types" "^7.18.6" - "@babel/traverse@^7.1.6", "@babel/traverse@^7.13.0", "@babel/traverse@^7.13.13", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.0": version "7.13.13" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.13.tgz#39aa9c21aab69f74d948a486dd28a2dbdbf5114d" @@ -2718,31 +2449,6 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.18.6", "@babel/traverse@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.8.tgz#f095e62ab46abf1da35e5a2011f43aee72d8d5b0" - integrity sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.7" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.8" - "@babel/types" "^7.18.8" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6" - integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ== - dependencies: - "@babel/helper-string-parser" "^7.18.10" - "@babel/helper-validator-identifier" "^7.18.6" - to-fast-properties "^2.0.0" - "@babel/types@7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" @@ -2793,14 +2499,6 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f" - integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - to-fast-properties "^2.0.0" - "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -3578,25 +3276,11 @@ resolved "https://registry.yarnpkg.com/@josephg/resolvable/-/resolvable-1.0.1.tgz#69bc4db754d79e1a2f17a650d3466e038d94a5eb" integrity sha512-CtzORUwWTTOTqfVtHaKRJ0I1kNQd1bpn3sUh8I3nJDVY+5/M/Oe1DnEWzPQvqq/xPIIkzzzIP7mfCoAjFRvDhg== -"@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - "@jridgewell/resolve-uri@^3.0.3": version "3.0.5" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz#68eb521368db76d040a6315cdb24bf2483037b9c" integrity sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew== -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.11" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz#771a1d8d744eeb71b6adb35808e1a6c7b9b8c8ec" @@ -3610,14 +3294,6 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.14" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" - integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jsdevtools/coverage-istanbul-loader@3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@jsdevtools/coverage-istanbul-loader/-/coverage-istanbul-loader-3.0.5.tgz#2a4bc65d0271df8d4435982db4af35d81754ee26" @@ -5578,14 +5254,6 @@ dependencies: "@types/sizzle" "*" -"@types/jscodeshift@^0.11.5": - version "0.11.5" - resolved "https://registry.yarnpkg.com/@types/jscodeshift/-/jscodeshift-0.11.5.tgz#51198aa72ceb66d36ceba3918e1ab445b868f29b" - integrity sha512-7JV0qdblTeWFigevmwFUgROXX395F+MQx6v0YqPn8Bx0B4Sng6alEejz9PENzgLYpG+zL0O4tGdBzc4gKZH8XA== - dependencies: - ast-types "^0.14.1" - recast "^0.20.3" - "@types/jsdom@^16.2.3": version "16.2.9" resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.9.tgz#9c219e5c387f045aae8b80ae4d4cf61d098c15eb" @@ -7071,7 +6739,7 @@ ast-types@0.13.3: resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.3.tgz#50da3f28d17bdbc7969a3a2d83a0e4a72ae755a7" integrity sha512-XTZ7xGML849LkQP86sWdQzfhwbt3YwIO6MqbX9mUNYY98VKaaVZP7YNNm70IpwecbkkxmfC5IYAzOQ/2p29zRA== -ast-types@0.14.2, ast-types@^0.14.1: +ast-types@0.14.2: version "0.14.2" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA== @@ -7283,11 +6951,6 @@ babel-core@^6.26.0, babel-core@^6.26.3: slash "^1.0.0" source-map "^0.5.7" -babel-core@^7.0.0-bridge.0: - version "7.0.0-bridge.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" - integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== - babel-eslint@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" @@ -9503,14 +9166,6 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -9794,15 +9449,6 @@ clone-deep@^0.2.4: lazy-cache "^1.0.3" shallow-clone "^0.1.2" -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - clone-response@1.0.2, clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -13600,7 +13246,7 @@ find-cache-dir@3.3.1, find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: +find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== @@ -13801,11 +13447,6 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== -flow-parser@0.*: - version "0.182.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.182.0.tgz#badada9392caac8e2b47b621bc0b68b51232d9f2" - integrity sha512-Caoy6YFlh0jz+qWpMGuI2CEIDcQGa/YRRnQ5d8+jtj30weXApWDyTSN5gPNve9cQN73JKXE2LFnpZ5AOUI1bXA== - flush-write-stream@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -17232,31 +16873,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jscodeshift@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.13.1.tgz#69bfe51e54c831296380585c6d9e733512aecdef" - integrity sha512-lGyiEbGOvmMRKgWk4vf+lUrCWO/8YR8sUR3FKF1Cq5fovjZDlIcw3Hu5ppLHAnEXshVffvaM0eyuY/AbOeYpnQ== - dependencies: - "@babel/core" "^7.13.16" - "@babel/parser" "^7.13.16" - "@babel/plugin-proposal-class-properties" "^7.13.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.13.8" - "@babel/plugin-proposal-optional-chaining" "^7.13.12" - "@babel/plugin-transform-modules-commonjs" "^7.13.8" - "@babel/preset-flow" "^7.13.13" - "@babel/preset-typescript" "^7.13.0" - "@babel/register" "^7.13.16" - babel-core "^7.0.0-bridge.0" - chalk "^4.1.2" - flow-parser "0.*" - graceful-fs "^4.2.4" - micromatch "^3.1.10" - neo-async "^2.5.0" - node-dir "^0.1.17" - recast "^0.20.4" - temp "^0.8.4" - write-file-atomic "^2.3.0" - jsdoctypeparser@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz#8c97e2fb69315eb274b0f01377eaa5c940bd7b26" @@ -19532,13 +19148,6 @@ nock@^13.1.0: lodash.set "^4.3.2" propagate "^2.0.0" -node-dir@^0.1.17: - version "0.1.17" - resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" - integrity sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg== - dependencies: - minimatch "^3.0.2" - node-environment-flags@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" @@ -21004,7 +20613,7 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" -pirates@^4.0.4, pirates@^4.0.5: +pirates@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== @@ -22466,7 +22075,7 @@ recast@^0.18.1: private "^0.1.8" source-map "~0.6.1" -recast@^0.20.3, recast@^0.20.4, recast@^0.20.5: +recast@^0.20.5: version "0.20.5" resolved "https://registry.yarnpkg.com/recast/-/recast-0.20.5.tgz#8e2c6c96827a1b339c634dd232957d230553ceae" integrity sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ== @@ -23666,13 +23275,6 @@ shallow-clone@^0.1.2: lazy-cache "^0.2.3" mixin-object "^2.0.1" -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -24107,7 +23709,7 @@ source-map-support@^0.4.15, source-map-support@^0.4.18: dependencies: source-map "^0.5.6" -source-map-support@^0.5.16, source-map-support@^0.5.21, source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.20: +source-map-support@^0.5.21, source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -25168,13 +24770,6 @@ temp@0.9.4: mkdirp "^0.5.1" rimraf "~2.6.2" -temp@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2" - integrity sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg== - dependencies: - rimraf "~2.6.2" - temp@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/temp/-/temp-0.4.0.tgz#671ad63d57be0fe9d7294664b3fc400636678a60"