From 213c28464a5a8d86141385ded44ec534155c9fb9 Mon Sep 17 00:00:00 2001 From: Emily Rohrbough Date: Thu, 8 Dec 2022 13:24:14 -0600 Subject: [PATCH 01/13] chore: update and cleanup package/example --- npm/create-cypress-tests/scripts/example.js | 8 +- .../examples/cypress/fixtures/example.json | 5 + .../scripts/examples/cypress/plugins/index.js | 22 +++ .../examples/cypress/support/commands.js | 25 ++++ .../examples/cypress/support/component.js | 20 +++ .../scripts/examples/cypress/support/e2e.js | 20 +++ .../tsconfig.json} | 0 .../src/actions/ProjectActions.ts | 6 +- .../data-context/src/codegen/templates.ts | 2 +- .../test/unit/codegen/code-generator.spec.ts | 12 +- packages/example/README.md | 25 ++-- packages/example/bin/build.js | 13 +- packages/example/cypress.config.js | 3 +- packages/example/gulpfile.js | 8 - packages/example/index.d.ts | 2 +- packages/example/lib/example.d.ts | 8 +- packages/example/lib/example.js | 33 +--- packages/example/package.json | 17 +-- packages/example/test/example_spec.js | 31 ---- .../support/mock-graphql/stubgql-Mutation.ts | 2 +- packages/graphql/schemas/schema.graphql | 4 +- .../enumTypes/gql-CodeGenTypeEnum.ts | 2 +- .../schemaTypes/objectTypes/gql-Mutation.ts | 4 +- .../cache/dev-darwin/snapshot-meta.cache.json | 57 ++++--- yarn.lock | 141 ++++++++++++++---- 25 files changed, 285 insertions(+), 185 deletions(-) create mode 100644 npm/create-cypress-tests/scripts/examples/cypress/fixtures/example.json create mode 100644 npm/create-cypress-tests/scripts/examples/cypress/plugins/index.js create mode 100644 npm/create-cypress-tests/scripts/examples/cypress/support/commands.js create mode 100644 npm/create-cypress-tests/scripts/examples/cypress/support/component.js create mode 100644 npm/create-cypress-tests/scripts/examples/cypress/support/e2e.js rename npm/create-cypress-tests/scripts/{example-tsconfig.json => examples/tsconfig.json} (100%) delete mode 100644 packages/example/test/example_spec.js diff --git a/npm/create-cypress-tests/scripts/example.js b/npm/create-cypress-tests/scripts/example.js index 49b35fd7ee21..0925901447ab 100644 --- a/npm/create-cypress-tests/scripts/example.js +++ b/npm/create-cypress-tests/scripts/example.js @@ -13,9 +13,13 @@ program await fs.remove(destinationPath) await fs.copy(exampleFolder, destinationPath, { recursive: true }) - console.log(`✅ Example was successfully created at ${chalk.cyan(destination)}`) + console.log(`✅ E2E Examples were successfully created at ${chalk.cyan(destination)}`) - await fs.copy(path.join(__dirname, 'example-tsconfig.json'), path.join(destination, 'tsconfig.json')) + await fs.copy(path.join(__dirname, 'examples', 'cypress'), path.join(destination)) + + console.log(`✅ Cypress Setup was successfully created at ${chalk.cyan(destination)}`) + + await fs.copy(path.join(__dirname, 'examples', 'tsconfig.json'), path.join(destination, 'tsconfig.json')) console.log(`✅ tsconfig.json was created for ${chalk.cyan(destination)}`) }) diff --git a/npm/create-cypress-tests/scripts/examples/cypress/fixtures/example.json b/npm/create-cypress-tests/scripts/examples/cypress/fixtures/example.json new file mode 100644 index 000000000000..02e4254378e9 --- /dev/null +++ b/npm/create-cypress-tests/scripts/examples/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git a/npm/create-cypress-tests/scripts/examples/cypress/plugins/index.js b/npm/create-cypress-tests/scripts/examples/cypress/plugins/index.js new file mode 100644 index 000000000000..59b2bab6e4e6 --- /dev/null +++ b/npm/create-cypress-tests/scripts/examples/cypress/plugins/index.js @@ -0,0 +1,22 @@ +/// +// *********************************************************** +// This example plugins/index.js can be used to load plugins +// +// You can change the location of this file or turn off loading +// the plugins file with the 'pluginsFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/plugins-guide +// *********************************************************** + +// This function is called when a project is opened or re-opened (e.g. due to +// the project's config changing) + +/** + * @type {Cypress.PluginConfig} + */ +// eslint-disable-next-line no-unused-vars +module.exports = (on, config) => { + // `on` is used to hook into various events Cypress emits + // `config` is the resolved Cypress config +} diff --git a/npm/create-cypress-tests/scripts/examples/cypress/support/commands.js b/npm/create-cypress-tests/scripts/examples/cypress/support/commands.js new file mode 100644 index 000000000000..119ab03f7cda --- /dev/null +++ b/npm/create-cypress-tests/scripts/examples/cypress/support/commands.js @@ -0,0 +1,25 @@ +// *********************************************** +// This example commands.js shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) diff --git a/npm/create-cypress-tests/scripts/examples/cypress/support/component.js b/npm/create-cypress-tests/scripts/examples/cypress/support/component.js new file mode 100644 index 000000000000..5e450a7b1a4a --- /dev/null +++ b/npm/create-cypress-tests/scripts/examples/cypress/support/component.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/component.js 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 +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git a/npm/create-cypress-tests/scripts/examples/cypress/support/e2e.js b/npm/create-cypress-tests/scripts/examples/cypress/support/e2e.js new file mode 100644 index 000000000000..d1dd1353e812 --- /dev/null +++ b/npm/create-cypress-tests/scripts/examples/cypress/support/e2e.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/e2e.js 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 +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git a/npm/create-cypress-tests/scripts/example-tsconfig.json b/npm/create-cypress-tests/scripts/examples/tsconfig.json similarity index 100% rename from npm/create-cypress-tests/scripts/example-tsconfig.json rename to npm/create-cypress-tests/scripts/examples/tsconfig.json diff --git a/packages/data-context/src/actions/ProjectActions.ts b/packages/data-context/src/actions/ProjectActions.ts index 605d499de02b..3e9e0af55f29 100644 --- a/packages/data-context/src/actions/ProjectActions.ts +++ b/packages/data-context/src/actions/ProjectActions.ts @@ -475,13 +475,13 @@ export class ProjectActions { return path.join(projectRoot, 'cypress', 'e2e') } - async scaffoldIntegration (): Promise { + async e2eExamples (): Promise { const projectRoot = this.ctx.currentProject assert(projectRoot, `Cannot create spec without currentProject.`) const results = await codeGenerator( - { templateDir: templates['scaffoldIntegration'], target: this.defaultE2EPath }, + { templateDir: templates['e2eExamples'], target: this.defaultE2EPath }, {}, ) @@ -503,7 +503,7 @@ export class ProjectActions { switch (this.ctx.coreData.currentTestingType) { case 'e2e': - return hasNonExampleSpec(templates.scaffoldIntegration, specs) + return hasNonExampleSpec(templates.e2eExamples, specs) case 'component': return specs.length > 0 case null: diff --git a/packages/data-context/src/codegen/templates.ts b/packages/data-context/src/codegen/templates.ts index 58f7a03bbed4..518d51eac02d 100644 --- a/packages/data-context/src/codegen/templates.ts +++ b/packages/data-context/src/codegen/templates.ts @@ -7,5 +7,5 @@ export default { vueComponent: getPath('./templates/vue-component'), componentEmpty: getPath('./templates/empty-component'), e2e: getPath('./templates/empty-e2e'), - scaffoldIntegration: cypressEx.getPathToE2E(), + e2eExamples: cypressEx.getPathToE2E(), } as const diff --git a/packages/data-context/test/unit/codegen/code-generator.spec.ts b/packages/data-context/test/unit/codegen/code-generator.spec.ts index 5b46e3f150f6..059a00997c10 100644 --- a/packages/data-context/test/unit/codegen/code-generator.spec.ts +++ b/packages/data-context/test/unit/codegen/code-generator.spec.ts @@ -228,10 +228,10 @@ describe('code-generator', () => { expect(() => babelParse(fileContent)).not.throw() }) - it('should generate from scaffoldIntegration', async () => { + it('should generate from e2eExamples', async () => { const target = path.join(tmpPath, 'scaffold-integration') const action: Action = { - templateDir: templates.scaffoldIntegration, + templateDir: templates.e2eExamples, target, } @@ -277,12 +277,12 @@ describe('code-generator', () => { it('should return true after adding new spec file', async () => { const target = path.join(tmpPath, 'spec-check') - const checkBeforeScaffolding = await hasNonExampleSpec(templates.scaffoldIntegration, []) + const checkBeforeScaffolding = await hasNonExampleSpec(templates.e2eExamples, []) expect(checkBeforeScaffolding, 'expected having no spec files to show no non-example specs').to.be.false const scaffoldExamplesAction: Action = { - templateDir: templates.scaffoldIntegration, + templateDir: templates.e2eExamples, target, } @@ -298,7 +298,7 @@ describe('code-generator', () => { const specs = addTemplatesAsSpecs(scaffoldResults) - const checkAfterScaffolding = await hasNonExampleSpec(templates.scaffoldIntegration, specs) + const checkAfterScaffolding = await hasNonExampleSpec(templates.e2eExamples, specs) expect(checkAfterScaffolding, 'expected only having template files to show no non-example specs').to.be.false @@ -313,7 +313,7 @@ describe('code-generator', () => { const specsWithGenerated = [...specs, ...addTemplatesAsSpecs(generatedTest)] - const checkAfterTemplate = await hasNonExampleSpec(templates.scaffoldIntegration, specsWithGenerated) + const checkAfterTemplate = await hasNonExampleSpec(templates.e2eExamples, specsWithGenerated) expect(checkAfterTemplate, 'expected check after adding a new spec to indicate there are now non-example specs').to.be.true }) diff --git a/packages/example/README.md b/packages/example/README.md index 1fe4640506ba..16b446ae425d 100644 --- a/packages/example/README.md +++ b/packages/example/README.md @@ -1,27 +1,30 @@ +# Example -## Scaffold config files +This package is responsible for coping the `cypress/e2e` and `app` files from [`cypress-example-kitchensink`](https://github.com/cypress-io/cypress-example-kitchensink) into the cypress repository. -The `cypress/plugins/index.js`, `cypress/support/*` and `cypress/tsconfig.json` from this package are used for user scaffolding in `packages/server` and `npm/create-cypress-tests`. This configuration files are by default injected when user instals Cypress. +The `cypress/e2e` tests, pulled into this package from the [kitchen sink app](https://github.com/cypress-io/cypress-example-kitchensink, are used for scaffolding user's e2e tests in `packages/data-context` and in `npm/create-cypress-tests`. -## Examples +The `app` content, pulled into this package from the [kitchen sink app](https://github.com/cypress-io/cypress-example-kitchensink, are published to `cypress-io/cypress` repository's Github page, [https://example.cypress.io](https://example.cypress.io). -This repo contains the source code for pushing out [https://example.cypress.io](https://example.cypress.io). +## Updating Content -The actual example repo you're probably looking for is [the kitchen sink app here](https://github.com/cypress-io/cypress-example-kitchensink). - -**THERE'S LIKELY NO REASON YOU NEED TO EDIT ANY OF THE CODE ON THIS REPO.** +**THERE'S LIKELY NO REASON YOU NEED TO EDIT ANY OF THE CODE IN THIS PACKAGE.** - Want to edit the `example` tests? -> edit it [here](https://github.com/cypress-io/cypress-example-kitchensink/blob/master/cypress/e2e) instead. - Want to edit the actual [https://example.cypress.io](https://example.cypress.io) website? edit it [here](https://github.com/cypress-io/cypress-example-kitchensink/tree/master/app) instead. -## Updating the `example` app +## Major Version Bumps of Cypress + +If any of the breaking changes in the next major release requires updates to Cypress commands or APIs, verify the site content in `cypress-example-kitchensink` is up-to-date and that all examples that will be scaffolded can successfully run with the breaking change. -After [releasing a new version](https://github.com/cypress-io/cypress-example-kitchensink/blob/master/CONTRIBUTING.md#deployment) on the [`cypress-example-kitchen-sink` repo](https://github.com/cypress-io/cypress-example-kitchensink/tree/master/cypress/e2e/2-advanced-examples), you now want to update the `example`'s dependency to match the newly released version. +## Using a new version of `cypress-example-kitchen-sink` + +After [new version is automatically](https://github.com/cypress-io/cypress-example-kitchensink/blob/master/CONTRIBUTING.md#deployment) on the [`cypress-example-kitchen-sink` repo](https://github.com/cypress-io/cypress-example-kitchensink/tree/master/cypress/e2e/2-advanced-examples) when a commit is merged to `master`, you will need to update the `example`'s dependency to match the newly released version. 1. Bump the `cypress-example-kitchensink` `devDependency` within this package's [`package.json`](https://github.com/cypress-io/cypress/blob/develop/packages/example/package.json). 2. Run `yarn` and `yarn workspace @packages/example` to build the app and spec files. -CONTRIBUTING + 3. Create a new pull-request following this repo's [pull request instructions](CONTRIBUTING.md#pull-requests). ## Building @@ -32,7 +35,7 @@ After running `yarn` you must build the app + spec files. yarn workspace @packages/example build ``` -This copies the src files from [`cypress-example-kitchensink`](https://github.com/cypress-io/cypress-example-kitchensink), modifies them to point to `https://example.cypress.io` and creates the `example` tests. +This copies the `cypress/e2e` and files from [`cypress-example-kitchensink`](https://github.com/cypress-io/cypress-example-kitchensink), modifies them to point to `https://example.cypress.io` and creates the `example` tests. ## Deploying diff --git a/packages/example/bin/build.js b/packages/example/bin/build.js index 445e0d774077..7118954bb757 100644 --- a/packages/example/bin/build.js +++ b/packages/example/bin/build.js @@ -1,28 +1,29 @@ #!/usr/bin/env node +/* eslint-disable no-console */ + const resolvePkg = require('resolve-pkg') const { join } = require('path') const fs = require('fs-extra') const path = require('path') -const glob = require('glob') -const util = require('util') const childProcess = require('child_process') const EXAMPLE_DIR = path.join(__dirname, '..') -const globAsync = util.promisify(glob) -async function build() { +async function build () { await Promise.all([ fs.remove(path.join(EXAMPLE_DIR, 'app')), - fs.remove(path.join(EXAMPLE_DIR, 'cypress')) + fs.remove(path.join(EXAMPLE_DIR, 'cypress')), ]) + await Promise.all([ fs.copy(join(resolvePkg('cypress-example-kitchensink'), 'app'), path.join(EXAMPLE_DIR, 'app')), fs.copy(join(resolvePkg('cypress-example-kitchensink'), 'cypress'), path.join(EXAMPLE_DIR, 'cypress')), ]) + childProcess.execSync('node ./bin/convert.js', { cwd: EXAMPLE_DIR, - stdio: 'inherit' + stdio: 'inherit', }) } diff --git a/packages/example/cypress.config.js b/packages/example/cypress.config.js index c43d27f47714..3c3795bb25f6 100644 --- a/packages/example/cypress.config.js +++ b/packages/example/cypress.config.js @@ -1,4 +1,3 @@ module.exports = { - "projectId": "2pz86o" + 'projectId': '2pz86o', } - \ No newline at end of file diff --git a/packages/example/gulpfile.js b/packages/example/gulpfile.js index 140240e927f0..d13ed909b763 100644 --- a/packages/example/gulpfile.js +++ b/packages/example/gulpfile.js @@ -1,5 +1,4 @@ const gulp = require('gulp') -const ghPages = require('gulp-gh-pages') const gulpClean = require('gulp-clean') const RevAll = require('gulp-rev-all') @@ -26,13 +25,6 @@ const clean = () => { .pipe(gulpClean()) } -const pushGhPages = () => { - return gulp.src('build/**/*') - .pipe(ghPages()) -} - const build = gulp.series(clean, gulp.parallel(assets, cname)) exports.build = build - -exports.deploy = gulp.series(build, pushGhPages) diff --git a/packages/example/index.d.ts b/packages/example/index.d.ts index 6319bc5ceb03..c1d6f18a7a9d 100644 --- a/packages/example/index.d.ts +++ b/packages/example/index.d.ts @@ -1 +1 @@ -export { default } from './lib/example' \ No newline at end of file +export { default } from './lib/example' diff --git a/packages/example/lib/example.d.ts b/packages/example/lib/example.d.ts index f53cd0c1d4c1..c532f2f7d8b7 100644 --- a/packages/example/lib/example.d.ts +++ b/packages/example/lib/example.d.ts @@ -1,9 +1,5 @@ declare const example: { - getPathToExamples(): Promise; - getPathToE2E(): string; - getPathToPlugins(): string; - getPathToTsConfig(): string; - getPathToFixture(): string; + getPathToE2E(): string } -export default example; \ No newline at end of file +export default example diff --git a/packages/example/lib/example.js b/packages/example/lib/example.js index e93e6fd6f19e..e9ce62d52066 100644 --- a/packages/example/lib/example.js +++ b/packages/example/lib/example.js @@ -1,38 +1,7 @@ const path = require('path') -const Promise = require('bluebird') -const glob = Promise.promisify(require('glob')) - -const pathToExamples = path.join( - __dirname, - '..', - 'cypress', - 'e2e', - '**', - '*' -) module.exports = { - getPathToExamples () { - return glob(pathToExamples, { nodir: true }) - }, - - getPathToE2E() { + getPathToE2E () { return path.join(__dirname, '..', 'cypress', 'e2e') }, - - getPathToExampleFolders () { - return glob(`${pathToExamples}${path.sep}`) - }, - - getPathToPlugins() { - return path.resolve(__dirname, '..', 'cypress', 'plugins', 'index.js') - }, - - getPathToTsConfig() { - return path.resolve(__dirname, '..', 'cypress', 'tsconfig.json') - }, - - getPathToFixture() { - return path.resolve(__dirname, '..', 'cypress', 'fixtures', 'example.json') - } } diff --git a/packages/example/package.json b/packages/example/package.json index a296bb529684..9780d9279f05 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -8,30 +8,23 @@ "clean-deps": "rimraf node_modules", "test": "yarn test-unit", "test-e2e": "cypress run", - "test-debug": "yarn test-unit --inspect-brk=5566", - "test-unit": "cross-env NODE_ENV=test mocha", - "test-watch": "yarn test-unit --watch", + "test-unit": "echo 'no unit tests'", "build": "node ./bin/build.js && gulp build", "build-prod": "yarn build", "predeploy": "yarn build", - "deploy": "gulp deploy" - }, - "dependencies": { - "bluebird": "3.5.3", - "glob": "7.1.3" + "deploy": "echo 'gh-pages -d build -b gh-pages'" }, "devDependencies": { - "chai": "3.5.0", "cross-env": "6.0.3", "cypress-example-kitchensink": "https://github.com/cypress-io/cypress-example-kitchensink.git#bd93f68568bc0a412b2c4dd2ddbc3b7cb89e5799", + "gh-pages": "0.2.0", + "glob": "7.1.3", "gulp": "4.0.2", "gulp-clean": "0.4.0", - "gulp-gh-pages": "0.6.0-6", "gulp-rev-all": "2.0.2", "mocha": "2.5.3", "resolve-pkg": "2.0.0", - "rimraf": "3.0.2", - "shelljs": "0.8.5" + "rimraf": "3.0.2" }, "files": [ "cypress", diff --git a/packages/example/test/example_spec.js b/packages/example/test/example_spec.js deleted file mode 100644 index 16cbc54a599d..000000000000 --- a/packages/example/test/example_spec.js +++ /dev/null @@ -1,31 +0,0 @@ -let example = require('../index') -let expect = require('chai').expect -const path = require('path') -const _ = require('lodash') - - -const cwd = process.cwd() - -/* global describe, it */ -describe('Cypress Example', function () { - it('returns path to examples', function () { - const expected = path.normalize(`${cwd}/cypress/e2e`) - - return example.getPathToExamples() - .then(expectToAllEqual(expected)) - }) -}) - -// --- -function expectToAllEqual(expectedPath) { - return (paths) => _.chain(paths) - .map(result => { - const pathParts = result.split(path.sep) - return pathParts.slice(0, pathParts.length - 1) - }) - .map(_.curry(path.join)) - .map(_.curry(path.normalize)) - .forEach(p => { - expect(p).to.eq(path.normalize(expectedPath)) - }) -} diff --git a/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Mutation.ts b/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Mutation.ts index 8d6a4a6025b3..3d0ccc8192fa 100644 --- a/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Mutation.ts +++ b/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Mutation.ts @@ -86,7 +86,7 @@ export const stubMutation: MaybeResolver = { resetWizard (src, args, ctx) { return true }, - scaffoldIntegration (src, args, ctx) { + e2eExamples (src, args, ctx) { return [{ __typename: 'ScaffoldedFile', status: 'valid', diff --git a/packages/graphql/schemas/schema.graphql b/packages/graphql/schemas/schema.graphql index 42f5379c2919..60b7d74d6289 100644 --- a/packages/graphql/schemas/schema.graphql +++ b/packages/graphql/schemas/schema.graphql @@ -547,7 +547,7 @@ enum CodeGenType { component componentEmpty e2e - scaffoldIntegration + e2eExamples } enum CodeLanguageEnum { @@ -1241,6 +1241,7 @@ type Mutation { """Dismisses a warning displayed by the frontend""" dismissWarning(id: ID!): Query + e2eExamples: [ScaffoldedFile!]! """user has finished migration component specs - move to next step""" finishedRenamingComponentSpecs: Query @@ -1354,7 +1355,6 @@ type Mutation { """Reset the Wizard to the starting position""" resetWizard: Boolean! - scaffoldIntegration: [ScaffoldedFile!]! scaffoldTestingType: Query setAndLoadCurrentTestingType(testingType: TestingTypeEnum!): Query diff --git a/packages/graphql/src/schemaTypes/enumTypes/gql-CodeGenTypeEnum.ts b/packages/graphql/src/schemaTypes/enumTypes/gql-CodeGenTypeEnum.ts index 45047a37ee4b..6aecab7a5c3f 100644 --- a/packages/graphql/src/schemaTypes/enumTypes/gql-CodeGenTypeEnum.ts +++ b/packages/graphql/src/schemaTypes/enumTypes/gql-CodeGenTypeEnum.ts @@ -2,5 +2,5 @@ import { enumType } from 'nexus' export const CodeGenTypeEnum = enumType({ name: 'CodeGenType', - members: ['component', 'componentEmpty', 'e2e', 'scaffoldIntegration'], + members: ['component', 'componentEmpty', 'e2e', 'e2eExamples'], }) diff --git a/packages/graphql/src/schemaTypes/objectTypes/gql-Mutation.ts b/packages/graphql/src/schemaTypes/objectTypes/gql-Mutation.ts index 52fc5dae1699..3bffa42d14fe 100644 --- a/packages/graphql/src/schemaTypes/objectTypes/gql-Mutation.ts +++ b/packages/graphql/src/schemaTypes/objectTypes/gql-Mutation.ts @@ -258,10 +258,10 @@ export const mutation = mutationType({ }, }) - t.nonNull.list.nonNull.field('scaffoldIntegration', { + t.nonNull.list.nonNull.field('e2eExamples', { type: ScaffoldedFile, resolve: (src, args, ctx) => { - return ctx.actions.project.scaffoldIntegration() + return ctx.actions.project.e2eExamples() }, }) diff --git a/tooling/v8-snapshot/cache/dev-darwin/snapshot-meta.cache.json b/tooling/v8-snapshot/cache/dev-darwin/snapshot-meta.cache.json index 7e77c05f0d64..3f674f05f8c7 100644 --- a/tooling/v8-snapshot/cache/dev-darwin/snapshot-meta.cache.json +++ b/tooling/v8-snapshot/cache/dev-darwin/snapshot-meta.cache.json @@ -4,10 +4,6 @@ "./get-stream/buffer-stream.js", "./graceful-fs/polyfills.js", "./lockfile/lockfile.js", - "./node_modules/@babel/traverse/lib/path/comments.js", - "./node_modules/@babel/traverse/lib/path/conversion.js", - "./node_modules/@babel/traverse/lib/path/family.js", - "./node_modules/@babel/traverse/lib/path/introspection.js", "./node_modules/@cspotcode/source-map-support/source-map-support.js", "./node_modules/@cypress/commit-info/node_modules/debug/src/node.js", "./node_modules/@cypress/get-windows-proxy/node_modules/debug/src/node.js", @@ -44,6 +40,10 @@ "./node_modules/tcp-port-used/node_modules/debug/src/node.js", "./node_modules/trash/node_modules/make-dir/index.js", "./node_modules/utif/UTIF.js", + "./packages/config/node_modules/@babel/traverse/lib/path/comments.js", + "./packages/config/node_modules/@babel/traverse/lib/path/conversion.js", + "./packages/config/node_modules/@babel/traverse/lib/path/family.js", + "./packages/config/node_modules/@babel/traverse/lib/path/introspection.js", "./packages/data-context/node_modules/debug/src/node.js", "./packages/data-context/node_modules/minimatch/minimatch.js", "./packages/graphql/node_modules/debug/src/node.js", @@ -73,17 +73,6 @@ "deferred": [ "./node_modules/@babel/generator/lib/node/index.js", "./node_modules/@babel/generator/lib/node/whitespace.js", - "./node_modules/@babel/helper-environment-visitor/lib/index.js", - "./node_modules/@babel/traverse/lib/context.js", - "./node_modules/@babel/traverse/lib/index.js", - "./node_modules/@babel/traverse/lib/path/ancestry.js", - "./node_modules/@babel/traverse/lib/path/context.js", - "./node_modules/@babel/traverse/lib/path/index.js", - "./node_modules/@babel/traverse/lib/path/modification.js", - "./node_modules/@babel/traverse/lib/path/removal.js", - "./node_modules/@babel/traverse/lib/path/replacement.js", - "./node_modules/@babel/traverse/lib/scope/index.js", - "./node_modules/@babel/traverse/lib/traverse-node.js", "./node_modules/@babel/types/lib/definitions/core.js", "./node_modules/@babel/types/lib/definitions/experimental.js", "./node_modules/@babel/types/lib/definitions/flow.js", @@ -632,6 +621,15 @@ "./node_modules/xml2js/lib/xml2js.js", "./node_modules/yauzl/index.js", "./node_modules/zip-stream/index.js", + "./packages/config/node_modules/@babel/traverse/lib/context.js", + "./packages/config/node_modules/@babel/traverse/lib/index.js", + "./packages/config/node_modules/@babel/traverse/lib/path/ancestry.js", + "./packages/config/node_modules/@babel/traverse/lib/path/context.js", + "./packages/config/node_modules/@babel/traverse/lib/path/index.js", + "./packages/config/node_modules/@babel/traverse/lib/path/modification.js", + "./packages/config/node_modules/@babel/traverse/lib/path/removal.js", + "./packages/config/node_modules/@babel/traverse/lib/path/replacement.js", + "./packages/config/node_modules/@babel/traverse/lib/scope/index.js", "./packages/data-context/node_modules/chokidar/index.js", "./packages/data-context/node_modules/chokidar/lib/constants.js", "./packages/data-context/node_modules/chokidar/lib/fsevents-handler.js", @@ -648,8 +646,6 @@ "./packages/data-context/node_modules/readdirp/index.js", "./packages/data-context/node_modules/supports-color/index.js", "./packages/electron/node_modules/get-stream/buffer-stream.js", - "./packages/example/node_modules/glob/glob.js", - "./packages/example/node_modules/glob/sync.js", "./packages/graphql/node_modules/chalk/node_modules/supports-color/index.js", "./packages/graphql/node_modules/chalk/source/index.js", "./packages/graphql/node_modules/debug/src/browser.js", @@ -816,18 +812,6 @@ "./node_modules/@babel/template/lib/parse.js", "./node_modules/@babel/template/lib/populate.js", "./node_modules/@babel/template/lib/string.js", - "./node_modules/@babel/traverse/lib/cache.js", - "./node_modules/@babel/traverse/lib/hub.js", - "./node_modules/@babel/traverse/lib/path/evaluation.js", - "./node_modules/@babel/traverse/lib/path/inference/index.js", - "./node_modules/@babel/traverse/lib/path/inference/inferer-reference.js", - "./node_modules/@babel/traverse/lib/path/inference/inferers.js", - "./node_modules/@babel/traverse/lib/path/lib/hoister.js", - "./node_modules/@babel/traverse/lib/path/lib/removal-hooks.js", - "./node_modules/@babel/traverse/lib/path/lib/virtual-types.js", - "./node_modules/@babel/traverse/lib/scope/binding.js", - "./node_modules/@babel/traverse/lib/scope/lib/renamer.js", - "./node_modules/@babel/traverse/lib/visitors.js", "./node_modules/@babel/types/lib/asserts/assertNode.js", "./node_modules/@babel/types/lib/asserts/generated/index.js", "./node_modules/@babel/types/lib/ast-types/generated/index.js", @@ -3295,6 +3279,18 @@ "./node_modules/yallist/yallist.js", "./node_modules/yn/index.js", "./node_modules/yn/lenient.js", + "./packages/config/node_modules/@babel/traverse/lib/cache.js", + "./packages/config/node_modules/@babel/traverse/lib/hub.js", + "./packages/config/node_modules/@babel/traverse/lib/path/evaluation.js", + "./packages/config/node_modules/@babel/traverse/lib/path/inference/index.js", + "./packages/config/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js", + "./packages/config/node_modules/@babel/traverse/lib/path/inference/inferers.js", + "./packages/config/node_modules/@babel/traverse/lib/path/lib/hoister.js", + "./packages/config/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js", + "./packages/config/node_modules/@babel/traverse/lib/path/lib/virtual-types.js", + "./packages/config/node_modules/@babel/traverse/lib/scope/binding.js", + "./packages/config/node_modules/@babel/traverse/lib/scope/lib/renamer.js", + "./packages/config/node_modules/@babel/traverse/lib/visitors.js", "./packages/data-context/node_modules/@babel/code-frame/lib/index.js", "./packages/data-context/node_modules/@babel/parser/lib/index.js", "./packages/data-context/node_modules/anymatch/index.js", @@ -3348,7 +3344,6 @@ "./packages/electron/node_modules/is-stream/index.js", "./packages/electron/node_modules/npm-run-path/index.js", "./packages/electron/node_modules/path-key/index.js", - "./packages/example/node_modules/glob/common.js", "./packages/graphql/node_modules/chalk/source/templates.js", "./packages/graphql/node_modules/chalk/source/util.js", "./packages/graphql/node_modules/debug/node_modules/ms/index.js", @@ -3542,5 +3537,5 @@ "./tooling/v8-snapshot/cache/dev-darwin/snapshot-entry.js" ], "deferredHashFile": "yarn.lock", - "deferredHash": "7da54eecbd832d3cd8ba75441a83e8c69c033664f25df5a2e43c1794d9d149de" + "deferredHash": "b45cb4a82d32b5a50de2655b7fd60a63acc8035ee010b0411abc8116caf76ba0" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0b0a4e7a1b80..40ff413ee89e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9337,6 +9337,11 @@ async-settle@^1.0.0: dependencies: async-done "^1.2.2" +async@0.2.9: + version "0.2.9" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.9.tgz#df63060fbf3d33286a76aaf6d55a2986d9ff8619" + integrity sha512-OAtM6mexGteNKdU29wcUfRW+VuBr94A3hx9h9yzBnPaQAbKoW1ORd68XM4CCAOpdL5wlNFgO29hsY1TKv2vAKw== + async@0.9.x, async@^0.9.0: version "0.9.2" resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" @@ -9353,9 +9358,9 @@ async@^1.5.0: integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= async@^2.1.4, async@^2.4.1, async@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" @@ -12409,6 +12414,13 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" +collections@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/collections/-/collections-0.2.2.tgz#1f23026b2ef36f927eecc901e99c5f0d48fa334e" + integrity sha512-XMGG5GPXUnjERaZzrBIfJo3iY3ck2ChSlL73iRk0UrT39Ei0HaKxhWL4NdrFjF72SCI/QGGa3U5CnN0BgbSgnw== + dependencies: + weak-map "1.0.0" + color-convert@^1.9.0, color-convert@^1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -17788,7 +17800,20 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -gift@0.10.2, gift@^0.10.2: +gh-pages@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-0.2.0.tgz#775503bf6af6656111e8c9b6cb9d62bdf0f8b7b4" + integrity sha512-U77FOJTyGQI7mSdCr3aCky8B+ZMBcIxLYRWTVtvJJYNTT7OYbCvCteZG1EP0D08oJkjwOGwQjLxEcKPLdhgFdQ== + dependencies: + async "0.2.9" + glob "~4.0.2" + graceful-fs "2.0.1" + lodash "~2.4.1" + q "~1.0.1" + q-io "~1.11.0" + wrench "1.5.1" + +gift@0.10.2: version "0.10.2" resolved "https://registry.yarnpkg.com/gift/-/gift-0.10.2.tgz#4600efe8f284b51fcb01c3527b321e22b494e156" integrity sha512-wC9aKnQpjfOTWX+JG4DPJkS89ux6sl8EN4hXhv/2vBoXCDTEz1JiTeGTSeuKYlCqIgUFM1JwPVym34Sys3hvzw== @@ -18053,6 +18078,16 @@ glob@^8.0.1: minimatch "^5.0.1" once "^1.3.0" +glob@~4.0.2: + version "4.0.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-4.0.6.tgz#695c50bdd4e2fb5c5d370b091f388d3707e291a7" + integrity sha512-D0H1thJnOVgI0zRV3H/Vmb9HWmDgGTTR7PeT8Lk0ri2kMmfK3oKQBolfqJuRpBVpTx5Q5PKGl9hdQEQNTXJI7Q== + dependencies: + graceful-fs "^3.0.2" + inherits "2" + minimatch "^1.0.0" + once "^1.3.0" + global-agent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-3.0.0.tgz#ae7cd31bd3583b93c5a16437a1afe27cc33a1ab6" @@ -18353,11 +18388,23 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" +graceful-fs@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-2.0.1.tgz#7fd6e0a4837c35d0cc15330294d9584a3898cf84" + integrity sha512-oJifEVPN+MOe0kEHBEF5ealVyB62w6iTwCINpkY7vA1lmEzDvq6UiotxvwWtke7fPrz5yM5y4rPwdLclgbDhOA== + graceful-fs@4.2.9: version "4.2.9" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== +graceful-fs@^3.0.2: + version "3.0.12" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.12.tgz#0034947ce9ed695ec8ab0b854bc919e82b1ffaef" + integrity sha512-J55gaCS4iTTJfTXIxSVw3EMQckcqkpdRv3IR7gu6sq0+tbC363Zx6KH/SEwXASK9JRbhyZmVjJEVJIOxYsB3Qg== + dependencies: + natives "^1.1.3" + graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.4, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" @@ -18563,19 +18610,6 @@ gulp-debug@4.0.0: through2 "^2.0.0" tildify "^1.1.2" -gulp-gh-pages@0.6.0-6: - version "0.6.0-6" - resolved "https://registry.yarnpkg.com/gulp-gh-pages/-/gulp-gh-pages-0.6.0-6.tgz#e61eec05beb7f6151ce576a1c2cadfceffa45ae5" - integrity sha512-9G3Z4THBrYaONcmy/3Z1t7Y0grzjcXH5YiZh/E+s4DREpfLBHy5qZyGLcc3R9hjDS/QJf+z3KfzWu8mhG6E0CA== - dependencies: - fancy-log "^1.3.2" - gift "^0.10.2" - inspect-with-kind "^1.0.4" - plugin-error "^1.0.1" - rimraf "^2.6.2" - vinyl "^2.2.0" - vinyl-fs "^3.0.3" - gulp-rename@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.4.0.tgz#de1c718e7c4095ae861f7296ef4f3248648240bd" @@ -19742,13 +19776,6 @@ inquirer@8.2.4: through "^2.3.6" wrap-ansi "^7.0.0" -inspect-with-kind@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/inspect-with-kind/-/inspect-with-kind-1.0.5.tgz#fce151d4ce89722c82ca8e9860bb96f9167c316c" - integrity sha512-MAQUJuIo7Xqk8EVNP+6d3CKq9c80hi4tjIbIAT6lmGW9W6WzlHiu9PS8uSuUYU+Do+j1baiFp3H25XEVxDIG2g== - dependencies: - kind-of "^6.0.2" - internal-ip@^4.2.0, internal-ip@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" @@ -22820,6 +22847,11 @@ lodash@^3.1.0, lodash@^3.10.0, lodash@^3.5.0, lodash@^3.9.3: resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y= +lodash@~2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e" + integrity sha512-Kak1hi6/hYHGVPmdyiZijoQyz5x2iGVzs6w9GYB/HiXEtylY7tIoYEROMjvM1d9nXJqPOrG2MNPMn01bJ+S0Rw== + log-ok@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/log-ok/-/log-ok-0.1.1.tgz#bea3dd36acd0b8a7240d78736b5b97c65444a334" @@ -23570,7 +23602,7 @@ mime-types@^2.1.12, mime-types@^2.1.21, mime-types@^2.1.27, mime-types@^2.1.31, dependencies: mime-db "1.52.0" -mime@1.6.0, mime@^1.3.4, mime@^1.4.1, mime@^1.6.0: +mime@1.6.0, mime@^1.2.11, mime@^1.3.4, mime@^1.4.1, mime@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -23590,6 +23622,11 @@ mime@^3.0.0: resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== +mimeparse@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/mimeparse/-/mimeparse-0.1.4.tgz#dafb02752370fd226093ae3152c271af01ac254a" + integrity sha512-jiuAsJJY4c0oF97oHKic9nva2y1QF2yhYJG3LXLys//f8SNQ89eFuGZ29z62Z29CAY4endJS6zFiKUtURFErog== + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -23692,6 +23729,14 @@ minimatch@4.2.1: dependencies: brace-expansion "^1.1.7" +minimatch@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-1.0.0.tgz#e0dd2120b49e1b724ce8d714c520822a9438576d" + integrity sha512-Ejh5Odk/uFXAj5nf/NSXk0UamqcGAfOdHI7nY0zvCHyn4f3nKLFoUTp+lYxDxSih/40uW8lpwDplOWHdWkQXWA== + dependencies: + lru-cache "2" + sigmund "~1.0.0" + minimatch@^2.0.3: version "2.0.10" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" @@ -24563,6 +24608,11 @@ native-promise-only@~0.8.1: resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11" integrity sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE= +natives@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.6.tgz#a603b4a498ab77173612b9ea1acdec4d980f00bb" + integrity sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -28029,6 +28079,18 @@ pupa@^2.0.1, pupa@^2.1.1: dependencies: escape-goat "^2.0.0" +q-io@~1.11.0: + version "1.11.6" + resolved "https://registry.yarnpkg.com/q-io/-/q-io-1.11.6.tgz#a6850976e1e8f7c5bd0fa3e5835f5eb9d94fa173" + integrity sha512-jPmPDoDHCVhW43Y2cP+mcv8Z5bxkIN8cw2BeCUhBnWXT3s0WPEy23CQAn/wIXK3xndnkuV51SH9UszhpDLhUjw== + dependencies: + collections "^0.2.0" + mime "^1.2.11" + mimeparse "^0.1.4" + q "^1.0.1" + qs "^1.2.1" + url2 "^0.0.0" + q@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/q/-/q-2.0.3.tgz#75b8db0255a1a5af82f58c3f3aaa1efec7d0d134" @@ -28038,11 +28100,16 @@ q@2.0.3: pop-iterate "^1.0.1" weak-map "^1.0.5" -q@^1.1.2, q@^1.5.1: +q@^1.0.1, q@^1.1.2, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= +q@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.0.1.tgz#11872aeedee89268110b10a718448ffb10112a14" + integrity sha512-18MnBaCeBX9sLRUdtxz/6onlb7wLzFxCylklyO8n27y5JxJYaGLPu4ccyc5zih58SpEzY8QmfwaWqguqXU6Y+A== + qrcode-terminal@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" @@ -28058,6 +28125,11 @@ qs@6.9.7: resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe" integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw== +qs@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-1.2.2.tgz#19b57ff24dc2a99ce1f8bdf6afcda59f8ef61f88" + integrity sha512-xEqT+49YIt+BdwQthXKTOkp7atENe6JqrGGerxBPiER6BArOIiVJtpZZYpWOpq2IOkTPVnDM8CgYvppFoJNwyQ== + qs@^6.4.0, qs@^6.5.1, qs@^6.9.4: version "6.10.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" @@ -33676,6 +33748,11 @@ url-to-options@^1.0.1: resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= +url2@^0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/url2/-/url2-0.0.0.tgz#4eaabd1d5c3ac90d62ab4485c998422865a04b1a" + integrity sha512-gb/XT1m2mnWOIbQwa5V9Dq2O07fkZbtu1K0WAAKuaNSX0c8psp2jovJTbbvPKCpimutdoK9jXOejDCtvQOoKOA== + url@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" @@ -33943,7 +34020,7 @@ verror@^1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vinyl-fs@^3.0.0, vinyl-fs@^3.0.3: +vinyl-fs@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7" integrity sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng== @@ -34429,6 +34506,11 @@ wcwidth@^1.0.0, wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +weak-map@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.0.tgz#b66e56a9df0bd25a76bbf1b514db129080614a37" + integrity sha512-Vb13TbgdvUEmzBA5mpsMqtPqcZGJPE2gj+b8wzxsevC7WkmL3c7YZg9H0pV1Jo8C1Sa1ykk3DU08hFRGLNWvLQ== + weak-map@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.5.tgz#79691584d98607f5070bd3b70a40e6bb22e401eb" @@ -35255,6 +35337,11 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +wrench@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/wrench/-/wrench-1.5.1.tgz#3f7a519b0e409338723bb039b209a541176baa42" + integrity sha512-Q59sen3tsxqNQIWgrOwDtUo/4P/BcclDh2UyqzTVC2BqjvJutip3YaHgQxujOY7t8MFEQB3FZED2GorOXlnZ/Q== + write-file-atomic@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" From ffc7264a341b5e3ea5d1c2df958ebd240a32d39c Mon Sep 17 00:00:00 2001 From: Emily Rohrbough Date: Thu, 8 Dec 2022 13:25:41 -0600 Subject: [PATCH 02/13] remove --- .../example/cypress/fixtures/example.json | 5 ---- packages/example/cypress/plugins/index.js | 22 ---------------- packages/example/cypress/support/commands.js | 25 ------------------- 3 files changed, 52 deletions(-) delete mode 100644 packages/example/cypress/fixtures/example.json delete mode 100644 packages/example/cypress/plugins/index.js delete mode 100644 packages/example/cypress/support/commands.js diff --git a/packages/example/cypress/fixtures/example.json b/packages/example/cypress/fixtures/example.json deleted file mode 100644 index 02e4254378e9..000000000000 --- a/packages/example/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/packages/example/cypress/plugins/index.js b/packages/example/cypress/plugins/index.js deleted file mode 100644 index 59b2bab6e4e6..000000000000 --- a/packages/example/cypress/plugins/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -/** - * @type {Cypress.PluginConfig} - */ -// eslint-disable-next-line no-unused-vars -module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -} diff --git a/packages/example/cypress/support/commands.js b/packages/example/cypress/support/commands.js deleted file mode 100644 index 119ab03f7cda..000000000000 --- a/packages/example/cypress/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) From a6820c756b3313cf775d91c3cf3b9c68fa393a9f Mon Sep 17 00:00:00 2001 From: Emily Rohrbough Date: Thu, 8 Dec 2022 13:37:34 -0600 Subject: [PATCH 03/13] run ci --- .../example/cypress/fixtures/example.json | 5 + packages/example/cypress/plugins/index.js | 22 +++ packages/example/cypress/support/commands.js | 25 ++++ packages/example/cypress/support/component.js | 20 +++ packages/example/cypress/support/e2e.js | 20 +++ packages/example/package.json | 2 +- .../cache/dev-darwin/snapshot-meta.cache.json | 2 +- yarn.lock | 131 +++--------------- 8 files changed, 115 insertions(+), 112 deletions(-) create mode 100644 packages/example/cypress/fixtures/example.json create mode 100644 packages/example/cypress/plugins/index.js create mode 100644 packages/example/cypress/support/commands.js create mode 100644 packages/example/cypress/support/component.js create mode 100644 packages/example/cypress/support/e2e.js diff --git a/packages/example/cypress/fixtures/example.json b/packages/example/cypress/fixtures/example.json new file mode 100644 index 000000000000..02e4254378e9 --- /dev/null +++ b/packages/example/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git a/packages/example/cypress/plugins/index.js b/packages/example/cypress/plugins/index.js new file mode 100644 index 000000000000..59b2bab6e4e6 --- /dev/null +++ b/packages/example/cypress/plugins/index.js @@ -0,0 +1,22 @@ +/// +// *********************************************************** +// This example plugins/index.js can be used to load plugins +// +// You can change the location of this file or turn off loading +// the plugins file with the 'pluginsFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/plugins-guide +// *********************************************************** + +// This function is called when a project is opened or re-opened (e.g. due to +// the project's config changing) + +/** + * @type {Cypress.PluginConfig} + */ +// eslint-disable-next-line no-unused-vars +module.exports = (on, config) => { + // `on` is used to hook into various events Cypress emits + // `config` is the resolved Cypress config +} diff --git a/packages/example/cypress/support/commands.js b/packages/example/cypress/support/commands.js new file mode 100644 index 000000000000..119ab03f7cda --- /dev/null +++ b/packages/example/cypress/support/commands.js @@ -0,0 +1,25 @@ +// *********************************************** +// This example commands.js shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) diff --git a/packages/example/cypress/support/component.js b/packages/example/cypress/support/component.js new file mode 100644 index 000000000000..5e450a7b1a4a --- /dev/null +++ b/packages/example/cypress/support/component.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/component.js 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 +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git a/packages/example/cypress/support/e2e.js b/packages/example/cypress/support/e2e.js new file mode 100644 index 000000000000..d1dd1353e812 --- /dev/null +++ b/packages/example/cypress/support/e2e.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/e2e.js 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 +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git a/packages/example/package.json b/packages/example/package.json index 9780d9279f05..3fdc7e4fb9b8 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -17,7 +17,7 @@ "devDependencies": { "cross-env": "6.0.3", "cypress-example-kitchensink": "https://github.com/cypress-io/cypress-example-kitchensink.git#bd93f68568bc0a412b2c4dd2ddbc3b7cb89e5799", - "gh-pages": "0.2.0", + "gh-pages": "4.0.0", "glob": "7.1.3", "gulp": "4.0.2", "gulp-clean": "0.4.0", diff --git a/tooling/v8-snapshot/cache/dev-darwin/snapshot-meta.cache.json b/tooling/v8-snapshot/cache/dev-darwin/snapshot-meta.cache.json index 3f674f05f8c7..8ce34e39eec7 100644 --- a/tooling/v8-snapshot/cache/dev-darwin/snapshot-meta.cache.json +++ b/tooling/v8-snapshot/cache/dev-darwin/snapshot-meta.cache.json @@ -3537,5 +3537,5 @@ "./tooling/v8-snapshot/cache/dev-darwin/snapshot-entry.js" ], "deferredHashFile": "yarn.lock", - "deferredHash": "b45cb4a82d32b5a50de2655b7fd60a63acc8035ee010b0411abc8116caf76ba0" + "deferredHash": "df8a0b54f3b9a217eaf8657e7af9e12349e34bc767d7cafb23895fb3bd59a1db" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 40ff413ee89e..463da58f09a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9337,11 +9337,6 @@ async-settle@^1.0.0: dependencies: async-done "^1.2.2" -async@0.2.9: - version "0.2.9" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.9.tgz#df63060fbf3d33286a76aaf6d55a2986d9ff8619" - integrity sha512-OAtM6mexGteNKdU29wcUfRW+VuBr94A3hx9h9yzBnPaQAbKoW1ORd68XM4CCAOpdL5wlNFgO29hsY1TKv2vAKw== - async@0.9.x, async@^0.9.0: version "0.9.2" resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" @@ -9357,7 +9352,7 @@ async@^1.5.0: resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= -async@^2.1.4, async@^2.4.1, async@^2.6.2: +async@^2.1.4, async@^2.4.1, async@^2.6.1, async@^2.6.2: version "2.6.4" resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== @@ -12414,13 +12409,6 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -collections@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/collections/-/collections-0.2.2.tgz#1f23026b2ef36f927eecc901e99c5f0d48fa334e" - integrity sha512-XMGG5GPXUnjERaZzrBIfJo3iY3ck2ChSlL73iRk0UrT39Ei0HaKxhWL4NdrFjF72SCI/QGGa3U5CnN0BgbSgnw== - dependencies: - weak-map "1.0.0" - color-convert@^1.9.0, color-convert@^1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -12554,7 +12542,7 @@ commander@2.9.0: dependencies: graceful-readlink ">= 1.0.0" -commander@2.x.x, commander@^2.11.0, commander@^2.12.1, commander@^2.19.0, commander@^2.20.0, commander@^2.5.0: +commander@2.x.x, commander@^2.11.0, commander@^2.12.1, commander@^2.18.0, commander@^2.19.0, commander@^2.20.0, commander@^2.5.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -15009,6 +14997,11 @@ elliptic@^6.5.3: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +email-addresses@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/email-addresses/-/email-addresses-3.1.0.tgz#cabf7e085cbdb63008a70319a74e6136188812fb" + integrity sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg== + email-validator@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/email-validator/-/email-validator-2.0.4.tgz#b8dfaa5d0dae28f1b03c95881d904d4e40bfe7ed" @@ -16860,7 +16853,7 @@ filename-reserved-regex@^2.0.0: resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" integrity sha1-q/c9+rc10EVECr/qLZHzieu/oik= -filenamify@^4.1.0: +filenamify@^4.1.0, filenamify@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-4.3.0.tgz#62391cb58f02b09971c9d4f9d63b3cf9aba03106" integrity sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg== @@ -17800,18 +17793,18 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -gh-pages@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-0.2.0.tgz#775503bf6af6656111e8c9b6cb9d62bdf0f8b7b4" - integrity sha512-U77FOJTyGQI7mSdCr3aCky8B+ZMBcIxLYRWTVtvJJYNTT7OYbCvCteZG1EP0D08oJkjwOGwQjLxEcKPLdhgFdQ== +gh-pages@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-4.0.0.tgz#bd7447bab7eef008f677ac8cc4f6049ab978f4a6" + integrity sha512-p8S0T3aGJc68MtwOcZusul5qPSNZCalap3NWbhRUZYu1YOdp+EjZ+4kPmRM8h3NNRdqw00yuevRjlkuSzCn7iQ== dependencies: - async "0.2.9" - glob "~4.0.2" - graceful-fs "2.0.1" - lodash "~2.4.1" - q "~1.0.1" - q-io "~1.11.0" - wrench "1.5.1" + async "^2.6.1" + commander "^2.18.0" + email-addresses "^3.0.1" + filenamify "^4.3.0" + find-cache-dir "^3.3.1" + fs-extra "^8.1.0" + globby "^6.1.0" gift@0.10.2: version "0.10.2" @@ -18078,16 +18071,6 @@ glob@^8.0.1: minimatch "^5.0.1" once "^1.3.0" -glob@~4.0.2: - version "4.0.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-4.0.6.tgz#695c50bdd4e2fb5c5d370b091f388d3707e291a7" - integrity sha512-D0H1thJnOVgI0zRV3H/Vmb9HWmDgGTTR7PeT8Lk0ri2kMmfK3oKQBolfqJuRpBVpTx5Q5PKGl9hdQEQNTXJI7Q== - dependencies: - graceful-fs "^3.0.2" - inherits "2" - minimatch "^1.0.0" - once "^1.3.0" - global-agent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-3.0.0.tgz#ae7cd31bd3583b93c5a16437a1afe27cc33a1ab6" @@ -18388,23 +18371,11 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-2.0.1.tgz#7fd6e0a4837c35d0cc15330294d9584a3898cf84" - integrity sha512-oJifEVPN+MOe0kEHBEF5ealVyB62w6iTwCINpkY7vA1lmEzDvq6UiotxvwWtke7fPrz5yM5y4rPwdLclgbDhOA== - graceful-fs@4.2.9: version "4.2.9" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== -graceful-fs@^3.0.2: - version "3.0.12" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.12.tgz#0034947ce9ed695ec8ab0b854bc919e82b1ffaef" - integrity sha512-J55gaCS4iTTJfTXIxSVw3EMQckcqkpdRv3IR7gu6sq0+tbC363Zx6KH/SEwXASK9JRbhyZmVjJEVJIOxYsB3Qg== - dependencies: - natives "^1.1.3" - graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.4, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" @@ -22847,11 +22818,6 @@ lodash@^3.1.0, lodash@^3.10.0, lodash@^3.5.0, lodash@^3.9.3: resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y= -lodash@~2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e" - integrity sha512-Kak1hi6/hYHGVPmdyiZijoQyz5x2iGVzs6w9GYB/HiXEtylY7tIoYEROMjvM1d9nXJqPOrG2MNPMn01bJ+S0Rw== - log-ok@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/log-ok/-/log-ok-0.1.1.tgz#bea3dd36acd0b8a7240d78736b5b97c65444a334" @@ -23602,7 +23568,7 @@ mime-types@^2.1.12, mime-types@^2.1.21, mime-types@^2.1.27, mime-types@^2.1.31, dependencies: mime-db "1.52.0" -mime@1.6.0, mime@^1.2.11, mime@^1.3.4, mime@^1.4.1, mime@^1.6.0: +mime@1.6.0, mime@^1.3.4, mime@^1.4.1, mime@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -23622,11 +23588,6 @@ mime@^3.0.0: resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== -mimeparse@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/mimeparse/-/mimeparse-0.1.4.tgz#dafb02752370fd226093ae3152c271af01ac254a" - integrity sha512-jiuAsJJY4c0oF97oHKic9nva2y1QF2yhYJG3LXLys//f8SNQ89eFuGZ29z62Z29CAY4endJS6zFiKUtURFErog== - mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -23729,14 +23690,6 @@ minimatch@4.2.1: dependencies: brace-expansion "^1.1.7" -minimatch@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-1.0.0.tgz#e0dd2120b49e1b724ce8d714c520822a9438576d" - integrity sha512-Ejh5Odk/uFXAj5nf/NSXk0UamqcGAfOdHI7nY0zvCHyn4f3nKLFoUTp+lYxDxSih/40uW8lpwDplOWHdWkQXWA== - dependencies: - lru-cache "2" - sigmund "~1.0.0" - minimatch@^2.0.3: version "2.0.10" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" @@ -24608,11 +24561,6 @@ native-promise-only@~0.8.1: resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11" integrity sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE= -natives@^1.1.3: - version "1.1.6" - resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.6.tgz#a603b4a498ab77173612b9ea1acdec4d980f00bb" - integrity sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -28079,18 +28027,6 @@ pupa@^2.0.1, pupa@^2.1.1: dependencies: escape-goat "^2.0.0" -q-io@~1.11.0: - version "1.11.6" - resolved "https://registry.yarnpkg.com/q-io/-/q-io-1.11.6.tgz#a6850976e1e8f7c5bd0fa3e5835f5eb9d94fa173" - integrity sha512-jPmPDoDHCVhW43Y2cP+mcv8Z5bxkIN8cw2BeCUhBnWXT3s0WPEy23CQAn/wIXK3xndnkuV51SH9UszhpDLhUjw== - dependencies: - collections "^0.2.0" - mime "^1.2.11" - mimeparse "^0.1.4" - q "^1.0.1" - qs "^1.2.1" - url2 "^0.0.0" - q@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/q/-/q-2.0.3.tgz#75b8db0255a1a5af82f58c3f3aaa1efec7d0d134" @@ -28100,16 +28036,11 @@ q@2.0.3: pop-iterate "^1.0.1" weak-map "^1.0.5" -q@^1.0.1, q@^1.1.2, q@^1.5.1: +q@^1.1.2, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -q@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.0.1.tgz#11872aeedee89268110b10a718448ffb10112a14" - integrity sha512-18MnBaCeBX9sLRUdtxz/6onlb7wLzFxCylklyO8n27y5JxJYaGLPu4ccyc5zih58SpEzY8QmfwaWqguqXU6Y+A== - qrcode-terminal@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" @@ -28125,11 +28056,6 @@ qs@6.9.7: resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe" integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw== -qs@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-1.2.2.tgz#19b57ff24dc2a99ce1f8bdf6afcda59f8ef61f88" - integrity sha512-xEqT+49YIt+BdwQthXKTOkp7atENe6JqrGGerxBPiER6BArOIiVJtpZZYpWOpq2IOkTPVnDM8CgYvppFoJNwyQ== - qs@^6.4.0, qs@^6.5.1, qs@^6.9.4: version "6.10.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" @@ -33748,11 +33674,6 @@ url-to-options@^1.0.1: resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= -url2@^0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/url2/-/url2-0.0.0.tgz#4eaabd1d5c3ac90d62ab4485c998422865a04b1a" - integrity sha512-gb/XT1m2mnWOIbQwa5V9Dq2O07fkZbtu1K0WAAKuaNSX0c8psp2jovJTbbvPKCpimutdoK9jXOejDCtvQOoKOA== - url@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" @@ -34506,11 +34427,6 @@ wcwidth@^1.0.0, wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -weak-map@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.0.tgz#b66e56a9df0bd25a76bbf1b514db129080614a37" - integrity sha512-Vb13TbgdvUEmzBA5mpsMqtPqcZGJPE2gj+b8wzxsevC7WkmL3c7YZg9H0pV1Jo8C1Sa1ykk3DU08hFRGLNWvLQ== - weak-map@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.5.tgz#79691584d98607f5070bd3b70a40e6bb22e401eb" @@ -35337,11 +35253,6 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -wrench@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/wrench/-/wrench-1.5.1.tgz#3f7a519b0e409338723bb039b209a541176baa42" - integrity sha512-Q59sen3tsxqNQIWgrOwDtUo/4P/BcclDh2UyqzTVC2BqjvJutip3YaHgQxujOY7t8MFEQB3FZED2GorOXlnZ/Q== - write-file-atomic@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" From 5eacce91748f0246b9125ad10e7745d6aadbc97f Mon Sep 17 00:00:00 2001 From: Emily Rohrbough Date: Thu, 8 Dec 2022 13:39:49 -0600 Subject: [PATCH 04/13] run ci --- packages/example/.gitignore | 2 +- .../example/cypress/fixtures/example.json | 5 ---- packages/example/cypress/plugins/index.js | 22 ---------------- packages/example/cypress/support/commands.js | 25 ------------------- packages/example/cypress/support/component.js | 20 --------------- packages/example/cypress/support/e2e.js | 20 --------------- 6 files changed, 1 insertion(+), 93 deletions(-) delete mode 100644 packages/example/cypress/fixtures/example.json delete mode 100644 packages/example/cypress/plugins/index.js delete mode 100644 packages/example/cypress/support/commands.js delete mode 100644 packages/example/cypress/support/component.js delete mode 100644 packages/example/cypress/support/e2e.js diff --git a/packages/example/.gitignore b/packages/example/.gitignore index 2bf5251dc88e..d9e3fa0c620d 100644 --- a/packages/example/.gitignore +++ b/packages/example/.gitignore @@ -2,4 +2,4 @@ cypress-example-kitchensink # ignore cypress folder # it is copied from cypress-example-kitchensink at build -cypress \ No newline at end of file +cypress/e2e \ No newline at end of file diff --git a/packages/example/cypress/fixtures/example.json b/packages/example/cypress/fixtures/example.json deleted file mode 100644 index 02e4254378e9..000000000000 --- a/packages/example/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/packages/example/cypress/plugins/index.js b/packages/example/cypress/plugins/index.js deleted file mode 100644 index 59b2bab6e4e6..000000000000 --- a/packages/example/cypress/plugins/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -/** - * @type {Cypress.PluginConfig} - */ -// eslint-disable-next-line no-unused-vars -module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -} diff --git a/packages/example/cypress/support/commands.js b/packages/example/cypress/support/commands.js deleted file mode 100644 index 119ab03f7cda..000000000000 --- a/packages/example/cypress/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) diff --git a/packages/example/cypress/support/component.js b/packages/example/cypress/support/component.js deleted file mode 100644 index 5e450a7b1a4a..000000000000 --- a/packages/example/cypress/support/component.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/component.js 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 -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/packages/example/cypress/support/e2e.js b/packages/example/cypress/support/e2e.js deleted file mode 100644 index d1dd1353e812..000000000000 --- a/packages/example/cypress/support/e2e.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/e2e.js 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 -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') From e67220fee68104508084c05ef088533deeb7b225 Mon Sep 17 00:00:00 2001 From: Emily Rohrbough Date: Thu, 8 Dec 2022 15:14:26 -0600 Subject: [PATCH 05/13] fix graphql references --- .github/workflows/trigger_circleci.yml | 108 +++++++++++++++++- .gitignore | 1 - .../scaffold/ScaffoldGeneratorStepOne.vue | 10 +- packages/example/bin/build.js | 2 +- 4 files changed, 112 insertions(+), 9 deletions(-) diff --git a/.github/workflows/trigger_circleci.yml b/.github/workflows/trigger_circleci.yml index 1386ec551beb..f3a098da4af5 100644 --- a/.github/workflows/trigger_circleci.yml +++ b/.github/workflows/trigger_circleci.yml @@ -8,9 +8,68 @@ on: jobs: main: - name: Trigger CircleCi Pipeline when PR is ready for review + name: Trigger CircleCi Pipeline runs-on: ubuntu-latest steps: + - name: Determine whether or not to trigger CircleCi + shell: bash + env: + CIRCLE_TOKEN: ${{ secrets.CIRCLE_TOKEN }} + run: | + if [[ "${CIRCLE_TOKEN}" == "" ]]; then + echo "The CIRCLE_TOKEN is unset. Cannot trigger pipeline..." + exit 1; + fi + + # arguments: $1 - branch; $2 workflows + trigger_build () { + echo "Triggering CircleCi pipeline for $1" + + response=$(curl -X POST https://circleci.com/api/v2/project/github/cypress-io/cypress/pipeline \ + --header "Circle-Token:$CIRCLE_TOKEN" \ + --header "content-type:application/json" \ + --data "{\"branch\":\"$1\"}" \ + --silent + ) + + echo "$response" + + if [ "$(jq 'has("message")' <<< $response )" == "true" ]; then + echo "Error triggering pipeline..." + exit 1; + fi + } + + + if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then + echo "Always run CI for develop and for release candidate branches." + exit 0 + fi + + LAST_COMMIT_MESSAGE=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commits/${CIRCLE_BRANCH}" | jq '.commit.message') + + if [[ "$LAST_COMMIT_MESSAGE" =~ "run ci" ]]; then + echo "Always run CI when the commit message includes 'run ci'." + exit 0 + fi + + TRIGGER_INSTRUCTIONS="to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI." + + if [ ! -z "${CIRCLE_PULL_REQUEST##*/}" ]; then + DRAFT=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PULL_REQUEST##*/}" | jq '.draft') + + if [[ "${DRAFT}" == true ]]; then + echo "Skipping CI; PR is in draft - $TRIGGER_INSTRUCTIONS" + exit 0 + fi + + echo "Always run CI for PR that is ready for review." + exit 0 + fi + + echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS" + exit 0 + - if: ${{ github.event.pull_request.draft == false }} shell: bash env: @@ -23,9 +82,54 @@ jobs: exit 1; fi + echo "Always run CI for PR that is ready for review." + echo " - base org & repo: $GITHUB_HEAD_REF" + echo " - branch: $BRANCH" + echo " - pull request id: $PULL_ID" + + BRANCH="$GITHUB_HEAD_REF" + + if [[ "$BASE_ORG_AND_REPO" !== "" && "$BASE_ORG_AND_REPO" != "cypress-io/cypress" ]]; then + echo "Triggering CircleCi pipeline for outside contributor." + BRANCH="pull/$PULL_ID/head" + fi + + echo "Triggering CircleCi pipeline for $BRANCH" + + response=$(curl -X POST https://circleci.com/api/v2/project/github/cypress-io/cypress/pipeline \ + --header "Circle-Token:$CIRCLE_TOKEN" \ + --header "content-type:application/json" \ + --data "{\"branch\":\"$BRANCH\"}" \ + --silent + ) + + echo "$response" + + if [ "$(jq 'has("message")' <<< $response )" == "true" ]; then + echo "Error triggering pipeline..." + exit 1; + fi + - if: ${{ github.event.pull_request.draft == true }} + shell: bash + env: + CIRCLE_TOKEN: ${{ secrets.CIRCLE_TOKEN }} + BASE_ORG_AND_REPO: ${{ github.event.pull_request.head.full_name }} + PULL_ID: ${{ github.event.pull_request.number }} + TRIGGER_INSTRUCTIONS: "to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI." + run: | + if [[ "${CIRCLE_TOKEN}" == "" ]]; then + echo "The CIRCLE_TOKEN is unset. Cannot trigger pipeline..." + exit 1; + fi + + echo "Determining if CI should run..." + echo " - base org & repo: $GITHUB_HEAD_REF" + echo " - branch: $BRANCH" + echo " - pull request id: $PULL_ID" + BRANCH="$GITHUB_HEAD_REF" - if [[ "$BASE_ORG_AND_REPO" != "cypress-io/cypress" ]]; then + if [[ "$BASE_ORG_AND_REPO" !== "" && "$BASE_ORG_AND_REPO" != "cypress-io/cypress" ]]; then echo "Triggering CircleCi pipeline for outside contributor." BRANCH="pull/$PULL_ID/head" fi diff --git a/.gitignore b/.gitignore index ce0f3b177ba0..5c3fd1f62b51 100644 --- a/.gitignore +++ b/.gitignore @@ -48,7 +48,6 @@ npm/**/cypress/screenshots # from example packages/example/app packages/example/build -packages/example/cypress/integration # from frontend-shared packages/frontend-shared/cypress/e2e/.projects diff --git a/packages/app/src/specs/generators/scaffold/ScaffoldGeneratorStepOne.vue b/packages/app/src/specs/generators/scaffold/ScaffoldGeneratorStepOne.vue index 548519c60d0c..70b776d097c2 100644 --- a/packages/app/src/specs/generators/scaffold/ScaffoldGeneratorStepOne.vue +++ b/packages/app/src/specs/generators/scaffold/ScaffoldGeneratorStepOne.vue @@ -56,7 +56,7 @@