diff --git a/babel.js b/babel.js deleted file mode 100644 index 859c3a7f..00000000 --- a/babel.js +++ /dev/null @@ -1,2 +0,0 @@ -// stub file for node versions without support for package exports -module.exports = require('./lib/babel') diff --git a/docs/content/en/getting-started/setup.md b/docs/content/en/getting-started/setup.md index 01775f38..7e81cf03 100644 --- a/docs/content/en/getting-started/setup.md +++ b/docs/content/en/getting-started/setup.md @@ -3,7 +3,7 @@ title: Quick start description: 'Getting started with the Nuxt Composition API.' category: Getting started position: 2 -version: 0.161 +version: 0.225 --- ## Quick start @@ -58,13 +58,3 @@ version: 0.161 - For convenience, this package also exports the [`@vue/composition-api`](https://github.com/vuejs/composition-api) methods and hooks, so you can import directly from `@nuxtjs/composition-api`. - -## Testing with Jest - -If you need to use jest tests with this module installed, just add the following lines to your `jest.config.js`: - -```js{}[jest.config.js] -moduleNameMapper: { - '@nuxtjs/composition-api': '@nuxtjs/composition-api/entrypoint', -}, -``` diff --git a/docs/content/en/helpers/ssrPromise.md b/docs/content/en/helpers/ssrPromise.md index e5f5c12e..7e9e544c 100644 --- a/docs/content/en/helpers/ssrPromise.md +++ b/docs/content/en/helpers/ssrPromise.md @@ -36,7 +36,7 @@ export default defineComponent({ -Under the hood, `ssrPromise` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/babel` to your Babel plugins. +Under the hood, `ssrPromise` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/dist/babel-plugin` to your Babel plugins. diff --git a/docs/content/en/helpers/ssrRef.md b/docs/content/en/helpers/ssrRef.md index ab6b575b..811a8cf8 100644 --- a/docs/content/en/helpers/ssrRef.md +++ b/docs/content/en/helpers/ssrRef.md @@ -30,7 +30,7 @@ const val2 = ssrRef(myExpensiveSetterFunction) -Under the hood, `ssrRef` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/babel` to your Babel plugins. +Under the hood, `ssrRef` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/dist/babel-plugin` to your Babel plugins. diff --git a/docs/content/en/typings/definitionHelpers.md b/docs/content/en/typings/definitionHelpers.md index 18d3dbff..eac96762 100644 --- a/docs/content/en/typings/definitionHelpers.md +++ b/docs/content/en/typings/definitionHelpers.md @@ -3,27 +3,13 @@ title: defineNuxt* description: 'You can get automatic type-hinting for Nuxt configuration, plugins, middleware, modules and serverMiddleware.' category: Typings position: 10 -version: 0.201 +version: 0.225 --- There are some helpers to optimize developer experience when creating Nuxt plugins, middleware, server middleware and modules. These helpers simply return the function or object passed into them, adding the correct typings. -## defineNuxtConfig - -Create your `nuxt.config.js` with types with: - -```ts -import { defineNuxtConfig } from '@nuxtjs/composition-api' - -export default defineNuxtConfig({ - // your nuxt config -}) -``` - -Note that if you define your Nuxt config this way you will need to ensure that `@nuxtjs/composition-api` is present in your `dependencies` rather than `devDependencies`. - ## defineNuxtPlugin Create a plugin with types with: @@ -47,27 +33,3 @@ export default defineNuxtMiddleware(ctx => { // do stuff }) ``` - -## defineNuxtModule - -Create a Nuxt module with types with: - -```ts -import { defineNuxtModule } from '@nuxtjs/composition-api' - -export default defineNuxtModule<{ myOption: boolean }>(moduleOptions => { - // do stuff -}) -``` - -## defineNuxtServerMiddleware - -Create server middleware with types with: - -```ts -import { defineNuxtServerMiddleware } from '@nuxtjs/composition-api' - -export default defineNuxtServerMiddleware((req, res, next) => { - // do stuff -}) -``` diff --git a/entrypoint.js b/entrypoint.js deleted file mode 100644 index 4253ae6d..00000000 --- a/entrypoint.js +++ /dev/null @@ -1,2 +0,0 @@ -// stub file for node versions without support for package exports -module.exports = require('./lib/entrypoint') diff --git a/jest.config.js b/jest.config.js index 726378b8..a397da5a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,9 +1,12 @@ module.exports = { - verbose: true, testEnvironment: 'node', - coveragePathIgnorePatterns: ['test', '.babelrc.js'], + collectCoverage: true, + verbose: true, transform: { '^.+\\.(js|ts)$': 'babel-jest', }, setupFiles: ['/test/unit/setup'], + moduleNameMapper: { + '@nuxtjs/composition-api/dist/globals': '/src/globals', + }, } diff --git a/module.js b/module.js index 0d2872f1..d6b0665c 100644 --- a/module.js +++ b/module.js @@ -1,2 +1 @@ -// stub file for node versions without support for package exports -module.exports = require('./lib/index') +module.exports = require('./dist/module') diff --git a/package.json b/package.json index f1481363..318699b6 100644 --- a/package.json +++ b/package.json @@ -18,29 +18,28 @@ "url": "https://roe.dev" }, "exports": { - "./babel": "./lib/babel.js", - "./entrypoint": "./lib/entrypoint.js", - "./module": "./lib/index.js", - "./lib/entrypoint.es": "./lib/entrypoint.es.js", - "./lib/templates/*": "./lib/templates/*", - "./package.json": "./package.json" + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./module": "./dist/module.js", + "./package.json": "./package.json", + "./dist/babel-plugin": "./dist/babel-plugin.js", + "./dist/globals": "./dist/globals.js", + "./dist/runtime/templates/*": "./dist/runtime/templates/*" }, - "types": "lib/entrypoint.d.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "files": [ - "lib/**/*", - "lib/index.d.ts", - "babel.js", - "entrypoint.js", - "module.js", - "!**/*.map" + "dist", + "module.js" ], "scripts": { - "build": "yarn clean && yarn compile", - "clean": "rimraf lib/*", - "clean:fixture": "rimraf dist/ test/fixture/.nuxt", - "compile": "siroc build", + "build": "siroc build", + "clean:fixture": "rimraf test/fixture/dist/ test/fixture/.nuxt", "dev": "nuxt dev test/fixture", - "fixture:generate": "yarn fixture:generate:export && yarn http-server -s -p 5000 dist", + "fixture:generate": "yarn fixture:generate:export && yarn http-server -s -p 5000 test/fixture/dist", "fixture:generate:export": "yarn clean:fixture && cross-env GENERATE=true PORT=6000 CMD=generate yarn nuxt-run", "fixture:prod": "yarn clean:fixture && cross-env CMD=build yarn nuxt-run && cross-env CMD=start yarn nuxt-run", "lint": "run-s lint:all:*", @@ -59,7 +58,7 @@ "test:e2e-ssr": "cross-env PORT=4000 start-server-and-test fixture:prod 4000 \"testcafe firefox:headless test/e2e\"", "test:types": "tsd", "test:unit": "jest", - "watch": "yarn compile -w" + "watch": "yarn build -w" }, "dependencies": { "@vue/composition-api": "1.0.0-rc.6", @@ -73,7 +72,9 @@ "@babel/plugin-transform-runtime": "^7.13.15", "@babel/preset-env": "^7.13.15", "@babel/preset-typescript": "^7.13.0", + "@nuxt/test-utils": "^0.2.1", "@nuxt/types": "^2.15.4", + "@nuxt/typescript-build": "^2.1.0", "@nuxtjs/module-test-utils": "^1.6.3", "@release-it/conventional-changelog": "^2.0.1", "@types/fs-extra": "^9.0.10", diff --git a/siroc.config.js b/siroc.config.js index 76215b0f..be2b62de 100644 --- a/siroc.config.js +++ b/siroc.config.js @@ -1,27 +1,7 @@ import { defineSirocConfig } from 'siroc' -import replace from '@rollup/plugin-replace' -import { resolve } from 'upath' - -import jiti from 'jiti' - -const getFile = jiti() export default defineSirocConfig({ - hooks: { - 'build:extendRollup'(pkg, { rollupConfig }) { - rollupConfig.forEach(config => { - if (!config.plugins) return - config.plugins.push( - replace({ - preventAssignment: true, - values: { - __HELPER_FUNCTIONS__: JSON.stringify( - Object.keys(getFile(resolve(__dirname, './src/entrypoint.ts'))) - ), - }, - }) - ) - }) - }, + rollup: { + externals: ['@nuxtjs/composition-api/dist/globals'], }, }) diff --git a/src/babel-plugin.js b/src/babel-plugin.js new file mode 100644 index 00000000..c4be3fc3 --- /dev/null +++ b/src/babel-plugin.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line +module.exports = require('jiti')(__dirname)('./babel-plugin.ts') diff --git a/src/babel.ts b/src/babel-plugin.ts similarity index 100% rename from src/babel.ts rename to src/babel-plugin.ts diff --git a/src/module/babel.ts b/src/babel-register.ts similarity index 93% rename from src/module/babel.ts rename to src/babel-register.ts index ba895c0e..4cd893d1 100644 --- a/src/module/babel.ts +++ b/src/babel-register.ts @@ -14,10 +14,10 @@ export function registerBabelPlugin(this: ModuleThis) { if (nuxtOptions.build.babel.plugins instanceof Function) { console.warn( - 'Unable to automatically add Babel plugin. Make sure your custom `build.babel.plugins` returns `@nuxtjs/composition-api/babel`' + 'Unable to automatically add Babel plugin. Make sure your custom `build.babel.plugins` returns `@nuxtjs/composition-api/dist/babel-plugin`' ) } else { - nuxtOptions.build.babel.plugins.push(resolveRelativePath('babel')) + nuxtOptions.build.babel.plugins.push(resolveRelativePath('babel-plugin')) } /** diff --git a/src/composables/defineHelpers.ts b/src/composables/defineHelpers.ts deleted file mode 100644 index b39501f5..00000000 --- a/src/composables/defineHelpers.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { - Middleware, - Plugin, - Module, - ServerMiddleware, - NuxtConfig, -} from '@nuxt/types' - -export const defineNuxtPlugin = (plugin: Plugin) => plugin -export const defineNuxtMiddleware = (middleware: Middleware) => middleware -export const defineNuxtModule = >( - module: Module -) => module -export const defineNuxtServerMiddleware = ( - serverMiddleware: ServerMiddleware -) => serverMiddleware -export const defineNuxtConfig = (config: NuxtConfig) => config diff --git a/src/composables/globals.ts b/src/composables/globals.ts deleted file mode 100644 index 59e6578b..00000000 --- a/src/composables/globals.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const globalNuxt = '<%= options.globalNuxt %>'.includes('options') - ? '$nuxt' - : ('<%= options.globalNuxt %>' as '$nuxt') - -export const globalContext = '<%= options.globalContext %>'.includes('options') - ? '__NUXT__' - : ('<%= options.globalContext %>' as '__NUXT__') - -export const isFullStatic = '<%= options.isFullStatic %>'.includes('options') - ? false - : JSON.parse('<%= options.isFullStatic %>') diff --git a/src/entrypoint.ts b/src/entrypoint.ts deleted file mode 100644 index 8a766222..00000000 --- a/src/entrypoint.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './composables' -export * from './vue' diff --git a/src/globals-register.ts b/src/globals-register.ts new file mode 100644 index 00000000..99cfc174 --- /dev/null +++ b/src/globals-register.ts @@ -0,0 +1,41 @@ +import type { ModuleThis } from '@nuxt/types/config/module' +import { withTrailingSlash } from 'ufo' + +import { prepareUseStatic } from './static' +import { + addResolvedTemplate, + getNuxtGlobals, + isFullStatic, + isUrl, +} from './utils' + +export function addGlobalsFile(this: ModuleThis) { + const nuxtOptions = this.options + + const { staticPath } = prepareUseStatic.call(this) + const { globalContext, globalNuxt } = getNuxtGlobals.call(this) + + const routerBase = withTrailingSlash(nuxtOptions.router.base) + const publicPath = withTrailingSlash(nuxtOptions.build.publicPath) + + const globals = { + // useFetch + isFullStatic: isFullStatic(nuxtOptions), + // useStatic + staticPath, + publicPath: isUrl(publicPath) ? publicPath : routerBase, + // Throughout + globalContext, + globalNuxt, + } + + const contents = Object.entries(globals) + .map(([key, value]) => `export const ${key} = ${JSON.stringify(value)}`) + .join('\n') + + const globalsFile = addResolvedTemplate.call(this, 'globals.js', { + contents, + }) + + nuxtOptions.alias['@nuxtjs/composition-api/dist/globals'] = globalsFile +} diff --git a/src/globals.ts b/src/globals.ts new file mode 100644 index 00000000..a375b1c8 --- /dev/null +++ b/src/globals.ts @@ -0,0 +1,11 @@ +// This is a shim for runtime/templates/globals.js + +export const globalNuxt = '$nuxt' + +export const globalContext = '__NUXT__' + +export const isFullStatic = false + +export const staticPath = '/static-path' + +export const publicPath = '/_nuxt/' diff --git a/src/index.ts b/src/index.ts index 4819c840..1b759130 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1 @@ -import compositionApiModule from './module' - -export default compositionApiModule +export * from './runtime/composables' diff --git a/src/module.ts b/src/module.ts new file mode 100644 index 00000000..bbc458e1 --- /dev/null +++ b/src/module.ts @@ -0,0 +1,94 @@ +import type { Module, NuxtOptions } from '@nuxt/types' + +import { name, version } from '../package.json' + +import { registerBabelPlugin } from './babel-register' +import { addGlobalsFile } from './globals-register' +import { + addResolvedTemplate, + resolveCoreJsVersion, + resolveRelativePath, +} from './utils' + +const compositionApiModule: Module = function compositionApiModule() { + const nuxtOptions: NuxtOptions = this.nuxt.options + + // Register globals file where Nuxt config can be accessed from live library + + addGlobalsFile.call(this) + + // Force transpilation of this library (to enable resolution of globals file) + + nuxtOptions.build.transpile = nuxtOptions.build.transpile || [] + nuxtOptions.build.transpile.push('@nuxtjs/composition-api', __dirname) + + // Define @vue/composition-api resolution to prevent using different versions of @vue/composition-api + + nuxtOptions.alias['@vue/composition-api'] = this.nuxt.resolver.resolveModule( + '@vue/composition-api/dist/vue-composition-api.esm.js' + ) + + // Turn off webpack4 module context for .mjs files (as it appears to have some issues) + + this.extendBuild(config => { + if (!config.module) return + + config.module.rules.unshift({ + test: /\.mjs$/, + type: 'javascript/auto', + include: [/node_modules/], + }) + }) + + // Register the Vue Composition API before any other layouts + + this.addLayout(resolveRelativePath('runtime/templates/layout.js'), '0') + + // If we're using nuxt-vite, register vite plugin & inject configuration + + this.nuxt.hook('vite:extend', async (ctx: any) => { + const { compositionApiPlugin } = await import('./vite-plugin') + ctx.config.plugins.push(compositionApiPlugin()) + }) + + // If we're using Babel, register Babel plugin for injecting keys + + registerBabelPlugin.call(this) + + // Add appropriate corejs polyfill for IE support + + addResolvedTemplate.call(this, 'polyfill.client.js', { + corejsPolyfill: resolveCoreJsVersion.call(this), + }) + + // Plugin to allow running onGlobalSetup + const globalPlugin = addResolvedTemplate.call(this, 'plugin.js') + + this.nuxt.hook('modules:done', () => { + nuxtOptions.plugins.unshift(globalPlugin) + }) + + // TODO: remove + // Allow setting head() within onGlobalSetup + + if ( + !nuxtOptions.buildModules.includes('@nuxtjs/pwa') && + !nuxtOptions.modules.includes('@nuxtjs/pwa') + ) { + nuxtOptions.plugins.push(addResolvedTemplate.call(this, 'meta.js')) + } else if (nuxtOptions.dev) { + console.warn( + 'useMeta is not supported in onGlobalSetup as @nuxtjs/pwa detected.\nSee https://github.com/nuxt-community/composition-api/issues/307' + ) + } +} + +// eslint-disable-next-line +// @ts-ignore +compositionApiModule.meta = { + name, + version, +} + +export default compositionApiModule +// export * from './defineHelpers' diff --git a/src/module/index.ts b/src/module/index.ts deleted file mode 100644 index 84fc9c03..00000000 --- a/src/module/index.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { withTrailingSlash } from 'ufo' - -import type { - Module, - NuxtConfig, - NuxtOptions, - ServerMiddleware, -} from '@nuxt/types' - -import { name, version } from '../../package.json' - -import { prepareUseStatic } from './static' -import { - addResolvedTemplate, - getNuxtGlobals, - isFullStatic, - isUrl, - resolveCoreJsVersion, - resolveRelativePath, -} from './utils' -import { compositionApiPlugin } from './vite' -import { registerBabelPlugin } from './babel' - -const compositionApiModule: Module = function compositionApiModule() { - const nuxtOptions: NuxtOptions = this.nuxt.options - - // Register entrypoint (where all user-facing content consumed within vite/webpack is located) - - const { staticPath } = prepareUseStatic.call(this) - const { globalContext, globalNuxt } = getNuxtGlobals.call(this) - - const routerBase = withTrailingSlash(nuxtOptions.router.base) - const publicPath = withTrailingSlash(nuxtOptions.build.publicPath) - - const entryFile = addResolvedTemplate.call(this, 'lib/entrypoint.es', { - // useFetch - isFullStatic: isFullStatic(nuxtOptions), - // useStatic - staticPath, - publicPath: isUrl(publicPath) ? publicPath : routerBase, - // Throughout - globalContext, - globalNuxt, - }) - - nuxtOptions.alias['@nuxtjs/composition-api'] = entryFile - - // Define @vue/composition-api resolution to prevent issues with registrations - - nuxtOptions.alias['@vue/composition-api'] = this.nuxt.resolver.resolveModule( - '@vue/composition-api' - ) - - // Transpile the Nuxt Composition API to force alias resolution - // TODO: remove this when we stop shadowing module - - nuxtOptions.build.transpile = nuxtOptions.build.transpile || [] - nuxtOptions.build.transpile.push('@nuxtjs/composition-api') - - // Register the Vue Composition API before any other layouts - - this.addLayout(resolveRelativePath('lib/templates/layout.js'), '0') - - // If we're using nuxt-vite, register vite plugin & inject configuration - - this.nuxt.hook('vite:extend', (ctx: any) => { - ctx.config.plugins.push(compositionApiPlugin()) - ctx.config.resolve.alias[ - '@vue/composition-api' - ] = this.nuxt.resolver.resolveModule( - '@vue/composition-api/dist/vue-composition-api.esm.js' - ) - // Fake alias to prevent shadowing actual node_module - ctx.config.resolve.alias['~nuxtjs-composition-api'] = entryFile - }) - - // If we're using Babel, register Babel plugin for injecting keys - - registerBabelPlugin.call(this) - - // Add appropriate corejs polyfill for IE support - - addResolvedTemplate.call(this, 'lib/templates/polyfill.client.js', { - corejsPolyfill: resolveCoreJsVersion.call(this), - }) - - // Plugin to allow running onGlobalSetup - const globalPlugin = addResolvedTemplate.call(this, 'lib/templates/plugin.js') - - this.nuxt.hook('modules:done', () => { - nuxtOptions.plugins.unshift(globalPlugin) - }) - - // TODO: remove - // Allow setting head() within onGlobalSetup - - if ( - !nuxtOptions.buildModules.includes('@nuxtjs/pwa') && - !nuxtOptions.modules.includes('@nuxtjs/pwa') - ) { - nuxtOptions.plugins.push( - addResolvedTemplate.call(this, 'lib/templates/meta.js') - ) - } else if (nuxtOptions.dev) { - console.warn( - 'useMeta is not supported in onGlobalSetup as @nuxtjs/pwa detected.\nSee https://github.com/nuxt-community/composition-api/issues/307' - ) - } -} - -// eslint-disable-next-line -// @ts-ignore -compositionApiModule.meta = { - name, - version, -} - -// Force users to register module to import helper functions from '@nuxtjs/composition-api' -// (which are dependent on registration anyway) - -const warnToAddModule = () => { - console.error( - 'You need to add `@nuxtjs/composition-api/module` to your buildModules in order to use it. See https://composition-api.nuxtjs.org/getting-started/setup.' - ) - throw new Error( - 'You need to add `@nuxtjs/composition-api/module` to your buildModules in order to use it. See https://composition-api.nuxtjs.org/getting-started/setup.' - ) -} - -/* eslint-disable @typescript-eslint/ban-ts-comment */ -const helperFunctions: string[] = JSON.parse(`__HELPER_FUNCTIONS__`) -helperFunctions.forEach(helper => { - // @ts-ignore - compositionApiModule[helper] = warnToAddModule -}) - -// Allow using some helper functions directly (required, as these are outside of webpack context) - -// @ts-ignore -compositionApiModule.defineNuxtConfig = (config: NuxtConfig) => config -// @ts-ignore -compositionApiModule.defineServerMiddleware = (smw: ServerMiddleware) => smw -// @ts-ignore -compositionApiModule.defineNuxtModule = (mod: Module) => mod -/* eslint-enable @typescript-eslint/ban-ts-comment */ - -export default compositionApiModule diff --git a/src/composables/async.ts b/src/runtime/composables/async.ts similarity index 93% rename from src/composables/async.ts rename to src/runtime/composables/async.ts index b4bf55e5..402bbcd1 100644 --- a/src/composables/async.ts +++ b/src/runtime/composables/async.ts @@ -1,7 +1,7 @@ import { isRef, onServerPrefetch } from '@vue/composition-api' import type { Ref } from '@vue/composition-api' -import { globalNuxt } from './globals' +import { globalNuxt } from '@nuxtjs/composition-api/dist/globals' import { ssrRef } from './ssr-ref' import { validateKey } from './utils' @@ -13,8 +13,8 @@ import { validateKey } from './utils' * * **At the moment, `useAsync` is only suitable for one-offs, unless you provide your own unique key.** * @param cb The async function that will populate the ref this function returns. - * @param key Under the hood, `useAsync` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/babel` to your Babel plugins. - * + * @param key Under the hood, `useAsync` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/dist/babel-plugin` to your Babel plugins. + * * @example ```ts import { defineComponent, useAsync, computed } from '@nuxtjs/composition-api' diff --git a/src/vue/component.ts b/src/runtime/composables/component.ts similarity index 90% rename from src/vue/component.ts rename to src/runtime/composables/component.ts index 55cfdd63..2c00f377 100644 --- a/src/vue/component.ts +++ b/src/runtime/composables/component.ts @@ -1,6 +1,6 @@ import { defineComponent as define } from '@vue/composition-api' -import { getHeadOptions } from '../composables/meta' +import { getHeadOptions } from './meta' /** * If you want to enable `useMeta`, make sure to include `head: {}` in your component definition. diff --git a/src/composables/context.ts b/src/runtime/composables/context.ts similarity index 97% rename from src/composables/context.ts rename to src/runtime/composables/context.ts index 5ba3cae4..88af6dcd 100644 --- a/src/composables/context.ts +++ b/src/runtime/composables/context.ts @@ -4,7 +4,7 @@ import type { Ref } from '@vue/composition-api' import type { Context } from '@nuxt/types' import type { Route } from 'vue-router' -import { globalNuxt } from './globals' +import { globalNuxt } from '@nuxtjs/composition-api/dist/globals' import { getCurrentInstance } from './utils' interface ContextCallback { diff --git a/src/runtime/composables/defineHelpers.ts b/src/runtime/composables/defineHelpers.ts new file mode 100644 index 00000000..fb4b095c --- /dev/null +++ b/src/runtime/composables/defineHelpers.ts @@ -0,0 +1,4 @@ +import { Middleware, Plugin } from '@nuxt/types' + +export const defineNuxtPlugin = (plugin: Plugin) => plugin +export const defineNuxtMiddleware = (middleware: Middleware) => middleware diff --git a/src/composables/fetch.ts b/src/runtime/composables/fetch.ts similarity index 98% rename from src/composables/fetch.ts rename to src/runtime/composables/fetch.ts index 2c3d93d4..10a7c444 100644 --- a/src/composables/fetch.ts +++ b/src/runtime/composables/fetch.ts @@ -6,7 +6,11 @@ import { set, } from '@vue/composition-api' -import { globalContext, globalNuxt, isFullStatic } from './globals' +import { + globalContext, + globalNuxt, + isFullStatic, +} from '@nuxtjs/composition-api/dist/globals' import type { NuxtApp } from '@nuxt/types/app' import { getCurrentInstance, ComponentInstance } from './utils' diff --git a/src/composables/hooks.ts b/src/runtime/composables/hooks.ts similarity index 100% rename from src/composables/hooks.ts rename to src/runtime/composables/hooks.ts diff --git a/src/composables/index.ts b/src/runtime/composables/index.ts similarity index 74% rename from src/composables/index.ts rename to src/runtime/composables/index.ts index 5fa1316b..18a31130 100644 --- a/src/composables/index.ts +++ b/src/runtime/composables/index.ts @@ -1,10 +1,13 @@ export { useAsync } from './async' +export { defineComponent } from './component' export { useContext, withContext } from './context' +export * from './defineHelpers' export { useFetch } from './fetch' export { globalPlugin, onGlobalSetup, setMetaPlugin } from './hooks' export { useMeta } from './meta' export { reqRef, reqSsrRef } from './req-ref' export { ssrRef, shallowSsrRef, setSSRContext, ssrPromise } from './ssr-ref' export { useStatic } from './static' -export * from './defineHelpers' -export * from './wrappers' +export { useRoute, useRouter, useStore, wrapProperty } from './wrappers' + +export * from './vue' diff --git a/src/composables/meta.ts b/src/runtime/composables/meta.ts similarity index 100% rename from src/composables/meta.ts rename to src/runtime/composables/meta.ts diff --git a/src/composables/req-ref.ts b/src/runtime/composables/req-ref.ts similarity index 100% rename from src/composables/req-ref.ts rename to src/runtime/composables/req-ref.ts diff --git a/src/composables/ssr-ref.ts b/src/runtime/composables/ssr-ref.ts similarity index 95% rename from src/composables/ssr-ref.ts rename to src/runtime/composables/ssr-ref.ts index 06b6011d..86140465 100644 --- a/src/composables/ssr-ref.ts +++ b/src/runtime/composables/ssr-ref.ts @@ -6,7 +6,7 @@ import { } from '@vue/composition-api' import type { Ref } from '@vue/composition-api' -import { globalContext, globalNuxt } from './globals' +import { globalContext, globalNuxt } from '@nuxtjs/composition-api/dist/globals' import { getCurrentInstance, validateKey } from './utils' function getValue(value: T | (() => T)): T { @@ -75,7 +75,7 @@ const ssrValue = ( /** * `ssrRef` will automatically add ref values to `window.__NUXT__` on SSR if they have been changed from their initial value. It can be used outside of components, such as in shared utility functions, and it supports passing a factory function that will generate the initial value of the ref. **At the moment, an `ssrRef` is only suitable for one-offs, unless you provide your own unique key.** * @param value This can be an initial value or a factory function that will be executed on server-side to get the initial value. - * @param key Under the hood, `ssrRef` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/babel` to your Babel plugins. + * @param key Under the hood, `ssrRef` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/dist/babel-plugin` to your Babel plugins. * @example ```ts import { ssrRef } from '@nuxtjs/composition-api' @@ -141,7 +141,7 @@ export const ssrRef = (value: T | (() => T), key?: string): Ref => { /** * This helper creates a [`shallowRef`](https://vue-composition-api-rfc.netlify.app/api.html#shallowref) (a ref that tracks its own .value mutation but doesn't make its value reactive) that is synced between client & server. * @param value This can be an initial value or a factory function that will be executed on server-side to get the initial value. - * @param key Under the hood, `shallowSsrRef` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/babel` to your Babel plugins. + * @param key Under the hood, `shallowSsrRef` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/dist/babel-plugin` to your Babel plugins. * @example ```ts @@ -188,7 +188,7 @@ export const shallowSsrRef = ( /** * `ssrPromise` runs a promise on the server and serialises the result as a resolved promise for the client. It needs to be run within the `setup()` function but note that it returns a promise which will require special handling. (For example, you cannot just return a promise from setup and use it in the template.) * @param value This can be an initial value or a factory function that will be executed on server-side to get the initial value. - * @param key Under the hood, `ssrPromise` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/babel` to your Babel plugins. + * @param key Under the hood, `ssrPromise` requires a key to ensure that the ref values match between client and server. If you have added `@nuxtjs/composition-api/module` to your `buildModules`, this will be done automagically by an injected Babel plugin. If you need to do things differently, you can specify a key manually or add `@nuxtjs/composition-api/dist/babel-plugin` to your Babel plugins. * @example ```ts diff --git a/src/composables/static.ts b/src/runtime/composables/static.ts similarity index 94% rename from src/composables/static.ts rename to src/runtime/composables/static.ts index 1f1b51d2..95a7b792 100644 --- a/src/composables/static.ts +++ b/src/runtime/composables/static.ts @@ -4,9 +4,12 @@ import type { Ref } from '@vue/composition-api' import { joinURL } from 'ufo' import { ssrRef } from './ssr-ref' -import { globalContext } from './globals' +import { + globalContext, + staticPath, + publicPath as _publicPath, +} from '@nuxtjs/composition-api/dist/globals' -const staticPath = '<%= options.staticPath %>' const staticCache: Record = {} function writeFile(key: string, value: string) { @@ -26,8 +29,8 @@ function writeFile(key: string, value: string) { } } /** - * You can pre-run expensive functions using `useStatic`. - * + * You can pre-run expensive functions using `useStatic`. + * * __SSG__ * If you are generating the whole app (or just prerendering some routes with `nuxt build && nuxt generate --no-build`) the following behaviour will be unlocked: @@ -37,7 +40,7 @@ function writeFile(key: string, value: string) { If you are pregenerating some pages in your app note that you may need to increase `generate.interval`. (See [setup instructions](https://composition-api.nuxtjs.org/setup.html).) - * + * * __SSR__ * If the route is not pre-generated (including in dev mode), then: @@ -81,8 +84,7 @@ export const useStatic = ( if (process.client) { const publicPath = - (window as any)[globalContext].$config?.app?.cdnURL || - '<%= options.publicPath %>' + (window as any)[globalContext].$config?.app?.cdnURL || _publicPath const onFailure = () => factory(param.value, key.value).then(r => { staticCache[key.value] = r diff --git a/src/composables/utils.ts b/src/runtime/composables/utils.ts similarity index 84% rename from src/composables/utils.ts rename to src/runtime/composables/utils.ts index 96bed178..fb47f736 100644 --- a/src/composables/utils.ts +++ b/src/runtime/composables/utils.ts @@ -4,7 +4,7 @@ import { getCurrentInstance as getVM } from '@vue/composition-api' export function validateKey(key?: T): asserts key is T { if (!key) { throw new Error( - "You must provide a key. You can have it generated automatically by adding '@nuxtjs/composition-api/babel' to your Babel plugins." + "You must provide a key. You can have it generated automatically by adding '@nuxtjs/composition-api/dist/babel-plugin' to your Babel plugins." ) } } diff --git a/src/vue/index.ts b/src/runtime/composables/vue.ts similarity index 100% rename from src/vue/index.ts rename to src/runtime/composables/vue.ts diff --git a/src/composables/wrappers.ts b/src/runtime/composables/wrappers.ts similarity index 100% rename from src/composables/wrappers.ts rename to src/runtime/composables/wrappers.ts diff --git a/src/runtime/templates/globals.js b/src/runtime/templates/globals.js new file mode 100644 index 00000000..1ff9d86b --- /dev/null +++ b/src/runtime/templates/globals.js @@ -0,0 +1 @@ +<%= options.contents %> \ No newline at end of file diff --git a/src/templates/layout.ts b/src/runtime/templates/layout.js similarity index 100% rename from src/templates/layout.ts rename to src/runtime/templates/layout.js diff --git a/src/templates/meta.ts b/src/runtime/templates/meta.js similarity index 100% rename from src/templates/meta.ts rename to src/runtime/templates/meta.js diff --git a/src/templates/plugin.ts b/src/runtime/templates/plugin.js similarity index 100% rename from src/templates/plugin.ts rename to src/runtime/templates/plugin.js diff --git a/src/templates/polyfill.client.ts b/src/runtime/templates/polyfill.client.js similarity index 100% rename from src/templates/polyfill.client.ts rename to src/runtime/templates/polyfill.client.js diff --git a/src/module/static.ts b/src/static.ts similarity index 100% rename from src/module/static.ts rename to src/static.ts diff --git a/src/module/utils.ts b/src/utils.ts similarity index 89% rename from src/module/utils.ts rename to src/utils.ts index 6d84f802..70d5783c 100644 --- a/src/module/utils.ts +++ b/src/utils.ts @@ -1,6 +1,6 @@ import { NuxtConfig, NuxtOptions } from '@nuxt/types' import { ModuleThis } from '@nuxt/types/config/module' -import { basename, join } from 'upath' +import { basename, join, resolve } from 'upath' export function isFullStatic(options: NuxtConfig) { return ( @@ -15,8 +15,8 @@ export function isUrl(url: string) { return ['http', '//'].some(str => url.startsWith(str)) } -export function resolveRelativePath(id: string) { - return require.resolve(`@nuxtjs/composition-api/${id}`) +export function resolveRelativePath(...path: string[]) { + return resolve(__dirname, ...path) } export function addResolvedTemplate( @@ -26,7 +26,7 @@ export function addResolvedTemplate( ) { const nuxtOptions: NuxtOptions = this.nuxt.options - const src = resolveRelativePath(template) + const src = resolveRelativePath(join('runtime/templates', template)) const { dst } = this.addTemplate({ src, fileName: join('composition-api', basename(src)), diff --git a/src/module/vite.ts b/src/vite-plugin.ts similarity index 95% rename from src/module/vite.ts rename to src/vite-plugin.ts index c8864505..c1543575 100644 --- a/src/module/vite.ts +++ b/src/vite-plugin.ts @@ -17,10 +17,6 @@ export function compositionApiPlugin(): Plugin & { enforce: 'pre' } { name: 'nuxt:composition-api', enforce: 'pre', transform(code: string, filename: string) { - code = code.replace( - /@nuxtjs[\\/]composition-api/g, - '~nuxtjs-composition-api' - ) const keyedFunctions = /(useStatic|shallowSsrRef|ssrPromise|ssrRef|reqSsrRef|useAsync)/ if (!keyedFunctions.test(code)) { return { diff --git a/test/fixture/nuxt.config.ts b/test/fixture/nuxt.config.ts index 62c33717..08f21ee5 100644 --- a/test/fixture/nuxt.config.ts +++ b/test/fixture/nuxt.config.ts @@ -1,18 +1,20 @@ -import { resolve } from 'upath' +import { join, resolve } from 'upath' import type { NuxtConfig } from '@nuxt/types' +import compositionAPIModule from '../../src/module' const routes = ['/route/a', '/static/1', '/static/2', '/static/3'] const interval = 3000 -const isGenerated = [process.env.GENERATE, process.env.NOW_BUILD].includes( - 'true' -) -const isPublic = process.env.NOW_BUILD === 'true' -const isTesting = process.env.NODE_ENV !== 'development' && !isPublic +const isGenerated = process.env.GENERATE === 'true' +const isTesting = process.env.NODE_ENV !== 'development' const rootDir = resolve(__dirname, '../..') export default { + alias: { + '@nuxtjs/composition-api/dist/globals': join(rootDir, 'src/globals'), + '@nuxtjs/composition-api': join(rootDir, 'src'), + }, target: isGenerated ? 'static' : 'server', publicRuntimeConfig: { globalInject: 'injected', @@ -51,23 +53,12 @@ export default { } : {}), generate: { - dir: isPublic ? 'dist/fixture' : undefined, + dir: 'test/fixture/dist', crawler: false, routes, interval, }, - router: { - base: isPublic ? '/fixture/' : undefined, - }, - watch: ['../../lib/**/*.js'], - build: { - publicPath: isPublic ? 'fixture' : undefined, - }, - buildModules: [ - process.env.NODE_ENV === 'test' - ? require('../../module') - : resolve(rootDir, './module.js'), - ], + buildModules: ['@nuxt/typescript-build', compositionAPIModule as any], pwa: { icon: false, manifest: false, diff --git a/test/tsd/createHelpers.test-d.ts b/test/tsd/createHelpers.test-d.ts index f91b6291..11c21af5 100644 --- a/test/tsd/createHelpers.test-d.ts +++ b/test/tsd/createHelpers.test-d.ts @@ -1,9 +1,7 @@ import { defineNuxtPlugin, defineNuxtMiddleware, - defineNuxtModule, - defineNuxtServerMiddleware, -} from '../..' +} from '../../src/runtime/composables/defineHelpers' import { expectType } from 'tsd' defineNuxtPlugin((context, inject) => { @@ -14,24 +12,8 @@ defineNuxtPlugin((context, inject) => { inject('hello', hello) }) -defineNuxtModule<{ - option: string -}>(function (options) { - // expectType(this.options.rootDir) - - this.addPlugin('filename') - - expectType(options.option) -}) - defineNuxtMiddleware(({ store, redirect }) => { if (!store.state.authenticated) { return redirect('/login') } }) - -defineNuxtServerMiddleware((req, res, next) => { - expectType(req.url) - - next() -}) diff --git a/test/unit/babel-ssr-ref.spec.ts b/test/unit/babel-ssr-ref.spec.ts index a3fbcdd3..05b4d340 100644 --- a/test/unit/babel-ssr-ref.spec.ts +++ b/test/unit/babel-ssr-ref.spec.ts @@ -1,7 +1,6 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -const babel = require('@babel/core') -const plugin = require('../../lib/babel') -/* eslint-enable */ +import { transform } from '@babel/core' + +import plugin from '../../src/babel-plugin' const example = ` const ref = ref(1) @@ -19,7 +18,7 @@ const stat3 = useStatic(() => 4) describe('ssrRef babel plugin', () => { it('works', () => { - const { code } = babel.transform(example, { plugins: [plugin] })! + const { code } = transform(example, { plugins: [plugin] }) expect(code).toMatchSnapshot() }) }) diff --git a/test/unit/ssr-ref.spec.ts b/test/unit/ssr-ref.spec.ts index 6f5c257c..c972dcfa 100644 --- a/test/unit/ssr-ref.spec.ts +++ b/test/unit/ssr-ref.spec.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom */ -import { ssrRef, globalPlugin } from '../../lib/entrypoint' +import { ssrRef, globalPlugin } from '../../src/runtime/composables' import * as cAPI from '@vue/composition-api' describe('ssrRef reactivity', () => { diff --git a/tsconfig.json b/tsconfig.json index db2f9ad1..e50b1cd1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,22 +1,21 @@ { "compilerOptions": { + "baseUrl": ".", + "rootDir": ".", "strict": true, "sourceMap": true, - "target": "es2018", - "module": "esnext", - "lib": ["esnext", "dom"], + "target": "ESNext", + "module": "CommonJS", + "moduleResolution": "Node", + "lib": ["ESNext", "DOM"], "esModuleInterop": true, - "moduleResolution": "node", - "rootDir": ".", "resolveJsonModule": true, - "outDir": "lib", - "declaration": false, - "skipLibCheck": true, "allowSyntheticDefaultImports": true, "paths": { - "@nuxtjs/composition-api": ["./src/entrypoint.ts"] + "@nuxtjs/composition-api/dist/globals": ["./src/globals.ts"], + "@nuxtjs/composition-api": ["./src/index.ts"] }, "types": ["node", "@nuxt/types", "jest"] }, - "exclude": ["node_modules", "lib"] + "include": ["src/**/*.ts", "test/fixture/**/*.vue", "test/fixture/**/*.ts"] } diff --git a/yarn.lock b/yarn.lock index 5b3c5f84..858867d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,7 +9,7 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.8.3": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== @@ -69,7 +69,7 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.13.0", "@babel/generator@^7.13.9": +"@babel/generator@^7.13.9": version "7.13.9" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39" integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw== @@ -93,17 +93,7 @@ "@babel/helper-explode-assignable-expression" "^7.12.13" "@babel/types" "^7.12.13" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.13.10", "@babel/helper-compilation-targets@^7.13.8": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz#1310a1678cb8427c07a753750da4f8ce442bdd0c" - integrity sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA== - dependencies: - "@babel/compat-data" "^7.13.8" - "@babel/helper-validator-option" "^7.12.17" - browserslist "^4.14.5" - semver "^6.3.0" - -"@babel/helper-compilation-targets@^7.13.13": +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.13.10", "@babel/helper-compilation-targets@^7.13.13", "@babel/helper-compilation-targets@^7.13.8": version "7.13.13" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz#2b2972a0926474853f41e4adbc69338f520600e5" integrity sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ== @@ -191,50 +181,21 @@ "@babel/traverse" "^7.13.0" "@babel/types" "^7.13.0" -"@babel/helper-member-expression-to-functions@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz#6aa4bb678e0f8c22f58cdb79451d30494461b091" - integrity sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ== - dependencies: - "@babel/types" "^7.13.0" - -"@babel/helper-member-expression-to-functions@^7.13.12": +"@babel/helper-member-expression-to-functions@^7.13.0", "@babel/helper-member-expression-to-functions@^7.13.12": version "7.13.12" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz#dfe368f26d426a07299d8d6513821768216e6d72" integrity sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw== dependencies: "@babel/types" "^7.13.12" -"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0" - integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-module-imports@^7.13.12": +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.13.12": version "7.13.12" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz#c6a369a6f3621cb25da014078684da9196b61977" integrity sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA== dependencies: "@babel/types" "^7.13.12" -"@babel/helper-module-transforms@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz#42eb4bd8eea68bab46751212c357bfed8b40f6f1" - integrity sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw== - dependencies: - "@babel/helper-module-imports" "^7.12.13" - "@babel/helper-replace-supers" "^7.13.0" - "@babel/helper-simple-access" "^7.12.13" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/helper-validator-identifier" "^7.12.11" - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" - lodash "^4.17.19" - -"@babel/helper-module-transforms@^7.13.14": +"@babel/helper-module-transforms@^7.13.0", "@babel/helper-module-transforms@^7.13.14": version "7.13.14" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz#e600652ba48ccb1641775413cb32cfa4e8b495ef" integrity sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g== @@ -269,17 +230,7 @@ "@babel/helper-wrap-function" "^7.13.0" "@babel/types" "^7.13.0" -"@babel/helper-replace-supers@^7.12.13", "@babel/helper-replace-supers@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz#6034b7b51943094cb41627848cb219cb02be1d24" - integrity sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.13.0" - "@babel/helper-optimise-call-expression" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" - -"@babel/helper-replace-supers@^7.13.12": +"@babel/helper-replace-supers@^7.12.13", "@babel/helper-replace-supers@^7.13.0", "@babel/helper-replace-supers@^7.13.12": version "7.13.12" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz#6442f4c1ad912502481a564a7386de0c77ff3804" integrity sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw== @@ -289,14 +240,7 @@ "@babel/traverse" "^7.13.0" "@babel/types" "^7.13.12" -"@babel/helper-simple-access@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz#8478bcc5cacf6aa1672b251c1d2dde5ccd61a6c4" - integrity sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-simple-access@^7.13.12": +"@babel/helper-simple-access@^7.12.13", "@babel/helper-simple-access@^7.13.12": version "7.13.12" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz#dd6c538afb61819d205a012c31792a39c7a5eaf6" integrity sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA== @@ -355,16 +299,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.10.tgz#8f8f9bf7b3afa3eabd061f7a5bcdf4fec3c48409" - integrity sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ== - -"@babel/parser@^7.13.13": +"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.13": version "7.13.13" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.13.tgz#42f03862f4aed50461e543270916b47dd501f0df" integrity sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw== +"@babel/parser@^7.13.10": + version "7.13.15" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.15.tgz#8e66775fb523599acb6a289e12929fa5ab0954d8" + integrity sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ== + "@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" @@ -1161,22 +1105,7 @@ "@babel/parser" "^7.12.13" "@babel/types" "^7.12.13" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc" - integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.0" - "@babel/helper-function-name" "^7.12.13" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/parser" "^7.13.0" - "@babel/types" "^7.13.0" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/traverse@^7.13.13": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.13.13": version "7.13.13" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.13.tgz#39aa9c21aab69f74d948a486dd28a2dbdbf5114d" integrity sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg== @@ -1190,16 +1119,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.12.17", "@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.13.12" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.12.tgz#edbf99208ef48852acdff1c8a681a1e4ade580cd" - integrity sha512-K4nY2xFN4QMvQwkQ+zmBDp6ANMbVNw6BbxWmYA4qNjhR9W+Lj/8ky5MEY2Me5r+B2c6/v6F53oMndG+f9s3IiA== - dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.13.13", "@babel/types@^7.13.14": +"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.12.17", "@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.13.13", "@babel/types@^7.13.14", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.13.14" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.14.tgz#c35a4abb15c7cd45a2746d78ab328e362cbace0d" integrity sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ== @@ -1701,6 +1621,17 @@ rc9 "^1.2.0" std-env "^2.2.1" +"@nuxt/test-utils@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@nuxt/test-utils/-/test-utils-0.2.1.tgz#cc91e1217087d5b78ad8b7acbca16c825dc9d053" + integrity sha512-HbkaD4vSGYWOK88O5msmAnVetSyQbecElFWaFnBGDPj5Ua6WegdIpS6n7hRVUXjNRMbORgx0blDESClvTzRcuQ== + dependencies: + "@babel/preset-typescript" "^7.13.0" + consola "^2.15.3" + defu "^3.2.2" + get-port "^5.1.1" + got "^11.8.2" + "@nuxt/types@^2.15.4": version "2.15.4" resolved "https://registry.yarnpkg.com/@nuxt/types/-/types-2.15.4.tgz#7d385757eb4faa28bb03cddc5f677c5c6677ab42" @@ -1725,6 +1656,16 @@ "@types/webpack-hot-middleware" "^2.25.4" sass-loader "^10.1.1" +"@nuxt/typescript-build@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@nuxt/typescript-build/-/typescript-build-2.1.0.tgz#191fe60e942ce84a01468ba6e255744e01c7c538" + integrity sha512-7TLMpfzgOckf3cBkzoPFns6Xl8FzY6MoFfm/5HUE47QeTWAdOG9ZFxMrVhHWieZHYUuV+k6byRtaRv4S/3R8zA== + dependencies: + consola "^2.15.3" + fork-ts-checker-webpack-plugin "^6.1.1" + ts-loader "^8.0.17" + typescript "~4.2" + "@nuxt/utils@2.15.4": version "2.15.4" resolved "https://registry.yarnpkg.com/@nuxt/utils/-/utils-2.15.4.tgz#1c84dfa964357224a79d402797c9feab2040991c" @@ -1884,11 +1825,6 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^5.3.2": - version "5.3.2" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-5.3.2.tgz#b8ac43c5c3d00aef61a34cf744e315110c78deb4" - integrity sha512-NxF1yfYOUO92rCx3dwvA2onF30Vdlg7YUkMVXkeptqpzA3tRLplThhFleV/UKWFgh7rpKu1yYRbvNDUtzSopKA== - "@octokit/openapi-types@^6.0.0": version "6.0.0" resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-6.0.0.tgz#7da8d7d5a72d3282c1a3ff9f951c8133a707480d" @@ -1947,14 +1883,7 @@ "@octokit/plugin-request-log" "^1.0.2" "@octokit/plugin-rest-endpoint-methods" "5.0.0" -"@octokit/types@^6.0.3", "@octokit/types@^6.11.0", "@octokit/types@^6.7.1": - version "6.12.2" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.12.2.tgz#5b44add079a478b8eb27d78cf384cc47e4411362" - integrity sha512-kCkiN8scbCmSq+gwdJV0iLgHc0O/GTPY1/cffo9kECu1MvatLPh9E+qFhfRIktKfHEA6ZYvv6S1B4Wnv3bi3pA== - dependencies: - "@octokit/openapi-types" "^5.3.2" - -"@octokit/types@^6.13.0": +"@octokit/types@^6.0.3", "@octokit/types@^6.11.0", "@octokit/types@^6.13.0", "@octokit/types@^6.7.1": version "6.13.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.13.0.tgz#779e5b7566c8dde68f2f6273861dd2f0409480d0" integrity sha512-W2J9qlVIU11jMwKHUp5/rbVUeErqelCsO5vW5PKNb7wAXQVUz87Rc+imjlEvpvbH8yUb+KHmv8NEjVZdsdpyxA== @@ -2113,18 +2042,7 @@ "@types/browserslist" "*" postcss "7.x.x" -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": - version "7.1.12" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.12.tgz#4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d" - integrity sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__core@^7.1.14": +"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14", "@types/babel__core@^7.1.7": version "7.1.14" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402" integrity sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g== @@ -2320,7 +2238,7 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": +"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== @@ -2479,12 +2397,7 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== -"@types/tapable@*", "@types/tapable@^1.0.5": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.6.tgz#a9ca4b70a18b270ccb2bc0aaafefd1d486b7ea74" - integrity sha512-W+bw9ds02rAQaMvaLYxAbJ6cvguW/iJXNT6lTssS1ps6QdrMKttqEAMEG/b5CR8TZl3/L7/lH0ZV5nNR1LXikA== - -"@types/tapable@^1": +"@types/tapable@^1", "@types/tapable@^1.0.5": version "1.0.7" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.7.tgz#545158342f949e8fd3bfd813224971ecddc3fac4" integrity sha512-0VBprVqfgFD7Ehb2vd8Lh9TG3jP98gvr8rgehQqzztZNI7o8zS8Ad4jyZneKELphpuE212D8J70LnSNQSyO6bQ== @@ -2528,7 +2441,7 @@ "@types/source-list-map" "*" source-map "^0.7.3" -"@types/webpack@^4", "@types/webpack@^4.41.27": +"@types/webpack@^4", "@types/webpack@^4.41.27", "@types/webpack@^4.41.8": version "4.41.27" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.27.tgz#f47da488c8037e7f1b2dbf2714fbbacb61ec0ffc" integrity sha512-wK/oi5gcHi72VMTbOaQ70VcDxSQ1uX8S2tukBK9ARuGXrYM/+u4ou73roc7trXDNmCxCoerE8zruQqX/wuHszA== @@ -2540,18 +2453,6 @@ "@types/webpack-sources" "*" source-map "^0.6.0" -"@types/webpack@^4.41.8": - version "4.41.26" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.26.tgz#27a30d7d531e16489f9c7607c747be6bc1a459ef" - integrity sha512-7ZyTfxjCRwexh+EJFwRUM+CDB2XvgHl4vfuqf1ZKrgGvcS5BrNvPQqJh3tsZ0P6h6Aa1qClVHaJZszLPzpqHeA== - dependencies: - "@types/anymatch" "*" - "@types/node" "*" - "@types/tapable" "*" - "@types/uglify-js" "*" - "@types/webpack-sources" "*" - source-map "^0.6.0" - "@types/yargs-parser@*": version "20.2.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" @@ -2578,7 +2479,7 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.21.0": +"@typescript-eslint/experimental-utils@4.21.0", "@typescript-eslint/experimental-utils@^4.0.1": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.21.0.tgz#0b0bb7c15d379140a660c003bdbafa71ae9134b6" integrity sha512-cEbgosW/tUFvKmkg3cU7LBoZhvUs+ZPVM9alb25XvR0dal4qHL3SiUqHNrzoWSxaXA9gsifrYrS1xdDV6w/gIA== @@ -2590,18 +2491,6 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/experimental-utils@^4.0.1": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.20.0.tgz#a8ab2d7b61924f99042b7d77372996d5f41dc44b" - integrity sha512-sQNlf6rjLq2yB5lELl3gOE7OuoA/6IVXJUJ+Vs7emrQMva14CkOwyQwD7CW+TkmOJ4Q/YGmoDLmbfFrpGmbKng== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.20.0" - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/typescript-estree" "4.20.0" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" - "@typescript-eslint/parser@^4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.21.0.tgz#a227fc2af4001668c3e3f7415d4feee5093894c1" @@ -2612,14 +2501,6 @@ "@typescript-eslint/typescript-estree" "4.21.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.20.0.tgz#953ecbf3b00845ece7be66246608be9d126d05ca" - integrity sha512-/zm6WR6iclD5HhGpcwl/GOYDTzrTHmvf8LLLkwKqqPKG6+KZt/CfSgPCiybshmck66M2L5fWSF/MKNuCwtKQSQ== - dependencies: - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/visitor-keys" "4.20.0" - "@typescript-eslint/scope-manager@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.21.0.tgz#c81b661c4b8af1ec0c010d847a8f9ab76ab95b4d" @@ -2628,29 +2509,11 @@ "@typescript-eslint/types" "4.21.0" "@typescript-eslint/visitor-keys" "4.21.0" -"@typescript-eslint/types@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.20.0.tgz#c6cf5ef3c9b1c8f699a9bbdafb7a1da1ca781225" - integrity sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w== - "@typescript-eslint/types@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.21.0.tgz#abdc3463bda5d31156984fa5bc316789c960edef" integrity sha512-+OQaupjGVVc8iXbt6M1oZMwyKQNehAfLYJJ3SdvnofK2qcjfor9pEM62rVjBknhowTkh+2HF+/KdRAc/wGBN2w== -"@typescript-eslint/typescript-estree@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz#8b3b08f85f18a8da5d88f65cb400f013e88ab7be" - integrity sha512-Knpp0reOd4ZsyoEJdW8i/sK3mtZ47Ls7ZHvD8WVABNx5Xnn7KhenMTRGegoyMTx6TiXlOVgMz9r0pDgXTEEIHA== - dependencies: - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/visitor-keys" "4.20.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.21.0.tgz#3817bd91857beeaeff90f69f1f112ea58d350b0a" @@ -2664,14 +2527,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz#1e84db034da13f208325e6bfc995c3b75f7dbd62" - integrity sha512-NXKRM3oOVQL8yNFDNCZuieRIwZ5UtjNLYtmMx2PacEAGmbaEYtGgVHUHVyZvU/0rYZcizdrWjDo+WBtRPSgq+A== - dependencies: - "@typescript-eslint/types" "4.20.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.21.0": version "4.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.21.0.tgz#990a9acdc124331f5863c2cf21c88ba65233cd8d" @@ -3039,7 +2894,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -4042,12 +3897,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001181: - version "1.0.30001198" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001198.tgz#ed2d9b5f060322ba2efa42afdc56dee3255473f4" - integrity sha512-r5GGgESqOPZzwvdLVER374FpQu2WluCF1Z2DSiFJ89KSmGjT0LVKjgv4NcAqHmGWF9ihNpqRI9KXO9Ex4sKsgA== - -caniuse-lite@^1.0.30001205: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001181, caniuse-lite@^1.0.30001205: version "1.0.30001205" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz#d79bf6a6fb13196b4bb46e5143a22ca0242e0ef8" integrity sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og== @@ -4151,7 +4001,7 @@ chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.4.1, chokidar@^3.5.1: +chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== @@ -4793,6 +4643,17 @@ cosmiconfig@^5.0.0: js-yaml "^3.13.1" parse-json "^4.0.0" +cosmiconfig@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" + integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.7.2" + crc@^3.8.0: version "3.8.0" resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" @@ -5660,7 +5521,7 @@ endpoint-utils@^1.0.2: ip "^1.1.3" pinkie-promise "^1.0.0" -enhanced-resolve@^4.1.1, enhanced-resolve@^4.5.0: +enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.1, enhanced-resolve@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== @@ -6433,6 +6294,24 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +fork-ts-checker-webpack-plugin@^6.1.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.2.0.tgz#d13af02e24d1b17f769af6bdf41c1e849e1615cc" + integrity sha512-DTNbOhq6lRdjYprukX54JMeYJgQ0zMow+R5BMLwWxEX2NAXthIkwnV8DBmsWjwNLSUItKZM4TCCJbtgrtKBu2Q== + dependencies: + "@babel/code-frame" "^7.8.3" + "@types/json-schema" "^7.0.5" + chalk "^4.1.0" + chokidar "^3.4.2" + cosmiconfig "^6.0.0" + deepmerge "^4.2.2" + fs-extra "^9.0.0" + memfs "^3.1.2" + minimatch "^3.0.4" + schema-utils "2.7.0" + semver "^7.3.2" + tapable "^1.0.0" + form-data@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -6485,7 +6364,7 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.1.0: +fs-extra@^9.0.0, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -6786,7 +6665,7 @@ globby@10.0.0: merge2 "^1.2.3" slash "^3.0.0" -globby@11.0.3, globby@^11.0.3: +globby@11.0.3, globby@^11.0.1, globby@^11.0.2, globby@^11.0.3: version "11.0.3" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== @@ -6812,18 +6691,6 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.1, globby@^11.0.2: - version "11.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" - integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -6849,7 +6716,7 @@ globby@^9.2.0: pify "^4.0.1" slash "^2.0.0" -got@11.8.2: +got@11.8.2, got@^11.8.2: version "11.8.2" resolved "https://registry.yarnpkg.com/got/-/got-11.8.2.tgz#7abb3959ea28c31f3576f1576c1effce23f33599" integrity sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ== @@ -7353,7 +7220,7 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -8427,12 +8294,7 @@ jest@^26.6.3: import-local "^3.0.2" jest-cli "^26.6.3" -jiti@^1.3.0, jiti@^1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.6.3.tgz#722fb45ee03b01af87314f80aeae07762f9ffb7e" - integrity sha512-4oOM9K5MgVx9kiv8zo2B/8SIpKQ/rkaREskE+H8ymvF08mC8PAKnd0bbZ1FV5DTyoOOto9mapMpvZWA06reWKw== - -jiti@^1.6.4: +jiti@^1.3.0, jiti@^1.6.3, jiti@^1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.6.4.tgz#63453b602d0234f8bd7ce638f03f0e74ef99be12" integrity sha512-ICUtP0/rAyT/GaaDG0vj6fmWzx5yjFc7v+L1MAEARGl1+lrdJ8wtJNChr+ZGEdPoOhFwdhtcDO5VM2TNNgPpjQ== @@ -9106,10 +8968,10 @@ mem@^8.0.0: map-age-cleaner "^0.1.3" mimic-fn "^3.1.0" -memfs@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.2.0.tgz#f9438e622b5acd1daa8a4ae160c496fdd1325b26" - integrity sha512-f/xxz2TpdKv6uDn6GtHee8ivFyxwxmPuXatBb1FBwxYNuVpbM3k/Y1Z+vC0mH/dIXXrukYfe3qe5J32Dfjg93A== +memfs@^3.1.2, memfs@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.2.1.tgz#12301801a14eb3daa9f7491aa0ff09ffec519dd0" + integrity sha512-Y5vcpQzWTime4fBTr/fEnxXUxEYUgKbDlty1WX0gaa4ae14I6KmvK1S8HtXOX0elKAE6ENZJctkGtbTFYcRIUw== dependencies: fs-monkey "1.0.1" @@ -9227,7 +9089,7 @@ micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -micromatch@^4.0.2: +micromatch@^4.0.0, micromatch@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== @@ -12020,6 +11882,15 @@ saxes@^5.0.0: dependencies: xmlchars "^2.2.0" +schema-utils@2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" + integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== + dependencies: + "@types/json-schema" "^7.0.4" + ajv "^6.12.2" + ajv-keywords "^3.4.1" + schema-utils@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" @@ -12084,7 +11955,7 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.3.5, semver@^7.3.5: +semver@7.3.5, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -12096,13 +11967,6 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -13461,6 +13325,17 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" +ts-loader@^8.0.17: + version "8.1.0" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.1.0.tgz#d6292487df279c7cc79b6d3b70bb9d31682b693e" + integrity sha512-YiQipGGAFj2zBfqLhp28yUvPP9jUGqHxRzrGYuc82Z2wM27YIHbElXiaZDc93c3x0mz4zvBmS6q/DgExpdj37A== + dependencies: + chalk "^4.1.0" + enhanced-resolve "^4.0.0" + loader-utils "^2.0.0" + micromatch "^4.0.0" + semver "^7.3.4" + ts-pnp@^1.1.6: version "1.2.0" resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" @@ -13573,7 +13448,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.2.4: +typescript@4.2.4, typescript@^4.2.3, typescript@~4.2: version "4.2.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== @@ -13583,22 +13458,12 @@ typescript@^3.3.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674" integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w== -typescript@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" - integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== - ua-parser-js@^0.7.26: version "0.7.26" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.26.tgz#b3731860e241419abd5b542b1a0881070d92e0ce" integrity sha512-VwIvGlFNmpKbjzRt51jpbbFTrKIEgGHxIwA8Y69K1Bqc6bTIV7TaGGABOkghSFQWsLmcRB4drGvpfv9z2szqoQ== -ufo@^0.6.10: - version "0.6.10" - resolved "https://registry.yarnpkg.com/ufo/-/ufo-0.6.10.tgz#c7ace9b8f72cb08c35e3a8c8edc76f062fbaa7d0" - integrity sha512-sMbJnrBcKKsbVyr6++hb0n9lCmrMqkJrNnJIOJ3sckeqY6NMfAULcRGbBWcASSnN1HDV3YqiGCPzi9RVs511bw== - -ufo@^0.6.11: +ufo@^0.6.10, ufo@^0.6.11: version "0.6.11" resolved "https://registry.yarnpkg.com/ufo/-/ufo-0.6.11.tgz#69311ed4abc8ab671c83754b79ce0d396fea1075" integrity sha512-Yu7TJThwlr23peOkX/+hm6LfkyBs+eDWV880468PTrjKBKjjsNWFFwIuOqDfmXngRo9TZ4+twFYueRH0OLl0Gw== @@ -14412,7 +14277,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@1.10.2, yaml@^1.10.0: +yaml@1.10.2, yaml@^1.10.0, yaml@^1.7.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==