repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/src/plugin/util.ts
npm/puppeteer/src/plugin/util.ts
export const pluginName = '@cypress/puppeteer' export function pluginError (message: string) { return new Error(message) }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/src/plugin/retry.ts
npm/puppeteer/src/plugin/retry.ts
import { pluginError } from './util' function delay (time: number) { return new Promise<void>((resolve) => { setTimeout(() => resolve(), time) }) } export async function retry<T> (functionToRetry: () => T, options?: { timeout?: number, delayBetweenTries?: number }): Promise<T> { const timeout = options?.tim...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/src/plugin/setup.ts
npm/puppeteer/src/plugin/setup.ts
import isPlainObject from 'lodash/isPlainObject' import defaultPuppeteer, { Browser, PuppeteerNode } from 'puppeteer-core' import { pluginError } from './util' import { activateMainTab } from './activateMainTab' export type MessageHandler = (browser: Browser, ...args: any[]) => any | Promise<any> interface SetupOptio...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/src/plugin/activateMainTab.ts
npm/puppeteer/src/plugin/activateMainTab.ts
/// <reference lib="browser"> import type { Browser } from 'puppeteer-core' export const ACTIVATION_TIMEOUT = 2000 const sendActivationMessage = (activationTimeout: number) => { // don't need to worry about tabs for Cy in Cy tests if (document.defaultView !== top) { return } let timeout: NodeJS.Timeout ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/src/plugin/index.ts
npm/puppeteer/src/plugin/index.ts
export { setup } from './setup' export { retry } from './retry'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/test/unit/activateMainTab.spec.ts
npm/puppeteer/test/unit/activateMainTab.spec.ts
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest' import type { Browser, Page } from 'puppeteer-core' import { activateMainTab, ACTIVATION_TIMEOUT } from '../../src/plugin/activateMainTab' describe('activateMainTab', () => { let prevWin: Window let prevDoc: Document let prevTop: Window & t...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/test/unit/setup.spec.ts
npm/puppeteer/test/unit/setup.spec.ts
import { describe, it, expect, vi, Mock } from 'vitest' import type { PuppeteerNode, Browser } from 'puppeteer-core' import { setup } from '../../src/plugin' import { activateMainTab } from '../../src/plugin/activateMainTab' vi.mock('../../src/plugin/activateMainTab') const flushPromises = () => { return new Promis...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/test/unit/retry.spec.ts
npm/puppeteer/test/unit/retry.spec.ts
import { describe, it, expect, vi } from 'vitest' import { retry } from '../../src/plugin' describe('#retry', () => { it('returns result of passing 1st attempt', async () => { const fn = vi.fn().mockReturnValue('passes 1st attempt') const result = await retry(fn) expect(fn).toHaveBeenCalledOnce() ex...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/cypress/support/e2e.ts
npm/puppeteer/cypress/support/e2e.ts
import '../../src/support'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/puppeteer/cypress/e2e/multi-tab.cy.ts
npm/puppeteer/cypress/e2e/multi-tab.cy.ts
describe('multi-tab testing', () => { it('switches to a new tab', () => { cy.visit('/cypress/fixtures/page-1.html') cy.get('input').type('Hello from Page 1') cy.get('button').click() // Triggers a new tab to open cy .puppeteer('switchToTabAndGetContent') .should('equal', 'You said: Hello from...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/eslint.config.ts
npm/webpack-batteries-included-preprocessor/eslint.config.ts
import { baseConfig } from '@packages/eslint-config' import globals from 'globals' export default [ ...baseConfig, { ignores: ['test/fixtures/**/*', 'test/_test-output/**'], }, { files: ['**/*.js', '**/*.ts'], languageOptions: { parserOptions: { tsconfigRootDir: __dirname, }, ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/vitest.config.ts
npm/webpack-batteries-included-preprocessor/vitest.config.ts
import { defineConfig } from 'vitest/config' export default defineConfig({ test: { include: ['test/**/*.spec.ts'], globals: true, environment: 'node', }, })
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/index.ts
npm/webpack-batteries-included-preprocessor/index.ts
import path from 'path' import Debug from 'debug' import type { EventEmitter } from 'events' import getTsConfig from 'get-tsconfig' import webpack from 'webpack' import webpackPreprocessor from '@cypress/webpack-preprocessor' import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer' const debug = Debug('cypress:w...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/test/fixtures/typescript_esmoduleinterop_false_spec.ts
npm/webpack-batteries-included-preprocessor/test/fixtures/typescript_esmoduleinterop_false_spec.ts
import { expect } from 'chai' import * as commonJSFn from './export-commonjs-function' expect(commonJSFn()).to.equal('return value')
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/test/fixtures/ts_spec.ts
npm/webpack-batteries-included-preprocessor/test/fixtures/ts_spec.ts
import { expect } from 'chai' import { pathed } from '@paths/paths-example-file' // simple example of typescript types type SomeType = { someProp: string } const someObj: SomeType = { someProp: 'someValue' } expect(pathed).to.be.true expect(someObj.someProp).to.equal('someValue')
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/test/fixtures/tsx_spec.tsx
npm/webpack-batteries-included-preprocessor/test/fixtures/tsx_spec.tsx
import { expect } from 'chai' import * as React from 'react' // simple example of typescript types type SomeType = { someProp: string } const someObj: SomeType = { someProp: 'someValue' } const component = <div className={someObj.someProp} /> expect(component).to.be.an('object')
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/test/fixtures/paths-example-dir/paths-example-file.ts
npm/webpack-batteries-included-preprocessor/test/fixtures/paths-example-dir/paths-example-file.ts
export const pathed = true
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/test/fixtures/file-types/tsx-file.tsx
npm/webpack-batteries-included-preprocessor/test/fixtures/file-types/tsx-file.tsx
import * as React from 'react' // simple example of typescript types type SomeTsxType = { tsxProp: string } export const tsxTypeExample: SomeTsxType = { tsxProp: 'tsx value' } export const fromTsx = <div />
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/test/fixtures/file-types/ts-file.ts
npm/webpack-batteries-included-preprocessor/test/fixtures/file-types/ts-file.ts
// simple example of typescript types type SomeTsType = { tsProp: string } export const tsTypeExample: SomeTsType = { tsProp: 'ts value' } export const fromTs = 'from ts'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/test/fixtures/esmoduleinterop-true/typescript_esmoduleinterop_true_spec.ts
npm/webpack-batteries-included-preprocessor/test/fixtures/esmoduleinterop-true/typescript_esmoduleinterop_true_spec.ts
import { expect } from 'chai' import commonJSFn from '../export-commonjs-function' expect(commonJSFn()).to.equal('return value')
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/test/e2e/features.spec.ts
npm/webpack-batteries-included-preprocessor/test/e2e/features.spec.ts
import { describe, it, beforeEach, expect } from 'vitest' import { EventEmitter } from 'events' import fs from 'fs-extra' import path from 'path' import preprocessor from '../../dist/index' const fixturesDir = path.join(__dirname, '..', 'fixtures') const outputDir = path.join(__dirname, '..', '_test-output') const ru...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-batteries-included-preprocessor/test/unit/index.spec.ts
npm/webpack-batteries-included-preprocessor/test/unit/index.spec.ts
import { describe, it, beforeEach, expect, vi } from 'vitest' import path from 'node:path' import getTsConfig from 'get-tsconfig' const Debug = require('debug') vi.mock('tsconfig-paths-webpack-plugin') vi.mock('@cypress/webpack-preprocessor', () => ({ default: vi.fn().mockReturnValue((file) => undefined), })) vi.m...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/vitest.config.ts
npm/webpack-dev-server/vitest.config.ts
import { defineConfig } from 'vitest/config' export default defineConfig({ test: { include: ['test/**/*.spec.ts'], // many of these tests are e2e in nature and change the working directory of the process, which impacts tests running in the same process. // Because of this, we disable file parallelism to ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/cypress.config.ts
npm/webpack-dev-server/cypress.config.ts
import { defineConfig } from 'cypress' export default defineConfig({ projectId: 'ypt4pf', e2e: { defaultCommandTimeout: 20000, // these take a bit longer b/c they're e2e open mode test async setupNodeEvents (on, config) { if (!process.env.HTTP_PROXY_TARGET_FOR_ORIGIN_REQUESTS) { throw new Err...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/browser.ts
npm/webpack-dev-server/src/browser.ts
function render () { require('!!./loader.js!./browser.js') } render()
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/makeWebpackConfig.ts
npm/webpack-dev-server/src/makeWebpackConfig.ts
import { debug as debugFn } from 'debug' import * as path from 'path' import { merge } from 'webpack-merge' import { importModule } from 'local-pkg' import type { Configuration, EntryObject } from 'webpack' import { makeCypressWebpackConfig } from './makeDefaultWebpackConfig' import type { CreateFinalWebpackConfig } fr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/createWebpackDevServer.ts
npm/webpack-dev-server/src/createWebpackDevServer.ts
import debugLib from 'debug' import type { Configuration as WebpackDevServer5Configuration } from 'webpack-dev-server' import type { WebpackDevServerConfig } from './devServer' import type { SourceRelativeWebpackResult } from './helpers/sourceRelativeWebpackModules' import { makeWebpackConfig } from './makeWebpackConfi...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/util.ts
npm/webpack-dev-server/src/util.ts
import debug from 'debug' export const WBADebugNamespace = 'cypress-verbose:webpack-dev-server:bundle-analyzer' export const isWebpackBundleAnalyzerEnabled = () => { return debug.enabled(WBADebugNamespace) }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/loader.ts
npm/webpack-dev-server/src/loader.ts
/* global Cypress */ /// <reference types="cypress" /> import debugFn from 'debug' import * as path from 'path' import type { LoaderContext } from 'webpack' import type { CypressCTWebpackContext } from './CypressCTWebpackPlugin' const debug = debugFn('cypress:webpack-dev-server:webpack') /** * @param {ComponentSpec}...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts
npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts
import path from 'path' import debugLib from 'debug' import type { Configuration } from 'webpack' import type { CreateFinalWebpackConfig } from './createWebpackDevServer' import { CypressCTWebpackPlugin } from './CypressCTWebpackPlugin' import { isWebpackBundleAnalyzerEnabled, WBADebugNamespace } from './util' import {...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/constants.ts
npm/webpack-dev-server/src/constants.ts
export const configFiles = [ 'webpack.config.ts', 'webpack.config.js', 'webpack.config.mjs', 'webpack.config.cjs', ]
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts
npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts
import type { Compiler, Compilation } from 'webpack' import type webpack from 'webpack' import type { EventEmitter } from 'events' import _ from 'lodash' import fs, { PathLike } from 'fs-extra' import path from 'path' type UtimesSync = (path: PathLike, atime: string | number | Date, mtime: string | number | Date) => v...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/aut-runner.ts
npm/webpack-dev-server/src/aut-runner.ts
/* eslint-env browser */ export function init (importPromises: Array<() => Promise<void>>, parent: Window = (window.opener || window.parent)) { // @ts-expect-error const Cypress = window.Cypress = parent.Cypress if (!Cypress) { throw new Error('Tests cannot run without a reference to Cypress!') } Cypre...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/index.ts
npm/webpack-dev-server/src/index.ts
import { devServer } from './devServer' export { devServer } export default devServer
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/devServer.ts
npm/webpack-dev-server/src/devServer.ts
/// <reference types="cypress" /> import type WebpackDevServer5 from 'webpack-dev-server' import type { Compiler, Configuration } from 'webpack' import { createWebpackDevServer } from './createWebpackDevServer' import debugLib from 'debug' import { nextHandler } from './helpers/nextHandler' import { sourceDefaultWebp...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/helpers/sourceRelativeWebpackModules.ts
npm/webpack-dev-server/src/helpers/sourceRelativeWebpackModules.ts
import Module from 'module' import path from 'path' import type { Frameworks, WebpackDevServerConfig } from '../devServer' import debugFn from 'debug' const debug = debugFn('cypress:webpack-dev-server:sourceRelativeWebpackModules') export type ModuleClass = typeof Module & { _load(id: string, parent: Module, isMain...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/helpers/angularHandler.ts
npm/webpack-dev-server/src/helpers/angularHandler.ts
import * as fs from 'fs-extra' import { tmpdir, platform } from 'os' import * as path from 'path' import type { Configuration, RuleSetRule } from 'webpack' import type { PresetHandlerResult, WebpackDevServerConfig } from '../devServer' import { sourceDefaultWebpackDependencies } from './sourceRelativeWebpackModules' im...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/src/helpers/nextHandler.ts
npm/webpack-dev-server/src/helpers/nextHandler.ts
import debugLib from 'debug' import Module from 'module' import type { Configuration } from 'webpack' import * as fs from 'fs' import * as path from 'path' import semver from 'semver' import type { PresetHandlerResult, WebpackDevServerConfig } from '../devServer' import { cypressWebpackPath, getMajorVersion, ModuleClas...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/test/sourceRelativeWebpackModules.spec.ts
npm/webpack-dev-server/test/sourceRelativeWebpackModules.spec.ts
import { expect, it, describe, beforeEach, afterAll } from 'vitest' import * as Fixtures from '@tooling/system-tests' import * as FixturesScaffold from '@tooling/system-tests/lib/dep-installer' import type { fixtureDirs } from '@tooling/system-tests' import path from 'path' import fs from 'fs' import { restoreLoadHook...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/test/makeWebpackConfig.spec.ts
npm/webpack-dev-server/test/makeWebpackConfig.spec.ts
import { expect, it, describe, beforeEach, vi } from 'vitest' import EventEmitter from 'events' import path from 'path' import debug from 'debug' import { IgnorePlugin } from 'webpack' import { WebpackDevServerConfig } from '../src/devServer' import { CYPRESS_WEBPACK_ENTRYPOINT, makeWebpackConfig } from '../src/makeWeb...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/test/devServer-unit.spec.ts
npm/webpack-dev-server/test/devServer-unit.spec.ts
import { expect, it, describe, beforeEach, afterEach, vi } from 'vitest' import path from 'path' import { createModuleMatrixResult } from './test-helpers/createModuleMatrixResult' import EventEmitter from 'events' import debug from 'debug' const cypressConfig = { projectRoot: path.join(__dirname, 'test-fixtures'), ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/test/devServer-e2e.spec.ts
npm/webpack-dev-server/test/devServer-e2e.spec.ts
import { expect, it, describe, beforeEach, afterAll } from 'vitest' import path from 'path' import { once, EventEmitter } from 'events' import http from 'http' import fs from 'fs-extra' import { devServer } from '..' import { restoreLoadHook } from '../src/helpers/sourceRelativeWebpackModules' import type { ConfigHand...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/test/test-helpers/createModuleMatrixResult.ts
npm/webpack-dev-server/test/test-helpers/createModuleMatrixResult.ts
import path from 'path' import type { SourceRelativeWebpackResult } from '../../src/helpers/sourceRelativeWebpackModules' type ModulesDef = {[K in keyof ModuleMatrixResultOptions]: Record<ModuleMatrixResultOptions[K], string>} const moduleSources: ModulesDef = { webpack: { 5: 'webpack', }, webpackDevServer:...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/test/test-helpers/scaffoldProject.ts
npm/webpack-dev-server/test/test-helpers/scaffoldProject.ts
import Fixtures, { ProjectFixtureDir } from '@tooling/system-tests' import * as FixturesScaffold from '@tooling/system-tests/lib/dep-installer' export async function scaffoldMigrationProject (project: ProjectFixtureDir): Promise<string> { Fixtures.removeProject(project) await Fixtures.scaffoldProject(project) ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/test/handlers/nextHandler.spec.ts
npm/webpack-dev-server/test/handlers/nextHandler.spec.ts
import { expect, it, describe } from 'vitest' import { scaffoldMigrationProject } from '../test-helpers/scaffoldProject' import { nextHandler, allCssTests } from '../../src/helpers/nextHandler' import type { Configuration, RuleSetRule } from 'webpack' import * as path from 'path' import { WebpackDevServerConfig } from ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/test/handlers/angularHandler.spec.ts
npm/webpack-dev-server/test/handlers/angularHandler.spec.ts
import { expect, it, describe } from 'vitest' import * as fs from 'fs-extra' import cloneDeep from 'lodash/cloneDeep' import * as path from 'path' import { angularHandler, AngularWebpackDevServerConfig, BuildOptions, generateTsConfig, getAngularBuildOptions, getAngularCliModules, getAngularJson, getProj...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/cypress/support/e2e.ts
npm/webpack-dev-server/cypress/support/e2e.ts
// *********************************************************** // This example support/e2e.ts is processed and // loaded automatically before your test files. // // This is a great place to put global configuration and // behavior that modifies Cypress. // // You can change the location of this file or turn off // auto...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/cypress/support/commands.ts
npm/webpack-dev-server/cypress/support/commands.ts
/// <reference types="cypress" /> import type { ExpectedResults } from '@packages/app/cypress/e2e/support/execute-spec' import { waitForSpecToFinish } from '@packages/app/cypress/e2e/support/execute-spec' declare global { namespace Cypress { interface Chainable { /** * Adapter to wait for a spec to ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/cypress/e2e/next.cy.ts
npm/webpack-dev-server/cypress/e2e/next.cy.ts
/// <reference path="../support/e2e.ts" /> import type { ProjectFixtureDir } from '@tooling/system-tests/lib/fixtureDirs' const NEXT_PROJECTS: ProjectFixtureDir[] = ['next-14'] // Add to this list to focus on a particular permutation const ONLY_PROJECTS: ProjectFixtureDir[] = [] for (const project of NEXT_PROJECTS) {...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/cypress/e2e/webpack-dev-server.cy.ts
npm/webpack-dev-server/cypress/e2e/webpack-dev-server.cy.ts
/// <reference path="../support/e2e.ts" /> import dedent from 'dedent' describe('Config options', () => { it('supports supportFile = false', () => { cy.scaffoldProject('webpack5_wds5-react') cy.openProject('webpack5_wds5-react', ['--config-file', 'cypress-webpack-no-support.config.ts', '--component']) c...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/cypress/e2e/angular.cy.ts
npm/webpack-dev-server/cypress/e2e/angular.cy.ts
/// <reference types="cypress" /> /// <reference path="../support/e2e.ts" /> import type { ProjectFixtureDir } from '@tooling/system-tests/lib/fixtureDirs' const WEBPACK_ANGULAR: ProjectFixtureDir[] = [ 'angular-18', 'angular-19', 'angular-20', 'angular-21', ] // Add to this list to focus on a particular perm...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-dev-server/cypress/e2e/react.cy.ts
npm/webpack-dev-server/cypress/e2e/react.cy.ts
/// <reference path="../support/e2e.ts" /> import type { fixtureDirs } from '@tooling/system-tests' import dedent from 'dedent' type ProjectDirs = typeof fixtureDirs const WEBPACK_REACT: ProjectDirs[number][] = ['webpack5_wds5-react'] // Add to this list to focus on a particular permutation const ONLY_PROJECTS: Proj...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/vitest.config.ts
npm/webpack-preprocessor/vitest.config.ts
import { defineConfig } from 'vitest/config' export default defineConfig({ test: { globals: true, environment: 'node', }, })
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/cypress.config.ts
npm/webpack-preprocessor/cypress.config.ts
import { defineConfig } from 'cypress' import webpackPreprocessor from './index' export default defineConfig({ e2e: { specPattern: 'cypress/tests/**/*', setupNodeEvents (on, config) { on('file:preprocessor', webpackPreprocessor()) return config }, }, })
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/index.ts
npm/webpack-preprocessor/index.ts
import Bluebird from 'bluebird' import Debug from 'debug' import _ from 'lodash' import * as events from 'events' import * as path from 'path' import webpack from 'webpack' import utils from './lib/utils' import { overrideSourceMaps } from './lib/typescript-overrides' const getTsLoaderIfExists = (rules) => { let tsL...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/scripts/test-webpack-5.ts
npm/webpack-preprocessor/scripts/test-webpack-5.ts
import execa from 'execa' import path from 'path' import pkg from '../package.json' import fs from 'fs' const pkgJsonPath = path.join(__dirname, '..', 'package.json') /** * This file installs Webpack 5 and runs the unit and e2e tests for the preprocessor. * We read package.json, update the webpack version, then re-...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/test/e2e/e2e.spec.ts
npm/webpack-preprocessor/test/e2e/e2e.spec.ts
/* eslint-disable no-console, prefer-rest-params */ import { describe, it, expect } from 'vitest' import globby from 'globby' import fs from 'fs-extra' import _ from 'lodash' import path from 'path' import chalk from 'chalk' import stripAnsi from 'strip-ansi' import cypress from 'cypress' import cp from 'child_process...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/test/e2e/compilation.spec.ts
npm/webpack-preprocessor/test/e2e/compilation.spec.ts
import { describe, beforeEach, afterEach, it, expect } from 'vitest' import { EventEmitter } from 'events' import fs from 'fs-extra' import path from 'path' import Bluebird from 'bluebird' import stripAnsi from 'strip-ansi' import preprocessor from '../../dist/index' const normalizeErrMessage = (message) => { return...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/test/unit/dist.spec.ts
npm/webpack-preprocessor/test/unit/dist.spec.ts
import { expect, it, describe } from 'vitest' import preprocessor from '../../dist/index' describe('typescript ./dist output', () => { it('builds dist correctly', () => { expect(preprocessor).toBeInstanceOf(Function) expect(preprocessor).toHaveProperty('defaultOptions') }) })
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/test/unit/get-typescript.spec.ts
npm/webpack-preprocessor/test/unit/get-typescript.spec.ts
import { describe, it, vi, expect } from 'vitest' import path from 'node:path' import { getTypescript } from '../../lib/get-typescript' // NOTE: mock-require is a deprecated package that is no longer maintained, but it plays nicely with Vitest unlike proxyquire. // We are leveraging mock-require here until we are able ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/test/unit/index.spec.ts
npm/webpack-preprocessor/test/unit/index.spec.ts
import { expect, it, describe, beforeEach, vi, Mock } from 'vitest' import webpack from 'webpack' import Bluebird from 'bluebird' import preprocessor from '../../index' import { overrideSourceMaps } from '../../lib/typescript-overrides' import EventEmitter from 'node:events' vi.mock('webpack') vi.mock('../../lib/type...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/test/unit/typescript-overrides.spec.ts
npm/webpack-preprocessor/test/unit/typescript-overrides.spec.ts
import { expect, it, describe, beforeEach, vi, Mock } from 'vitest' import { getTypescript } from '../../lib/get-typescript' import { CreateProgramOptions } from 'typescript' type Typescript = { createProgram: Mock version: string } vi.mock('../../lib/get-typescript', () => { return { getTypescript: vi.fn()...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/lib/get-typescript.ts
npm/webpack-preprocessor/lib/get-typescript.ts
export const getTypescript = (typescriptPath?: string) => { const projectTsPath = require.resolve(typescriptPath || 'typescript', { paths: [process.cwd()], }) const typescript = require(projectTsPath) as typeof import('typescript') return typescript }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/lib/utils.ts
npm/webpack-preprocessor/lib/utils.ts
import Bluebird from 'bluebird' function createDeferred<T> () { let resolve: (thenableOrResult?: T | PromiseLike<T> | undefined) => void let reject: any const promise = new Bluebird<T>(function (_resolve, _reject) { resolve = _resolve reject = _reject }) return { //@ts-ignore resolve, re...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/webpack-preprocessor/lib/typescript-overrides.ts
npm/webpack-preprocessor/lib/typescript-overrides.ts
import debugModule from 'debug' import _ from 'lodash' import semverLt from 'semver/functions/lt' import { CompilerOptions, CreateProgramOptions } from 'typescript' import { getTypescript } from './get-typescript' const debug = debugModule('cypress:webpack') let patched = false const getProgramOptions = (rootNamesO...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/svelte/src/mount.ts
npm/svelte/src/mount.ts
import { getContainerEl, setupHooks, } from '@cypress/mount-utils' import { mount as svelteMount, unmount as svelteUnmount } from 'svelte' import type { MountOptions, Component } from 'svelte' const DEFAULT_COMP_NAME = 'unknown' export interface MountReturn{ component: Record<string, any> } let componentInstan...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/svelte/src/index.ts
npm/svelte/src/index.ts
export * from './mount'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/eslint.config.ts
npm/cypress-schematic/eslint.config.ts
import { baseConfig, cliOverrides } from '@packages/eslint-config' import { globalIgnores } from 'eslint/config' export default [ // these are configured to build in place, rather than in a separate // dist folder, so we need to ignore them globalIgnores(['src/**/*.{js,js.map,d.ts}']), ...baseConfig, ...cliO...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/vitest.config.ts
npm/cypress-schematic/vitest.config.ts
import { defineConfig } from 'vitest/config' export default defineConfig({ test: { include: ['src/**/*.spec.ts'], globals: true, environment: 'node', }, })
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/e2e.spec.ts
npm/cypress-schematic/src/e2e.spec.ts
import { describe, it } from 'vitest' import Fixtures, { ProjectFixtureDir } from '@tooling/system-tests' import * as FixturesScaffold from '@tooling/system-tests/lib/dep-installer' import execa from 'execa' import path from 'path' import * as fs from 'fs-extra' const scaffoldAngularProject = async (project: string) =...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/ct.spec.ts
npm/cypress-schematic/src/ct.spec.ts
import { describe, it, beforeEach, afterEach } from 'vitest' import Fixtures, { ProjectFixtureDir } from '@tooling/system-tests' import * as FixturesScaffold from '@tooling/system-tests/lib/dep-installer' import execa from 'execa' import path from 'path' import * as fs from 'fs-extra' const runCommandInProject = (comm...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/builders/cypress/cypressBuilderOptions.ts
npm/cypress-schematic/src/builders/cypress/cypressBuilderOptions.ts
import { JsonObject } from '@angular-devkit/core' export interface CypressBuilderOptions extends JsonObject { baseUrl: string configFile: string browser: 'electron' | 'chrome' | 'chromium' | 'canary' | 'firefox' | 'edge' | string devServerTarget: string e2e: boolean component: boolean env: Record<string,...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/builders/cypress/index.ts
npm/cypress-schematic/src/builders/cypress/index.ts
import { BuilderContext, BuilderOutput, createBuilder, scheduleTargetAndForget, targetFromTargetString, } from '@angular-devkit/architect' import { asWindowsPath, normalize } from '@angular-devkit/core' import * as os from 'os' import { dirname, join } from 'path' import { open, run } from 'cypress' import { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-add/index.spec.ts
npm/cypress-schematic/src/schematics/ng-add/index.spec.ts
import { describe, beforeEach, it, expect } from 'vitest' import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing' import { join } from 'path' import { JsonObject } from '@angular-devkit/core' describe('@cypress/schematic: ng-add', () => { const schematicRunner = new SchematicTestRunner...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-add/index.ts
npm/cypress-schematic/src/schematics/ng-add/index.ts
import { getSystemPath, JsonObject, JsonValue, normalize, strings } from '@angular-devkit/core' import { apply, chain, mergeWith, move, Rule, SchematicContext, SchematicsException, applyTemplates, Tree, url, } from '@angular-devkit/schematics' import { NodePackageInstallTask } from '@angular-devkit/...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-generate/cypress-ct-tests/schema.ts
npm/cypress-schematic/src/schematics/ng-generate/cypress-ct-tests/schema.ts
export interface Schema { // The name of the project. project?: string // The path to create the spec. path?: string }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-generate/cypress-ct-tests/index.spec.ts
npm/cypress-schematic/src/schematics/ng-generate/cypress-ct-tests/index.spec.ts
import { describe, it, beforeEach, expect } from 'vitest' import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing' import { join } from 'path' describe('ng-generate @cypress/schematic:specs-ct', () => { const schematicRunner = new SchematicTestRunner( 'schematics', join(__dirnam...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-generate/cypress-ct-tests/index.ts
npm/cypress-schematic/src/schematics/ng-generate/cypress-ct-tests/index.ts
import { Rule, Tree, SchematicsException } from '@angular-devkit/schematics' import { getAngularJsonValue, getDirectoriesAndCreateSpecs } from '../../utils' import { Schema } from './schema' export default function (options: Schema): Rule { return (tree: Tree) => { if (!options.project) { throw new Schema...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-generate/cypress-test/schema.ts
npm/cypress-schematic/src/schematics/ng-generate/cypress-test/schema.ts
export interface Schema { // Custom filename. filename?: string // The name of the spec. name: string // The path to create the spec. path?: string // The name of the project. project?: string // Create a component spec component?: boolean }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-generate/cypress-test/index.spec.ts
npm/cypress-schematic/src/schematics/ng-generate/cypress-test/index.spec.ts
import { describe, it, beforeEach, expect } from 'vitest' import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing' import { join } from 'path' describe('ng-generate @cypress/schematic:spec', () => { const schematicRunner = new SchematicTestRunner( 'schematics', join(__dirname, '...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-generate/cypress-test/index.ts
npm/cypress-schematic/src/schematics/ng-generate/cypress-test/index.ts
import { Rule, Tree, SchematicsException, chain, mergeWith, } from '@angular-devkit/schematics' import { virtualFs, workspaces } from '@angular-devkit/core' import { Schema } from './schema' import { createTemplate } from '../../utils' function createSpec (tree: Tree): workspaces.WorkspaceHost { return { as...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-generate/component/index.spec.ts
npm/cypress-schematic/src/schematics/ng-generate/component/index.spec.ts
import { describe, beforeEach, it, expect } from 'vitest' import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing' import { join } from 'path' describe('ng-generate @cypress/schematic:component', () => { const schematicRunner = new SchematicTestRunner( 'schematics', join(__dirna...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/ng-generate/component/index.ts
npm/cypress-schematic/src/schematics/ng-generate/component/index.ts
import { chain, externalSchematic, noop, Rule, SchematicContext, Tree } from '@angular-devkit/schematics' import cypressTest from '../cypress-test' import path = require('path') export default function (options: any): Rule { return (_: Tree, _context: SchematicContext) => { return chain([ externalSchematic...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/utils/dependencies.ts
npm/cypress-schematic/src/schematics/utils/dependencies.ts
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license * https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utils/dependencies.ts */ import { Tree...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/utils/jsonFile.ts
npm/cypress-schematic/src/schematics/utils/jsonFile.ts
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { JsonValue } from '@angular-devkit/core' import { Tree } from '@angular-devkit/schematics' import { Node, ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/src/schematics/utils/index.ts
npm/cypress-schematic/src/schematics/utils/index.ts
import { readdirSync } from 'fs' import { resolve } from 'path' import { getSystemPath, normalize, strings } from '@angular-devkit/core' import { Tree, apply, url, applyTemplates, move, Rule } from '@angular-devkit/schematics' import { get } from 'https' import { Schema } from '../ng-generate/cypress-test/schema' impor...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/cypress-schematic/projects/sandbox/src/fake-component.component.ts
npm/cypress-schematic/projects/sandbox/src/fake-component.component.ts
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress.config.ts
npm/vite-plugin-cypress-esm/cypress.config.ts
import { defineConfig } from 'cypress' import react from '@vitejs/plugin-react' import { CypressEsm } from './src' export default defineConfig({ projectId: 'ypt4pf', component: { supportFile: false, specPattern: 'cypress/component/**/*.cy.ts*', devServer: { bundler: 'vite', framework: 'reac...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/index.d.ts
npm/vite-plugin-cypress-esm/index.d.ts
export * from './dist'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/src/index.ts
npm/vite-plugin-cypress-esm/src/index.ts
import debugFn from 'debug' import picomatch from 'picomatch' import type { Plugin } from 'vite' import fs from 'fs' import path from 'path' const debug = debugFn('cypress:vite-plugin-cypress-esm') const MODULE_IMPORTER_IDENTIFIER = '__cypressModule' const MODULE_DYNAMIC_IMPORTER_IDENTIFIER = '__cypressDynamicModule' ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/types.d.ts
npm/vite-plugin-cypress-esm/cypress/types.d.ts
declare module '*.css' {} declare module '*.svg' {}
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/ignoreImportList.cy.ts
npm/vite-plugin-cypress-esm/cypress/component/ignoreImportList.cy.ts
// This import path should match `ignoreImportPath` and be ignored import * as Immutable from './fixtures/ImmutableModuleB' describe('ignoreImportList', () => { it('ignored import is not proxified and cannot be stubbed', () => { let called = false try { cy.stub(Immutable, 'unstubbable') } catch (e...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/edgeCases.cy.tsx
npm/vite-plugin-cypress-esm/cypress/component/edgeCases.cy.tsx
/// <reference types="cypress" /> import React, { Suspense, lazy } from 'react' import { mount } from 'cypress/react' import * as Mod from './fixtures/class' import * as Foo from './fixtures/Foo' import numbers from './fixtures/defaultExportArray' import { App } from './fixtures/reactQuery' import { letters } from './...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/dynamicImport.cy.ts
npm/vite-plugin-cypress-esm/cypress/component/dynamicImport.cy.ts
/// <reference types="cypress" /> import _ from 'lodash' describe('dynamic imports', () => { it('uses real implementation', () => { expect(_.add(1, 2)).to.eq(3) }) it('mocks', () => { cy.stub(_, 'add').callsFake(function multiply (a: number, b: number) { return a * b }) // Plot twist - a...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/importSyntax.cy.ts
npm/vite-plugin-cypress-esm/cypress/component/importSyntax.cy.ts
/// <reference types="cypress" /> /* eslint-disable import/no-duplicates */ import defaultExport1 from './fixtures/kitchenSink' import * as name1 from './fixtures/kitchenSink' import { export1 } from './fixtures/kitchenSink' import { export1 as alias1 } from './fixtures/kitchenSink' import { default as alias } from '....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/stub.cy.tsx
npm/vite-plugin-cypress-esm/cypress/component/stub.cy.tsx
/// <reference types="cypress" /> import React from 'react' import * as M from './fixtures/add' import { mount } from 'cypress/react' import * as Foo from './fixtures/Foo' import _ from 'lodash' describe('stubbing ES modules', () => { it('uses real implementation', () => { expect(M.add(1, 2)).to.eq(3) }) it...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/spy.cy.ts
npm/vite-plugin-cypress-esm/cypress/component/spy.cy.ts
/// <reference types="cypress" /> import * as M from './fixtures/add' describe('spying ES modules', () => { it('spies', () => { cy.spy(M, 'add').as('add') expect(M.add(2, 5)).to.eq(7) cy.get('@add').should('have.been.calledWith', 2, 5) }) })
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/assetTypes.cy.ts
npm/vite-plugin-cypress-esm/cypress/component/assetTypes.cy.ts
import css from './fixtures/style.css?inline' import svg from './fixtures/image.svg?raw' describe('asset types', () => { it('does not transform style assets', () => { expect(css).to.contain('import') expect(css).not.to.contain('_cypress') }) it('does not transform image assets', () => { expect(svg)....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/ignoreModuleList.cy.ts
npm/vite-plugin-cypress-esm/cypress/component/ignoreModuleList.cy.ts
// The referenced module should be ignored due to `ignoreModuleList` entry import * as Immutable from './fixtures/ImmutableModuleA' describe('ignoreModuleList', () => { it('ignored module is not proxified and cannot be stubbed', () => { let called = false try { cy.stub(Immutable, 'unstubbable') } ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/ImmutableModuleB.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/ImmutableModuleB.ts
export function unstubbable () { return 'Hello from immutable' } export default function nospy () { return 'You cannot spy on this' }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false