From eca9a831a12ed4432ef33b1120b8513a27a38203 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Tue, 1 Mar 2022 11:57:57 -0500 Subject: [PATCH 01/21] wip --- npm/vite-dev-server/cypress.config.ts | 2 + npm/vite-dev-server/package.json | 10 +- npm/vite-dev-server/src/index.ts | 57 +++--- npm/vite-dev-server/src/makeCypressPlugin.ts | 182 ------------------ npm/vite-dev-server/src/plugins/inspect.ts | 30 +++ npm/vite-dev-server/src/plugins/server.ts | 66 +++++++ npm/vite-dev-server/src/resolveConfig.ts | 41 ++++ .../src/resolveServerConfig.ts | 81 -------- npm/vite-dev-server/src/types.ts | 14 ++ .../cypress/e2e/support/e2eProjectDirs.ts | 2 + yarn.lock | 2 +- 11 files changed, 196 insertions(+), 291 deletions(-) delete mode 100644 npm/vite-dev-server/src/makeCypressPlugin.ts create mode 100644 npm/vite-dev-server/src/plugins/inspect.ts create mode 100644 npm/vite-dev-server/src/plugins/server.ts create mode 100644 npm/vite-dev-server/src/resolveConfig.ts delete mode 100644 npm/vite-dev-server/src/resolveServerConfig.ts create mode 100644 npm/vite-dev-server/src/types.ts diff --git a/npm/vite-dev-server/cypress.config.ts b/npm/vite-dev-server/cypress.config.ts index a4ab7048fa47..4ef17e877656 100644 --- a/npm/vite-dev-server/cypress.config.ts +++ b/npm/vite-dev-server/cypress.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from 'cypress' import { devServer } from './dist' +console.log('top level') export default defineConfig({ 'pluginsFile': 'cypress/plugins.js', 'video': false, @@ -8,6 +9,7 @@ export default defineConfig({ 'component': { 'supportFile': 'cypress/support.js', devServer (cypressDevServerConfig) { + console.log('inside') const path = require('path') return devServer(cypressDevServerConfig, { diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json index 354a3a246d27..33941c626685 100644 --- a/npm/vite-dev-server/package.json +++ b/npm/vite-dev-server/package.json @@ -2,7 +2,7 @@ "name": "@cypress/vite-dev-server", "version": "0.0.0-development", "description": "Launches Vite Dev Server for Component Testing", - "main": "index.js", + "main": "dist/index.js", "scripts": { "build": "tsc || echo 'built, with type errors'", "build-prod": "tsc || echo 'built, with type errors'", @@ -14,8 +14,12 @@ "watch": "tsc -w" }, "dependencies": { - "debug": "^4.3.2", - "get-port": "^5.1.1" + "debug": "4.3.3", + "dedent": "0.7.0", + "find-up": "6.3.0", + "get-port": "5.1.1", + "pathe": "0.2.0", + "ufo": "0.7.10" }, "devDependencies": { "@cypress/react": "0.0.0-development", diff --git a/npm/vite-dev-server/src/index.ts b/npm/vite-dev-server/src/index.ts index b4b14e42fa54..ff1215ead221 100644 --- a/npm/vite-dev-server/src/index.ts +++ b/npm/vite-dev-server/src/index.ts @@ -1,31 +1,40 @@ -import { debug as debugFn } from 'debug' -import { createServer, InlineConfig } from 'vite' -import { resolveServerConfig, StartDevServerOptions } from './resolveServerConfig' -const debug = debugFn('cypress:vite-dev-server:vite') - -export { StartDevServerOptions } - -export async function startDevServer (startDevServerArgs: StartDevServerOptions): Promise { - if (!startDevServerArgs.viteConfig) { - debug('User did not pass in any Vite dev server configuration') - startDevServerArgs.viteConfig = {} +import { createServer as viteCreateServer } from 'vite' +import debugFn from 'debug' +import getPort from 'get-port' +import { createConfig } from './resolveConfig' +import type { CypressViteDevServerConfig, StartDevServer } from './types' + +const debug = debugFn('cypress:vite-dev-server:index') + +console.log('top level index') +export const startDevServer = async ({ options, viteConfig = {} }: StartDevServer) => { + console.log('start dev server') + debug('user has registered startDevServer for Vite') + let server + + try { + console.log('inside of try') + const config = await createConfig({ options, viteConfig }) + + server = await viteCreateServer(config) + console.log('after server try', config) + } catch (err) { + console.log('err', err) + throw new Error(err as string) } - debug('starting vite dev server') - const resolvedConfig = await resolveServerConfig(startDevServerArgs) - const port = resolvedConfig.server!.port! - - const viteDevServer = await createServer(resolvedConfig) + debug('vite server created successfully') + const port = await getPort({ port: 3000 }) - await viteDevServer.listen() + await server.listen(port) + debug('successfully launched the vite server on port', port) - debug('Component testing vite server started on port', port) - - return { port, close: viteDevServer.close } + return { + port, + close: server.close, + } } -export type CypressViteDevServerConfig = Omit - -export function devServer (cypressDevServerConfig: Cypress.DevServerConfig, devServerConfig?: CypressViteDevServerConfig) { - return startDevServer({ options: cypressDevServerConfig, viteConfig: devServerConfig }) +export function devServer (options: Cypress.DevServerConfig, viteConfig?: CypressViteDevServerConfig) { + return startDevServer({ options, viteConfig }) } diff --git a/npm/vite-dev-server/src/makeCypressPlugin.ts b/npm/vite-dev-server/src/makeCypressPlugin.ts deleted file mode 100644 index a0117d1e7fdc..000000000000 --- a/npm/vite-dev-server/src/makeCypressPlugin.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { resolve, sep } from 'path' -import { readFile } from 'fs/promises' -import Debug from 'debug' -import { ModuleNode, normalizePath, Plugin, ViteDevServer } from 'vite' - -const debug = Debug('cypress:vite-dev-server:plugin') - -const pluginName = 'cypress-transform-html' -const OSSepRE = new RegExp(`\\${sep}`, 'g') - -function convertPathToPosix (path: string): string { - return sep === '/' - ? path - : path.replace(OSSepRE, '/') -} - -const INIT_FILEPATH = resolve(__dirname, '../client/initCypressTests.js') - -const HMR_DEPENDENCY_LOOKUP_MAX_ITERATION = 50 - -function getSpecsPathsSet (specs: Spec[]) { - return new Set( - specs.map((spec) => spec.absolute), - ) -} - -interface Spec{ - absolute: string - relative: string -} - -export const makeCypressPlugin = ( - projectRoot: string, - supportFilePath: string | false, - devServerEvents: NodeJS.EventEmitter, - specs: Spec[], - namespace: string, - indexHtml?: string, -): Plugin => { - let base = '/' - - let specsPathsSet = getSpecsPathsSet(specs) - - devServerEvents.on('dev-server:specs:changed', (specs: Spec[]) => { - specsPathsSet = getSpecsPathsSet(specs) - }) - - const posixSupportFilePath = supportFilePath ? convertPathToPosix(resolve(projectRoot, supportFilePath)) : undefined - const posixIndexHtml = indexHtml ? convertPathToPosix(resolve(projectRoot, indexHtml)) : undefined - - return { - name: pluginName, - enforce: 'pre', - configResolved (config) { - base = config.base - }, - async transformIndexHtml () { - const indexHtmlPath = indexHtml ? resolve(projectRoot, indexHtml) : resolve(__dirname, '..', 'index.html') - const indexHtmlContent = await readFile(indexHtmlPath, { encoding: 'utf8' }) - // find last index - const endOfBody = indexHtmlContent.lastIndexOf('') - - // insert the script in the end of the body - return `${indexHtmlContent.substring(0, endOfBody) - }${ - indexHtmlContent.substring(endOfBody) - }` - }, - resolveId (id) { - if (id === 'cypress:config') { - return id - } - - if (id === 'cypress:support-path') { - return posixSupportFilePath - } - - if (id === 'cypress:spec-loaders') { - return id - } - - if (id === '/cypress:client-init-test') { - return INIT_FILEPATH - } - }, - load (id) { - if (id === 'cypress:spec-loaders') { - return `export default {\n${specs.map((s) => { - return `${JSON.stringify(s.relative)}:()=>import(${JSON.stringify(s.absolute)})` - }).join(',\n')}\n}` - } - - if (id === 'cypress:config') { - return ` -export const hasSupportPath = ${JSON.stringify(!!supportFilePath)} -export const originAutUrl = ${JSON.stringify(`/${namespace}/iframes/${normalizePath(projectRoot)}/`)}` - } - }, - configureServer: async (server: ViteDevServer) => { - server.middlewares.use(`${base}index.html`, async (req, res) => { - const transformedIndexHtml = await server.transformIndexHtml(base, '') - - return res.end(transformedIndexHtml) - }) - }, - handleHotUpdate: ({ server, file }) => { - debug('handleHotUpdate - file', file) - - // If the user provided IndexHtml is changed, do a full-reload - if (file === posixIndexHtml) { - server.ws.send({ - type: 'full-reload', - }) - - return - } - - // get the graph node for the file that just got updated - let moduleImporters = server.moduleGraph.fileToModulesMap.get(file) - let iterationNumber = 0 - - const exploredFiles = new Set() - - // until we reached a point where the current module is imported by no other - while (moduleImporters?.size) { - if (iterationNumber > HMR_DEPENDENCY_LOOKUP_MAX_ITERATION) { - debug(`max hmr iteration reached: ${HMR_DEPENDENCY_LOOKUP_MAX_ITERATION}; Rerun will not happen on this file change.`) - - return [] - } - - // as soon as we find one of the specs, we trigger the re-run of tests - for (const mod of moduleImporters.values()) { - debug('handleHotUpdate - mod.file', mod.file) - if (mod.file === supportFilePath) { - debug('handleHotUpdate - support compile success') - devServerEvents.emit('dev-server:compile:success') - - // if we update support we know we have to re-run it all - // no need to ckeck further - return [] - } - - if (mod.file && specsPathsSet.has(mod.file)) { - debug('handleHotUpdate - spec compile success', mod.file) - devServerEvents.emit('dev-server:compile:success', { specFile: mod.file }) - // if we find one spec, does not mean we are done yet, - // there could be other spec files to re-run - // see https://github.com/cypress-io/cypress/issues/17691 - } - } - - // get all the modules that import the current one - moduleImporters = getImporters(moduleImporters, exploredFiles) - iterationNumber += 1 - } - - return [] - }, - } -} - -/** - * Gets all the modules that import the set of modules passed in parameters - * @param modules the set of module whose dependents to return - * @param alreadyExploredFiles set of files that have already been looked at and should be avoided in case of circular dependency - * @returns a set of ModuleMode that import directly the current modules - */ -function getImporters (modules: Set, alreadyExploredFiles: Set): Set { - const allImporters = new Set() - - modules.forEach((m) => { - if (m.file && !alreadyExploredFiles.has(m.file)) { - alreadyExploredFiles.add(m.file) - m.importers.forEach((imp) => { - allImporters.add(imp) - }) - } - }) - - return allImporters -} diff --git a/npm/vite-dev-server/src/plugins/inspect.ts b/npm/vite-dev-server/src/plugins/inspect.ts new file mode 100644 index 000000000000..0316384ed335 --- /dev/null +++ b/npm/vite-dev-server/src/plugins/inspect.ts @@ -0,0 +1,30 @@ +import debugFn from 'debug' +import type { PluginOption } from 'vite' + +const debug = debugFn('cypress:vite-dev-server:plugins:inspect') + +console.log('anything') +const noop = () => ({}) + +export const CypressInspect = (): PluginOption => { + if (!process.env.DEBUG) return noop + + let Inspect = noop + + try { + Inspect = require('vite-plugin-inspect').default + debug('inspect was found', Inspect) + } catch (err) { + debug(`Tried to import the inspect plugin 'vite-plugin-inspect'. It's an optional peerDependency so install it if you'd like.`) + debug(err) + + return noop + } + + return () => { + return { + ...Inspect(), + name: 'cypress:inspect', + } + } +} diff --git a/npm/vite-dev-server/src/plugins/server.ts b/npm/vite-dev-server/src/plugins/server.ts new file mode 100644 index 000000000000..33ebdd2048df --- /dev/null +++ b/npm/vite-dev-server/src/plugins/server.ts @@ -0,0 +1,66 @@ +import { promises as fsp } from 'fs' +import { decode, isSamePath } from 'ufo' +import { resolve } from 'path' +import debugFn from 'debug' +import type { ViteDevServer } from 'vite' +import { normalizePath } from 'vite' + +const debug = debugFn('cypress:vite-dev-server:server') + +export type RequestType = 'index' | '404' | 'spec' | 'module' + +const matchRequest = (url: string, files): RequestType => { + const normalizedUrl = normalizePath(decode(url)) + const isIndex = isSamePath(normalizedUrl, '/index.html') || isSamePath(normalizedUrl, '/') + + if (isIndex) return 'index' + + return 'spec' +} + +export class CypressViteDevServer { + server: ViteDevServer + indexHtmlPath: string + template?: string + + constructor (server: ViteDevServer) { + debug('Setting up Cypress\'s Vite plugin') + + this.server = server + this.indexHtmlPath = resolve('index.html') + + debug('Resolved html path at', this.indexHtmlPath) + } + + async loadTemplate () { + if (this.template) { + debug('The html template has already been loaded. It was loaded from', this.indexHtmlPath) + + return this.template + } + + this.template = await fsp.readFile(this.indexHtmlPath, 'utf-8') + debug('Loaded html template successfully') + + return this.template + } + + /** + * Route matching and handling. + * + * There are 4 cases to cover + * 1. User loads the site's index. + * 2. User is trying to run a spec from Cypress. + * 3. User is trying to visit a resource that does not exist. + * 4. User is trying to visit an HTML page that does not exist. + */ + + // When the user requests `/` and is not trying to load a spec + handleIndexRoute () { + + } + + // When the user requests `/does-not-exist` + handle404 () { + } +} diff --git a/npm/vite-dev-server/src/resolveConfig.ts b/npm/vite-dev-server/src/resolveConfig.ts new file mode 100644 index 000000000000..80ec385b080a --- /dev/null +++ b/npm/vite-dev-server/src/resolveConfig.ts @@ -0,0 +1,41 @@ +/** + * The logic inside of this file is heavily reused from + * Vitest's own config resolution logic. + * You can find it here https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/create.ts + */ +import { resolve } from 'pathe' + +import { mergeConfig } from 'vite' +import { configFiles } from './constants' +import { Cypress } from './plugins' +import debugFn from 'debug' +import type { StartDevServer } from './types' + +const debug = debugFn('cypress:vite-dev-server:resolve-config') + +export const createConfig = async ({ options, viteConfig: viteOverrides = {} }: StartDevServer) => { + const root = resolve(process.cwd()) + const { findUp } = await import('find-up') + const configFile = await findUp(configFiles, { cwd: root } as { cwd: string }) + + if (configFile) { + debug('resolved config file at', configFile, 'using root', root) + } else if (viteOverrides) { + debug('Couldn\'t find a Vite config file, however we received a custom viteConfig', viteOverrides) + } else { + debug(` + Didn\'t resolve a Vite config AND the user didn\'t pass in a custom viteConfig. + Falling back to Vite\'s defaults.`) + } + + const config = { + root, + configFile, + plugins: [ + Cypress(), + // CypressInspect(), + ], + } + + return mergeConfig(config, viteOverrides) +} diff --git a/npm/vite-dev-server/src/resolveServerConfig.ts b/npm/vite-dev-server/src/resolveServerConfig.ts deleted file mode 100644 index 89d0b94ca047..000000000000 --- a/npm/vite-dev-server/src/resolveServerConfig.ts +++ /dev/null @@ -1,81 +0,0 @@ -import Debug from 'debug' -import { InlineConfig } from 'vite' -import { dirname, resolve } from 'path' -import getPort from 'get-port' -import { makeCypressPlugin } from './makeCypressPlugin' - -const debug = Debug('cypress:vite-dev-server:start') - -export interface StartDevServerOptions { - /** - * the Cypress dev server configuration object - */ - options: Cypress.DevServerConfig - /** - * By default, vite will use your vite.config file to - * Start the server. If you need additional plugins or - * to override some options, you can do so using this. - * @optional - */ - viteConfig?: Omit - /** - * Path to an index.html file that will serve as the template in - * which your components will be rendered. - */ - indexHtml?: string -} - -export const resolveServerConfig = async ({ viteConfig, options, indexHtml }: StartDevServerOptions): Promise => { - const { projectRoot, supportFile, namespace } = options.config - - const requiredOptions: InlineConfig = { - base: `/${namespace}/src/`, - root: projectRoot, - } - - const finalConfig: InlineConfig = { ...viteConfig, ...requiredOptions } - - finalConfig.plugins = [...(finalConfig.plugins || []), makeCypressPlugin(projectRoot, supportFile, options.devServerEvents, options.specs, options.config.namespace, indexHtml)] - - // This alias is necessary to avoid a "prefixIdentifiers" issue from slots mounting - // only cjs compiler-core accepts using prefixIdentifiers in slots which vue test utils use. - // Could we resolve this usage in test-utils? - try { - finalConfig.resolve = finalConfig.resolve || {} - finalConfig.resolve.alias = { - ...finalConfig.resolve.alias, - '@vue/compiler-core': resolve(dirname(require.resolve('@vue/compiler-core')), 'dist', 'compiler-core.cjs.js'), - } - } catch (e) { - // Vue 3 is not installed - } - - finalConfig.server = finalConfig.server || {} - - finalConfig.server.port = await getPort({ port: finalConfig.server.port || 3000 }), - - // Ask vite to pre-optimize all dependencies of the specs - finalConfig.optimizeDeps = finalConfig.optimizeDeps || {} - - // pre-optimize all the specs - if ((options.specs && options.specs.length)) { - // fix: we must preserve entries configured on target project - const existingOptimizeDepsEntries = finalConfig.optimizeDeps.entries - - if (existingOptimizeDepsEntries) { - finalConfig.optimizeDeps.entries = [...existingOptimizeDepsEntries, ...options.specs.map((spec) => spec.relative)] - } else { - finalConfig.optimizeDeps.entries = [...options.specs.map((spec) => spec.relative)] - } - - // only optimize a supportFile is it is not false or undefined - if (supportFile) { - // fix: on windows we need to replace backslashes with slashes - finalConfig.optimizeDeps.entries.push(supportFile.replace(/\\/g, '/')) - } - } - - debug(`the resolved server config is ${JSON.stringify(finalConfig, null, 2)}`) - - return finalConfig -} diff --git a/npm/vite-dev-server/src/types.ts b/npm/vite-dev-server/src/types.ts new file mode 100644 index 000000000000..b66a4ac1ab58 --- /dev/null +++ b/npm/vite-dev-server/src/types.ts @@ -0,0 +1,14 @@ +import type { InlineConfig } from 'vite' + +export type CypressViteDevServerConfig = Omit + +export interface StartDevServer { + /* this is the Cypress dev server configuration object */ + options: Cypress.DevServerConfig + /* Base webpack config object used for loading component testing */ + viteConfig?: CypressViteDevServerConfig + /* base html template to render in AUT */ + template?: string + /* base html template to render in AUT */ + indexHtml?: string +} diff --git a/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts b/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts index a35ba327605b..b287b70daf95 100644 --- a/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts +++ b/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts @@ -120,7 +120,9 @@ export const e2eProjectDirs = [ 'unify-plugin-errors', 'various-file-types', 'vite-ct', + 'vite-ct-vue-3-typescript', 'webpack-preprocessor', + 'webpack-preprocessor-2', 'webpack-preprocessor-awesome-typescript-loader', 'webpack-preprocessor-ts-loader', 'webpack-preprocessor-ts-loader-compiler-options', diff --git a/yarn.lock b/yarn.lock index 5b22a3e2776a..a1fb078a997f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18010,7 +18010,7 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" -dedent@^0.7.0: +dedent@0.7.0, dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= From 36e4681bafddcc8993d55bde81467834fe5fa950 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Tue, 1 Mar 2022 14:54:27 -0500 Subject: [PATCH 02/21] wip --- npm/vite-dev-server/src/constants.ts | 8 ++++ npm/vite-dev-server/src/plugins/cypress.ts | 6 +++ npm/vite-dev-server/src/plugins/index.ts | 5 +++ npm/vite-dev-server/src/plugins/inspect.ts | 10 ++--- npm/vite-dev-server/src/resolveConfig.ts | 4 +- yarn.lock | 51 +++++++++++++++++++++- 6 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 npm/vite-dev-server/src/constants.ts create mode 100644 npm/vite-dev-server/src/plugins/cypress.ts create mode 100644 npm/vite-dev-server/src/plugins/index.ts diff --git a/npm/vite-dev-server/src/constants.ts b/npm/vite-dev-server/src/constants.ts new file mode 100644 index 000000000000..9d51c68b7c92 --- /dev/null +++ b/npm/vite-dev-server/src/constants.ts @@ -0,0 +1,8 @@ +export const configFiles = [ + 'vitest.config.ts', + 'vitest.config.js', + 'vitest.config.mjs', + 'vite.config.ts', + 'vite.config.js', + 'vite.config.mjs', +] diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts new file mode 100644 index 000000000000..05adbcbd3901 --- /dev/null +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -0,0 +1,6 @@ +export const Cypress = () => { + return { + name: 'cypress:main', + enforce: 'pre', + } +} diff --git a/npm/vite-dev-server/src/plugins/index.ts b/npm/vite-dev-server/src/plugins/index.ts new file mode 100644 index 000000000000..07e622dd1570 --- /dev/null +++ b/npm/vite-dev-server/src/plugins/index.ts @@ -0,0 +1,5 @@ +export * from './inspect' + +export * from './server' + +export * from './cypress' diff --git a/npm/vite-dev-server/src/plugins/inspect.ts b/npm/vite-dev-server/src/plugins/inspect.ts index 0316384ed335..0ff67cfac3fb 100644 --- a/npm/vite-dev-server/src/plugins/inspect.ts +++ b/npm/vite-dev-server/src/plugins/inspect.ts @@ -4,12 +4,10 @@ import type { PluginOption } from 'vite' const debug = debugFn('cypress:vite-dev-server:plugins:inspect') console.log('anything') -const noop = () => ({}) +export const CypressInspect = (): (() => PluginOption) | null => { + if (!process.env.DEBUG) return null -export const CypressInspect = (): PluginOption => { - if (!process.env.DEBUG) return noop - - let Inspect = noop + let Inspect try { Inspect = require('vite-plugin-inspect').default @@ -18,7 +16,7 @@ export const CypressInspect = (): PluginOption => { debug(`Tried to import the inspect plugin 'vite-plugin-inspect'. It's an optional peerDependency so install it if you'd like.`) debug(err) - return noop + return null } return () => { diff --git a/npm/vite-dev-server/src/resolveConfig.ts b/npm/vite-dev-server/src/resolveConfig.ts index 80ec385b080a..4cb12c8add8c 100644 --- a/npm/vite-dev-server/src/resolveConfig.ts +++ b/npm/vite-dev-server/src/resolveConfig.ts @@ -7,7 +7,7 @@ import { resolve } from 'pathe' import { mergeConfig } from 'vite' import { configFiles } from './constants' -import { Cypress } from './plugins' +import { Cypress, CypressInspect } from './plugins/index' import debugFn from 'debug' import type { StartDevServer } from './types' @@ -33,7 +33,7 @@ export const createConfig = async ({ options, viteConfig: viteOverrides = {} }: configFile, plugins: [ Cypress(), - // CypressInspect(), + CypressInspect(), ], } diff --git a/yarn.lock b/yarn.lock index a1fb078a997f..cbb33233a2b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21354,6 +21354,14 @@ find-up@5.0.0, find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +find-up@6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" + integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== + dependencies: + locate-path "^7.1.0" + path-exists "^5.0.0" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -22228,7 +22236,7 @@ get-pkg-repo@^1.0.0: parse-github-repo-url "^1.3.0" through2 "^2.0.0" -get-port@5.1.1, get-port@^5.1.1: +get-port@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== @@ -28050,6 +28058,13 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +locate-path@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.1.0.tgz#241d62af60739f6097c055efe10329c88b798425" + integrity sha512-HNx5uOnYeK4SxEoid5qnhRfprlJeGMzFRKPLCf/15N3/B4AiofNwC/yq7VBKdVk9dx7m+PiYCJOGg55JYTAqoQ== + dependencies: + p-locate "^6.0.0" + lock-verify@^2.0.2, lock-verify@^2.1.0: version "2.2.1" resolved "https://registry.yarnpkg.com/lock-verify/-/lock-verify-2.2.1.tgz#81107948c51ed16f97b96ff8b60675affb243fc1" @@ -31896,6 +31911,13 @@ p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1, p-limit@^2.2.2, p-limit@^2.3.0: dependencies: p-try "^2.0.0" +p-limit@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" + integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== + dependencies: + yocto-queue "^1.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -31924,6 +31946,13 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-locate@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" + integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw== + dependencies: + p-limit "^4.0.0" + p-map-series@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" @@ -32533,6 +32562,11 @@ path-exists@^4.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== +path-exists@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7" + integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ== + path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -32633,6 +32667,11 @@ path@^0.12.7: process "^0.11.1" util "^0.10.3" +pathe@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.2.0.tgz#30fd7bbe0a0d91f0e60bae621f5d19e9e225c339" + integrity sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw== + pathval@^1.0.0, pathval@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -41222,6 +41261,11 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== +ufo@0.7.10: + version "0.7.10" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-0.7.10.tgz#278942c326e3da344b6b97637ed7f322e817261e" + integrity sha512-YTnDRlE1cIofRqOFN8ioAbz9qenDvkgVMSn0cnxvIDjM9sfEOMKB0ybMr+otSlCXMfQ/X35haYRoI7Nua82RrA== + uglify-js@3.4.x, uglify-js@^3.1.4: version "3.4.10" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f" @@ -44773,6 +44817,11 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +yocto-queue@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" + integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== + zip-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79" From 78d5bed75db0fcb89cfd97987935c1011a0fba8f Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Tue, 1 Mar 2022 20:08:42 -0500 Subject: [PATCH 03/21] wip --- cli/package.json | 12 +++- npm/vite-dev-server/package.json | 2 + npm/vite-dev-server/src/constants.ts | 2 + npm/vite-dev-server/src/index.ts | 6 +- npm/vite-dev-server/src/plugins/cypress.ts | 14 +++- npm/vite-dev-server/src/plugins/inspect.ts | 12 ++-- npm/vite-dev-server/src/plugins/server.ts | 76 ++++++++++++++++++---- npm/vite-dev-server/src/resolveConfig.ts | 8 +-- yarn.lock | 55 ++++++++++++++-- 9 files changed, 151 insertions(+), 36 deletions(-) diff --git a/cli/package.json b/cli/package.json index 68c2cc06eb21..fd1da7e56ecd 100644 --- a/cli/package.json +++ b/cli/package.json @@ -112,5 +112,15 @@ "engines": { "node": ">=12.0.0" }, - "types": "types" + "types": "types", + "exports": { + ".": { + "import": "./index.mjs", + "require": "./index.js" + }, + "./package.json": { + "import": "./package.json", + "require": "./package.json" + } + } } diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json index 33941c626685..f8736a2f23fd 100644 --- a/npm/vite-dev-server/package.json +++ b/npm/vite-dev-server/package.json @@ -18,6 +18,7 @@ "dedent": "0.7.0", "find-up": "6.3.0", "get-port": "5.1.1", + "local-pkg": "0.4.1", "pathe": "0.2.0", "ufo": "0.7.10" }, @@ -33,6 +34,7 @@ "mocha-multi-reporters": "^1.5.1", "react": "17.0.2", "vite": "2.5.0", + "vite-plugin-inspect": "0.4.3", "vue": "3.2.6", "vue-eslint-parser": "7.11.0" }, diff --git a/npm/vite-dev-server/src/constants.ts b/npm/vite-dev-server/src/constants.ts index 9d51c68b7c92..e214cb6ac0b0 100644 --- a/npm/vite-dev-server/src/constants.ts +++ b/npm/vite-dev-server/src/constants.ts @@ -6,3 +6,5 @@ export const configFiles = [ 'vite.config.js', 'vite.config.mjs', ] + +export const commonSpecExtensions = ['.cy', '.spec', '.test', '-spec', '-test', '_spec'] diff --git a/npm/vite-dev-server/src/index.ts b/npm/vite-dev-server/src/index.ts index ff1215ead221..d43ac18d6adc 100644 --- a/npm/vite-dev-server/src/index.ts +++ b/npm/vite-dev-server/src/index.ts @@ -6,20 +6,16 @@ import type { CypressViteDevServerConfig, StartDevServer } from './types' const debug = debugFn('cypress:vite-dev-server:index') -console.log('top level index') export const startDevServer = async ({ options, viteConfig = {} }: StartDevServer) => { - console.log('start dev server') debug('user has registered startDevServer for Vite') + debug('startDevServer has received options', options) let server try { - console.log('inside of try') const config = await createConfig({ options, viteConfig }) server = await viteCreateServer(config) - console.log('after server try', config) } catch (err) { - console.log('err', err) throw new Error(err as string) } diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index 05adbcbd3901..ea9d17984861 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -1,6 +1,18 @@ -export const Cypress = () => { +import { ViteDevServer } from 'vite' +import { CypressViteDevServer } from './server' + +export const Cypress = (options) => { return { name: 'cypress:main', enforce: 'pre', + configureServer (viteServer: ViteDevServer) { + return () => { + const cyServer = new CypressViteDevServer(viteServer, options.specs) + + viteServer.middlewares.use('/', cyServer.handleAllRoutes) + + viteServer.middlewares.use('/', cyServer.handle404) + } + }, } } diff --git a/npm/vite-dev-server/src/plugins/inspect.ts b/npm/vite-dev-server/src/plugins/inspect.ts index 0ff67cfac3fb..ec6dc9a5b1a6 100644 --- a/npm/vite-dev-server/src/plugins/inspect.ts +++ b/npm/vite-dev-server/src/plugins/inspect.ts @@ -4,13 +4,13 @@ import type { PluginOption } from 'vite' const debug = debugFn('cypress:vite-dev-server:plugins:inspect') console.log('anything') -export const CypressInspect = (): (() => PluginOption) | null => { +export const CypressInspect = async (): (() => PluginOption) | null => { if (!process.env.DEBUG) return null let Inspect try { - Inspect = require('vite-plugin-inspect').default + Inspect = (await import('vite-plugin-inspect')).default debug('inspect was found', Inspect) } catch (err) { debug(`Tried to import the inspect plugin 'vite-plugin-inspect'. It's an optional peerDependency so install it if you'd like.`) @@ -19,10 +19,8 @@ export const CypressInspect = (): (() => PluginOption) | null => { return null } - return () => { - return { - ...Inspect(), - name: 'cypress:inspect', - } + return { + ...Inspect(), + name: 'cypress:inspect', } } diff --git a/npm/vite-dev-server/src/plugins/server.ts b/npm/vite-dev-server/src/plugins/server.ts index 33ebdd2048df..7ee01d0bc22d 100644 --- a/npm/vite-dev-server/src/plugins/server.ts +++ b/npm/vite-dev-server/src/plugins/server.ts @@ -1,48 +1,78 @@ import { promises as fsp } from 'fs' import { decode, isSamePath } from 'ufo' -import { resolve } from 'path' +import { parse, join, resolve } from 'path' import debugFn from 'debug' import type { ViteDevServer } from 'vite' import { normalizePath } from 'vite' +import { commonSpecExtensions } from '../constants' const debug = debugFn('cypress:vite-dev-server:server') -export type RequestType = 'index' | '404' | 'spec' | 'module' +export type RequestType = 'index' | '404' | 'current-spec' | 'module' -const matchRequest = (url: string, files): RequestType => { +const matchRequest = (url: string, specs): RequestType => { const normalizedUrl = normalizePath(decode(url)) const isIndex = isSamePath(normalizedUrl, '/index.html') || isSamePath(normalizedUrl, '/') if (isIndex) return 'index' - return 'spec' + if (getCurrentSpecFile(url, specs)) return 'current-spec' + + return 'module' +} + +const cleanSpecFileName = (file) => { + if (typeof file === 'string') file = parse(file) + + let cleanPath + + commonSpecExtensions.some((extension) => { + if (file.name.endsWith(extension)) { + cleanPath = join(`/${ file.dir}`, file.name.slice(0, -extension.length)) + + return true + } + }) + + return cleanPath +} + +const getCurrentSpecFile = (url: string, specs: any[]) => { + return specs.find((spec) => { + if (isSamePath(`/${ spec}`, decode(url))) return false + + return isSamePath(cleanSpecFileName(parse(spec)), normalizePath(decode(url))) + }) } export class CypressViteDevServer { server: ViteDevServer indexHtmlPath: string - template?: string + _template?: string + specs: any[] - constructor (server: ViteDevServer) { + constructor (server: ViteDevServer, specs) { debug('Setting up Cypress\'s Vite plugin') + this.specs = specs this.server = server this.indexHtmlPath = resolve('index.html') + this.getTemplate() debug('Resolved html path at', this.indexHtmlPath) } - async loadTemplate () { - if (this.template) { + async getTemplate () { + if (this._template) { debug('The html template has already been loaded. It was loaded from', this.indexHtmlPath) - return this.template + return this._template } - this.template = await fsp.readFile(this.indexHtmlPath, 'utf-8') + this._template = await fsp.readFile(this.indexHtmlPath, 'utf-8') debug('Loaded html template successfully') - return this.template + return this._template } /** @@ -55,12 +85,32 @@ export class CypressViteDevServer { * 4. User is trying to visit an HTML page that does not exist. */ + handleAllRoutes (req, res, next) { + const matched = matchRequest(req.originalUrl, this.specs) + + if (matched === 'index') return this.handleIndexRoute(req, res) + + if (matched === 'current-spec') return this.handleCurrentSpecRoute(req, res) + + return next() + } + // When the user requests `/` and is not trying to load a spec - handleIndexRoute () { + async handleIndexRoute (req, res) { + return res.end(await this.server.transformIndexHtml(req.url, `

Hello Index

`, req.originalUrl)) + } + + async handleCurrentSpecRoute (req, res) { + const html = (await this.getTemplate()).replace('', ` + + + `) + return res.end(await this.server.transformIndexHtml(req.url, html)) } // When the user requests `/does-not-exist` - handle404 () { + handle404 (req, res) { + return res.end(`404!`) } } diff --git a/npm/vite-dev-server/src/resolveConfig.ts b/npm/vite-dev-server/src/resolveConfig.ts index 4cb12c8add8c..68f38f8f2931 100644 --- a/npm/vite-dev-server/src/resolveConfig.ts +++ b/npm/vite-dev-server/src/resolveConfig.ts @@ -4,18 +4,18 @@ * You can find it here https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/create.ts */ import { resolve } from 'pathe' - import { mergeConfig } from 'vite' import { configFiles } from './constants' import { Cypress, CypressInspect } from './plugins/index' import debugFn from 'debug' import type { StartDevServer } from './types' +import { importModule } from 'local-pkg' const debug = debugFn('cypress:vite-dev-server:resolve-config') export const createConfig = async ({ options, viteConfig: viteOverrides = {} }: StartDevServer) => { const root = resolve(process.cwd()) - const { findUp } = await import('find-up') + const { default: findUp } = await importModule('find-up') const configFile = await findUp(configFiles, { cwd: root } as { cwd: string }) if (configFile) { @@ -32,8 +32,8 @@ export const createConfig = async ({ options, viteConfig: viteOverrides = {} }: root, configFile, plugins: [ - Cypress(), - CypressInspect(), + Cypress(options), + await CypressInspect(), ], } diff --git a/yarn.lock b/yarn.lock index cbb33233a2b8..7c77ecf4295b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7275,10 +7275,10 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rollup/pluginutils@^4.1.0", "@rollup/pluginutils@^4.1.1": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec" - integrity sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ== +"@rollup/pluginutils@^4.1.0", "@rollup/pluginutils@^4.1.1", "@rollup/pluginutils@^4.1.2": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.2.tgz#ed5821c15e5e05e32816f5fb9ec607cdf5a75751" + integrity sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ== dependencies: estree-walker "^2.0.1" picomatch "^2.2.2" @@ -17863,7 +17863,7 @@ debounce@^1.2.0: resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== -debug@*, debug@4, debug@4.3.3, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@~4.3.1: +debug@*, debug@4, debug@4.3.3, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@~4.3.1: version "4.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== @@ -27312,6 +27312,11 @@ koa@^2.13.0: type-is "^1.6.16" vary "^1.1.2" +kolorist@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.5.1.tgz#c3d66dc4fabde4f6b7faa6efda84c00491f9e52b" + integrity sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ== + konfig@0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/konfig/-/konfig-0.2.1.tgz#4be83ebb859207dbdad8d0e6eeb6004245de3cd8" @@ -28028,6 +28033,11 @@ loader-utils@^1.0.0, loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1 emojis-list "^3.0.0" json5 "^1.0.1" +local-pkg@0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.1.tgz#e7b0d7aa0b9c498a1110a5ac5b00ba66ef38cfff" + integrity sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw== + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -30104,6 +30114,11 @@ move-file@^1.1.0: make-dir "^3.0.0" path-exists "^3.0.0" +mrmime@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.0.tgz#14d387f0585a5233d291baba339b063752a2398b" + integrity sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ== + ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -38143,6 +38158,15 @@ sirv@^1.0.12: mime "^2.3.1" totalist "^1.0.0" +sirv@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.2.tgz#128b9a628d77568139cff85703ad5497c46a4760" + integrity sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w== + dependencies: + "@polka/url" "^1.0.0-next.20" + mrmime "^1.0.0" + totalist "^3.0.0" + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -40677,6 +40701,11 @@ totalist@^1.0.0: resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== +totalist@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.0.tgz#4ef9c58c5f095255cdc3ff2a0a55091c57a3a1bd" + integrity sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw== + tough-cookie@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" @@ -41266,6 +41295,11 @@ ufo@0.7.10: resolved "https://registry.yarnpkg.com/ufo/-/ufo-0.7.10.tgz#278942c326e3da344b6b97637ed7f322e817261e" integrity sha512-YTnDRlE1cIofRqOFN8ioAbz9qenDvkgVMSn0cnxvIDjM9sfEOMKB0ybMr+otSlCXMfQ/X35haYRoI7Nua82RrA== +ufo@^0.7.11: + version "0.7.11" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-0.7.11.tgz#17defad497981290383c5d26357773431fdbadcb" + integrity sha512-IT3q0lPvtkqQ8toHQN/BkOi4VIqoqheqM1FnkNWT9y0G8B3xJhwnoKBu5OHx8zHDOvveQzfKuFowJ0VSARiIDg== + uglify-js@3.4.x, uglify-js@^3.1.4: version "3.4.10" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f" @@ -42553,6 +42587,17 @@ vite-plugin-icons@0.6.3: "@iconify/json-tools" "^1.0.10" vue-template-es2015-compiler "^1.9.1" +vite-plugin-inspect@0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/vite-plugin-inspect/-/vite-plugin-inspect-0.4.3.tgz#d048106c0aa24554d91bee0d524e94b1eba178fd" + integrity sha512-lj3oWnReRUwMHB7k8ZD8o6E27/OSn+8ua+tOftxuS39aM6Z9MG7m5r1CMlxMwEwdTM/wnQr0aH22Y2IX3e+++w== + dependencies: + "@rollup/pluginutils" "^4.1.2" + debug "^4.3.3" + kolorist "^1.5.1" + sirv "^2.0.2" + ufo "^0.7.11" + vite-plugin-optimize-persist@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/vite-plugin-optimize-persist/-/vite-plugin-optimize-persist-0.0.5.tgz#fdfb40e502c87ac09186c6ba47856cb33c891029" From 7c715d0673f6922370dcad7e0f04b9ff31b2dac0 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Wed, 2 Mar 2022 16:33:42 -0500 Subject: [PATCH 04/21] wip --- .../client/initCypressTests.js | 19 +- npm/vite-dev-server/cypress.config.ts | 1 - npm/vite-dev-server/cypress/foo.cy.js | 4 + npm/vite-dev-server/foo.js | 4 + npm/vite-dev-server/package.json | 2 +- npm/vite-dev-server/src/index.ts | 7 +- npm/vite-dev-server/src/plugins/cypress.ts | 202 +++++++++++++++++- npm/vite-dev-server/src/plugins/inspect.ts | 1 - npm/vite-dev-server/src/plugins/server.ts | 178 +++++++++++---- npm/vite-dev-server/src/resolveConfig.ts | 19 +- yarn.lock | 154 ++++++++++++- 11 files changed, 512 insertions(+), 79 deletions(-) create mode 100644 npm/vite-dev-server/cypress/foo.cy.js create mode 100644 npm/vite-dev-server/foo.js diff --git a/npm/vite-dev-server/client/initCypressTests.js b/npm/vite-dev-server/client/initCypressTests.js index 4e34f0668412..605239cd8527 100644 --- a/npm/vite-dev-server/client/initCypressTests.js +++ b/npm/vite-dev-server/client/initCypressTests.js @@ -1,16 +1,6 @@ // This file is merged in a ${ + indexHtmlContent.substring(endOfBody) + }` + }, + resolveId (id) { + if (id === '@cypress:config') { + return id + } + + if (id === '@cypress:support-path') { + return posixSupportFilePath + } - viteServer.middlewares.use('/', cyServer.handleAllRoutes) + if (id === '@cypress:spec-loaders') { + return id + } - viteServer.middlewares.use('/', cyServer.handle404) + if (id === '/@cypress:client-init-test') { + return INIT_FILEPATH + } + }, + load (id) { + if (id === '@cypress:spec-loaders') { + return `export default {\n${specs.map((s) => { + return `${JSON.stringify(s.relative)}:()=>import(${JSON.stringify(s.absolute)})` + }).join(',\n')}\n}` } + + if (id === '@cypress:config') { + return ` +export const hasSupportPath = ${JSON.stringify(!!supportFilePath)}` + } + }, + configureServer: async (server: ViteDevServer) => { + server.middlewares.use(`${base}index.html`, async (req, res) => { + const transformedIndexHtml = await server.transformIndexHtml(base, '') + + return res.end(transformedIndexHtml) + }) + }, + handleHotUpdate: ({ server, file }) => { + debug('handleHotUpdate - file', file) + + // If the user provided IndexHtml is changed, do a full-reload + if (file === posixIndexHtml) { + server.ws.send({ + type: 'full-reload', + }) + + return + } + + // get the graph node for the file that just got updated + let moduleImporters = server.moduleGraph.fileToModulesMap.get(file) + let iterationNumber = 0 + + const exploredFiles = new Set() + + // until we reached a point where the current module is imported by no other + while (moduleImporters?.size) { + if (iterationNumber > HMR_DEPENDENCY_LOOKUP_MAX_ITERATION) { + debug(`max hmr iteration reached: ${HMR_DEPENDENCY_LOOKUP_MAX_ITERATION}; Rerun will not happen on this file change.`) + + return [] + } + + // as soon as we find one of the specs, we trigger the re-run of tests + for (const mod of moduleImporters.values()) { + debug('handleHotUpdate - mod.file', mod.file) + if (mod.file === supportFilePath) { + debug('handleHotUpdate - support compile success') + devServerEvents.emit('dev-server:compile:success') + + // if we update support we know we have to re-run it all + // no need to ckeck further + return [] + } + + if (mod.file && specsPathsSet.has(mod.file)) { + debug('handleHotUpdate - spec compile success', mod.file) + devServerEvents.emit('dev-server:compile:success', { specFile: mod.file }) + // if we find one spec, does not mean we are done yet, + // there could be other spec files to re-run + // see https://github.com/cypress-io/cypress/issues/17691 + } + } + + // get all the modules that import the current one + moduleImporters = getImporters(moduleImporters, exploredFiles) + iterationNumber += 1 + } + + return [] }, } } + +/** + * Gets all the modules that import the set of modules passed in parameters + * @param modules the set of module whose dependents to return + * @param alreadyExploredFiles set of files that have already been looked at and should be avoided in case of circular dependency + * @returns a set of ModuleMode that import directly the current modules + */ +function getImporters (modules: Set, alreadyExploredFiles: Set): Set { + const allImporters = new Set() + + modules.forEach((m) => { + if (m.file && !alreadyExploredFiles.has(m.file)) { + alreadyExploredFiles.add(m.file) + m.importers.forEach((imp) => { + allImporters.add(imp) + }) + } + }) + + return allImporters +} diff --git a/npm/vite-dev-server/src/plugins/inspect.ts b/npm/vite-dev-server/src/plugins/inspect.ts index ec6dc9a5b1a6..ad5eefd29f31 100644 --- a/npm/vite-dev-server/src/plugins/inspect.ts +++ b/npm/vite-dev-server/src/plugins/inspect.ts @@ -3,7 +3,6 @@ import type { PluginOption } from 'vite' const debug = debugFn('cypress:vite-dev-server:plugins:inspect') -console.log('anything') export const CypressInspect = async (): (() => PluginOption) | null => { if (!process.env.DEBUG) return null diff --git a/npm/vite-dev-server/src/plugins/server.ts b/npm/vite-dev-server/src/plugins/server.ts index 7ee01d0bc22d..f4491f2e62c3 100644 --- a/npm/vite-dev-server/src/plugins/server.ts +++ b/npm/vite-dev-server/src/plugins/server.ts @@ -1,22 +1,46 @@ +import { relative, resolve } from 'pathe' import { promises as fsp } from 'fs' import { decode, isSamePath } from 'ufo' -import { parse, join, resolve } from 'path' +import { parse, join } from 'path' import debugFn from 'debug' -import type { ViteDevServer } from 'vite' +import type { Connect, ViteDevServer } from 'vite' import { normalizePath } from 'vite' import { commonSpecExtensions } from '../constants' +import { IncomingMessage, ServerResponse } from 'http' +import { pathToFileURL } from 'url' const debug = debugFn('cypress:vite-dev-server:server') export type RequestType = 'index' | '404' | 'current-spec' | 'module' -const matchRequest = (url: string, specs): RequestType => { - const normalizedUrl = normalizePath(decode(url)) - const isIndex = isSamePath(normalizedUrl, '/index.html') || isSamePath(normalizedUrl, '/') +// TODO: pass this into each dev server in the options +const specHeader = '__cypress_spec_path' +const iframeRoute = '/__cypress/iframes/' - if (isIndex) return 'index' +const matchRequest = (req, specs): RequestType => { + // const url = req.originalUrl + // const normalizedUrl = normalizePath(decode(url)) - if (getCurrentSpecFile(url, specs)) return 'current-spec' + debug('from original url', req.originalUrl) + debug('with headers', req.headers) + + // Cypress proxies all requests through index.html using different headers + // If the route matches index.html it can mean two things: + // 1. Cypress is trying to load a spec (spec header will not be present) + // 2. The user is requesting the server from their browser (header is present) + + if (isCypressSpecRequest(req)) { + if (getCurrentSpecFile(req, specs)) { + debug('is current spec') + + return 'current-spec' + } + } + + // const isIndex = isSamePath(normalizedUrl, '/index.html') || isSamePath(normalizedUrl, '/') + + // if (isIndex) return 'index' + debug('is module') return 'module' } @@ -37,44 +61,81 @@ const cleanSpecFileName = (file) => { return cleanPath } -const getCurrentSpecFile = (url: string, specs: any[]) => { - return specs.find((spec) => { - if (isSamePath(`/${ spec}`, decode(url))) return false +const isRequestFromWithinCyIframe = (req) => { + return req.headers.referer.includes(iframeRoute) +} - return isSamePath(cleanSpecFileName(parse(spec)), normalizePath(decode(url))) - }) +const isCypressSpecRequest = (req) => { + if (req.headers[specHeader]) return true + + return false +} + +const getSpecPathFromHeader = (req): string | null => { + const specPaths = req.headers[specHeader] + + if (specPaths) { + return Array.isArray(specPaths) ? specPaths[0] : specPaths + } + + return null +} + +const getCurrentSpecFile = (req, specs: Cypress.DevServerConfig['specs']) => { + // Route by header (Cypress does this when it forwards on the request to the dev server) + const specPaths = req.headers['__cypress_spec_path'] + + if (specPaths) { + debug('spec paths', specPaths) + + return Array.isArray(specPaths) ? specPaths[0] : specPaths + } + + // Route by url (You, navigating to your browser) + // return specs.find((spec) => { + // if (isSamePath(`/${spec.relative}`, decode(req.originalUrl))) return false + + // debug('clean spec file name', cleanSpecFileName(parse(spec.relative))) + // debug('normalizePath', normalizePath(decode(req.originalUrl))) + // debug('decode', decode(req.originalUrl)) + + // return isSamePath(cleanSpecFileName(parse(spec.relative)), normalizePath(decode(url))) + // })?.absolute } export class CypressViteDevServer { server: ViteDevServer - indexHtmlPath: string + options: Cypress.DevServerConfig _template?: string - specs: any[] + _client?: string - constructor (server: ViteDevServer, specs) { + constructor (server: ViteDevServer, options: Cypress.DevServerConfig) { debug('Setting up Cypress\'s Vite plugin') - this.specs = specs + this.options = options this.server = server - this.indexHtmlPath = resolve('index.html') this.getTemplate() - - debug('Resolved html path at', this.indexHtmlPath) + this.getClient() } async getTemplate () { - if (this._template) { - debug('The html template has already been loaded. It was loaded from', this.indexHtmlPath) + const indexHtmlPath = resolve('index.html') - return this._template - } - - this._template = await fsp.readFile(this.indexHtmlPath, 'utf-8') - debug('Loaded html template successfully') + this._template = await fsp.readFile(indexHtmlPath, 'utf-8') + debug('Loaded html template successfully from', indexHtmlPath) return this._template } + async getClient () { + const clientPath = resolve(process.cwd(), join('client', 'initCypressTests.js')) + + this._client = await fsp.readFile(clientPath, 'utf-8') + debug('Loaded client successfully from', clientPath) + + return this._client + } + /** * Route matching and handling. * @@ -85,32 +146,75 @@ export class CypressViteDevServer { * 4. User is trying to visit an HTML page that does not exist. */ - handleAllRoutes (req, res, next) { - const matched = matchRequest(req.originalUrl, this.specs) + handleAllRoutes (req: Connect.IncomingMessage, res: ServerResponse, next: Function) { + if (isCypressSpecRequest(req)) { + // We're going to request the same route with the same headers, + // But from this time, it'll be inside of the iframe. + if (isRequestFromWithinCyIframe(req)) { + return next() + } + + // If you request a non-existent from top, you'll end up here... + // That's not great :/ + return this.handleCurrentSpecRoute(req, res) + } + + return next() + } + + getCurrentSpecFile (req) { + const specPaths = req.headers['__cypress_spec_path'] - if (matched === 'index') return this.handleIndexRoute(req, res) + if (specPaths) { + debug('spec paths', specPaths) - if (matched === 'current-spec') return this.handleCurrentSpecRoute(req, res) + const absolutePath = Array.isArray(specPaths) ? specPaths[0] : specPaths - return next() + return this.options.specs.find((s) => { + return s.absolute === absolutePath + }) + } + } + + getSupportFile () { + const supportFile = this.options.config.supportFile + + if (supportFile) { + return relative(this.options.config.projectRoot, supportFile) + } } // When the user requests `/` and is not trying to load a spec async handleIndexRoute (req, res) { - return res.end(await this.server.transformIndexHtml(req.url, `

Hello Index

`, req.originalUrl)) + return res.end(await this.server.transformIndexHtml(req.originalUrl, `

Hello Index

`, req.originalUrl)) } async handleCurrentSpecRoute (req, res) { - const html = (await this.getTemplate()).replace('', ` - - - `) + const specFile = this.getCurrentSpecFile(req) + const supportFile = this.getSupportFile() + + if (!specFile) { + throw new Error('Attempted to resolve request to Vite Dev Server, but no specs were found. Re-run Cypress with `DEBUG=cypress:vite-dev-server:*` for more details') + } - return res.end(await this.server.transformIndexHtml(req.url, html)) + let client = '`) + + const ret = await this.server.transformIndexHtml(req.url, html, req.originalUrl) + + return res.end(ret) } // When the user requests `/does-not-exist` handle404 (req, res) { + debug('res end 404') + return res.end(`404!`) } } diff --git a/npm/vite-dev-server/src/resolveConfig.ts b/npm/vite-dev-server/src/resolveConfig.ts index 68f38f8f2931..f72dc189f318 100644 --- a/npm/vite-dev-server/src/resolveConfig.ts +++ b/npm/vite-dev-server/src/resolveConfig.ts @@ -3,7 +3,7 @@ * Vitest's own config resolution logic. * You can find it here https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/create.ts */ -import { resolve } from 'pathe' +import { resolve, relative } from 'pathe' import { mergeConfig } from 'vite' import { configFiles } from './constants' import { Cypress, CypressInspect } from './plugins/index' @@ -14,7 +14,7 @@ import { importModule } from 'local-pkg' const debug = debugFn('cypress:vite-dev-server:resolve-config') export const createConfig = async ({ options, viteConfig: viteOverrides = {} }: StartDevServer) => { - const root = resolve(process.cwd()) + const root = options.config.projectRoot || resolve(process.cwd()) const { default: findUp } = await importModule('find-up') const configFile = await findUp(configFiles, { cwd: root } as { cwd: string }) @@ -30,12 +30,23 @@ export const createConfig = async ({ options, viteConfig: viteOverrides = {} }: const config = { root, + base: `/${options.config.namespace}/src/`, configFile, + optimizeDeps: { + entries: [ + ...options.specs.map((s) => relative(root, s.relative)), + options.config.supportFile ?? resolve(root, options.config.supportFile), + ].filter((v) => v != null), + }, plugins: [ Cypress(options), - await CypressInspect(), + // await CypressInspect(), ], } - return mergeConfig(config, viteOverrides) + const finalConfig = mergeConfig(config, viteOverrides) + + debug('The resolved server config is', JSON.stringify(finalConfig, null, 2)) + + return finalConfig } diff --git a/yarn.lock b/yarn.lock index 7c77ecf4295b..26482642c000 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19668,11 +19668,131 @@ es6-weak-map@^2.0.1: es6-iterator "^2.0.3" es6-symbol "^3.1.1" +esbuild-android-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.23.tgz#c89b3c50b4f47668dcbeb0b34ee4615258818e71" + integrity sha512-k9sXem++mINrZty1v4FVt6nC5BQCFG4K2geCIUUqHNlTdFnuvcqsY7prcKZLFhqVC1rbcJAr9VSUGFL/vD4vsw== + +esbuild-darwin-64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.23.tgz#1c131e8cb133ed935ca32f824349a117c896a15b" + integrity sha512-lB0XRbtOYYL1tLcYw8BoBaYsFYiR48RPrA0KfA/7RFTr4MV7Bwy/J4+7nLsVnv9FGuQummM3uJ93J3ptaTqFug== + +esbuild-darwin-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.23.tgz#3c6245a50109dd84953f53d7833bd3b4f0e8c6fa" + integrity sha512-yat73Z/uJ5tRcfRiI4CCTv0FSnwErm3BJQeZAh+1tIP0TUNh6o+mXg338Zl5EKChD+YGp6PN+Dbhs7qa34RxSw== + +esbuild-freebsd-64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.23.tgz#0cdc54e72d3dd9cd992f9c2960055e68a7f8650c" + integrity sha512-/1xiTjoLuQ+LlbfjJdKkX45qK/M7ARrbLmyf7x3JhyQGMjcxRYVR6Dw81uH3qlMHwT4cfLW4aEVBhP1aNV7VsA== + +esbuild-freebsd-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.23.tgz#1d11faed3a0c429e99b7dddef84103eb509788b2" + integrity sha512-uyPqBU/Zcp6yEAZS4LKj5jEE0q2s4HmlMBIPzbW6cTunZ8cyvjG6YWpIZXb1KK3KTJDe62ltCrk3VzmWHp+iLg== + +esbuild-linux-32@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.23.tgz#fd9f033fc27dcab61100cb1eb1c936893a68c841" + integrity sha512-37R/WMkQyUfNhbH7aJrr1uCjDVdnPeTHGeDhZPUNhfoHV0lQuZNCKuNnDvlH/u/nwIYZNdVvz1Igv5rY/zfrzQ== + +esbuild-linux-64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.23.tgz#c04c438514f1359ecb1529205d0c836d4165f198" + integrity sha512-H0gztDP60qqr8zoFhAO64waoN5yBXkmYCElFklpd6LPoobtNGNnDe99xOQm28+fuD75YJ7GKHzp/MLCLhw2+vQ== + +esbuild-linux-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.23.tgz#d1b3ab2988ab0734886eb9e811726f7db099ab96" + integrity sha512-c4MLOIByNHR55n3KoYf9hYDfBRghMjOiHLaoYLhkQkIabb452RWi+HsNgB41sUpSlOAqfpqKPFNg7VrxL3UX9g== + +esbuild-linux-arm@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.23.tgz#df7558b6a5076f5eb9fd387c8704f768b61d97fb" + integrity sha512-x64CEUxi8+EzOAIpCUeuni0bZfzPw/65r8tC5cy5zOq9dY7ysOi5EVQHnzaxS+1NmV+/RVRpmrzGw1QgY2Xpmw== + +esbuild-linux-mips64le@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.23.tgz#bb4c47fccc9493d460ffeb1f88e8a97a98a14f8b" + integrity sha512-kHKyKRIAedYhKug2EJpyJxOUj3VYuamOVA1pY7EimoFPzaF3NeY7e4cFBAISC/Av0/tiV0xlFCt9q0HJ68IBIw== + +esbuild-linux-ppc64le@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.23.tgz#a332dbc8a1b4e30cfe1261bfaa5cef57c9c8c02a" + integrity sha512-7ilAiJEPuJJnJp/LiDO0oJm5ygbBPzhchJJh9HsHZzeqO+3PUzItXi+8PuicY08r0AaaOe25LA7sGJ0MzbfBag== + +esbuild-linux-riscv64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.23.tgz#85675f3f931f5cd7cfb238fd82f77a62ffcb6d86" + integrity sha512-fbL3ggK2wY0D8I5raPIMPhpCvODFE+Bhb5QGtNP3r5aUsRR6TQV+ZBXIaw84iyvKC8vlXiA4fWLGhghAd/h/Zg== + +esbuild-linux-s390x@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.23.tgz#a526282a696e6d846f4c628f5315475518c0c0f0" + integrity sha512-GHMDCyfy7+FaNSO8RJ8KCFsnax8fLUsOrj9q5Gi2JmZMY0Zhp75keb5abTFCq2/Oy6KVcT0Dcbyo/bFb4rIFJA== + +esbuild-netbsd-64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.23.tgz#8e456605694719aa1be4be266d6cd569c06dfaf5" + integrity sha512-ovk2EX+3rrO1M2lowJfgMb/JPN1VwVYrx0QPUyudxkxLYrWeBxDKQvc6ffO+kB4QlDyTfdtAURrVzu3JeNdA2g== + +esbuild-openbsd-64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.23.tgz#f2fc51714b4ddabc86e4eb30ca101dd325db2f7d" + integrity sha512-uYYNqbVR+i7k8ojP/oIROAHO9lATLN7H2QeXKt2H310Fc8FJj4y3Wce6hx0VgnJ4k1JDrgbbiXM8rbEgQyg8KA== + +esbuild-sunos-64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.23.tgz#a408f33ea20e215909e20173a0fd78b1aaad1f8e" + integrity sha512-hAzeBeET0+SbScknPzS2LBY6FVDpgE+CsHSpe6CEoR51PApdn2IB0SyJX7vGelXzlyrnorM4CAsRyb9Qev4h9g== + +esbuild-windows-32@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.23.tgz#b9005bbff54dac3975ff355d5de2b5e37165d128" + integrity sha512-Kttmi3JnohdaREbk6o9e25kieJR379TsEWF0l39PQVHXq3FR6sFKtVPgY8wk055o6IB+rllrzLnbqOw/UV60EA== + +esbuild-windows-64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.23.tgz#2b5a99befeaca6aefdad32d738b945730a60a060" + integrity sha512-JtIT0t8ymkpl6YlmOl6zoSWL5cnCgyLaBdf/SiU/Eg3C13r0NbHZWNT/RDEMKK91Y6t79kTs3vyRcNZbfu5a8g== + +esbuild-windows-arm64@0.14.23: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.23.tgz#edc560bbadb097eb45fc235aeacb942cb94a38c0" + integrity sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw== + esbuild@^0.12.17, esbuild@^0.12.28: version "0.12.29" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.29.tgz#be602db7c4dc78944a9dbde0d1ea19d36c1f882d" integrity sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g== +esbuild@^0.14.14: + version "0.14.23" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.23.tgz#95e842cb22bc0c7d82c140adc16788aac91469fe" + integrity sha512-XjnIcZ9KB6lfonCa+jRguXyRYcldmkyZ99ieDksqW/C8bnyEX299yA4QH2XcgijCgaddEZePPTgvx/2imsq7Ig== + optionalDependencies: + esbuild-android-arm64 "0.14.23" + esbuild-darwin-64 "0.14.23" + esbuild-darwin-arm64 "0.14.23" + esbuild-freebsd-64 "0.14.23" + esbuild-freebsd-arm64 "0.14.23" + esbuild-linux-32 "0.14.23" + esbuild-linux-64 "0.14.23" + esbuild-linux-arm "0.14.23" + esbuild-linux-arm64 "0.14.23" + esbuild-linux-mips64le "0.14.23" + esbuild-linux-ppc64le "0.14.23" + esbuild-linux-riscv64 "0.14.23" + esbuild-linux-s390x "0.14.23" + esbuild-netbsd-64 "0.14.23" + esbuild-openbsd-64 "0.14.23" + esbuild-sunos-64 "0.14.23" + esbuild-windows-32 "0.14.23" + esbuild-windows-64 "0.14.23" + esbuild-windows-arm64 "0.14.23" + escalade@^3.0.2, escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -30220,7 +30340,7 @@ nanoid@3.2.0: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c" integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA== -nanoid@^3.1.16, nanoid@^3.1.22, nanoid@^3.2.0: +nanoid@^3.1.16, nanoid@^3.1.22, nanoid@^3.2.0, nanoid@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== @@ -34070,12 +34190,12 @@ postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, po source-map "^0.6.1" supports-color "^6.1.0" -postcss@^8.1.10, postcss@^8.1.4, postcss@^8.2.8, postcss@^8.3.6: - version "8.4.6" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.6.tgz#c5ff3c3c457a23864f32cb45ac9b741498a09ae1" - integrity sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA== +postcss@^8.1.10, postcss@^8.1.4, postcss@^8.2.8, postcss@^8.3.6, postcss@^8.4.5: + version "8.4.7" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.7.tgz#f99862069ec4541de386bf57f5660a6c7a0875a8" + integrity sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A== dependencies: - nanoid "^3.2.0" + nanoid "^3.3.1" picocolors "^1.0.0" source-map-js "^1.0.2" @@ -36784,7 +36904,7 @@ resolve@^0.6.3: resolved "https://registry.yarnpkg.com/resolve/-/resolve-0.6.3.tgz#dd957982e7e736debdf53b58a4dd91754575dd46" integrity sha1-3ZV5gufnNt699TtYpN2RdUV13UY= -resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.8.1: +resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.8.1: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -37046,10 +37166,10 @@ rollup@2.38.4: optionalDependencies: fsevents "~2.3.1" -rollup@^2.38.5, rollup@^2.56.1: - version "2.67.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.67.1.tgz#4402665706fa00f321d446ce45f880e02cf54f01" - integrity sha512-1Sbcs4OuW+aD+hhqpIRl+RqooIpF6uQcfzU/QSI7vGkwADY6cM4iLsBGRM2CGLXDTDN5y/yShohFmnKegSPWzg== +rollup@^2.38.5, rollup@^2.56.1, rollup@^2.59.0: + version "2.68.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.68.0.tgz#6ccabfd649447f8f21d62bf41662e5caece3bd66" + integrity sha512-XrMKOYK7oQcTio4wyTz466mucnd8LzkiZLozZ4Rz0zQD+HeX4nUK4B8GrTX/2EvN2/vBF/i2WnaXboPxo0JylA== optionalDependencies: fsevents "~2.3.2" @@ -42693,6 +42813,18 @@ vite@2.5.0: optionalDependencies: fsevents "~2.3.2" +vite@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/vite/-/vite-2.8.0.tgz#0646ab9eee805fb24b667889644ac04bc516d0d3" + integrity sha512-ed5rjyeysttuPJX/aKSA0gTB/8ZKLM5xF6FtEuKy1B9DiQbDNFMVMQxnb9JesgBPUMMIJxC8w5KZ/KNWLKFXoA== + dependencies: + esbuild "^0.14.14" + postcss "^8.4.5" + resolve "^1.22.0" + rollup "^2.59.0" + optionalDependencies: + fsevents "~2.3.2" + vm-browserify@1.1.2, vm-browserify@^1.0.0, vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" From 2bf55dc84db40597632c66034e6cb8575a10e79b Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Thu, 3 Mar 2022 21:25:52 -0500 Subject: [PATCH 05/21] wip --- .../client/initCypressTests.js | 18 ++++++----- npm/vite-dev-server/cypress/foo.cy.js | 4 --- npm/vite-dev-server/src/plugins/cypress.ts | 31 ++----------------- yarn.lock | 2 +- 4 files changed, 15 insertions(+), 40 deletions(-) delete mode 100644 npm/vite-dev-server/cypress/foo.cy.js diff --git a/npm/vite-dev-server/client/initCypressTests.js b/npm/vite-dev-server/client/initCypressTests.js index 605239cd8527..7fa5fd2bef65 100644 --- a/npm/vite-dev-server/client/initCypressTests.js +++ b/npm/vite-dev-server/client/initCypressTests.js @@ -1,18 +1,22 @@ // This file is merged in a ${ + }${ indexHtmlContent.substring(endOfBody) }` }, resolveId (id) { - if (id === '@cypress:config') { - return id - } - - if (id === '@cypress:support-path') { - return posixSupportFilePath - } - - if (id === '@cypress:spec-loaders') { - return id - } - - if (id === '/@cypress:client-init-test') { + if (id === '@cypress:client-init-test') { return INIT_FILEPATH } }, - load (id) { - if (id === '@cypress:spec-loaders') { - return `export default {\n${specs.map((s) => { - return `${JSON.stringify(s.relative)}:()=>import(${JSON.stringify(s.absolute)})` - }).join(',\n')}\n}` - } - - if (id === '@cypress:config') { - return ` -export const hasSupportPath = ${JSON.stringify(!!supportFilePath)}` - } - }, configureServer: async (server: ViteDevServer) => { server.middlewares.use(`${base}index.html`, async (req, res) => { const transformedIndexHtml = await server.transformIndexHtml(base, '') @@ -157,7 +132,7 @@ export const hasSupportPath = ${JSON.stringify(!!supportFilePath)}` devServerEvents.emit('dev-server:compile:success') // if we update support we know we have to re-run it all - // no need to ckeck further + // no need to check further return [] } diff --git a/yarn.lock b/yarn.lock index 26482642c000..1e2b6b405c57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30340,7 +30340,7 @@ nanoid@3.2.0: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c" integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA== -nanoid@^3.1.16, nanoid@^3.1.22, nanoid@^3.2.0, nanoid@^3.3.1: +nanoid@^3.1.16, nanoid@^3.1.22, nanoid@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== From 99a6887e05c91f628c295158734be222b30ca392 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Fri, 4 Mar 2022 04:08:54 -0500 Subject: [PATCH 06/21] updated versions --- npm/vite-dev-server/package.json | 5 +- npm/vite-dev-server/src/plugins/cypress.ts | 4 +- .../unit/codegen/files/vue/Button.stories.js | 66 ---------- yarn.lock | 121 ++++++++---------- 4 files changed, 60 insertions(+), 136 deletions(-) delete mode 100644 packages/data-context/test/unit/codegen/files/vue/Button.stories.js diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json index 248c7dc266fe..fb67f3b30790 100644 --- a/npm/vite-dev-server/package.json +++ b/npm/vite-dev-server/package.json @@ -26,8 +26,7 @@ "@cypress/react": "0.0.0-development", "@cypress/vue": "0.0.0-development", "@testing-library/cypress": "7.0.4", - "@vitejs/plugin-vue": "1.2.4", - "@vue/compiler-sfc": "3.2.6", + "@vitejs/plugin-vue": "2.2.4", "cypress": "0.0.0-development", "eslint-plugin-vue": "7.18.0", "mocha-junit-reporter": "^2.0.0", @@ -35,7 +34,7 @@ "react": "17.0.2", "vite": "2.8.0", "vite-plugin-inspect": "0.4.3", - "vue": "3.2.6", + "vue": "3.2.13", "vue-eslint-parser": "7.11.0" }, "peerDependencies": { diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index 481839099b3f..531805a7bb9d 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -82,12 +82,12 @@ export const Cypress = ( // insert the script in the end of the body return `${indexHtmlContent.substring(0, endOfBody) - }${ + }${ indexHtmlContent.substring(endOfBody) }` }, resolveId (id) { - if (id === '@cypress:client-init-test') { + if (id === '/@cypress:client-init-test') { return INIT_FILEPATH } }, diff --git a/packages/data-context/test/unit/codegen/files/vue/Button.stories.js b/packages/data-context/test/unit/codegen/files/vue/Button.stories.js deleted file mode 100644 index 1c0a8f9b8bc4..000000000000 --- a/packages/data-context/test/unit/codegen/files/vue/Button.stories.js +++ /dev/null @@ -1,66 +0,0 @@ -// @ts-nocheck -import MyButton from './Button.vue' - -// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export -export default { - title: 'Example/Button', - component: MyButton, - // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes - argTypes: { - backgroundColor: { control: 'color' }, - onClick: {}, - size: { - control: { type: 'select' }, - options: ['small', 'medium', 'large'], - }, - }, -} - -// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args -const Template = (args) => { - return { - // Components used in your story `template` are defined in the `components` object - components: { MyButton }, - // The story's `args` need to be mapped into the template through the `setup()` method - setup () { - return { args } - }, - // And then the `args` are bound to your component with `v-bind="args"` - template: '', - } -} - -export const Primary = Template.bind({}) - -// More on args: https://storybook.js.org/docs/vue/writing-stories/args -Primary.args = { - primary: true, - label: 'Button', -} - -export const Secondary = Template.bind({}) - -Secondary.args = { - label: 'Button', -} - -export const Large = Template.bind({}) - -Large.args = { - size: 'large', - label: 'Button', -} - -export const Small = Template.bind({}) - -Small.args = { - size: 'small', - label: 'Button', -} - -export const ExampleWithLongName = Template.bind({}) - -ExampleWithLongName.args = { - size: 'small', - label: 'Button', -} diff --git a/yarn.lock b/yarn.lock index 1e2b6b405c57..5b0f0db1b185 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10112,6 +10112,11 @@ resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.2.4.tgz#a7aa6e6a31c556a8b781de730316deeecf7f56f2" integrity sha512-D/3H9plevPQGgQGwmV6eecvOnooLTecPR63HPffVVWPEhbfvmtYLWgznzs456NBb2DItiRTCIa1yWxvGqC+I8A== +"@vitejs/plugin-vue@2.2.4": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-2.2.4.tgz#ab8b199ca82496b05d2654c5f34ffcf9b947243d" + integrity sha512-ev9AOlp0ljCaDkFZF3JwC/pD2N4Hh+r5srl5JHM6BKg5+99jiiK0rE/XaRs3pVm1wzyKkjUy/StBSoXX5fFzcw== + "@volar/code-gen@^0.27.14": version "0.27.14" resolved "https://registry.yarnpkg.com/@volar/code-gen/-/code-gen-0.27.14.tgz#fea4bde0c05b81f22e16185e01ecb6fedd842e05" @@ -10394,17 +10399,6 @@ semver "^6.1.0" strip-ansi "^6.0.0" -"@vue/compiler-core@3.2.12": - version "3.2.12" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.12.tgz#23998d6986a45e1ab0424130cc0ad00e33da1101" - integrity sha512-IGJ0JmrAaAl5KBBegPAKkoXvsfDFgN/h7K1t/+0MxqpZF1fTDVUOp3tG7q9gWa7fwzGEaIsPhjtT5C3qztdLKg== - dependencies: - "@babel/parser" "^7.15.0" - "@babel/types" "^7.15.0" - "@vue/shared" "3.2.12" - estree-walker "^2.0.2" - source-map "^0.6.1" - "@vue/compiler-core@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.13.tgz#901268088b98a53c43be0f02bfa0e3a389ad6bf4" @@ -10426,14 +10420,6 @@ estree-walker "^2.0.2" source-map "^0.6.1" -"@vue/compiler-dom@3.2.12": - version "3.2.12" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.12.tgz#d6ba00114e73adb8b18940c3ff18797cc2b0514f" - integrity sha512-MulvKilA2USm8ubPfvXvNY55HVTn+zHERsXeNg437TXrmM4FRCis6zjWW47QZ3ZyxEkCdqOmuiFCtXbpnuthyw== - dependencies: - "@vue/compiler-core" "3.2.12" - "@vue/shared" "3.2.12" - "@vue/compiler-dom@3.2.13", "@vue/compiler-dom@^3.2.6": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.13.tgz#028982494fb9d97807d5275b42355732686f8ed7" @@ -10450,6 +10436,22 @@ "@vue/compiler-core" "3.2.6" "@vue/shared" "3.2.6" +"@vue/compiler-sfc@3.2.13", "@vue/compiler-sfc@^3.0.11", "@vue/compiler-sfc@^3.0.5", "@vue/compiler-sfc@^3.2.4": + version "3.2.13" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.13.tgz#a38475048aad9c96cf04dfe635129b417e0f9295" + integrity sha512-3j970d969aOILykcTstdihP33xH1Onm0wsvcl+rGv9AGxivB9xicRxBw93HCIA4dAPivr42WjHEoci9q2/85uw== + dependencies: + "@babel/parser" "^7.15.0" + "@vue/compiler-core" "3.2.13" + "@vue/compiler-dom" "3.2.13" + "@vue/compiler-ssr" "3.2.13" + "@vue/ref-transform" "3.2.13" + "@vue/shared" "3.2.13" + estree-walker "^2.0.2" + magic-string "^0.25.7" + postcss "^8.1.10" + source-map "^0.6.1" + "@vue/compiler-sfc@3.2.6": version "3.2.6" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.6.tgz#d6ab7410cff57081ab627b15a1ea51a1072c7cf1" @@ -10474,22 +10476,6 @@ postcss-selector-parser "^6.0.4" source-map "^0.6.1" -"@vue/compiler-sfc@^3.0.11", "@vue/compiler-sfc@^3.0.5", "@vue/compiler-sfc@^3.2.4": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.13.tgz#a38475048aad9c96cf04dfe635129b417e0f9295" - integrity sha512-3j970d969aOILykcTstdihP33xH1Onm0wsvcl+rGv9AGxivB9xicRxBw93HCIA4dAPivr42WjHEoci9q2/85uw== - dependencies: - "@babel/parser" "^7.15.0" - "@vue/compiler-core" "3.2.13" - "@vue/compiler-dom" "3.2.13" - "@vue/compiler-ssr" "3.2.13" - "@vue/ref-transform" "3.2.13" - "@vue/shared" "3.2.13" - estree-walker "^2.0.2" - magic-string "^0.25.7" - postcss "^8.1.10" - source-map "^0.6.1" - "@vue/compiler-ssr@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.13.tgz#98434672e0b488c2affa4b0570731d6be5cda187" @@ -10532,12 +10518,12 @@ resolved "https://registry.yarnpkg.com/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.2.tgz#ceb924b4ecb3b9c43871c7a429a02f8423e621ab" integrity sha512-LIZMuJk38pk9U9Ur4YzHjlIyMuxPlACdBIHH9/nGYVTsaGKOSnSuELiE8vS9wa+dJpIYspYUOqk+L1Q4pgHQHQ== -"@vue/reactivity@3.2.12", "@vue/reactivity@^3.2.6": - version "3.2.12" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.12.tgz#b482a737cbdc891f9b1ec3100f3c1804b56d080b" - integrity sha512-Lr5CTQjFm5mT/6DGnVNhptmba/Qg1DbD6eNWWmiHLMlpPt4q2ww9A2orEjVw0qNcdTJ04JLPEVAz5jhTZTCfIg== +"@vue/reactivity@3.2.13", "@vue/reactivity@^3.2.6": + version "3.2.13" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.13.tgz#d269b09aaafef06a91bf3eb98defd41a2c3daf54" + integrity sha512-j3ByCiRgrr4uEZpXJM8XowrbYKeNHMHlbmMZE/2QpVzVPIfrQWS2fpLmbchJeMrnwIrzEl+dub3hgwkV4KRn4w== dependencies: - "@vue/shared" "3.2.12" + "@vue/shared" "3.2.13" "@vue/reactivity@3.2.6": version "3.2.6" @@ -10568,13 +10554,13 @@ estree-walker "^2.0.2" magic-string "^0.25.7" -"@vue/runtime-core@3.2.12": - version "3.2.12" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.12.tgz#422662fd5b85f787222d2aea840264ba97e84a13" - integrity sha512-LO+ztgcmsomavYUaSq7BTteh8pmnUmvUnXUFVYdlcg3VCdYRS0ImlclpYsNHqjAk2gU+H09dr2PP0kL961xUfQ== +"@vue/runtime-core@3.2.13": + version "3.2.13" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.13.tgz#8b62f92642e56af71d0d35a9f0065daf6f9eb3fb" + integrity sha512-VQedL9Wa7yWMPVDrIkxzLCm6cWCDBoXcXc+jrsOJkqpWhEeA7+zGOsDsHzhLH8aaJD6vdnUR5Cy0EKvoJDqEWQ== dependencies: - "@vue/reactivity" "3.2.12" - "@vue/shared" "3.2.12" + "@vue/reactivity" "3.2.13" + "@vue/shared" "3.2.13" "@vue/runtime-core@3.2.6": version "3.2.6" @@ -10584,13 +10570,13 @@ "@vue/reactivity" "3.2.6" "@vue/shared" "3.2.6" -"@vue/runtime-dom@3.2.12": - version "3.2.12" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.12.tgz#d9fe865dca36f9ca33ba327afdeb89ae2aa03f4c" - integrity sha512-+NSDqivgihvoPYbKFDmzFu1tW7SOzwc7r0b7T8vsJtooVPGxwtfAFZ6wyLtteOXXrCpyTR3kpyTCIp31uY7aJg== +"@vue/runtime-dom@3.2.13": + version "3.2.13" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.13.tgz#238f517a75765719f8373409cee853775c636f92" + integrity sha512-DVG+ItkrnCOEa9HSrmGBTLwv/gBVYCO8wkm/yv+d5ChoTnyIILxP0oCiZEPJsgWZfUSRPNi5rXozwo7F99MiwQ== dependencies: - "@vue/runtime-core" "3.2.12" - "@vue/shared" "3.2.12" + "@vue/runtime-core" "3.2.13" + "@vue/shared" "3.2.13" csstype "^2.6.8" "@vue/runtime-dom@3.2.6": @@ -10602,10 +10588,13 @@ "@vue/shared" "3.2.6" csstype "^2.6.8" -"@vue/shared@3.2.12": - version "3.2.12" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.12.tgz#304064a4b56fc6c7b9169d80e9ee62ecb4bf0a1c" - integrity sha512-5CkaifUCJwcTuru7FDwKFacPJuEoGUTw0LKSa5bw40B23s0TS+MGlYR1285nbV/ju3QUGlA6d6PD+GJkWy7uFg== +"@vue/server-renderer@3.2.13": + version "3.2.13" + resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.13.tgz#b10a564be67eec6721f90b36c3c817c19e6064b4" + integrity sha512-KI+JFV+vRb95+Jb6IwRRm4Vhvj8wrJTNs+OlATfqwwIRpBGAyxn/4knDJYzlnUf/mrKAkrbw751mHhi+pEwILQ== + dependencies: + "@vue/compiler-ssr" "3.2.13" + "@vue/shared" "3.2.13" "@vue/shared@3.2.13", "@vue/shared@^3.2.6": version "3.2.13" @@ -43094,6 +43083,17 @@ vue3-file-selector@^1.0.1: resolved "https://registry.yarnpkg.com/vue3-file-selector/-/vue3-file-selector-1.0.1.tgz#bcae2f5ab44c406c1d72a60885990883051b688b" integrity sha512-popFgEvLrkRFo9MWs8mzlb4HH+Mg2+5DhJF7MzKmUrE9179rtVt4Wf7/w+0FvhDRVELQ6f8Z9BhF+SDSUSpRVw== +vue@3.2.13, vue@^3.2.4: + version "3.2.13" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.13.tgz#9d1a94fc62dc29ae21a3dd0d8ee24198e421671e" + integrity sha512-raTGvLXXTdMxrhQKY1r1YFXZMmjbjTe7QHBW9EU4CgCBhq8DbgyLqgILcSUZmeFyazk5WY7a7xu0VYmHElf4lA== + dependencies: + "@vue/compiler-dom" "3.2.13" + "@vue/compiler-sfc" "3.2.13" + "@vue/runtime-dom" "3.2.13" + "@vue/server-renderer" "3.2.13" + "@vue/shared" "3.2.13" + vue@3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.6.tgz#c71445078751f458648fd8fb3a2da975507d03d2" @@ -43103,15 +43103,6 @@ vue@3.2.6: "@vue/runtime-dom" "3.2.6" "@vue/shared" "3.2.6" -vue@^3.2.4: - version "3.2.12" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.12.tgz#b44f55506fb6a7c4b65635e609deb5f9368aa2ce" - integrity sha512-VV14HtubmB56uuQaSvLkJZgoocPiN8CJI3zZA9y8h7q/Z5hcknDIFkbq5d8ku0ukZ6AJPQqMsZWcq0qryF0jgg== - dependencies: - "@vue/compiler-dom" "3.2.12" - "@vue/runtime-dom" "3.2.12" - "@vue/shared" "3.2.12" - vuex@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/vuex/-/vuex-4.0.0.tgz#ac877aa76a9c45368c979471e461b520d38e6cf5" From 6960cc8ee231c5a841957800bc62fe3d51d04362 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Fri, 4 Mar 2022 04:25:59 -0500 Subject: [PATCH 07/21] updated versions --- .../client/initCypressTests.js | 2 - npm/vite-dev-server/src/constants.ts | 2 - npm/vue/examples/code-coverage/package.json | 2 +- npm/vue/examples/vue-cli/package.json | 2 +- npm/vue/package.json | 2 +- packages/app/package.json | 4 +- packages/frontend-shared/package.json | 4 +- packages/launchpad/package.json | 4 +- yarn.lock | 38 ------------------- 9 files changed, 9 insertions(+), 51 deletions(-) diff --git a/npm/vite-dev-server/client/initCypressTests.js b/npm/vite-dev-server/client/initCypressTests.js index 7fa5fd2bef65..eb61234c85f8 100644 --- a/npm/vite-dev-server/client/initCypressTests.js +++ b/npm/vite-dev-server/client/initCypressTests.js @@ -7,8 +7,6 @@ const importsToLoad = [] const supportFile = CypressInstance.config('supportFile') -console.log(supportFile) - if (supportFile) { importsToLoad.push(() => import(supportFile)) } diff --git a/npm/vite-dev-server/src/constants.ts b/npm/vite-dev-server/src/constants.ts index e214cb6ac0b0..9d51c68b7c92 100644 --- a/npm/vite-dev-server/src/constants.ts +++ b/npm/vite-dev-server/src/constants.ts @@ -6,5 +6,3 @@ export const configFiles = [ 'vite.config.js', 'vite.config.mjs', ] - -export const commonSpecExtensions = ['.cy', '.spec', '.test', '-spec', '-test', '_spec'] diff --git a/npm/vue/examples/code-coverage/package.json b/npm/vue/examples/code-coverage/package.json index 899c0119b573..12dc4f6eed10 100644 --- a/npm/vue/examples/code-coverage/package.json +++ b/npm/vue/examples/code-coverage/package.json @@ -26,7 +26,7 @@ "patch-package": "6.4.7", "sass": "1.44.0", "sass-loader": "7.3.1", - "vue": "3.2.6", + "vue": "3.2.13", "vue-loader": "16.2.0", "webpack": "^4.44.2" }, diff --git a/npm/vue/examples/vue-cli/package.json b/npm/vue/examples/vue-cli/package.json index 198cb41f6c9d..3980c8bcca51 100644 --- a/npm/vue/examples/vue-cli/package.json +++ b/npm/vue/examples/vue-cli/package.json @@ -14,7 +14,7 @@ "dependencies": { "core-js": "^3.6.5", "register-service-worker": "^1.7.1", - "vue": "3.2.6" + "vue": "3.2.13" }, "devDependencies": { "@cypress/code-coverage": "^3.9.5", diff --git a/npm/vue/package.json b/npm/vue/package.json index 9a1440ede00a..3470c11629e2 100644 --- a/npm/vue/package.json +++ b/npm/vue/package.json @@ -48,7 +48,7 @@ "rollup-plugin-typescript2": "^0.29.0", "tailwindcss": "1.1.4", "typescript": "^4.2.3", - "vue": "3.2.6", + "vue": "3.2.13", "vue-eslint-parser": "7.11.0", "vue-i18n": "9.0.0-rc.6", "vue-loader": "16.1.2", diff --git a/packages/app/package.json b/packages/app/package.json index c02369050c57..34317b50a778 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -31,7 +31,7 @@ "@types/faker": "5.5.8", "@urql/core": "2.3.1", "@urql/vue": "0.4.3", - "@vitejs/plugin-vue": "1.2.4", + "@vitejs/plugin-vue": "2.2.4", "@vitejs/plugin-vue-jsx": "1.1.6", "@vueuse/core": "7.2.2", "@windicss/plugin-interaction-variants": "1.0.0", @@ -64,7 +64,7 @@ "vite-plugin-vue-layouts": "0.4.1", "vite-plugin-windicss": "1.2.4", "vite-svg-loader": "2.1.1", - "vue": "3.2.6", + "vue": "3.2.13", "vue-i18n": "9.2.0-beta.7", "vue-router": "4", "vue-tsc": "^0.3.0", diff --git a/packages/frontend-shared/package.json b/packages/frontend-shared/package.json index f749110d7092..eed0027cb1ee 100644 --- a/packages/frontend-shared/package.json +++ b/packages/frontend-shared/package.json @@ -34,7 +34,7 @@ "@urql/exchange-execute": "1.1.0", "@urql/exchange-graphcache": "4.3.3", "@urql/vue": "0.4.3", - "@vitejs/plugin-vue": "1.2.4", + "@vitejs/plugin-vue": "2.2.4", "@vitejs/plugin-vue-jsx": "1.1.6", "@vue/compiler-core": "3.2.6", "@vue/compiler-dom": "3.2.6", @@ -60,7 +60,7 @@ "vite-plugin-icons": "0.6.3", "vite-plugin-windicss": "^1.4.7", "vite-svg-loader": "^2.2.0", - "vue": "3.2.6", + "vue": "3.2.13", "vue-eslint-parser": "7.11.0", "vue-i18n": "^9.2.0-beta.7", "vue-toastification": "2.0.0-rc.1", diff --git a/packages/launchpad/package.json b/packages/launchpad/package.json index 0f0fb970caaa..8129cf14d2a3 100644 --- a/packages/launchpad/package.json +++ b/packages/launchpad/package.json @@ -32,7 +32,7 @@ "@urql/core": "2.3.1", "@urql/devtools": "2.0.3", "@urql/vue": "0.4.3", - "@vitejs/plugin-vue": "1.2.4", + "@vitejs/plugin-vue": "2.2.4", "@vitejs/plugin-vue-jsx": "1.1.6", "@vue/compiler-core": "3.2.6", "@vue/compiler-dom": "3.2.6", @@ -60,7 +60,7 @@ "vite-plugin-purge-icons": "0.7.0", "vite-plugin-windicss": "1.2.4", "vite-svg-loader": "2.1.1", - "vue": "3.2.6", + "vue": "3.2.13", "vue-i18n": "9.2.0-beta.7", "vue-tsc": "^0.3.0", "vue3-file-selector": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index 5b0f0db1b185..a00cd6993779 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10107,11 +10107,6 @@ "@vue/babel-plugin-jsx" "^1.0.6" hash-sum "^2.0.0" -"@vitejs/plugin-vue@1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.2.4.tgz#a7aa6e6a31c556a8b781de730316deeecf7f56f2" - integrity sha512-D/3H9plevPQGgQGwmV6eecvOnooLTecPR63HPffVVWPEhbfvmtYLWgznzs456NBb2DItiRTCIa1yWxvGqC+I8A== - "@vitejs/plugin-vue@2.2.4": version "2.2.4" resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-2.2.4.tgz#ab8b199ca82496b05d2654c5f34ffcf9b947243d" @@ -10525,13 +10520,6 @@ dependencies: "@vue/shared" "3.2.13" -"@vue/reactivity@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.6.tgz#b8993fa6f48545178e588e25a9c9431a1c1b7d50" - integrity sha512-8vIDD2wpCnYisNNZjmcIj+Rixn0uhZNY3G1vzlgdVdLygeRSuFjkmnZk6WwvGzUWpKfnG0e/NUySM3mVi59hAA== - dependencies: - "@vue/shared" "3.2.6" - "@vue/ref-transform@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/ref-transform/-/ref-transform-3.2.13.tgz#6adfce50d388cc03683d9d2ba58f3a3bde5166f4" @@ -10562,14 +10550,6 @@ "@vue/reactivity" "3.2.13" "@vue/shared" "3.2.13" -"@vue/runtime-core@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.6.tgz#376baeef7fe02a62377d46d0d0a8ab9510db1d8e" - integrity sha512-3mqtgpj/YSGFxtvTufSERRApo92B16JNNxz9p+5eG6PPuqTmuRJz214MqhKBEgLEAIQ6R6YCbd83ZDtjQnyw2g== - dependencies: - "@vue/reactivity" "3.2.6" - "@vue/shared" "3.2.6" - "@vue/runtime-dom@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.13.tgz#238f517a75765719f8373409cee853775c636f92" @@ -10579,15 +10559,6 @@ "@vue/shared" "3.2.13" csstype "^2.6.8" -"@vue/runtime-dom@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.6.tgz#0f74dbca84d56c222fbfbd53415b260386859a3b" - integrity sha512-fq33urnP0BNCGm2O3KCzkJlKIHI80C94HJ4qDZbjsTtxyOn5IHqwKSqXVN3RQvO6epcQH+sWS+JNwcNDPzoasg== - dependencies: - "@vue/runtime-core" "3.2.6" - "@vue/shared" "3.2.6" - csstype "^2.6.8" - "@vue/server-renderer@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.13.tgz#b10a564be67eec6721f90b36c3c817c19e6064b4" @@ -43094,15 +43065,6 @@ vue@3.2.13, vue@^3.2.4: "@vue/server-renderer" "3.2.13" "@vue/shared" "3.2.13" -vue@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.6.tgz#c71445078751f458648fd8fb3a2da975507d03d2" - integrity sha512-Zlb3LMemQS3Xxa6xPsecu45bNjr1hxO8Bh5FUmE0Dr6Ot0znZBKiM47rK6O7FTcakxOnvVN+NTXWJF6u8ajpCQ== - dependencies: - "@vue/compiler-dom" "3.2.6" - "@vue/runtime-dom" "3.2.6" - "@vue/shared" "3.2.6" - vuex@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/vuex/-/vuex-4.0.0.tgz#ac877aa76a9c45368c979471e461b520d38e6cf5" From 8bc9ad8cf375ea52975d845a48e2f4bb2c34a9a1 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Fri, 4 Mar 2022 04:45:17 -0500 Subject: [PATCH 08/21] updated versions --- npm/design-system/package.json | 2 +- npm/vite-dev-server/package.json | 2 +- npm/vue/examples/code-coverage/package.json | 2 +- npm/vue/examples/vue-cli/package.json | 2 +- npm/vue/package.json | 4 +- packages/app/package.json | 6 +- packages/driver/package.json | 2 +- packages/frontend-shared/package.json | 12 +- packages/launchpad/package.json | 12 +- yarn.lock | 263 ++++++++++---------- 10 files changed, 153 insertions(+), 154 deletions(-) diff --git a/npm/design-system/package.json b/npm/design-system/package.json index 4b6833a31d87..24c94073144b 100644 --- a/npm/design-system/package.json +++ b/npm/design-system/package.json @@ -84,7 +84,7 @@ "tsconfig-paths-webpack-plugin": "^3.5.1", "typed-scss-modules": "^4.1.1", "typescript": "^4.2.3", - "vite": "2.5.0", + "vite": "2.8.0", "webpack": "^4.44.2" }, "peerDependencies": { diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json index fb67f3b30790..1a8c756c53a6 100644 --- a/npm/vite-dev-server/package.json +++ b/npm/vite-dev-server/package.json @@ -34,7 +34,7 @@ "react": "17.0.2", "vite": "2.8.0", "vite-plugin-inspect": "0.4.3", - "vue": "3.2.13", + "vue": "3.2.31", "vue-eslint-parser": "7.11.0" }, "peerDependencies": { diff --git a/npm/vue/examples/code-coverage/package.json b/npm/vue/examples/code-coverage/package.json index 12dc4f6eed10..8aaf2e5a6633 100644 --- a/npm/vue/examples/code-coverage/package.json +++ b/npm/vue/examples/code-coverage/package.json @@ -26,7 +26,7 @@ "patch-package": "6.4.7", "sass": "1.44.0", "sass-loader": "7.3.1", - "vue": "3.2.13", + "vue": "3.2.31", "vue-loader": "16.2.0", "webpack": "^4.44.2" }, diff --git a/npm/vue/examples/vue-cli/package.json b/npm/vue/examples/vue-cli/package.json index 3980c8bcca51..682c2169736c 100644 --- a/npm/vue/examples/vue-cli/package.json +++ b/npm/vue/examples/vue-cli/package.json @@ -14,7 +14,7 @@ "dependencies": { "core-js": "^3.6.5", "register-service-worker": "^1.7.1", - "vue": "3.2.13" + "vue": "3.2.31" }, "devDependencies": { "@cypress/code-coverage": "^3.9.5", diff --git a/npm/vue/package.json b/npm/vue/package.json index 3470c11629e2..2cb0582da873 100644 --- a/npm/vue/package.json +++ b/npm/vue/package.json @@ -30,7 +30,7 @@ "@rollup/plugin-node-resolve": "^11.1.1", "@vue/cli-plugin-babel": "~4.4.0", "@vue/cli-service": "~4.4.0", - "@vue/compiler-sfc": "3.2.6", + "@vue/compiler-sfc": "3.2.31", "axios": "0.21.2", "babel-loader": "8.1.0", "babel-plugin-istanbul": "^6.0.0", @@ -48,7 +48,7 @@ "rollup-plugin-typescript2": "^0.29.0", "tailwindcss": "1.1.4", "typescript": "^4.2.3", - "vue": "3.2.13", + "vue": "3.2.31", "vue-eslint-parser": "7.11.0", "vue-i18n": "9.0.0-rc.6", "vue-loader": "16.1.2", diff --git a/packages/app/package.json b/packages/app/package.json index 34317b50a778..539a98caa4cf 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -32,7 +32,7 @@ "@urql/core": "2.3.1", "@urql/vue": "0.4.3", "@vitejs/plugin-vue": "2.2.4", - "@vitejs/plugin-vue-jsx": "1.1.6", + "@vitejs/plugin-vue-jsx": "1.3.8", "@vueuse/core": "7.2.2", "@windicss/plugin-interaction-variants": "1.0.0", "ansi-to-html": "0.6.14", @@ -56,7 +56,7 @@ "rollup-plugin-polyfill-node": "^0.7.0", "unplugin-icons": "^0.11.3", "unplugin-vue-components": "^0.15.2", - "vite": "2.5.0", + "vite": "2.8.0", "vite-plugin-components": "0.11.3", "vite-plugin-icons": "0.6.3", "vite-plugin-pages": "0.18.1", @@ -64,7 +64,7 @@ "vite-plugin-vue-layouts": "0.4.1", "vite-plugin-windicss": "1.2.4", "vite-svg-loader": "2.1.1", - "vue": "3.2.13", + "vue": "3.2.31", "vue-i18n": "9.2.0-beta.7", "vue-router": "4", "vue-tsc": "^0.3.0", diff --git a/packages/driver/package.json b/packages/driver/package.json index 7c7cfd83f065..5535886b9b06 100644 --- a/packages/driver/package.json +++ b/packages/driver/package.json @@ -83,7 +83,7 @@ "unfetch": "4.1.0", "url-parse": "1.5.6", "vanilla-text-mask": "5.1.1", - "vite": "2.5.0", + "vite": "2.8.0", "webpack": "^4.44.2", "zone.js": "0.9.0" }, diff --git a/packages/frontend-shared/package.json b/packages/frontend-shared/package.json index eed0027cb1ee..af282cbe1c22 100644 --- a/packages/frontend-shared/package.json +++ b/packages/frontend-shared/package.json @@ -35,10 +35,7 @@ "@urql/exchange-graphcache": "4.3.3", "@urql/vue": "0.4.3", "@vitejs/plugin-vue": "2.2.4", - "@vitejs/plugin-vue-jsx": "1.1.6", - "@vue/compiler-core": "3.2.6", - "@vue/compiler-dom": "3.2.6", - "@vue/compiler-sfc": "3.2.6", + "@vitejs/plugin-vue-jsx": "1.3.8", "@vueuse/core": "7.2.2", "@windicss/plugin-interaction-variants": "1.0.0", "bluebird": "3.5.3", @@ -56,11 +53,14 @@ "spin.js": "^4.1.1", "unplugin-icons": "^0.11.4", "unplugin-vue-components": "^0.15.4", - "vite": "2.5.0", + "vite": "2.8.0", "vite-plugin-icons": "0.6.3", "vite-plugin-windicss": "^1.4.7", "vite-svg-loader": "^2.2.0", - "vue": "3.2.13", + "vue": "3.2.31", + "@vue/compiler-core": "3.2.31", + "@vue/compiler-dom": "3.2.31", + "@vue/compiler-sfc": "3.2.31", "vue-eslint-parser": "7.11.0", "vue-i18n": "^9.2.0-beta.7", "vue-toastification": "2.0.0-rc.1", diff --git a/packages/launchpad/package.json b/packages/launchpad/package.json index 8129cf14d2a3..ab422d2baf05 100644 --- a/packages/launchpad/package.json +++ b/packages/launchpad/package.json @@ -33,10 +33,10 @@ "@urql/devtools": "2.0.3", "@urql/vue": "0.4.3", "@vitejs/plugin-vue": "2.2.4", - "@vitejs/plugin-vue-jsx": "1.1.6", - "@vue/compiler-core": "3.2.6", - "@vue/compiler-dom": "3.2.6", - "@vue/compiler-sfc": "3.2.6", + "@vitejs/plugin-vue-jsx": "1.3.8", + "@vue/compiler-core": "3.2.31", + "@vue/compiler-dom": "3.2.31", + "@vue/compiler-sfc": "3.2.31", "@vueuse/core": "7.2.2", "bluebird": "3.5.3", "classnames": "2.3.1", @@ -52,7 +52,7 @@ "rimraf": "3.0.2", "rollup-plugin-polyfill-node": "^0.7.0", "type-fest": "^2.3.4", - "vite": "2.5.0", + "vite": "2.8.0", "vite-plugin-components": "0.11.3", "vite-plugin-icons": "0.6.3", "vite-plugin-optimize-persist": "0.0.5", @@ -60,7 +60,7 @@ "vite-plugin-purge-icons": "0.7.0", "vite-plugin-windicss": "1.2.4", "vite-svg-loader": "2.1.1", - "vue": "3.2.13", + "vue": "3.2.31", "vue-i18n": "9.2.0-beta.7", "vue-tsc": "^0.3.0", "vue3-file-selector": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index a00cd6993779..23dfe01dc37c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,10 +7,10 @@ resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.1.1.tgz#9274ec7460652f9c632c59addf24efb1684ef876" integrity sha512-sAP4LldeWNz0lNzmTird3uWfFDWWTeg6V/MsmyyLR9X1idwKBWIgt/ZvinqQldJm3LecKEs1emkbquO6PCiLVQ== -"@ampproject/remapping@^2.0.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.1.0.tgz#72becdf17ee44b2d1ac5651fb12f1952c336fe23" - integrity sha512-d5RysTlJ7hmw5Tw4UxgxcY3lkMe92n8sXCcuLPAyIAHK6j8DefDwtGnVVDgOnv+RnEosulDJ9NPKQL27bDId0g== +"@ampproject/remapping@^2.1.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.1.2.tgz#4edca94973ded9630d20101cd8559cedb8d8bd34" + integrity sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg== dependencies: "@jridgewell/trace-mapping" "^0.3.0" @@ -608,20 +608,20 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.0.0", "@babel/core@^7.0.1", "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.11.0", "@babel/core@^7.11.1", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.14.6", "@babel/core@^7.4.5", "@babel/core@^7.5.4", "@babel/core@^7.7.5", "@babel/core@^7.8.6", "@babel/core@^7.9.6": - version "7.17.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.2.tgz#2c77fc430e95139d816d39b113b31bf40fb22337" - integrity sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw== +"@babel/core@^7.0.0", "@babel/core@^7.0.1", "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.11.0", "@babel/core@^7.11.1", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.17.2", "@babel/core@^7.4.5", "@babel/core@^7.5.4", "@babel/core@^7.7.5", "@babel/core@^7.8.6", "@babel/core@^7.9.6": + version "7.17.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.5.tgz#6cd2e836058c28f06a4ca8ee7ed955bbf37c8225" + integrity sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA== dependencies: - "@ampproject/remapping" "^2.0.0" + "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.0" + "@babel/generator" "^7.17.3" "@babel/helper-compilation-targets" "^7.16.7" "@babel/helper-module-transforms" "^7.16.7" "@babel/helpers" "^7.17.2" - "@babel/parser" "^7.17.0" + "@babel/parser" "^7.17.3" "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.0" + "@babel/traverse" "^7.17.3" "@babel/types" "^7.17.0" convert-source-map "^1.7.0" debug "^4.1.0" @@ -638,10 +638,10 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.12.10", "@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.15.4", "@babel/generator@^7.17.0", "@babel/generator@^7.4.0", "@babel/generator@^7.4.4", "@babel/generator@^7.5.0", "@babel/generator@^7.6.0", "@babel/generator@^7.8.3", "@babel/generator@^7.9.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.0.tgz#7bd890ba706cd86d3e2f727322346ffdbf98f65e" - integrity sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw== +"@babel/generator@^7.12.10", "@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.15.4", "@babel/generator@^7.17.3", "@babel/generator@^7.4.0", "@babel/generator@^7.4.4", "@babel/generator@^7.5.0", "@babel/generator@^7.6.0", "@babel/generator@^7.8.3", "@babel/generator@^7.9.0": + version "7.17.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.3.tgz#a2c30b0c4f89858cb87050c3ffdfd36bdf443200" + integrity sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg== dependencies: "@babel/types" "^7.17.0" jsesc "^2.5.1" @@ -901,10 +901,10 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" integrity sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q== -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.16.7", "@babel/parser@^7.17.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.5", "@babel/parser@^7.6.0", "@babel/parser@^7.7.0", "@babel/parser@^7.8.3", "@babel/parser@^7.9.0", "@babel/parser@^7.9.6": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.0.tgz#f0ac33eddbe214e4105363bb17c3341c5ffcc43c" - integrity sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.16.4", "@babel/parser@^7.16.7", "@babel/parser@^7.17.3", "@babel/parser@^7.4.3", "@babel/parser@^7.4.5", "@babel/parser@^7.6.0", "@babel/parser@^7.7.0", "@babel/parser@^7.8.3", "@babel/parser@^7.9.0", "@babel/parser@^7.9.6": + version "7.17.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.3.tgz#b07702b982990bf6fdc1da5049a23fece4c5c3d0" + integrity sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": version "7.16.7" @@ -1680,7 +1680,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-typescript@^7.10.1", "@babel/plugin-transform-typescript@^7.10.4", "@babel/plugin-transform-typescript@^7.14.6", "@babel/plugin-transform-typescript@^7.16.7", "@babel/plugin-transform-typescript@^7.2.0", "@babel/plugin-transform-typescript@^7.3.2", "@babel/plugin-transform-typescript@^7.9.0": +"@babel/plugin-transform-typescript@^7.10.1", "@babel/plugin-transform-typescript@^7.10.4", "@babel/plugin-transform-typescript@^7.16.7", "@babel/plugin-transform-typescript@^7.16.8", "@babel/plugin-transform-typescript@^7.2.0", "@babel/plugin-transform-typescript@^7.3.2", "@babel/plugin-transform-typescript@^7.9.0": version "7.16.8" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.8.tgz#591ce9b6b83504903fa9dd3652c357c2ba7a1ee0" integrity sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ== @@ -2307,18 +2307,18 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.5", "@babel/traverse@^7.6.0", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.9.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.0.tgz#3143e5066796408ccc880a33ecd3184f3e75cd30" - integrity sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg== +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.0", "@babel/traverse@^7.17.3", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.5", "@babel/traverse@^7.6.0", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.9.0": + version "7.17.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.3.tgz#0ae0f15b27d9a92ba1f2263358ea7c4e7db47b57" + integrity sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw== dependencies: "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.0" + "@babel/generator" "^7.17.3" "@babel/helper-environment-visitor" "^7.16.7" "@babel/helper-function-name" "^7.16.7" "@babel/helper-hoist-variables" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.17.0" + "@babel/parser" "^7.17.3" "@babel/types" "^7.17.0" debug "^4.1.0" globals "^11.1.0" @@ -2340,7 +2340,7 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.7", "@babel/types@^7.13.0", "@babel/types@^7.15.0", "@babel/types@^7.15.4", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.0", "@babel/types@^7.6.0", "@babel/types@^7.6.1", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5", "@babel/types@^7.9.6": +"@babel/types@^7.0.0", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.7", "@babel/types@^7.13.0", "@babel/types@^7.15.4", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.0", "@babel/types@^7.6.0", "@babel/types@^7.6.1", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5", "@babel/types@^7.9.6": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw== @@ -8921,11 +8921,6 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== -"@types/estree@^0.0.48": - version "0.0.48" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.48.tgz#18dc8091b285df90db2f25aa7d906cfc394b7f74" - integrity sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew== - "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" @@ -10095,16 +10090,16 @@ "@urql/core" "^2.1.5" wonka "^4.0.14" -"@vitejs/plugin-vue-jsx@1.1.6": - version "1.1.6" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-1.1.6.tgz#c9e7b63d1ebf537a24a0b4b3b31f4beb8055cef6" - integrity sha512-1vKGALnBFt7hUIOgkC4ZAhTRgENpSgGBsdltJn3fPNcqrbrvR/HaRS5VThjCCoN69d0d+VlDXOTlWcfUpE3pfQ== +"@vitejs/plugin-vue-jsx@1.3.8": + version "1.3.8" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-1.3.8.tgz#a3ee492d30699e4eb95bf3cd5216185451ffe545" + integrity sha512-gPtie8IM7G5OI2O2/Xwk/oYjnw2gKBzayVuEOM5Jx65KmpVcW444F+H7IsIMduvAgwLQPEYMGiO1V8dBgk7qog== dependencies: - "@babel/core" "^7.14.6" + "@babel/core" "^7.17.2" "@babel/plugin-syntax-import-meta" "^7.10.4" - "@babel/plugin-transform-typescript" "^7.14.6" - "@rollup/pluginutils" "^4.1.0" - "@vue/babel-plugin-jsx" "^1.0.6" + "@babel/plugin-transform-typescript" "^7.16.8" + "@rollup/pluginutils" "^4.1.2" + "@vue/babel-plugin-jsx" "^1.1.1" hash-sum "^2.0.0" "@vitejs/plugin-vue@2.2.4": @@ -10176,10 +10171,10 @@ resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.0.2.tgz#9b9c691cd06fc855221a2475c3cc831d774bc7dc" integrity sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA== -"@vue/babel-plugin-jsx@^1.0.3", "@vue/babel-plugin-jsx@^1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.6.tgz#184bf3541ab6efdbe5079ab8b20c19e2af100bfb" - integrity sha512-RzYsvBhzKUmY2YG6LoV+W5PnlnkInq0thh1AzCmewwctAgGN6e9UFon6ZrQQV1CO5G5PeME7MqpB+/vvGg0h4g== +"@vue/babel-plugin-jsx@^1.0.3", "@vue/babel-plugin-jsx@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.1.1.tgz#0c5bac27880d23f89894cd036a37b55ef61ddfc1" + integrity sha512-j2uVfZjnB5+zkcbc/zsOc0fSNGCMMjaEXP52wdwdIfn0qjFfEYpYZBFKFg+HHnQeJCVrjOeO0YxgaL7DMrym9w== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.0.0" @@ -10404,18 +10399,17 @@ estree-walker "^2.0.2" source-map "^0.6.1" -"@vue/compiler-core@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.6.tgz#7162bb0670273f04566af0d353009187ab577915" - integrity sha512-vbwnz7+OhtLO5p5i630fTuQCL+MlUpEMTKHuX+RfetQ+3pFCkItt2JUH+9yMaBG2Hkz6av+T9mwN/acvtIwpbw== +"@vue/compiler-core@3.2.31": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.31.tgz#d38f06c2cf845742403b523ab4596a3fda152e89" + integrity sha512-aKno00qoA4o+V/kR6i/pE+aP+esng5siNAVQ422TkBNM6qA4veXiZbSe8OTXHXquEi/f6Akc+nLfB4JGfe4/WQ== dependencies: - "@babel/parser" "^7.15.0" - "@babel/types" "^7.15.0" - "@vue/shared" "3.2.6" + "@babel/parser" "^7.16.4" + "@vue/shared" "3.2.31" estree-walker "^2.0.2" source-map "^0.6.1" -"@vue/compiler-dom@3.2.13", "@vue/compiler-dom@^3.2.6": +"@vue/compiler-dom@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.13.tgz#028982494fb9d97807d5275b42355732686f8ed7" integrity sha512-5+2dYgQyNzM97EEgbdAusUpLjulcKkvLM26jOGpd14+qwEcW/KCnns5DGjlZD/tsdEwToOoTDCm+mjx7cO/G1Q== @@ -10423,15 +10417,15 @@ "@vue/compiler-core" "3.2.13" "@vue/shared" "3.2.13" -"@vue/compiler-dom@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.6.tgz#3764d7fe1a696e39fb2a3c9d638da0749e369b2d" - integrity sha512-+a/3oBAzFIXhHt8L5IHJOTP4a5egzvpXYyi13jR7CUYOR1S+Zzv7vBWKYBnKyJLwnrxTZnTQVjeHCgJq743XKg== +"@vue/compiler-dom@3.2.31", "@vue/compiler-dom@^3.2.6": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.31.tgz#b1b7dfad55c96c8cc2b919cd7eb5fd7e4ddbf00e" + integrity sha512-60zIlFfzIDf3u91cqfqy9KhCKIJgPeqxgveH2L+87RcGU/alT6BRrk5JtUso0OibH3O7NXuNOQ0cDc9beT0wrg== dependencies: - "@vue/compiler-core" "3.2.6" - "@vue/shared" "3.2.6" + "@vue/compiler-core" "3.2.31" + "@vue/shared" "3.2.31" -"@vue/compiler-sfc@3.2.13", "@vue/compiler-sfc@^3.0.11", "@vue/compiler-sfc@^3.0.5", "@vue/compiler-sfc@^3.2.4": +"@vue/compiler-sfc@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.13.tgz#a38475048aad9c96cf04dfe635129b417e0f9295" integrity sha512-3j970d969aOILykcTstdihP33xH1Onm0wsvcl+rGv9AGxivB9xicRxBw93HCIA4dAPivr42WjHEoci9q2/85uw== @@ -10447,28 +10441,20 @@ postcss "^8.1.10" source-map "^0.6.1" -"@vue/compiler-sfc@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.6.tgz#d6ab7410cff57081ab627b15a1ea51a1072c7cf1" - integrity sha512-Ariz1eDsf+2fw6oWXVwnBNtfKHav72RjlWXpEgozYBLnfRPzP+7jhJRw4Nq0OjSsLx2HqjF3QX7HutTjYB0/eA== - dependencies: - "@babel/parser" "^7.15.0" - "@babel/types" "^7.15.0" - "@types/estree" "^0.0.48" - "@vue/compiler-core" "3.2.6" - "@vue/compiler-dom" "3.2.6" - "@vue/compiler-ssr" "3.2.6" - "@vue/ref-transform" "3.2.6" - "@vue/shared" "3.2.6" - consolidate "^0.16.0" +"@vue/compiler-sfc@3.2.31", "@vue/compiler-sfc@^3.0.11", "@vue/compiler-sfc@^3.0.5", "@vue/compiler-sfc@^3.2.4": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.31.tgz#d02b29c3fe34d599a52c5ae1c6937b4d69f11c2f" + integrity sha512-748adc9msSPGzXgibHiO6T7RWgfnDcVQD+VVwYgSsyyY8Ans64tALHZANrKtOzvkwznV/F4H7OAod/jIlp/dkQ== + dependencies: + "@babel/parser" "^7.16.4" + "@vue/compiler-core" "3.2.31" + "@vue/compiler-dom" "3.2.31" + "@vue/compiler-ssr" "3.2.31" + "@vue/reactivity-transform" "3.2.31" + "@vue/shared" "3.2.31" estree-walker "^2.0.2" - hash-sum "^2.0.0" - lru-cache "^5.1.1" magic-string "^0.25.7" - merge-source-map "^1.1.0" postcss "^8.1.10" - postcss-modules "^4.0.0" - postcss-selector-parser "^6.0.4" source-map "^0.6.1" "@vue/compiler-ssr@3.2.13": @@ -10479,13 +10465,13 @@ "@vue/compiler-dom" "3.2.13" "@vue/shared" "3.2.13" -"@vue/compiler-ssr@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.6.tgz#cadcf199859fa00739f4275b4c85970e4b0abe7d" - integrity sha512-A7IKRKHSyPnTC4w1FxHkjzoyjXInsXkcs/oX22nBQ+6AWlXj2Tt1le96CWPOXy5vYlsTYkF1IgfBaKIdeN/39g== +"@vue/compiler-ssr@3.2.31": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.31.tgz#4fa00f486c9c4580b40a4177871ebbd650ecb99c" + integrity sha512-mjN0rqig+A8TVDnsGPYJM5dpbjlXeHUm2oZHZwGyMYiGT/F4fhJf/cXy8QpjnLQK4Y9Et4GWzHn9PS8AHUnSkw== dependencies: - "@vue/compiler-dom" "3.2.6" - "@vue/shared" "3.2.6" + "@vue/compiler-dom" "3.2.31" + "@vue/shared" "3.2.31" "@vue/component-compiler-utils@^3.1.0", "@vue/component-compiler-utils@^3.1.2": version "3.2.0" @@ -10513,13 +10499,31 @@ resolved "https://registry.yarnpkg.com/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.2.tgz#ceb924b4ecb3b9c43871c7a429a02f8423e621ab" integrity sha512-LIZMuJk38pk9U9Ur4YzHjlIyMuxPlACdBIHH9/nGYVTsaGKOSnSuELiE8vS9wa+dJpIYspYUOqk+L1Q4pgHQHQ== -"@vue/reactivity@3.2.13", "@vue/reactivity@^3.2.6": +"@vue/reactivity-transform@3.2.31": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.31.tgz#0f5b25c24e70edab2b613d5305c465b50fc00911" + integrity sha512-uS4l4z/W7wXdI+Va5pgVxBJ345wyGFKvpPYtdSgvfJfX/x2Ymm6ophQlXXB6acqGHtXuBqNyyO3zVp9b1r0MOA== + dependencies: + "@babel/parser" "^7.16.4" + "@vue/compiler-core" "3.2.31" + "@vue/shared" "3.2.31" + estree-walker "^2.0.2" + magic-string "^0.25.7" + +"@vue/reactivity@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.13.tgz#d269b09aaafef06a91bf3eb98defd41a2c3daf54" integrity sha512-j3ByCiRgrr4uEZpXJM8XowrbYKeNHMHlbmMZE/2QpVzVPIfrQWS2fpLmbchJeMrnwIrzEl+dub3hgwkV4KRn4w== dependencies: "@vue/shared" "3.2.13" +"@vue/reactivity@3.2.31", "@vue/reactivity@^3.2.6": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.31.tgz#fc90aa2cdf695418b79e534783aca90d63a46bbd" + integrity sha512-HVr0l211gbhpEKYr2hYe7hRsV91uIVGFYNHj73njbARVGHQvIojkImKMaZNDdoDZOIkMsBc9a1sMqR+WZwfSCw== + dependencies: + "@vue/shared" "3.2.31" + "@vue/ref-transform@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/ref-transform/-/ref-transform-3.2.13.tgz#6adfce50d388cc03683d9d2ba58f3a3bde5166f4" @@ -10531,17 +10535,6 @@ estree-walker "^2.0.2" magic-string "^0.25.7" -"@vue/ref-transform@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@vue/ref-transform/-/ref-transform-3.2.6.tgz#30b5f1fa77daf9894bc23e6a5a0e3586a4a796b8" - integrity sha512-ie39+Y4nbirDLvH+WEq6Eo/l3n3mFATayqR+kEMSphrtMW6Uh/eEMx1Gk2Jnf82zmj3VLRq7dnmPx72JLcBYkQ== - dependencies: - "@babel/parser" "^7.15.0" - "@vue/compiler-core" "3.2.6" - "@vue/shared" "3.2.6" - estree-walker "^2.0.2" - magic-string "^0.25.7" - "@vue/runtime-core@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.13.tgz#8b62f92642e56af71d0d35a9f0065daf6f9eb3fb" @@ -10550,6 +10543,14 @@ "@vue/reactivity" "3.2.13" "@vue/shared" "3.2.13" +"@vue/runtime-core@3.2.31": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.31.tgz#9d284c382f5f981b7a7b5971052a1dc4ef39ac7a" + integrity sha512-Kcog5XmSY7VHFEMuk4+Gap8gUssYMZ2+w+cmGI6OpZWYOEIcbE0TPzzPHi+8XTzAgx1w/ZxDFcXhZeXN5eKWsA== + dependencies: + "@vue/reactivity" "3.2.31" + "@vue/shared" "3.2.31" + "@vue/runtime-dom@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.13.tgz#238f517a75765719f8373409cee853775c636f92" @@ -10559,6 +10560,15 @@ "@vue/shared" "3.2.13" csstype "^2.6.8" +"@vue/runtime-dom@3.2.31": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.31.tgz#79ce01817cb3caf2c9d923f669b738d2d7953eff" + integrity sha512-N+o0sICVLScUjfLG7u9u5XCjvmsexAiPt17GNnaWHJUfsKed5e85/A3SWgKxzlxx2SW/Hw7RQxzxbXez9PtY3g== + dependencies: + "@vue/runtime-core" "3.2.31" + "@vue/shared" "3.2.31" + csstype "^2.6.8" + "@vue/server-renderer@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.13.tgz#b10a564be67eec6721f90b36c3c817c19e6064b4" @@ -10567,15 +10577,23 @@ "@vue/compiler-ssr" "3.2.13" "@vue/shared" "3.2.13" -"@vue/shared@3.2.13", "@vue/shared@^3.2.6": +"@vue/server-renderer@3.2.31": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.31.tgz#201e9d6ce735847d5989403af81ef80960da7141" + integrity sha512-8CN3Zj2HyR2LQQBHZ61HexF5NReqngLT3oahyiVRfSSvak+oAvVmu8iNLSu6XR77Ili2AOpnAt1y8ywjjqtmkg== + dependencies: + "@vue/compiler-ssr" "3.2.31" + "@vue/shared" "3.2.31" + +"@vue/shared@3.2.13": version "3.2.13" resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.13.tgz#c830ef966d7af12598e0ea862a55695ea589cd47" integrity sha512-F/gs3kHQ8Xeo24F6EImOvBiIoYQsBjF9qoLzvk+LHxYN6ZhIDEL1NWrBFYzdFQ7NphjEYd4EvPZ+Qee+WX8P6w== -"@vue/shared@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.6.tgz#2c22bae88fe2b7b59fa68a9c9c4cd60bae2c1794" - integrity sha512-uwX0Qs2e6kdF+WmxwuxJxOnKs/wEkMArtYpHSm7W+VY/23Tl8syMRyjnzEeXrNCAP0/8HZxEGkHJsjPEDNRuHw== +"@vue/shared@3.2.31", "@vue/shared@^3.2.6": + version "3.2.31" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.31.tgz#c90de7126d833dcd3a4c7534d534be2fb41faa4e" + integrity sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ== "@vue/test-utils@^2.0.0-rc.10": version "2.0.0-rc.10" @@ -16330,13 +16348,6 @@ consolidate@^0.15.1: dependencies: bluebird "^3.1.1" -consolidate@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/consolidate/-/consolidate-0.16.0.tgz#a11864768930f2f19431660a65906668f5fbdc16" - integrity sha512-Nhl1wzCslqXYTJVDyJCu3ODohy9OfBMB5uD2BiBTzd7w+QY0lBzafkR8y8755yMYHAaMD4NuzbAw03/xzfw+eQ== - dependencies: - bluebird "^3.7.2" - constant-case@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" @@ -19723,7 +19734,7 @@ esbuild-windows-arm64@0.14.23: resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.23.tgz#edc560bbadb097eb45fc235aeacb942cb94a38c0" integrity sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw== -esbuild@^0.12.17, esbuild@^0.12.28: +esbuild@^0.12.28: version "0.12.29" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.29.tgz#be602db7c4dc78944a9dbde0d1ea19d36c1f882d" integrity sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g== @@ -34150,7 +34161,7 @@ postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, po source-map "^0.6.1" supports-color "^6.1.0" -postcss@^8.1.10, postcss@^8.1.4, postcss@^8.2.8, postcss@^8.3.6, postcss@^8.4.5: +postcss@^8.1.10, postcss@^8.1.4, postcss@^8.2.8, postcss@^8.4.5: version "8.4.7" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.7.tgz#f99862069ec4541de386bf57f5660a6c7a0875a8" integrity sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A== @@ -42761,18 +42772,6 @@ vite-svg-loader@^2.2.0: "@vue/compiler-sfc" "^3.0.11" svgo "^2.3.0" -vite@2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/vite/-/vite-2.5.0.tgz#111ba3679432d426e44566acf480005a7914cbd6" - integrity sha512-Dn4B+g54PJsMG5WCc4QeFy1ygMXRdTtFrUPegqfk4+vzVQcbF/DqqmI/1bxezArzbujBJg/67QeT5wz8edfJVQ== - dependencies: - esbuild "^0.12.17" - postcss "^8.3.6" - resolve "^1.20.0" - rollup "^2.38.5" - optionalDependencies: - fsevents "~2.3.2" - vite@2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/vite/-/vite-2.8.0.tgz#0646ab9eee805fb24b667889644ac04bc516d0d3" @@ -43054,16 +43053,16 @@ vue3-file-selector@^1.0.1: resolved "https://registry.yarnpkg.com/vue3-file-selector/-/vue3-file-selector-1.0.1.tgz#bcae2f5ab44c406c1d72a60885990883051b688b" integrity sha512-popFgEvLrkRFo9MWs8mzlb4HH+Mg2+5DhJF7MzKmUrE9179rtVt4Wf7/w+0FvhDRVELQ6f8Z9BhF+SDSUSpRVw== -vue@3.2.13, vue@^3.2.4: - version "3.2.13" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.13.tgz#9d1a94fc62dc29ae21a3dd0d8ee24198e421671e" - integrity sha512-raTGvLXXTdMxrhQKY1r1YFXZMmjbjTe7QHBW9EU4CgCBhq8DbgyLqgILcSUZmeFyazk5WY7a7xu0VYmHElf4lA== +vue@3.2.31, vue@^3.2.4: + version "3.2.31" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.31.tgz#e0c49924335e9f188352816788a4cca10f817ce6" + integrity sha512-odT3W2tcffTiQCy57nOT93INw1auq5lYLLYtWpPYQQYQOOdHiqFct9Xhna6GJ+pJQaF67yZABraH47oywkJgFw== dependencies: - "@vue/compiler-dom" "3.2.13" - "@vue/compiler-sfc" "3.2.13" - "@vue/runtime-dom" "3.2.13" - "@vue/server-renderer" "3.2.13" - "@vue/shared" "3.2.13" + "@vue/compiler-dom" "3.2.31" + "@vue/compiler-sfc" "3.2.31" + "@vue/runtime-dom" "3.2.31" + "@vue/server-renderer" "3.2.31" + "@vue/shared" "3.2.31" vuex@^4.0.0: version "4.0.0" From 58fe6de01d0d3a933f9c19f8257acbbc5bfcdb3d Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Fri, 4 Mar 2022 05:22:44 -0500 Subject: [PATCH 09/21] updated versions --- packages/frontend-shared/package.json | 38 +++++--- yarn.lock | 122 ++------------------------ 2 files changed, 35 insertions(+), 125 deletions(-) diff --git a/packages/frontend-shared/package.json b/packages/frontend-shared/package.json index af282cbe1c22..83bcf33897b9 100644 --- a/packages/frontend-shared/package.json +++ b/packages/frontend-shared/package.json @@ -24,48 +24,66 @@ "@antfu/utils": "^0.3.0", "@cypress/vite-dev-server": "0.0.0-development", "@cypress/vue": "0.0.0-development", + "@graphql-typed-document-node/core": "^3.1.0", "@headlessui/vue": "1.4.0", "@iconify/json": "1.1.368", "@iconify/vue": "3.0.0-beta.1", "@intlify/vite-plugin-vue-i18n": "2.4.0", "@percy/cypress": "^3.1.0", "@testing-library/cypress": "8.0.0", + "@types/faker": "5.5.8", "@urql/core": "2.3.1", "@urql/exchange-execute": "1.1.0", "@urql/exchange-graphcache": "4.3.3", "@urql/vue": "0.4.3", "@vitejs/plugin-vue": "2.2.4", "@vitejs/plugin-vue-jsx": "1.3.8", + "@vue/compiler-core": "3.2.31", + "@vue/compiler-dom": "3.2.31", + "@vue/compiler-sfc": "3.2.31", "@vueuse/core": "7.2.2", "@windicss/plugin-interaction-variants": "1.0.0", + "ansi-to-html": "0.6.14", "bluebird": "3.5.3", "classnames": "2.3.1", + "combine-properties": "0.1.0", + "concurrently": "^6.2.0", + "cross-env": "6.0.3", "cypress-real-events": "1.6.0", "fake-uuid": "^1.0.0", + "faker": "5.5.3", + "fuzzysort": "^1.1.4", "graphql": "^15.5.1", "graphql-relay": "^0.9.0", "graphql-tag": "^2.12.5", "human-interval": "1.0.0", - "lodash": "^4.17.21", + "javascript-time-ago": "2.3.8", + "just-my-luck": "3.0.0", + "lodash": "4.17.21", "modern-normalize": "1.1.0", "patch-package": "6.4.7", + "pinia": "2.0.0-rc.14", "rimraf": "3.0.2", + "rollup-plugin-copy": "3.4.0", + "rollup-plugin-polyfill-node": "^0.7.0", "spin.js": "^4.1.1", - "unplugin-icons": "^0.11.4", - "unplugin-vue-components": "^0.15.4", + "unplugin-icons": "^0.11.3", + "unplugin-vue-components": "^0.15.2", "vite": "2.8.0", + "vite-plugin-components": "0.11.3", "vite-plugin-icons": "0.6.3", - "vite-plugin-windicss": "^1.4.7", - "vite-svg-loader": "^2.2.0", + "vite-plugin-pages": "0.18.1", + "vite-plugin-purge-icons": "0.7.0", + "vite-plugin-vue-layouts": "0.4.1", + "vite-plugin-windicss": "1.2.4", + "vite-svg-loader": "2.1.1", "vue": "3.2.31", - "@vue/compiler-core": "3.2.31", - "@vue/compiler-dom": "3.2.31", - "@vue/compiler-sfc": "3.2.31", "vue-eslint-parser": "7.11.0", - "vue-i18n": "^9.2.0-beta.7", + "vue-i18n": "9.2.0-beta.7", + "vue-router": "4", "vue-toastification": "2.0.0-rc.1", "vue-tsc": "^0.3.0", - "windicss": "3.1.8", + "windicss": "3.1.4", "windicss-analysis": "^0.3.4", "wonka": "^4.0.15" }, diff --git a/yarn.lock b/yarn.lock index 23dfe01dc37c..8ff73325aac5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -901,7 +901,7 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" integrity sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q== -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.16.4", "@babel/parser@^7.16.7", "@babel/parser@^7.17.3", "@babel/parser@^7.4.3", "@babel/parser@^7.4.5", "@babel/parser@^7.6.0", "@babel/parser@^7.7.0", "@babel/parser@^7.8.3", "@babel/parser@^7.9.0", "@babel/parser@^7.9.6": +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.15.4", "@babel/parser@^7.16.4", "@babel/parser@^7.16.7", "@babel/parser@^7.17.3", "@babel/parser@^7.4.3", "@babel/parser@^7.4.5", "@babel/parser@^7.6.0", "@babel/parser@^7.7.0", "@babel/parser@^7.8.3", "@babel/parser@^7.9.0", "@babel/parser@^7.9.6": version "7.17.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.3.tgz#b07702b982990bf6fdc1da5049a23fece4c5c3d0" integrity sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA== @@ -10389,16 +10389,6 @@ semver "^6.1.0" strip-ansi "^6.0.0" -"@vue/compiler-core@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.13.tgz#901268088b98a53c43be0f02bfa0e3a389ad6bf4" - integrity sha512-H8MUuKVCfAT6C0vth/+1LAriKnM+RTFo/5MoFycwRPwworTvkpWq/EuGoIXdLBblo8Y2/bNsOmIBEEoOtrb/bQ== - dependencies: - "@babel/parser" "^7.15.0" - "@vue/shared" "3.2.13" - estree-walker "^2.0.2" - source-map "^0.6.1" - "@vue/compiler-core@3.2.31": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.31.tgz#d38f06c2cf845742403b523ab4596a3fda152e89" @@ -10409,14 +10399,6 @@ estree-walker "^2.0.2" source-map "^0.6.1" -"@vue/compiler-dom@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.13.tgz#028982494fb9d97807d5275b42355732686f8ed7" - integrity sha512-5+2dYgQyNzM97EEgbdAusUpLjulcKkvLM26jOGpd14+qwEcW/KCnns5DGjlZD/tsdEwToOoTDCm+mjx7cO/G1Q== - dependencies: - "@vue/compiler-core" "3.2.13" - "@vue/shared" "3.2.13" - "@vue/compiler-dom@3.2.31", "@vue/compiler-dom@^3.2.6": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.31.tgz#b1b7dfad55c96c8cc2b919cd7eb5fd7e4ddbf00e" @@ -10425,22 +10407,6 @@ "@vue/compiler-core" "3.2.31" "@vue/shared" "3.2.31" -"@vue/compiler-sfc@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.13.tgz#a38475048aad9c96cf04dfe635129b417e0f9295" - integrity sha512-3j970d969aOILykcTstdihP33xH1Onm0wsvcl+rGv9AGxivB9xicRxBw93HCIA4dAPivr42WjHEoci9q2/85uw== - dependencies: - "@babel/parser" "^7.15.0" - "@vue/compiler-core" "3.2.13" - "@vue/compiler-dom" "3.2.13" - "@vue/compiler-ssr" "3.2.13" - "@vue/ref-transform" "3.2.13" - "@vue/shared" "3.2.13" - estree-walker "^2.0.2" - magic-string "^0.25.7" - postcss "^8.1.10" - source-map "^0.6.1" - "@vue/compiler-sfc@3.2.31", "@vue/compiler-sfc@^3.0.11", "@vue/compiler-sfc@^3.0.5", "@vue/compiler-sfc@^3.2.4": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.31.tgz#d02b29c3fe34d599a52c5ae1c6937b4d69f11c2f" @@ -10457,14 +10423,6 @@ postcss "^8.1.10" source-map "^0.6.1" -"@vue/compiler-ssr@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.13.tgz#98434672e0b488c2affa4b0570731d6be5cda187" - integrity sha512-ZbO6uDhUWTdKBRguYNEZXj2FU3nh1cudoHBiidbxj9q5J0tVT+j1PSVFAXPq6SquUBdJpa4HvGkQ5kQzv6upXg== - dependencies: - "@vue/compiler-dom" "3.2.13" - "@vue/shared" "3.2.13" - "@vue/compiler-ssr@3.2.31": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.31.tgz#4fa00f486c9c4580b40a4177871ebbd650ecb99c" @@ -10510,13 +10468,6 @@ estree-walker "^2.0.2" magic-string "^0.25.7" -"@vue/reactivity@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.13.tgz#d269b09aaafef06a91bf3eb98defd41a2c3daf54" - integrity sha512-j3ByCiRgrr4uEZpXJM8XowrbYKeNHMHlbmMZE/2QpVzVPIfrQWS2fpLmbchJeMrnwIrzEl+dub3hgwkV4KRn4w== - dependencies: - "@vue/shared" "3.2.13" - "@vue/reactivity@3.2.31", "@vue/reactivity@^3.2.6": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.31.tgz#fc90aa2cdf695418b79e534783aca90d63a46bbd" @@ -10524,25 +10475,6 @@ dependencies: "@vue/shared" "3.2.31" -"@vue/ref-transform@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/ref-transform/-/ref-transform-3.2.13.tgz#6adfce50d388cc03683d9d2ba58f3a3bde5166f4" - integrity sha512-q6GXHZFzXjpx1K3UFRF8fa+xSmD9xV/FjhGzTNnfrryBr8tBUNYgP2f0s5K5N+21Ay7+MlQ1XXMUp8McGvsryQ== - dependencies: - "@babel/parser" "^7.15.0" - "@vue/compiler-core" "3.2.13" - "@vue/shared" "3.2.13" - estree-walker "^2.0.2" - magic-string "^0.25.7" - -"@vue/runtime-core@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.13.tgz#8b62f92642e56af71d0d35a9f0065daf6f9eb3fb" - integrity sha512-VQedL9Wa7yWMPVDrIkxzLCm6cWCDBoXcXc+jrsOJkqpWhEeA7+zGOsDsHzhLH8aaJD6vdnUR5Cy0EKvoJDqEWQ== - dependencies: - "@vue/reactivity" "3.2.13" - "@vue/shared" "3.2.13" - "@vue/runtime-core@3.2.31": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.31.tgz#9d284c382f5f981b7a7b5971052a1dc4ef39ac7a" @@ -10551,15 +10483,6 @@ "@vue/reactivity" "3.2.31" "@vue/shared" "3.2.31" -"@vue/runtime-dom@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.13.tgz#238f517a75765719f8373409cee853775c636f92" - integrity sha512-DVG+ItkrnCOEa9HSrmGBTLwv/gBVYCO8wkm/yv+d5ChoTnyIILxP0oCiZEPJsgWZfUSRPNi5rXozwo7F99MiwQ== - dependencies: - "@vue/runtime-core" "3.2.13" - "@vue/shared" "3.2.13" - csstype "^2.6.8" - "@vue/runtime-dom@3.2.31": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.31.tgz#79ce01817cb3caf2c9d923f669b738d2d7953eff" @@ -10569,14 +10492,6 @@ "@vue/shared" "3.2.31" csstype "^2.6.8" -"@vue/server-renderer@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.13.tgz#b10a564be67eec6721f90b36c3c817c19e6064b4" - integrity sha512-KI+JFV+vRb95+Jb6IwRRm4Vhvj8wrJTNs+OlATfqwwIRpBGAyxn/4knDJYzlnUf/mrKAkrbw751mHhi+pEwILQ== - dependencies: - "@vue/compiler-ssr" "3.2.13" - "@vue/shared" "3.2.13" - "@vue/server-renderer@3.2.31": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.31.tgz#201e9d6ce735847d5989403af81ef80960da7141" @@ -10585,11 +10500,6 @@ "@vue/compiler-ssr" "3.2.31" "@vue/shared" "3.2.31" -"@vue/shared@3.2.13": - version "3.2.13" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.13.tgz#c830ef966d7af12598e0ea862a55695ea589cd47" - integrity sha512-F/gs3kHQ8Xeo24F6EImOvBiIoYQsBjF9qoLzvk+LHxYN6ZhIDEL1NWrBFYzdFQ7NphjEYd4EvPZ+Qee+WX8P6w== - "@vue/shared@3.2.31", "@vue/shared@^3.2.6": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.31.tgz#c90de7126d833dcd3a4c7534d534be2fb41faa4e" @@ -11069,7 +10979,7 @@ micromatch "^4.0.4" windicss "^3.1.4" -"@windicss/plugin-utils@1.4.7", "@windicss/plugin-utils@^1.1.1": +"@windicss/plugin-utils@^1.1.1": version "1.4.7" resolved "https://registry.yarnpkg.com/@windicss/plugin-utils/-/plugin-utils-1.4.7.tgz#d1b1ba445a85e6847a1385bf9348b4b5b3a00267" integrity sha512-YRWQ4NHMS4/YPixoqku1+gRDRZgMHgRbx4Q0r+bLipczbbpNDPWgL4JS8F+xxbQn2wYRh7q+xqA8NIe/7T7vIA== @@ -15037,7 +14947,7 @@ chai@4.2.0, chai@^4.2.0: pathval "^1.1.0" type-detect "^4.0.5" -chalk@*, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: +chalk@*, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -41757,7 +41667,7 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= -unplugin-icons@^0.11.3, unplugin-icons@^0.11.4: +unplugin-icons@^0.11.3: version "0.11.4" resolved "https://registry.yarnpkg.com/unplugin-icons/-/unplugin-icons-0.11.4.tgz#e11b826619b325b99d1e15b2cae19581f41300b6" integrity sha512-vmUqYCf+uFZF33GyL5/1X3LqNJrn6RfI8K85EPs8PzTTqMF6lGnO9wERSo2yKt2wzkCye10urZFdaYrReheA8A== @@ -41767,7 +41677,7 @@ unplugin-icons@^0.11.3, unplugin-icons@^0.11.4: has-pkg "^0.0.1" unplugin "^0.2.11" -unplugin-vue-components@^0.15.2, unplugin-vue-components@^0.15.4: +unplugin-vue-components@^0.15.2: version "0.15.4" resolved "https://registry.yarnpkg.com/unplugin-vue-components/-/unplugin-vue-components-0.15.4.tgz#f1a84f82f814b23a521ff2d6469cafb642f862f8" integrity sha512-RQpNj5u4j7yiZpaUyzTyJl6ZTtwlThOnTmchV6Foml8BvRBv/Eogr8zFeQ89amEd9Wc9eiCA46d6v0u3uM/d/A== @@ -42746,16 +42656,6 @@ vite-plugin-windicss@1.2.4: debug "^4.3.2" windicss "^3.1.4" -vite-plugin-windicss@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/vite-plugin-windicss/-/vite-plugin-windicss-1.4.7.tgz#505ff1deb4209b95681c0d6eff59775e600e0f2b" - integrity sha512-m0z1CPrHKE4xrSb84f3iZICBFSznZvhvTHTv6PB3Bd0E56eDSbWNhBuV1m7Gg71wRpBeQv6oLt+tuOEZQ/+RVw== - dependencies: - "@windicss/plugin-utils" "1.4.7" - chalk "^4.1.2" - debug "^4.3.2" - windicss "^3.1.7" - vite-svg-loader@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/vite-svg-loader/-/vite-svg-loader-2.1.1.tgz#ca4ac6b7208b1ef5268b425f904dc36908c327b5" @@ -42764,14 +42664,6 @@ vite-svg-loader@2.1.1: "@vue/compiler-sfc" "^3.0.11" svgo "^2.3.0" -vite-svg-loader@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/vite-svg-loader/-/vite-svg-loader-2.2.0.tgz#b5d6ca948b03e45320cb4f96c44bf88f5bef0a2c" - integrity sha512-FP6qCN57coIOwmtah68ofpi4dewGmfzPcoKe76RMnJoz7qBTXxQVm2BlnH0YzGeCbOcjm9NKauJ1I6J9OlUUtg== - dependencies: - "@vue/compiler-sfc" "^3.0.11" - svgo "^2.3.0" - vite@2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/vite/-/vite-2.8.0.tgz#0646ab9eee805fb24b667889644ac04bc516d0d3" @@ -42970,7 +42862,7 @@ vue-i18n@9.0.0-rc.6: "@intlify/shared" "9.0.0-rc.6" "@vue/devtools-api" "^6.0.0-beta.5" -vue-i18n@9.2.0-beta.7, vue-i18n@^9.2.0-beta.7: +vue-i18n@9.2.0-beta.7: version "9.2.0-beta.7" resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.2.0-beta.7.tgz#d1f68759873c4f5ea2db5c08877afd8f26482430" integrity sha512-SwzwGQFlHbS1rI+qp9dKJB+jP0HmlCUdWL99CugCPhhnDKm2sdd0Vw2Hiwa6cMxxWs6fpccGFTlmTwWtTpvAog== @@ -43926,7 +43818,7 @@ windicss@3.1.4: resolved "https://registry.yarnpkg.com/windicss/-/windicss-3.1.4.tgz#557eaf8e3c08064a309ccb5d887c82c4bce25069" integrity sha512-3RBcANxdOy/n4dLVT8+0X409sGI+piO06ARbQ8RncxGuYgdw5Ip3hrhGIYajH67lV+tHc7xNVGxj73amOC9N0g== -windicss@3.1.8, windicss@^3.1.4, windicss@^3.1.7: +windicss@^3.1.4, windicss@^3.1.7: version "3.1.8" resolved "https://registry.yarnpkg.com/windicss/-/windicss-3.1.8.tgz#56e80e362e6d1d32cc3d1d5c63069dca14d9fe4a" integrity sha512-G1UfnnSZ3s4MZnqqIL8DOQbL8rBArQKlodlby8OvP333TPaRouamuIuYyCt5kSNEJzFrkx168TSRIkqhDs9bOA== From 6c0961687005c42b9f5ab15d91e8c5f6f38d6892 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Fri, 4 Mar 2022 16:15:59 -0500 Subject: [PATCH 10/21] updated versions --- npm/design-system/package.json | 2 +- npm/vite-dev-server/package.json | 2 +- npm/vite-dev-server/src/plugins/cypress.ts | 14 +- npm/vite-dev-server/src/plugins/server.ts | 14 +- packages/app/package.json | 8 +- packages/driver/package.json | 2 +- packages/frontend-shared/package.json | 8 +- packages/frontend-shared/vite.config.ts | 12 ++ packages/launchpad/package.json | 6 +- yarn.lock | 172 +++++++++------------ 10 files changed, 117 insertions(+), 123 deletions(-) diff --git a/npm/design-system/package.json b/npm/design-system/package.json index 24c94073144b..5542e27a7dc1 100644 --- a/npm/design-system/package.json +++ b/npm/design-system/package.json @@ -84,7 +84,7 @@ "tsconfig-paths-webpack-plugin": "^3.5.1", "typed-scss-modules": "^4.1.1", "typescript": "^4.2.3", - "vite": "2.8.0", + "vite": "2.8.4", "webpack": "^4.44.2" }, "peerDependencies": { diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json index 1a8c756c53a6..dfb1be8cd651 100644 --- a/npm/vite-dev-server/package.json +++ b/npm/vite-dev-server/package.json @@ -32,7 +32,7 @@ "mocha-junit-reporter": "^2.0.0", "mocha-multi-reporters": "^1.5.1", "react": "17.0.2", - "vite": "2.8.0", + "vite": "2.8.4", "vite-plugin-inspect": "0.4.3", "vue": "3.2.31", "vue-eslint-parser": "7.11.0" diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index 531805a7bb9d..0394d92f60ec 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -60,6 +60,7 @@ export const Cypress = ( const indexHtml = options.indexHtml let specsPathsSet = getSpecsPathsSet(specs) + let loader devServerEvents.on('dev-server:specs:changed', (specs: Spec[]) => { specsPathsSet = getSpecsPathsSet(specs) @@ -82,16 +83,25 @@ export const Cypress = ( // insert the script in the end of the body return `${indexHtmlContent.substring(0, endOfBody) - }${ + }${ indexHtmlContent.substring(endOfBody) }` }, resolveId (id) { if (id === '/@cypress:client-init-test') { - return INIT_FILEPATH + return ` + const h1 = document.createElement('h1'); + h1.innerText = 'Looking good'; + document.body.appendChild(h1); + + ` } }, configureServer: async (server: ViteDevServer) => { + loader = await readFile(INIT_FILEPATH) + server.middlewares.use(`${base}index.html`, async (req, res) => { const transformedIndexHtml = await server.transformIndexHtml(base, '') diff --git a/npm/vite-dev-server/src/plugins/server.ts b/npm/vite-dev-server/src/plugins/server.ts index f4491f2e62c3..8ed8facab169 100644 --- a/npm/vite-dev-server/src/plugins/server.ts +++ b/npm/vite-dev-server/src/plugins/server.ts @@ -5,7 +5,7 @@ import { parse, join } from 'path' import debugFn from 'debug' import type { Connect, ViteDevServer } from 'vite' import { normalizePath } from 'vite' -import { commonSpecExtensions } from '../constants' +// import { commonSpecExtensions } from '../constants' import { IncomingMessage, ServerResponse } from 'http' import { pathToFileURL } from 'url' @@ -50,13 +50,13 @@ const cleanSpecFileName = (file) => { let cleanPath - commonSpecExtensions.some((extension) => { - if (file.name.endsWith(extension)) { - cleanPath = join(`/${ file.dir}`, file.name.slice(0, -extension.length)) + // commonSpecExtensions.some((extension) => { + // if (file.name.endsWith(extension)) { + // cleanPath = join(`/${ file.dir}`, file.name.slice(0, -extension.length)) - return true - } - }) + // return true + // } + // }) return cleanPath } diff --git a/packages/app/package.json b/packages/app/package.json index 539a98caa4cf..2b542ddb659c 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -54,16 +54,14 @@ "rimraf": "3.0.2", "rollup-plugin-copy": "3.4.0", "rollup-plugin-polyfill-node": "^0.7.0", - "unplugin-icons": "^0.11.3", + "unplugin-icons": "0.13.2", "unplugin-vue-components": "^0.15.2", - "vite": "2.8.0", + "vite": "2.8.4", "vite-plugin-components": "0.11.3", - "vite-plugin-icons": "0.6.3", "vite-plugin-pages": "0.18.1", - "vite-plugin-purge-icons": "0.7.0", "vite-plugin-vue-layouts": "0.4.1", "vite-plugin-windicss": "1.2.4", - "vite-svg-loader": "2.1.1", + "vite-svg-loader": "3.1.2", "vue": "3.2.31", "vue-i18n": "9.2.0-beta.7", "vue-router": "4", diff --git a/packages/driver/package.json b/packages/driver/package.json index 5535886b9b06..e4c471e22812 100644 --- a/packages/driver/package.json +++ b/packages/driver/package.json @@ -83,7 +83,7 @@ "unfetch": "4.1.0", "url-parse": "1.5.6", "vanilla-text-mask": "5.1.1", - "vite": "2.8.0", + "vite": "2.8.4", "webpack": "^4.44.2", "zone.js": "0.9.0" }, diff --git a/packages/frontend-shared/package.json b/packages/frontend-shared/package.json index 83bcf33897b9..a999794fa9b3 100644 --- a/packages/frontend-shared/package.json +++ b/packages/frontend-shared/package.json @@ -67,16 +67,14 @@ "rollup-plugin-copy": "3.4.0", "rollup-plugin-polyfill-node": "^0.7.0", "spin.js": "^4.1.1", - "unplugin-icons": "^0.11.3", + "unplugin-icons": "0.13.2", "unplugin-vue-components": "^0.15.2", - "vite": "2.8.0", + "vite": "2.8.4", "vite-plugin-components": "0.11.3", - "vite-plugin-icons": "0.6.3", "vite-plugin-pages": "0.18.1", - "vite-plugin-purge-icons": "0.7.0", "vite-plugin-vue-layouts": "0.4.1", "vite-plugin-windicss": "1.2.4", - "vite-svg-loader": "2.1.1", + "vite-svg-loader": "3.1.2", "vue": "3.2.31", "vue-eslint-parser": "7.11.0", "vue-i18n": "9.2.0-beta.7", diff --git a/packages/frontend-shared/vite.config.ts b/packages/frontend-shared/vite.config.ts index 0f3f6cfe24ae..41874ea06a0a 100644 --- a/packages/frontend-shared/vite.config.ts +++ b/packages/frontend-shared/vite.config.ts @@ -53,6 +53,10 @@ const makePlugins = (plugins) => { cy: FileSystemIconLoader(path.resolve(__dirname, './src/assets/icons')), ...plugins.iconsOptions?.customCollections, }, + iconCustomizer (_, __, props) { + props.width = '1em' + props.height = '1em' + }, ...plugins.iconsOptions, }), Components({ @@ -110,6 +114,14 @@ export const makeConfig = (config: Partial = {}, plugins: PluginOpti '@urql/vue', ], }, + server: { + fs: { + // Since we're in a monorepo, we're going to serve packages from + // npm/vue/dist/* and other local places. This enables us to do that. + // https://vitejs.dev/config/#server-fs-strict + strict: false, + }, + }, // You cannot add or remove arbitrary options from shared plugins. // Please use the PluginsOverride option for this. diff --git a/packages/launchpad/package.json b/packages/launchpad/package.json index ab422d2baf05..ee08764fa6d8 100644 --- a/packages/launchpad/package.json +++ b/packages/launchpad/package.json @@ -52,14 +52,12 @@ "rimraf": "3.0.2", "rollup-plugin-polyfill-node": "^0.7.0", "type-fest": "^2.3.4", - "vite": "2.8.0", + "vite": "2.8.4", "vite-plugin-components": "0.11.3", - "vite-plugin-icons": "0.6.3", "vite-plugin-optimize-persist": "0.0.5", "vite-plugin-package-config": "0.0.3", - "vite-plugin-purge-icons": "0.7.0", "vite-plugin-windicss": "1.2.4", - "vite-svg-loader": "2.1.1", + "vite-svg-loader": "3.1.2", "vue": "3.2.31", "vue-i18n": "9.2.0-beta.7", "vue-tsc": "^0.3.0", diff --git a/yarn.lock b/yarn.lock index 8ff73325aac5..ac5aa2c197f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -399,6 +399,14 @@ dependencies: tslib "^2.0.0" +"@antfu/install-pkg@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.1.0.tgz#8d8c61820cbc32e5c37d82d515485ad3ee9bd052" + integrity sha512-VaIJd3d1o7irZfK1U0nvBsHMyjkuyMP3HKYVV53z8DKyulkHKmjhhtccXO51WSPeeSHIeoJEoNOKavYpS7jkZw== + dependencies: + execa "^5.1.1" + find-up "^5.0.0" + "@antfu/utils@^0.2.4": version "0.2.4" resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.2.4.tgz#c7d33fc6faa0d3a6fcc2555673f5e9b19c0fbc15" @@ -413,6 +421,11 @@ dependencies: "@types/throttle-debounce" "^2.1.0" +"@antfu/utils@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.5.0.tgz#b3169429997cb87850e543cb74660f9e2fed7efd" + integrity sha512-MrAQ/MrPSxbh1bBrmwJjORfJymw4IqSHFBXqvxaga3ZdDM+/zokYF8DjyJpSjY2QmpmgQrajDUBJOWrYeARfzA== + "@ardatan/aggregate-error@0.0.6": version "0.0.6" resolved "https://registry.yarnpkg.com/@ardatan/aggregate-error/-/aggregate-error-0.0.6.tgz#fe6924771ea40fc98dc7a7045c2e872dc8527609" @@ -3941,30 +3954,11 @@ resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== -"@iconify/iconify@2.0.0-rc.6": - version "2.0.0-rc.6" - resolved "https://registry.yarnpkg.com/@iconify/iconify/-/iconify-2.0.0-rc.6.tgz#e3f5376b63b441dcb3696317784b98e2e678cf46" - integrity sha512-pXvLXqLPQsjpDY4qbbyh5cPEtakTfWfQCAo6SdYNhYQzat+/0fbeEhScryqaketNAG0bT4/+deKezkJZTvbuSg== - dependencies: - cross-fetch "^3.0.6" - -"@iconify/iconify@>=2.0.0-rc.6": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@iconify/iconify/-/iconify-2.0.3.tgz#1ae5bc81c2615b4d24ae495e6bdd6b5109f6e1dc" - integrity sha512-Ctjre38vIf0PjjU2joj+DheSDFajdLiZ7gNdttjsXPqB9yYrmqOIDe1ce8L8v0qO86kM05hF9lUMriQTlgiSPA== - dependencies: - cross-fetch "^3.0.6" - "@iconify/icons-vscode-icons@^1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@iconify/icons-vscode-icons/-/icons-vscode-icons-1.1.4.tgz#cefaac0094ea2cfa015e003b27d9eed55244ee86" integrity sha512-iInsEsv2HkjvEzPqKli2UJTu27aUfTo2CQO88KEugc8Q/G0bYKCvAOus3zRRaG2ZrGSIjWKFftwGKm3oeDGpug== -"@iconify/json-tools@^1.0.10": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@iconify/json-tools/-/json-tools-1.0.10.tgz#d9a7050dbbe8bb29d684d4b3f9446ed2d0bea3cc" - integrity sha512-LFelJDOLZ6JHlmlAkgrvmcu4hpNPB91KYcr4f60D/exzU1eNOb4/KCVHIydGHIQFaOacIOD+Xy+B7P1z812cZg== - "@iconify/json@1.1.368": version "1.1.368" resolved "https://registry.yarnpkg.com/@iconify/json/-/json-1.1.368.tgz#a45ddc36efacd7d8f8ef44ed098ef2a21117765b" @@ -3975,10 +3969,22 @@ resolved "https://registry.yarnpkg.com/@iconify/react/-/react-2.0.0-rc.8.tgz#8fb5d175b3b7c944121173299baddf424c912428" integrity sha512-jJKOBeJaM8tRu3kpBnYgzNLDGG7QojtbGlZGyAQGNWiIjR30+7S+DnMA2kFrvr4mBBVji7A0bpcfoZNKBoXyVw== -"@iconify/types@^1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@iconify/types/-/types-1.0.6.tgz#87a0409d9ce58a04e6c76f89637d69c81bc0d942" - integrity sha512-eG74WPaqjBGnZ3Xy36X4LRDA/ZlhCK6T0zbsAAIYObY2Qija/379iXx+e2wWwEIXS46B62nGaUcuI0MpUnTSrg== +"@iconify/types@^1.0.12", "@iconify/types@^1.0.6": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@iconify/types/-/types-1.0.12.tgz#839f1f784b7030b94482d51996570f4dbd7d6796" + integrity sha512-6er6wSGF3hgc1JEZqiGpg21CTCjHBYOUwqLmb2Idzkjiw6ogalGP0ZMLVutCzah+0WB4yP+Zd2oVPN8jvJ+Ftg== + +"@iconify/utils@^1.0.23": + version "1.0.23" + resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-1.0.23.tgz#71d34ffb79687e9430d73d938f5e258ae7fdb5da" + integrity sha512-Ktdmpe4mkMXQAnnDUz3s6s5aY/BeVPwHC1d5IhG1bgrWVNWFQNUj8cQPMbHpNCSD9MRC5yGxm9/PGPpOWGJLAg== + dependencies: + "@antfu/install-pkg" "^0.1.0" + "@antfu/utils" "^0.3.0" + "@iconify/types" "^1.0.12" + debug "^4.3.3" + kolorist "^1.5.0" + local-pkg "^0.4.0" "@iconify/vue@3.0.0-beta.1": version "3.0.0-beta.1" @@ -6506,24 +6512,6 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353" integrity sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q== -"@purge-icons/core@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@purge-icons/core/-/core-0.7.0.tgz#097ba8d4d8b7e8d662df687bd2391eb8b83caba0" - integrity sha512-PaCeTFjkQUX+MzBsNg3L8x5aCZqXwaUSNw1FY3Jn7wlLqNqxRNoShw5P//a1DQAy7hLlUHvEL6IGeDoN/xf98A== - dependencies: - "@iconify/iconify" "2.0.0-rc.6" - axios "^0.21.1" - debug "^4.3.2" - fast-glob "^3.2.5" - fs-extra "^9.1.0" - -"@purge-icons/generated@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@purge-icons/generated/-/generated-0.7.0.tgz#d87dbb3145e8b9a64e2e12ff660aa3cb13cbeb56" - integrity sha512-4SHVpZnKaW5ekRTjhPY9b1pALVlF0pDuGIDRAlxAm0V+gQVOL0+Ghav6U9XqXFj2kiG1+eQ8swpvB+kd0a+tqg== - dependencies: - "@iconify/iconify" ">=2.0.0-rc.6" - "@reach/dialog@0.10.5": version "0.10.5" resolved "https://registry.yarnpkg.com/@reach/dialog/-/dialog-0.10.5.tgz#70bd832616fc2b0f31ed65aff81ae9e218c4dbc4" @@ -8608,6 +8596,11 @@ resolved "https://registry.yarnpkg.com/@toycode/markdown-it-class/-/markdown-it-class-1.2.3.tgz#272082b46d1242d2607a3aca281aae9d208fc182" integrity sha512-9N7iI5iGzjmYpeEFE93/76SkiSZkywkIiKUxahoU4h5WDUJyruXO+Ce4o/nFkFdKQnmsTmyxhdCtXVikl67XGw== +"@toycode/markdown-it-class@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@toycode/markdown-it-class/-/markdown-it-class-1.2.4.tgz#6d9bc162d0b980695a2e6b2622f49eb1c3f349c8" + integrity sha512-hA4gHBK8moObkOYdWTjhy1wYcYy0MJeM3JjSKbsXHRpRMvIKhk6Jm+t3bXsSScTdz/byWqQbs8YIwVYjHp+SlQ== + "@trysound/sax@0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" @@ -10407,7 +10400,7 @@ "@vue/compiler-core" "3.2.31" "@vue/shared" "3.2.31" -"@vue/compiler-sfc@3.2.31", "@vue/compiler-sfc@^3.0.11", "@vue/compiler-sfc@^3.0.5", "@vue/compiler-sfc@^3.2.4": +"@vue/compiler-sfc@3.2.31", "@vue/compiler-sfc@^3.0.5", "@vue/compiler-sfc@^3.2.20", "@vue/compiler-sfc@^3.2.4": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.31.tgz#d02b29c3fe34d599a52c5ae1c6937b4d69f11c2f" integrity sha512-748adc9msSPGzXgibHiO6T7RWgfnDcVQD+VVwYgSsyyY8Ans64tALHZANrKtOzvkwznV/F4H7OAod/jIlp/dkQ== @@ -12381,7 +12374,7 @@ axios@0.19.0: follow-redirects "1.5.10" is-buffer "^2.0.2" -axios@0.21.2, axios@^0.21.1: +axios@0.21.2: version "0.21.2" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.2.tgz#21297d5084b2aeeb422f5d38e7be4fbb82239017" integrity sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg== @@ -20517,10 +20510,10 @@ execa@^3.3.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -execa@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" - integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== +execa@^5.0.0, execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" get-stream "^6.0.0" @@ -27313,7 +27306,7 @@ koa@^2.13.0: type-is "^1.6.16" vary "^1.1.2" -kolorist@^1.5.1: +kolorist@^1.5.0, kolorist@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.5.1.tgz#c3d66dc4fabde4f6b7faa6efda84c00491f9e52b" integrity sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ== @@ -28034,7 +28027,7 @@ loader-utils@^1.0.0, loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1 emojis-list "^3.0.0" json5 "^1.0.1" -local-pkg@0.4.1: +local-pkg@0.4.1, local-pkg@^0.4.0, local-pkg@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.1.tgz#e7b0d7aa0b9c498a1110a5ac5b00ba66ef38cfff" integrity sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw== @@ -34071,7 +34064,7 @@ postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, po source-map "^0.6.1" supports-color "^6.1.0" -postcss@^8.1.10, postcss@^8.1.4, postcss@^8.2.8, postcss@^8.4.5: +postcss@^8.1.10, postcss@^8.1.4, postcss@^8.2.8, postcss@^8.4.6: version "8.4.7" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.7.tgz#f99862069ec4541de386bf57f5660a6c7a0875a8" integrity sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A== @@ -37014,14 +37007,6 @@ rollup-plugin-postcss@^4.0.0: safe-identifier "^0.4.2" style-inject "^0.3.0" -rollup-plugin-purge-icons@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-purge-icons/-/rollup-plugin-purge-icons-0.7.0.tgz#4419b810d5d75f1bba3af72a238e70b4a675f03c" - integrity sha512-zAff7SrjC2nA7TCm6gaOclh1cZ2IBupX1tnebn+sfvcvrezu+avS7k0BhhAC2pAtfhdOvD6G/2a+kkkm6hvpiw== - dependencies: - "@purge-icons/core" "^0.7.0" - "@purge-icons/generated" "^0.7.0" - rollup-plugin-typescript2@^0.29.0: version "0.29.0" resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.29.0.tgz#b7ad83f5241dbc5bdf1e98d9c3fca005ffe39e1a" @@ -39889,7 +39874,7 @@ svgo@^1.0.0, svgo@^1.2.2: unquote "~1.1.1" util.promisify "~1.0.0" -svgo@^2.3.0, svgo@^2.7.0: +svgo@^2.7.0: version "2.8.0" resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.8.0.tgz#4ff80cce6710dc2795f0c7c74101e6764cfccd24" integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg== @@ -41667,15 +41652,18 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= -unplugin-icons@^0.11.3: - version "0.11.4" - resolved "https://registry.yarnpkg.com/unplugin-icons/-/unplugin-icons-0.11.4.tgz#e11b826619b325b99d1e15b2cae19581f41300b6" - integrity sha512-vmUqYCf+uFZF33GyL5/1X3LqNJrn6RfI8K85EPs8PzTTqMF6lGnO9wERSo2yKt2wzkCye10urZFdaYrReheA8A== +unplugin-icons@0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/unplugin-icons/-/unplugin-icons-0.13.2.tgz#c85fb6e68c0d041099a1534dca204f99943c8d7d" + integrity sha512-Dwfn5DkKrp/BpZV0R/2wgU39j+kjkeuIQ54PmJ9LhXNpNAS+Huf6Fl/PUmUrlWOvMAz0uPo3y/5lQKZUBjBkBQ== dependencies: - "@antfu/utils" "^0.3.0" - "@iconify/json-tools" "^1.0.10" - has-pkg "^0.0.1" - unplugin "^0.2.11" + "@antfu/install-pkg" "^0.1.0" + "@antfu/utils" "^0.5.0" + "@iconify/utils" "^1.0.23" + debug "^4.3.3" + kolorist "^1.5.1" + local-pkg "^0.4.1" + unplugin "^0.3.2" unplugin-vue-components@^0.15.2: version "0.15.4" @@ -41693,13 +41681,20 @@ unplugin-vue-components@^0.15.2: resolve "^1.20.0" unplugin "^0.2.13" -unplugin@^0.2.11, unplugin@^0.2.13: +unplugin@^0.2.13: version "0.2.16" resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-0.2.16.tgz#6f34e9f5068ca3ec92a36b016f47b5ad8bb875ca" integrity sha512-KkXatHba0baJszSHW+2e8EQU/5Bz7rYwzYXu8wUeq97tE6K3wvub+7OWSuRv04LttvzNLsJ2jXEyR35gofv74Q== dependencies: webpack-virtual-modules "^0.4.3" +unplugin@^0.3.2: + version "0.3.3" + resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-0.3.3.tgz#e9b148f84cabef5e6529f232a10e674a7c020930" + integrity sha512-WjZWpUqqcYPQ/efR00Zm2m1+J1LitwoZ4uhHV4VdZ+IpW0Nh/qnDYtVf+nLhozXdGxslMPecOshVR7NiWFl4gA== + dependencies: + webpack-virtual-modules "^0.4.3" + unquote@^1.1.0, unquote@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" @@ -42580,14 +42575,6 @@ vite-plugin-components@0.11.3: magic-string "^0.25.7" minimatch "^3.0.4" -vite-plugin-icons@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/vite-plugin-icons/-/vite-plugin-icons-0.6.3.tgz#b60ee401e4f15187758de583de7a94f44c323701" - integrity sha512-h+DNh9xMBhISNBZ/broslVRk/DbgDXV71u2Ienoz8G0W81+tzbtPHsE6imnwqW93h0qtS1VnVyOQlqsKcheLtw== - dependencies: - "@iconify/json-tools" "^1.0.10" - vue-template-es2015-compiler "^1.9.1" - vite-plugin-inspect@0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/vite-plugin-inspect/-/vite-plugin-inspect-0.4.3.tgz#d048106c0aa24554d91bee0d524e94b1eba178fd" @@ -42626,15 +42613,6 @@ vite-plugin-pages@0.18.1: json5 "^2.2.0" yaml "^2.0.0-8" -vite-plugin-purge-icons@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/vite-plugin-purge-icons/-/vite-plugin-purge-icons-0.7.0.tgz#c460037438fd71372153360ccb9e7d97b030fb58" - integrity sha512-oGZUKFAL4waIZIeiCPT5KZvGbBA500AO/03oxW+ODTKUMq+0jbh9s+T8NPzfJQFC1jtE7eUb2ium82IP/gxZjA== - dependencies: - "@purge-icons/core" "^0.7.0" - "@purge-icons/generated" "^0.7.0" - rollup-plugin-purge-icons "^0.7.0" - vite-plugin-vue-layouts@0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/vite-plugin-vue-layouts/-/vite-plugin-vue-layouts-0.4.1.tgz#17dc2d72f5806c0089a01656f17e6f71c180722b" @@ -42656,21 +42634,21 @@ vite-plugin-windicss@1.2.4: debug "^4.3.2" windicss "^3.1.4" -vite-svg-loader@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/vite-svg-loader/-/vite-svg-loader-2.1.1.tgz#ca4ac6b7208b1ef5268b425f904dc36908c327b5" - integrity sha512-TOMwQgA44SIre5xKpS5HrERbXdRPt7VN41WVi2WIzTEtxwIKQJV7XYsUeslBXCS7RPUAly00/oAdMCN6qT+/Rg== +vite-svg-loader@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/vite-svg-loader/-/vite-svg-loader-3.1.2.tgz#e701d6f5d42969eac2b3c40fea9d4159bfa27be3" + integrity sha512-op5ENc3eo1K1YlufQtdyAcxxXtiWJHyimH9y573ZWhj/9cw5x3ZtYhOEQua7MugclTa9mnZTzuir0rfTCkVyiQ== dependencies: - "@vue/compiler-sfc" "^3.0.11" - svgo "^2.3.0" + "@vue/compiler-sfc" "^3.2.20" + svgo "^2.7.0" -vite@2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/vite/-/vite-2.8.0.tgz#0646ab9eee805fb24b667889644ac04bc516d0d3" - integrity sha512-ed5rjyeysttuPJX/aKSA0gTB/8ZKLM5xF6FtEuKy1B9DiQbDNFMVMQxnb9JesgBPUMMIJxC8w5KZ/KNWLKFXoA== +vite@2.8.4: + version "2.8.4" + resolved "https://registry.yarnpkg.com/vite/-/vite-2.8.4.tgz#4e52a534289b7b4e94e646df2fc5556ceaa7336b" + integrity sha512-GwtOkkaT2LDI82uWZKcrpRQxP5tymLnC7hVHHqNkhFNknYr0hJUlDLfhVRgngJvAy3RwypkDCWtTKn1BjO96Dw== dependencies: esbuild "^0.14.14" - postcss "^8.4.5" + postcss "^8.4.6" resolve "^1.22.0" rollup "^2.59.0" optionalDependencies: @@ -42923,7 +42901,7 @@ vue-template-compiler@2.6.12, vue-template-compiler@^2.6.11: de-indent "^1.0.2" he "^1.1.0" -vue-template-es2015-compiler@^1.9.0, vue-template-es2015-compiler@^1.9.1: +vue-template-es2015-compiler@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw== From f19186b65d681946eaf5dbc03f838fe96792f3d3 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Fri, 4 Mar 2022 19:17:48 -0500 Subject: [PATCH 11/21] cleaning up the vite-dev-server --- npm/vite-dev-server/foo.js | 4 - npm/vite-dev-server/package.json | 4 +- npm/vite-dev-server/src/constants.ts | 4 +- npm/vite-dev-server/src/index.ts | 2 +- npm/vite-dev-server/src/plugins/cypress.ts | 30 +-- npm/vite-dev-server/src/plugins/index.ts | 2 - npm/vite-dev-server/src/plugins/inspect.ts | 2 +- npm/vite-dev-server/src/plugins/server.ts | 220 --------------------- npm/vite-dev-server/src/resolveConfig.ts | 6 +- npm/vite-dev-server/src/types.ts | 2 +- yarn.lock | 75 +------ 11 files changed, 20 insertions(+), 331 deletions(-) delete mode 100644 npm/vite-dev-server/foo.js delete mode 100644 npm/vite-dev-server/src/plugins/server.ts diff --git a/npm/vite-dev-server/foo.js b/npm/vite-dev-server/foo.js deleted file mode 100644 index 04e5af76e036..000000000000 --- a/npm/vite-dev-server/foo.js +++ /dev/null @@ -1,4 +0,0 @@ -const t = document.createElement('h1') - -t.innerText = 'It is I! Foo.js, relative to the VITE CONFIG' -document.body.appendChild(t) diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json index 035ff4c016ed..672426024f2a 100644 --- a/npm/vite-dev-server/package.json +++ b/npm/vite-dev-server/package.json @@ -15,12 +15,10 @@ }, "dependencies": { "debug": "4.3.3", - "dedent": "0.7.0", "find-up": "6.3.0", "get-port": "5.1.1", "local-pkg": "0.4.1", - "pathe": "0.2.0", - "ufo": "0.7.10" + "pathe": "0.2.0" }, "devDependencies": { "@cypress/react": "0.0.0-development", diff --git a/npm/vite-dev-server/src/constants.ts b/npm/vite-dev-server/src/constants.ts index 9d51c68b7c92..48b5e73a764c 100644 --- a/npm/vite-dev-server/src/constants.ts +++ b/npm/vite-dev-server/src/constants.ts @@ -1,8 +1,6 @@ export const configFiles = [ - 'vitest.config.ts', - 'vitest.config.js', - 'vitest.config.mjs', 'vite.config.ts', 'vite.config.js', 'vite.config.mjs', + 'vite.config.cjs', ] diff --git a/npm/vite-dev-server/src/index.ts b/npm/vite-dev-server/src/index.ts index 0df4773bce7a..8efc2d43e80f 100644 --- a/npm/vite-dev-server/src/index.ts +++ b/npm/vite-dev-server/src/index.ts @@ -1,6 +1,6 @@ -import { createServer as viteCreateServer } from 'vite' import debugFn from 'debug' import getPort from 'get-port' +import { createServer as viteCreateServer } from 'vite' import { createConfig } from './resolveConfig' import type { CypressViteDevServerConfig, StartDevServer } from './types' diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index 72102f9f8736..7d53c58c2460 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -1,30 +1,10 @@ -// import { Plugin, ViteDevServer } from 'vite' -// import { CypressViteDevServer } from './server' - -// export const Cypress = (options): Plugin => { -// return { -// name: 'cypress:main', -// enforce: 'pre', - -// // configureServer (viteServer: ViteDevServer) { -// // return () => { -// // const cyServer = new CypressViteDevServer(viteServer, options) - -// // viteServer.middlewares.use('/', cyServer.handleAllRoutes.bind(cyServer)) - -// // viteServer.middlewares.use('/', cyServer.handle404.bind(cyServer)) -// // } -// // }, -// } -// } -import { resolve, sep } from 'path' -import { readFile } from 'fs/promises' import Debug from 'debug' -import { ModuleNode, normalizePath, Plugin, ViteDevServer } from 'vite' +import { readFile } from 'fs/promises' +import { resolve, sep } from 'pathe' +import { ModuleNode, Plugin, ViteDevServer } from 'vite' -const debug = Debug('cypress:vite-dev-server:plugin') +const debug = Debug('cypress:vite-dev-server:plugins') -const pluginName = 'cypress-transform-html' const OSSepRE = new RegExp(`\\${sep}`, 'g') function convertPathToPosix (path: string): string { @@ -70,7 +50,7 @@ export const Cypress = ( const posixIndexHtml = indexHtmlFile ? convertPathToPosix(resolve(projectRoot, indexHtmlFile)) : undefined return { - name: pluginName, + name: 'cypress:main', enforce: 'pre', configResolved (config) { base = config.base diff --git a/npm/vite-dev-server/src/plugins/index.ts b/npm/vite-dev-server/src/plugins/index.ts index 07e622dd1570..f8eb18e0f500 100644 --- a/npm/vite-dev-server/src/plugins/index.ts +++ b/npm/vite-dev-server/src/plugins/index.ts @@ -1,5 +1,3 @@ export * from './inspect' -export * from './server' - export * from './cypress' diff --git a/npm/vite-dev-server/src/plugins/inspect.ts b/npm/vite-dev-server/src/plugins/inspect.ts index ad5eefd29f31..000fb3d80277 100644 --- a/npm/vite-dev-server/src/plugins/inspect.ts +++ b/npm/vite-dev-server/src/plugins/inspect.ts @@ -3,7 +3,7 @@ import type { PluginOption } from 'vite' const debug = debugFn('cypress:vite-dev-server:plugins:inspect') -export const CypressInspect = async (): (() => PluginOption) | null => { +export const CypressInspect = async (): Promise<(() => PluginOption) | null> => { if (!process.env.DEBUG) return null let Inspect diff --git a/npm/vite-dev-server/src/plugins/server.ts b/npm/vite-dev-server/src/plugins/server.ts deleted file mode 100644 index 8ed8facab169..000000000000 --- a/npm/vite-dev-server/src/plugins/server.ts +++ /dev/null @@ -1,220 +0,0 @@ -import { relative, resolve } from 'pathe' -import { promises as fsp } from 'fs' -import { decode, isSamePath } from 'ufo' -import { parse, join } from 'path' -import debugFn from 'debug' -import type { Connect, ViteDevServer } from 'vite' -import { normalizePath } from 'vite' -// import { commonSpecExtensions } from '../constants' -import { IncomingMessage, ServerResponse } from 'http' -import { pathToFileURL } from 'url' - -const debug = debugFn('cypress:vite-dev-server:server') - -export type RequestType = 'index' | '404' | 'current-spec' | 'module' - -// TODO: pass this into each dev server in the options -const specHeader = '__cypress_spec_path' -const iframeRoute = '/__cypress/iframes/' - -const matchRequest = (req, specs): RequestType => { - // const url = req.originalUrl - // const normalizedUrl = normalizePath(decode(url)) - - debug('from original url', req.originalUrl) - debug('with headers', req.headers) - - // Cypress proxies all requests through index.html using different headers - // If the route matches index.html it can mean two things: - // 1. Cypress is trying to load a spec (spec header will not be present) - // 2. The user is requesting the server from their browser (header is present) - - if (isCypressSpecRequest(req)) { - if (getCurrentSpecFile(req, specs)) { - debug('is current spec') - - return 'current-spec' - } - } - - // const isIndex = isSamePath(normalizedUrl, '/index.html') || isSamePath(normalizedUrl, '/') - - // if (isIndex) return 'index' - debug('is module') - - return 'module' -} - -const cleanSpecFileName = (file) => { - if (typeof file === 'string') file = parse(file) - - let cleanPath - - // commonSpecExtensions.some((extension) => { - // if (file.name.endsWith(extension)) { - // cleanPath = join(`/${ file.dir}`, file.name.slice(0, -extension.length)) - - // return true - // } - // }) - - return cleanPath -} - -const isRequestFromWithinCyIframe = (req) => { - return req.headers.referer.includes(iframeRoute) -} - -const isCypressSpecRequest = (req) => { - if (req.headers[specHeader]) return true - - return false -} - -const getSpecPathFromHeader = (req): string | null => { - const specPaths = req.headers[specHeader] - - if (specPaths) { - return Array.isArray(specPaths) ? specPaths[0] : specPaths - } - - return null -} - -const getCurrentSpecFile = (req, specs: Cypress.DevServerConfig['specs']) => { - // Route by header (Cypress does this when it forwards on the request to the dev server) - const specPaths = req.headers['__cypress_spec_path'] - - if (specPaths) { - debug('spec paths', specPaths) - - return Array.isArray(specPaths) ? specPaths[0] : specPaths - } - - // Route by url (You, navigating to your browser) - // return specs.find((spec) => { - // if (isSamePath(`/${spec.relative}`, decode(req.originalUrl))) return false - - // debug('clean spec file name', cleanSpecFileName(parse(spec.relative))) - // debug('normalizePath', normalizePath(decode(req.originalUrl))) - // debug('decode', decode(req.originalUrl)) - - // return isSamePath(cleanSpecFileName(parse(spec.relative)), normalizePath(decode(url))) - // })?.absolute -} - -export class CypressViteDevServer { - server: ViteDevServer - options: Cypress.DevServerConfig - _template?: string - _client?: string - - constructor (server: ViteDevServer, options: Cypress.DevServerConfig) { - debug('Setting up Cypress\'s Vite plugin') - - this.options = options - this.server = server - this.getTemplate() - this.getClient() - } - - async getTemplate () { - const indexHtmlPath = resolve('index.html') - - this._template = await fsp.readFile(indexHtmlPath, 'utf-8') - debug('Loaded html template successfully from', indexHtmlPath) - - return this._template - } - - async getClient () { - const clientPath = resolve(process.cwd(), join('client', 'initCypressTests.js')) - - this._client = await fsp.readFile(clientPath, 'utf-8') - debug('Loaded client successfully from', clientPath) - - return this._client - } - - /** - * Route matching and handling. - * - * There are 4 cases to cover - * 1. User loads the site's index. - * 2. User is trying to run a spec from Cypress. - * 3. User is trying to visit a resource that does not exist. - * 4. User is trying to visit an HTML page that does not exist. - */ - - handleAllRoutes (req: Connect.IncomingMessage, res: ServerResponse, next: Function) { - if (isCypressSpecRequest(req)) { - // We're going to request the same route with the same headers, - // But from this time, it'll be inside of the iframe. - if (isRequestFromWithinCyIframe(req)) { - return next() - } - - // If you request a non-existent from top, you'll end up here... - // That's not great :/ - return this.handleCurrentSpecRoute(req, res) - } - - return next() - } - - getCurrentSpecFile (req) { - const specPaths = req.headers['__cypress_spec_path'] - - if (specPaths) { - debug('spec paths', specPaths) - - const absolutePath = Array.isArray(specPaths) ? specPaths[0] : specPaths - - return this.options.specs.find((s) => { - return s.absolute === absolutePath - }) - } - } - - getSupportFile () { - const supportFile = this.options.config.supportFile - - if (supportFile) { - return relative(this.options.config.projectRoot, supportFile) - } - } - - // When the user requests `/` and is not trying to load a spec - async handleIndexRoute (req, res) { - return res.end(await this.server.transformIndexHtml(req.originalUrl, `

Hello Index

`, req.originalUrl)) - } - - async handleCurrentSpecRoute (req, res) { - const specFile = this.getCurrentSpecFile(req) - const supportFile = this.getSupportFile() - - if (!specFile) { - throw new Error('Attempted to resolve request to Vite Dev Server, but no specs were found. Re-run Cypress with `DEBUG=cypress:vite-dev-server:*` for more details') - } - - let client = '`) - - const ret = await this.server.transformIndexHtml(req.url, html, req.originalUrl) - - return res.end(ret) - } - - // When the user requests `/does-not-exist` - handle404 (req, res) { - debug('res end 404') - - return res.end(`404!`) - } -} diff --git a/npm/vite-dev-server/src/resolveConfig.ts b/npm/vite-dev-server/src/resolveConfig.ts index c1c107255188..1bcea08c55cd 100644 --- a/npm/vite-dev-server/src/resolveConfig.ts +++ b/npm/vite-dev-server/src/resolveConfig.ts @@ -3,13 +3,13 @@ * Vitest's own config resolution logic. * You can find it here https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/create.ts */ -import { resolve, relative } from 'pathe' +import debugFn from 'debug' +import { importModule } from 'local-pkg' +import { relative, resolve } from 'pathe' import { mergeConfig } from 'vite' import { configFiles } from './constants' import { Cypress, CypressInspect } from './plugins/index' -import debugFn from 'debug' import type { StartDevServer } from './types' -import { importModule } from 'local-pkg' const debug = debugFn('cypress:vite-dev-server:resolve-config') diff --git a/npm/vite-dev-server/src/types.ts b/npm/vite-dev-server/src/types.ts index 9d1593e23918..af601a8ee916 100644 --- a/npm/vite-dev-server/src/types.ts +++ b/npm/vite-dev-server/src/types.ts @@ -16,5 +16,5 @@ export interface StartDevServer { /* base html template to render in AUT */ template?: string /* base html template to render in AUT */ - indexHtml?: string + indexHtmlFile?: string } diff --git a/yarn.lock b/yarn.lock index 678627ad8150..9eed50428791 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10929,16 +10929,6 @@ jiti "^1.10.1" windicss "^3.1.4" -"@windicss/config@1.4.7": - version "1.4.7" - resolved "https://registry.yarnpkg.com/@windicss/config/-/config-1.4.7.tgz#5562a36b907cc28a1b8ecc7d2ddc534a43e11ae8" - integrity sha512-giz6b9ce5fiac/JoLQSabcwD4wbkSt07Z0+Y0Ruw5RvJ4oejq7/4qv/cmFtjbf3l+rmxh8U8/1szQMd0Zs2esg== - dependencies: - debug "^4.3.2" - jiti "^1.12.3" - tsup "^5.2.0" - windicss "^3.1.7" - "@windicss/config@1.8.2": version "1.8.2" resolved "https://registry.yarnpkg.com/@windicss/config/-/config-1.8.2.tgz#52f8720a7987184a79d610a151f12a6325c3677e" @@ -14461,7 +14451,7 @@ c8@^7.10.0: yargs "^16.2.0" yargs-parser "^20.2.7" -cac@^6.7.2, cac@^6.7.3: +cac@^6.7.3: version "6.7.3" resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.3.tgz#10410b8611677990cc2e3c8b576d471c1d71b768" integrity sha512-ECVqVZh74qgSuZG9YOt2OJPI3wGcf+EwwuF/XIOYqZBD0KZYLtgPWqFPxmDPQ6joxI1nOlvVgRV6VT53Ooyocg== @@ -15978,7 +15968,7 @@ commander@6.2.1, commander@^6.1.0, commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@^4.0.0, commander@^4.0.1, commander@^4.1.1: +commander@^4.0.1, commander@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== @@ -19650,11 +19640,6 @@ esbuild-windows-arm64@0.14.23: resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.23.tgz#edc560bbadb097eb45fc235aeacb942cb94a38c0" integrity sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw== -esbuild@^0.12.28: - version "0.12.29" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.29.tgz#be602db7c4dc78944a9dbde0d1ea19d36c1f882d" - integrity sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g== - esbuild@^0.14.14: version "0.14.23" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.23.tgz#95e842cb22bc0c7d82c140adc16788aac91469fe" @@ -23370,11 +23355,6 @@ has-own-prop@^2.0.0: resolved "https://registry.yarnpkg.com/has-own-prop/-/has-own-prop-2.0.0.tgz#f0f95d58f65804f5d218db32563bb85b8e0417af" integrity sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ== -has-pkg@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/has-pkg/-/has-pkg-0.0.1.tgz#f9d9139ed83e2487deae5eb4ac13182a2e903857" - integrity sha512-UuzsNxcEOdEwRsz4HtaceT7jg71L2gopEq8OMOGKtPLYhHhF4RJZtkcZ4Xn0jmAmBSNhm0xPhrywgZkLu4aMYQ== - has-symbol-support-x@^1.4.1: version "1.4.2" resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" @@ -26526,7 +26506,7 @@ jimp@^0.2.21: tinycolor2 "^1.1.2" url-regex "^3.0.0" -jiti@^1.10.1, jiti@^1.12.3, jiti@^1.13.0: +jiti@^1.10.1, jiti@^1.13.0: version "1.13.0" resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.13.0.tgz#3cdfc4e651ca0cca4c62ed5e47747b5841d41a8e" integrity sha512-/n9mNxZj/HDSrincJ6RP+L+yXbpnB8FybySBa+IjIaoH9FIxBbrbRT5XUbe8R7zuVM2AQqNMNDDqz0bzx3znOQ== @@ -26536,11 +26516,6 @@ jmespath@0.15.0: resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc= -joycon@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.0.1.tgz#9074c9b08ccf37a6726ff74a18485f85efcaddaf" - integrity sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA== - jpeg-js@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.1.2.tgz#135b992c0575c985cfa0f494a3227ed238583ece" @@ -30277,7 +30252,7 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mz@^2.4.0, mz@^2.5.0, mz@^2.7.0: +mz@^2.4.0, mz@^2.5.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== @@ -33396,7 +33371,7 @@ postcss-load-config@^2.0.0: cosmiconfig "^5.0.0" import-cwd "^2.0.0" -postcss-load-config@^3.0.0, postcss-load-config@^3.0.1: +postcss-load-config@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.1.tgz#2f53a17f2f543d9e63864460af42efdac0d41f87" integrity sha512-c/9XYboIbSEUZpiD1UQD0IKiUe8n9WHYV7YFe7X7J+ZwCsEKkUJSFWjS9hBU1RR9THR7jMXst8sxiqP0jjo2mg== @@ -37143,7 +37118,7 @@ rollup@2.38.4: optionalDependencies: fsevents "~2.3.1" -rollup@^2.38.5, rollup@^2.56.1, rollup@^2.59.0: +rollup@^2.38.5, rollup@^2.59.0: version "2.68.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.68.0.tgz#6ccabfd649447f8f21d62bf41662e5caece3bd66" integrity sha512-XrMKOYK7oQcTio4wyTz466mucnd8LzkiZLozZ4Rz0zQD+HeX4nUK4B8GrTX/2EvN2/vBF/i2WnaXboPxo0JylA== @@ -39797,18 +39772,6 @@ success-symbol@^0.1.0: resolved "https://registry.yarnpkg.com/success-symbol/-/success-symbol-0.1.0.tgz#24022e486f3bf1cdca094283b769c472d3b72897" integrity sha1-JAIuSG878c3KCUKDt2nEctO3KJc= -sucrase@^3.20.1: - version "3.20.1" - resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.20.1.tgz#1c055e97d0fab2f9857f02461364075b3a4ab226" - integrity sha512-BIG59HaJOxNct9Va6KvT5yzBA/rcMGetzvZyTx0ZdCcspIbpJTPS64zuAfYlJuOj+3WaI5JOdA+F0bJQQi8ZiQ== - dependencies: - commander "^4.0.0" - glob "7.1.6" - lines-and-columns "^1.1.6" - mz "^2.7.0" - pirates "^4.0.1" - ts-interface-checker "^0.1.9" - sumchecker@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42" @@ -40955,11 +40918,6 @@ ts-essentials@^2.0.3: resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745" integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w== -ts-interface-checker@^0.1.9: - version "0.1.13" - resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" - integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== - ts-loader@7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-7.0.4.tgz#5d9b95227de5afb91fdd9668f8920eb193cfe0cc" @@ -41181,25 +41139,6 @@ tsscmp@1.0.6: resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA== -tsup@^5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/tsup/-/tsup-5.2.1.tgz#4ad4debd1d7852e8c4bb40075ebd2ee85efe7715" - integrity sha512-eQmRfKoHIiTFg38Dh2MARCx3J0+P+wbwB5iSHcXTwsnVR9csGLpln5qqBjdgyAGV1VTbOmyU37veCi2eA+wuqA== - dependencies: - cac "^6.7.2" - chalk "^4.1.0" - chokidar "^3.5.1" - debug "^4.3.1" - esbuild "^0.12.28" - execa "^5.0.0" - globby "^11.0.3" - joycon "^3.0.1" - postcss-load-config "^3.0.1" - resolve-from "^5.0.0" - rollup "^2.56.1" - sucrase "^3.20.1" - tree-kill "^1.2.2" - tsutils@^2.29.0: version "2.29.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" @@ -43960,7 +43899,7 @@ windicss@3.1.4: resolved "https://registry.yarnpkg.com/windicss/-/windicss-3.1.4.tgz#557eaf8e3c08064a309ccb5d887c82c4bce25069" integrity sha512-3RBcANxdOy/n4dLVT8+0X409sGI+piO06ARbQ8RncxGuYgdw5Ip3hrhGIYajH67lV+tHc7xNVGxj73amOC9N0g== -windicss@^3.1.4, windicss@^3.1.7, windicss@^3.5.1: +windicss@^3.1.4, windicss@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/windicss/-/windicss-3.5.1.tgz#5e279c21179dbc122122d0b3a3a2651511249241" integrity sha512-E1hYZATcZFci/XhGS0sJAMRxULjnK+glNukE78Ku7xeb3jxgMY55fFOdIrav+GjQCsgR+IZxPq9/DwmO6eyc4Q== From 24038557f43c476710210fdbdd8d5e04a0009a60 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Tue, 8 Mar 2022 15:34:37 -0500 Subject: [PATCH 12/21] cleaning up the vite-dev-server. removing virtual modules --- .../client/initCypressTests.js | 17 +++++++- npm/vite-dev-server/src/plugins/cypress.ts | 42 ++++--------------- .../cypress/e2e/support/e2eProjectDirs.ts | 1 - 3 files changed, 25 insertions(+), 35 deletions(-) diff --git a/npm/vite-dev-server/client/initCypressTests.js b/npm/vite-dev-server/client/initCypressTests.js index eb61234c85f8..c418bbc68545 100644 --- a/npm/vite-dev-server/client/initCypressTests.js +++ b/npm/vite-dev-server/client/initCypressTests.js @@ -5,12 +5,27 @@ const CypressInstance = window.Cypress = parent.Cypress const importsToLoad = [] +/* Support file import logic, this should be removed once we + * are able to return relative paths from the supportFile + * Jira #UNIFY-1260 + */ const supportFile = CypressInstance.config('supportFile') +const projectRoot = CypressInstance.config('projectRoot') + +let supportRelativeToProjectRoot = supportFile.replace(projectRoot, '') + +if (CypressInstance.config('platform') === 'win32') { + supportRelativeToProjectRoot = supportFile.replace(projectRoot.replaceAll('/', '\\')) +} if (supportFile) { - importsToLoad.push(() => import(supportFile)) + // We need a slash before /cypress/supportFile.js, this happens by default + // with the current string replacement logic. + importsToLoad.push(() => import(`${supportRelativeToProjectRoot}`)) } +/* Spec file import logic */ +// We need a slash before /src/my-spec.js, this does not happen by default. importsToLoad.push(() => import(`/${CypressInstance.spec.relative}`)) if (!CypressInstance) { diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index 7d53c58c2460..0967da1609b2 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -1,33 +1,22 @@ -import Debug from 'debug' +import type { BaseSpec } from '@packages/types' +import debugFn from 'debug' import { readFile } from 'fs/promises' -import { resolve, sep } from 'pathe' -import { ModuleNode, Plugin, ViteDevServer } from 'vite' +import { resolve } from 'pathe' +import type { ModuleNode, Plugin, ViteDevServer } from 'vite' +import { normalizePath } from 'vite' -const debug = Debug('cypress:vite-dev-server:plugins') - -const OSSepRE = new RegExp(`\\${sep}`, 'g') - -function convertPathToPosix (path: string): string { - return sep === '/' - ? path - : path.replace(OSSepRE, '/') -} +const debug = debugFn('cypress:vite-dev-server:plugins:cypress') const INIT_FILEPATH = resolve(__dirname, '../../client/initCypressTests.js') const HMR_DEPENDENCY_LOOKUP_MAX_ITERATION = 50 -function getSpecsPathsSet (specs: Spec[]) { +function getSpecsPathsSet (specs: BaseSpec[]) { return new Set( specs.map((spec) => spec.absolute), ) } -interface Spec{ - absolute: string - relative: string -} - export const Cypress = ( options, ): Plugin => { @@ -42,13 +31,10 @@ export const Cypress = ( let specsPathsSet = getSpecsPathsSet(specs) let loader - devServerEvents.on('dev-server:specs:changed', (specs: Spec[]) => { + devServerEvents.on('dev-server:specs:changed', (specs: BaseSpec[]) => { specsPathsSet = getSpecsPathsSet(specs) }) - const posixSupportFilePath = supportFilePath ? convertPathToPosix(resolve(projectRoot, supportFilePath)) : undefined - const posixIndexHtml = indexHtmlFile ? convertPathToPosix(resolve(projectRoot, indexHtmlFile)) : undefined - return { name: 'cypress:main', enforce: 'pre', @@ -69,16 +55,6 @@ export const Cypress = ( indexHtmlContent.substring(endOfBody) }` }, - resolveId (id) { - if (id === '/@cypress:client-init-test') { - return ` - const h1 = document.createElement('h1'); - h1.innerText = 'Looking good'; - document.body.appendChild(h1); - - ` - } - }, configureServer: async (server: ViteDevServer) => { loader = await readFile(INIT_FILEPATH) @@ -92,7 +68,7 @@ export const Cypress = ( debug('handleHotUpdate - file', file) // If the user provided IndexHtml is changed, do a full-reload - if (file === posixIndexHtml) { + if (normalizePath(file) === resolve(projectRoot, indexHtmlFile)) { server.ws.send({ type: 'full-reload', }) diff --git a/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts b/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts index 108c81b30cfd..d8a5e7bfee1c 100644 --- a/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts +++ b/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts @@ -146,7 +146,6 @@ export const e2eProjectDirs = [ 'vueclivue3-custom-index-html', 'vueclivue3-unconfigured', 'webpack-preprocessor', - 'webpack-preprocessor-2', 'webpack-preprocessor-awesome-typescript-loader', 'webpack-preprocessor-ts-loader', 'webpack-preprocessor-ts-loader-compiler-options', From 19045fec329662e3ea430cb79dc53507ca250677 Mon Sep 17 00:00:00 2001 From: Jess Date: Tue, 8 Mar 2022 15:37:09 -0500 Subject: [PATCH 13/21] Update package.json --- cli/package.json | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/cli/package.json b/cli/package.json index e8226e5f6bc6..b068831e4755 100644 --- a/cli/package.json +++ b/cli/package.json @@ -110,15 +110,5 @@ "engines": { "node": ">=12.0.0" }, - "types": "types", - "exports": { - ".": { - "import": "./index.mjs", - "require": "./index.js" - }, - "./package.json": { - "import": "./package.json", - "require": "./package.json" - } - } + "types": "types" } From 5410eb34f5aec408137fb08a343244937d06860a Mon Sep 17 00:00:00 2001 From: Jess Date: Tue, 8 Mar 2022 15:41:18 -0500 Subject: [PATCH 14/21] Update cypress.config.ts --- npm/vite-dev-server/cypress.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/npm/vite-dev-server/cypress.config.ts b/npm/vite-dev-server/cypress.config.ts index 36ef85293ec2..a4ab7048fa47 100644 --- a/npm/vite-dev-server/cypress.config.ts +++ b/npm/vite-dev-server/cypress.config.ts @@ -8,7 +8,6 @@ export default defineConfig({ 'component': { 'supportFile': 'cypress/support.js', devServer (cypressDevServerConfig) { - console.log('inside') const path = require('path') return devServer(cypressDevServerConfig, { From c4b012a9f3b60c9caae77ac7bf0332aa46160f79 Mon Sep 17 00:00:00 2001 From: Jess Date: Tue, 8 Mar 2022 15:41:31 -0500 Subject: [PATCH 15/21] Update package.json --- npm/vite-dev-server/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json index 672426024f2a..dd2b1e10b802 100644 --- a/npm/vite-dev-server/package.json +++ b/npm/vite-dev-server/package.json @@ -2,7 +2,7 @@ "name": "@cypress/vite-dev-server", "version": "0.0.0-development", "description": "Launches Vite Dev Server for Component Testing", - "main": "dist/index.js", + "main": "index.js", "scripts": { "build": "tsc || echo 'built, with type errors'", "build-prod": "tsc || echo 'built, with type errors'", From eb3d717b4b5264bb1997bb065a0fbe02aa4523e2 Mon Sep 17 00:00:00 2001 From: Jess Date: Tue, 8 Mar 2022 15:42:15 -0500 Subject: [PATCH 16/21] Update vite.config.ts --- packages/frontend-shared/vite.config.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/frontend-shared/vite.config.ts b/packages/frontend-shared/vite.config.ts index 41874ea06a0a..8a90b2f8b0b0 100644 --- a/packages/frontend-shared/vite.config.ts +++ b/packages/frontend-shared/vite.config.ts @@ -53,10 +53,6 @@ const makePlugins = (plugins) => { cy: FileSystemIconLoader(path.resolve(__dirname, './src/assets/icons')), ...plugins.iconsOptions?.customCollections, }, - iconCustomizer (_, __, props) { - props.width = '1em' - props.height = '1em' - }, ...plugins.iconsOptions, }), Components({ From 44ef9a7aceb9f83333a2326d8424ec27039ee47e Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Tue, 8 Mar 2022 16:37:37 -0500 Subject: [PATCH 17/21] types --- npm/vite-dev-server/src/plugins/cypress.ts | 10 +++++++--- packages/frontend-shared/windi.config.ts | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index 0967da1609b2..94bf79c44fa6 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -1,4 +1,3 @@ -import type { BaseSpec } from '@packages/types' import debugFn from 'debug' import { readFile } from 'fs/promises' import { resolve } from 'pathe' @@ -11,7 +10,12 @@ const INIT_FILEPATH = resolve(__dirname, '../../client/initCypressTests.js') const HMR_DEPENDENCY_LOOKUP_MAX_ITERATION = 50 -function getSpecsPathsSet (specs: BaseSpec[]) { +interface Spec { + absolute: string + relative: string +} + +function getSpecsPathsSet (specs: Spec[]) { return new Set( specs.map((spec) => spec.absolute), ) @@ -31,7 +35,7 @@ export const Cypress = ( let specsPathsSet = getSpecsPathsSet(specs) let loader - devServerEvents.on('dev-server:specs:changed', (specs: BaseSpec[]) => { + devServerEvents.on('dev-server:specs:changed', (specs: Spec[]) => { specsPathsSet = getSpecsPathsSet(specs) }) diff --git a/packages/frontend-shared/windi.config.ts b/packages/frontend-shared/windi.config.ts index b929ac84d850..872292996f19 100644 --- a/packages/frontend-shared/windi.config.ts +++ b/packages/frontend-shared/windi.config.ts @@ -5,9 +5,9 @@ import { safelist } from './.windicss/safelist' import { colors } from './.windicss/colors' import { shortcuts } from './.windicss/shortcuts' import path from 'path' -import type { WindiCssOptions } from '@windicss/config' +import type { FullConfig } from 'windicss/types/interfaces' -export const defaultConfig: WindiCssOptions = { +export const defaultConfig: FullConfig = { // This adds !important to all utility classes. // https://csswizardry.com/2016/05/the-importance-of-important/ important: true, From d442dd2d5297b1ceef7b1973b9c86c8b42c16dc5 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Tue, 8 Mar 2022 17:14:28 -0500 Subject: [PATCH 18/21] deps --- packages/app/package.json | 1 + packages/launchpad/package.json | 1 + yarn.lock | 43 +++++++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/packages/app/package.json b/packages/app/package.json index 2b542ddb659c..3522d158a0b0 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -22,6 +22,7 @@ "@cypress/vue": "0.0.0-development", "@graphql-typed-document-node/core": "^3.1.0", "@headlessui/vue": "1.4.0", + "@iconify/iconify": "2.1.2", "@iconify/json": "1.1.368", "@iconify/vue": "3.0.0-beta.1", "@intlify/vite-plugin-vue-i18n": "2.4.0", diff --git a/packages/launchpad/package.json b/packages/launchpad/package.json index ee08764fa6d8..468638297120 100644 --- a/packages/launchpad/package.json +++ b/packages/launchpad/package.json @@ -22,6 +22,7 @@ "@cypress/vue": "0.0.0-development", "@graphql-typed-document-node/core": "^3.1.0", "@headlessui/vue": "1.4.0", + "@iconify/iconify": "2.1.2", "@iconify/json": "1.1.368", "@iconify/vue": "3.0.0-beta.1", "@intlify/vite-plugin-vue-i18n": "2.4.0", diff --git a/yarn.lock b/yarn.lock index 2602113284ff..bac8f9868a53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4578,6 +4578,13 @@ resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== +"@iconify/iconify@2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@iconify/iconify/-/iconify-2.1.2.tgz#978e8f08c3b834816c82ae2933b3a70f143f7685" + integrity sha512-QcUzFeEWkE/mW+BVtEGmcWATClcCOIJFiYUD/PiCWuTcdEA297o8D4oN6Ra44WrNOHu1wqNW4J0ioaDIiqaFOQ== + dependencies: + cross-fetch "^3.1.5" + "@iconify/icons-vscode-icons@^1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@iconify/icons-vscode-icons/-/icons-vscode-icons-1.1.4.tgz#cefaac0094ea2cfa015e003b27d9eed55244ee86" @@ -17545,13 +17552,20 @@ cross-env@7.0.3: dependencies: cross-spawn "^7.0.1" -cross-fetch@3.1.4, cross-fetch@^3.0.4, cross-fetch@^3.0.6, cross-fetch@^3.1.4: +cross-fetch@3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39" integrity sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ== dependencies: node-fetch "2.6.1" +cross-fetch@^3.0.4, cross-fetch@^3.0.6, cross-fetch@^3.1.4, cross-fetch@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + cross-spawn-async@^2.1.1: version "2.2.5" resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc" @@ -31502,11 +31516,18 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@2.6.1, node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.1: +node-fetch@2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-fetch@2.6.7, node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.1: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -41760,6 +41781,11 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + trash@5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/trash/-/trash-5.2.0.tgz#f0103ea6ef7dedfa8d46fe40cdd6e03a0ebf00eb" @@ -44122,6 +44148,11 @@ webextension-polyfill@0.4.0: resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.4.0.tgz#9cc5a60f0f2bf907a6b349fdd7e61701f54956f9" integrity sha512-oreMp+EoAo1pzRMigx4jB5jInIpx6NTCySPSjGyLLee/dCIPiRqowCEfbFP8o20wz9SOtNwSsfkaJ9D/tRgpag== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -44713,6 +44744,14 @@ whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + whatwg-url@^6.4.1: version "6.5.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" From 070c2af2d8a4510714151b9a6a5d68779cd22657 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Wed, 9 Mar 2022 13:55:24 -0500 Subject: [PATCH 19/21] fixing tests --- .../app/cypress/e2e/sidebar_navigation.cy.ts | 19 ++++++++++--------- .../app/src/navigation/SidebarNavigation.vue | 5 ++++- packages/launchpad/package.json | 1 + yarn.lock | 9 ++++++++- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/packages/app/cypress/e2e/sidebar_navigation.cy.ts b/packages/app/cypress/e2e/sidebar_navigation.cy.ts index 78337ad48631..6c7085e33f57 100644 --- a/packages/app/cypress/e2e/sidebar_navigation.cy.ts +++ b/packages/app/cypress/e2e/sidebar_navigation.cy.ts @@ -14,15 +14,16 @@ describe('Sidebar Navigation', () => { }) it('highlights indicator on hover showing you can click to expand', () => { - cy.findByLabelText('toggle navigation', { - selector: 'button', - }).should('not.have.css', 'outline', 'rgba(0, 0, 0, 0) solid 2px') - - cy.findByLabelText('toggle navigation', { - selector: 'button', - }).realHover().should('have.css', 'outline', 'rgba(0, 0, 0, 0) solid 2px') - - cy.percySnapshot() + const navIndicatorSelector = '[data-testid=sidebar-nav-indicator]' + const navExpansionToggleSelector = '[aria-label="toggle navigation"]' + + cy.get(navIndicatorSelector) + .should('not.be.visible') + .get(navExpansionToggleSelector) + .realHover() + .get(navIndicatorSelector) + .should('be.visible') + .percySnapshot() }) it('closes the left nav bar when clicking the expand button (if expanded)', () => { diff --git a/packages/app/src/navigation/SidebarNavigation.vue b/packages/app/src/navigation/SidebarNavigation.vue index 99cd4f8b8565..f691b62a3035 100644 --- a/packages/app/src/navigation/SidebarNavigation.vue +++ b/packages/app/src/navigation/SidebarNavigation.vue @@ -12,7 +12,10 @@ aria-label="toggle navigation" @click="toggleNavbarIfAllowed" > -
+
=2.0.0-rc.6": version "2.1.2" resolved "https://registry.yarnpkg.com/@iconify/iconify/-/iconify-2.1.2.tgz#978e8f08c3b834816c82ae2933b3a70f143f7685" integrity sha512-QcUzFeEWkE/mW+BVtEGmcWATClcCOIJFiYUD/PiCWuTcdEA297o8D4oN6Ra44WrNOHu1wqNW4J0ioaDIiqaFOQ== @@ -7143,6 +7143,13 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353" integrity sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q== +"@purge-icons/generated@0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@purge-icons/generated/-/generated-0.8.1.tgz#15544a9c9b2436e436d884828077f9d88df660e7" + integrity sha512-rIExGA33EGKEToqtc8WfpboaR7or1XRp+KV1Y5v/P0Rq7G5Me95DmP3ow/MpG7ql+XZ9xPzyS2naGRx5358+6Q== + dependencies: + "@iconify/iconify" ">=2.0.0-rc.6" + "@reach/dialog@0.10.5": version "0.10.5" resolved "https://registry.yarnpkg.com/@reach/dialog/-/dialog-0.10.5.tgz#70bd832616fc2b0f31ed65aff81ae9e218c4dbc4" From 0223ac266b3878e55a0186133e44a65e9b3f34d7 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Wed, 9 Mar 2022 14:36:04 -0500 Subject: [PATCH 20/21] fixing system tests --- npm/vite-dev-server/src/plugins/cypress.ts | 4 +++- npm/vite-dev-server/src/resolveConfig.ts | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index 94bf79c44fa6..ed5b1553e48e 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -30,7 +30,7 @@ export const Cypress = ( const supportFilePath = options.config.supportFile const devServerEvents = options.devServerEvents const specs = options.specs - const indexHtmlFile = options.indexHtmlFile + const indexHtmlFile = options.config.devServerConfig?.indexHtmlFile let specsPathsSet = getSpecsPathsSet(specs) let loader @@ -47,6 +47,8 @@ export const Cypress = ( }, async transformIndexHtml () { const indexHtmlPath = indexHtmlFile ? resolve(projectRoot, indexHtmlFile) : resolve(__dirname, '..', '..', 'index.html') + + debug('resolved the indexHtmlPath as', indexHtmlPath, 'from', indexHtmlFile) const indexHtmlContent = await readFile(indexHtmlPath, { encoding: 'utf8' }) // find last index const endOfBody = indexHtmlContent.lastIndexOf('') diff --git a/npm/vite-dev-server/src/resolveConfig.ts b/npm/vite-dev-server/src/resolveConfig.ts index 1bcea08c55cd..a2bfd671dd58 100644 --- a/npm/vite-dev-server/src/resolveConfig.ts +++ b/npm/vite-dev-server/src/resolveConfig.ts @@ -18,6 +18,9 @@ export const createConfig = async ({ options, viteConfig: viteOverrides = {} }: const { default: findUp } = await importModule('find-up') const configFile = await findUp(configFiles, { cwd: root } as { cwd: string }) + // INFO logging, a lot is logged here. + // debug('all dev-server options are', options) + if (configFile) { debug('resolved config file at', configFile, 'using root', root) } else if (viteOverrides) { From 91b47fe83587a45b6e52ea6a22ca2ee726ceb40c Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Wed, 9 Mar 2022 15:58:30 -0500 Subject: [PATCH 21/21] removing deps from package.json --- packages/frontend-shared/package.json | 9 --------- packages/frontend-shared/vite-env.d.ts | 2 -- 2 files changed, 11 deletions(-) diff --git a/packages/frontend-shared/package.json b/packages/frontend-shared/package.json index a49ede7a0762..5c1203e26a4e 100644 --- a/packages/frontend-shared/package.json +++ b/packages/frontend-shared/package.json @@ -43,11 +43,7 @@ "@vue/compiler-sfc": "3.2.31", "@vueuse/core": "7.2.2", "@windicss/plugin-interaction-variants": "1.0.0", - "ansi-to-html": "0.6.14", - "bluebird": "3.5.3", - "classnames": "2.3.1", "combine-properties": "0.1.0", - "concurrently": "^6.2.0", "cross-env": "6.0.3", "cypress-real-events": "1.6.0", "fake-uuid": "^1.0.0", @@ -62,17 +58,12 @@ "lodash": "4.17.21", "modern-normalize": "1.1.0", "patch-package": "6.4.7", - "pinia": "2.0.0-rc.14", "rimraf": "3.0.2", - "rollup-plugin-copy": "3.4.0", - "rollup-plugin-polyfill-node": "^0.7.0", "spin.js": "^4.1.1", "unplugin-icons": "0.13.2", "unplugin-vue-components": "^0.15.4", "vite": "2.8.4", "vite-plugin-components": "0.11.3", - "vite-plugin-pages": "0.18.1", - "vite-plugin-vue-layouts": "0.4.1", "vite-plugin-windicss": "^1.4.7", "vite-svg-loader": "3.1.2", "vue": "3.2.31", diff --git a/packages/frontend-shared/vite-env.d.ts b/packages/frontend-shared/vite-env.d.ts index 7189f9361e6d..8cee151713c4 100644 --- a/packages/frontend-shared/vite-env.d.ts +++ b/packages/frontend-shared/vite-env.d.ts @@ -1,4 +1,2 @@ /// -/// -/// ///