mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-26 00:49:05 -06:00
* chore: rename snapshots and spec files to fit vitest convention (#32405) * chore: move compiled files to dist directory to make vitest convertion easier (#32406) * chore: convert utils to vitest (#32407) * chore: convert logger to vitest * chore: convert errors spec to vitest * chore: convert cypress spec to vitest * chore: convert `exec` directory to `vitest` (#32428) * chore: cut over exec directory to vitest * Update cli/test/lib/exec/run.spec.ts * Update cli/test/lib/exec/run.spec.ts * Update cli/test/lib/exec/run.spec.ts * chore: convert the CLI and build script specs over to vitest (#32438) * chore: convert tasks directory to vitest (#32434) change way verify module is exported due to issues interpreting module (thinks its an esm) rework scripts as we cannot run an empty mocha suite chore: fix snapshots and verify requires that are internal to the cypress project fix stubbing issues with fs-extra which is also used by request-progress under the hood fix issues where xvfb was stopping prematurely * chore: remove files no longer used now that mocha tests are converted to vitest (#32455) * build binaries * chore: fix CLI tests (#32484) * chore: remove CI branch
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
import { includeTypes } from './utils'
|
|
import { join } from 'path'
|
|
import shell from 'shelljs'
|
|
|
|
shell.set('-v') // verbose
|
|
shell.set('-e') // any error is fatal
|
|
|
|
shell.rm('-rf', 'build')
|
|
shell.mkdir('-p', 'build/bin')
|
|
shell.mkdir('-p', 'build/types')
|
|
shell.cp('bin/cypress', 'build/bin/cypress')
|
|
shell.cp('NPM_README.md', 'build/README.md')
|
|
shell.cp('.release.json', 'build/.release.json')
|
|
// copies our typescript definitions
|
|
shell.cp('-R', 'types/*.ts', 'build/types/')
|
|
// copies 3rd party typescript definitions
|
|
includeTypes.forEach((folder: string) => {
|
|
const source: string = join('types', folder)
|
|
|
|
shell.cp('-R', source, 'build/types')
|
|
})
|
|
|
|
// build the project and copy the build files over to the build directory
|
|
shell.exec('tsc -p tsconfig.json')
|
|
shell.exec('tsc -p tsconfig.esm.json')
|
|
|
|
shell.mkdir('-p', 'build/dist')
|
|
shell.cp('dist/*.js', 'build/dist/')
|
|
shell.cp('dist/*.mjs', 'build/dist/')
|
|
|
|
shell.mkdir('-p', 'build/dist/exec')
|
|
shell.cp('dist/exec/*.js', 'build/dist/exec')
|
|
|
|
shell.mkdir('-p', 'build/dist/tasks')
|
|
shell.cp('dist/tasks/*.js', 'build/dist/tasks')
|