diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..04179d5018 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto + +*.json text eol=lf diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 628489c2b0..e6b4a1a06f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -649,7 +649,7 @@ Below are some guidelines Cypress uses when reviewing dependency updates. ## Deployment -We will try to review and merge pull requests quickly. If you want to know our build process or build your own Cypress binary, read [DEPLOY.md](./DEPLOY.md). +We will try to review and merge pull requests quickly. If you want to know our build process or build your own Cypress binary, read [the "Release Process" guide](./guides/release-process.md). Independent packages are deployed immediately upon being merged into master. You can read more [above](#independent-packages-ci-workflow). diff --git a/__snapshots__/bump-spec.js b/__snapshots__/bump-spec.js index 6158c9de68..f004f1bfdd 100644 --- a/__snapshots__/bump-spec.js +++ b/__snapshots__/bump-spec.js @@ -1,12 +1,12 @@ exports['list of all projects'] = [ { "repo": "cypress-io/cypress-test-tiny", - "provider": "appVeyor", + "provider": "circle", "platform": "win32" }, { "repo": "cypress-io/cypress-test-example-repos", - "provider": "appVeyor", + "provider": "circle", "platform": "win32" }, { diff --git a/__snapshots__/packages-spec.js b/__snapshots__/packages-spec.js index 861c2e4248..bed43f383f 100644 --- a/__snapshots__/packages-spec.js +++ b/__snapshots__/packages-spec.js @@ -27,7 +27,6 @@ exports['packages can copy files from package.json 1'] = { } } - exports['transformRequires can find and replace symlink requires 1'] = { "[cwd]": { "build": { diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 456163e187..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,105 +0,0 @@ -branches: - only: - - master - - develop - - windows-code-signing - - 10.0-release - - /win*/ - -# https://www.appveyor.com/docs/lang/nodejs-iojs/ -environment: - # use matching version of Node.js - nodejs_version: "16.5.0" - # encode secure variables which will NOT be used - # in pull requests - # https://www.appveyor.com/docs/build-configuration/#secure-variables - # the variables can be encrypted at - # https://ci.appveyor.com/tools/encrypt - ci_json: - secure: uOM7Bj+6MfQA/wiUzA4MolZDlcdhIqrOWLN0LdR+Lg4olc1onF3IpWfRf+3B6Q5uT98OTnIU71OOqSRY7inGQg== - # for uploading built binary to S3 bucket - aws_credentials_json: - secure: ttGzd2/rW+i8H+pozcFxzZKU07B5INL8+LjD4vCOKes+tI6EaKhrLvAQ9xT7r+e1p8My8f4LrqvT+i37kbRCUPY4DHmUgagj3aj0OghsT0eX/Vr/6T4v1yndB7SX7FnG07eVcGb63r9f5kT7xu7ElJ9WXh1Ok5K69W0zDPsa1RGCCYqsTi4tH2h5EAZwjY1b - # CDN control - CF_TOKEN: - secure: nVGxcWxXGvrT621HmgMf9Mwm84dqo+cKHZj94OvyyWEGIZOJJkbWHsD/l2/r4a6Y - CF_ZONEID: - secure: SrZnd4BYW9PILEEi7y9VyXuC16C+qMEDT3QuV1PZZJa47TRkjcaYpAXhAHz0j0jT - # authenticate as Cypress bot when posting commit status checks - GH_APP_ID: - secure: oR0RVDbv6GKej4wwjkz7Zw== - GH_INSTALLATION_ID: - secure: tAoqu4zIgZUxOfW0u9YQgw== - GH_PRIVATE_KEY: - secure: msLmlIBnkNovqrqTeCqa7ZPjETyS8Xn4JLuiRMWYK7gZBTO66pNnFaoeqwPFwH+ooO0cDFhAOPTToLisgTLXCo4hnw38zuBuKq+ywCh5mtk5uZn4x4F8G2XyRLD/ViZm+VuD2yZzaTWF11upDqC4xbXDe32yD6OSLKhA5ms5F5ke83zEuWSLTqVVCIpVH12rVTJHl3QHaWPwZbBBE3SFN8D6uiclvI06y3pEg2bVShU8YqlwearYTRuErsYXNCUmT0SrDd2kHznlYf08edQDHpydnQvvTViZMgomvYp5wDCXFD+/FxtTMuTptJFpspirXL8w/xjYy1/JaTd/K01oUUD2Xwl/v0cS28OpdcraETyrQxQhEgTCXfg9ONbZ5mRvQlkaRROaTqDSGMmEPs4N91zarpA7RLxu7PPvxXQcbDW4GiJvH5BhVWu8lY/QBZsr8It1dhLYSzTP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Q36g6ItCo7vLQAq+rgU99IUyQROOGXMUgK/8umL71oijA9dht0LmH9E7EGwih0WuLO2SndovTJODDfK9YrRTEocbo3B9S05O4fpGoQ32TK99mXjoQdlyxd/dn9Q9uDD27u/fGgUoYdt9VzAIigbRIQuRx430n33V0ZyXv90QuD4ESOLxVI1vnLj6JKAS4PGRz66rouYG6U+1syDWpf5Y6DzC/2KOfdLPwmuwjMQxuhf+6+tGeJbeotNX/eJF0LkRfyieRwEGKxIo0PaxdmVwsF7vKR6ZnOpr5BuLm/+44Rg3bQdJ4bcRW6i6dIhOyHWniLvsAPLu1NZDVN6jA13KTChhcrNnSGddjRFLekawl80E3KhG1p+KvItIZX3kzG4QjJ - CSC_KEY_PASSWORD: - secure: GiXelhGGKXKUNW6T7ptKUw== - CSC_LINK: - secure: 9uSZwUYwcdZejLTpGpySd6t9JSL1Hw3iTvb4T2HZrx6iKd5DSR7AN6A7lS5ThTZ6g1JNSypSHRwDeC1Z5xkP8QEIjDqKjyNrqC19gCiSMrpdjjIR8Y8upIISrDBWjOiI - -platform: - - x64 - -# https://www.appveyor.com/docs/build-cache/ -# hmm, seems there is NPM on windows problem -# with installing over cached folder -# https://github.com/npm/npm/issues/17747 -# cache: -# - node_modules -> yarn.lock -# - '%LOCALAPPDATA%/Yarn -> yarn.lock' -# # todo: cache node_modules in each package - -# Install scripts. (runs after repo cloning) -install: - # it is not a given that AppVeyor has the exact version of Node we need predownloaded - # see https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs - - ps: Update-NodeJsInstallation $env:nodejs_version $env:platform - # - ps: Install-Product node $env:nodejs_version $env:platform - # upgrade npm - - yarn global add @bahmutov/print-env@1 - # Output useful info for debugging. - - node --version - - node --print process.arch - - yarn --version - # prints all public variables relevant to the build - - print-env Platform - - yarn check-node-version - - print-env APPVEYOR - # prints if we have sensitive variables that start with a prefix GH - # which are used to trigger other projects - # ignore errors - forked pull requests will NOT have these variables set - - has-env GH || true - # clean cache to prevent install permission issues - - yarn cache clean - - yarn --frozen-lockfile || yarn --frozen-lockfile || yarn --frozen-lockfile - - yarn build-prod - - .\node_modules\.bin\print-arch - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - # beware of echo-ing environment variables that may have batch syntax (e.g. commit messages) - - node --version - - yarn --version - - 7z - - echo *** System info *** - - node cli/bin/cypress info --dev - - # make sure mocha runs - - yarn test-mocha - # make sure our snapshots are compared correctly - # - npm run test-mocha-snapshot - # the other larger tests - - echo *** Building Windows NPM package *** - - yarn get-next-version --npm - - cd cli - - yarn - - yarn build - - cd build - - yarn pack - - cd ../.. - - - node ./scripts/win-appveyor-build.js - -# Don't actually build. -build: off diff --git a/circle.yml b/circle.yml index a6963abb23..db59760ef4 100644 --- a/circle.yml +++ b/circle.yml @@ -1,17 +1,5 @@ version: 2.1 -# usually we don't build Mac app - it takes a long time -# but sometimes we want to really confirm we are doing the right thing -# so just add your branch to the list here to build and test on Mac -macBuildFilters: &macBuildFilters - filters: - branches: - only: - - develop - - 10.0-release - - tgriesser/chore/fix-release - - renovate/cypress-request-2.x - defaults: &defaults parallelism: 1 working_directory: ~/cypress @@ -19,13 +7,9 @@ defaults: &defaults executor: type: executor default: cy-doc - is-mac: + only-cache-for-root-user: type: boolean default: false - arch: - type: enum - default: 'linux' - enum: ['linux', 'darwin'] executor: <> environment: ## set specific timezone @@ -39,14 +23,38 @@ defaults: &defaults LINES: 24 # filters and requires for testing binary with Firefox -onlyMainBranches: &onlyMainBranches +mainBuildFilters: &mainBuildFilters filters: branches: only: - develop - 10.0-release - requires: - - create-build-artifacts + +# usually we don't build Mac app - it takes a long time +# but sometimes we want to really confirm we are doing the right thing +# so just add your branch to the list here to build and test on Mac +macWorkflowFilters: &mac-workflow-filters + when: + or: + - equal: [ develop, << pipeline.git.branch >> ] + - equal: [ tgriesser/fix/patch-resolutions, << pipeline.git.branch >> ] + - equal: [ renovate/cypress-request-2.x, << pipeline.git.branch >> ] + - matches: + pattern: "-release$" + value: << pipeline.git.branch >> + +windowsWorkflowFilters: &windows-workflow-filters + when: + or: + - equal: [ master, << pipeline.git.branch >> ] + - equal: [ develop, << pipeline.git.branch >> ] + - equal: [ tgriesser/fix/patch-resolutions, << pipeline.git.branch >> ] + - matches: + pattern: "-release$" + value: << pipeline.git.branch >> + - matches: + pattern: "win*" + value: << pipeline.git.branch >> executors: # the Docker image with Cypress dependencies and Chrome browser @@ -76,6 +84,18 @@ executors: environment: PLATFORM: mac + # executor to run on Windows - based off of the windows-orb default executor since it is + # not customizable enough to align with our existing setup. + # https://github.com/CircleCI-Public/windows-orb/blob/master/src/executors/default.yml + # https://circleci.com/docs/2.0/hello-world-windows/#software-pre-installed-in-the-windows-image + windows: &windows-executor + machine: + image: windows-server-2019-vs2019:stable + shell: bash.exe -eo pipefail + resource_class: windows.medium + environment: + PLATFORM: windows + commands: restore_workspace_binaries: steps: @@ -91,6 +111,7 @@ commands: steps: - attach_workspace: at: ~/ + - install-required-node - unpack-dependencies restore_cached_binary: @@ -133,14 +154,24 @@ commands: - cypress - .ssh - node_modules # contains the npm i -g modules + + install_cache_helpers_dependencies: + steps: + - run: + # Dependencies needed by circle-cache.js, before we "yarn" or unpack cached node_modules + name: Cache Helper Dependencies + working_directory: ~/ + command: npm i glob@7.1.6 fs-extra@10.0.0 minimist@1.2.5 fast-json-stable-stringify@2.1.0 unpack-dependencies: description: 'Unpacks dependencies associated with the current workflow' steps: + - install_cache_helpers_dependencies - run: name: Generate Circle Cache Key command: node scripts/circle-cache.js --action cacheKey > circle_cache_key - restore_cache: + name: Restore cache state, to check for known modules cache existence key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-test2-node-modules-cache-{{ checksum "circle_cache_key" }} - run: name: Move node_modules back from /tmp @@ -208,13 +239,11 @@ commands: caching-dependency-installer: description: 'Installs & caches the dependencies based on yarn lock & package json dependencies' parameters: - is-mac: + only-cache-for-root-user: type: boolean default: false - arch: - type: enum - enum: ['linux', 'darwin'] steps: + - install_cache_helpers_dependencies - run: name: Generate Circle Cache Key command: node scripts/circle-cache.js --action cacheKey > circle_cache_key @@ -236,13 +265,12 @@ commands: - run: name: Install Node Modules command: | - . ./scripts/load-nvm.sh - yarn --prefer-offline --frozen-lockfile --cache-folder ~/.yarn-<< parameters.arch >> + yarn --prefer-offline --frozen-lockfile --cache-folder ~/.yarn no_output_timeout: 20m - prepare-modules-cache: - dont-move: <> # we don't move, so we don't hit any issues unpacking symlinks + dont-move: <> # we don't move, so we don't hit any issues unpacking symlinks - when: - condition: <> # on mac, we don't move to /tmp since we don't need to worry about different users + condition: <> # we don't move to /tmp since we don't need to worry about different users steps: - save_cache: name: Saving node modules for root, cli, and all globbed workspace packages @@ -253,7 +281,7 @@ commands: - system-tests/node_modules - globbed_node_modules - unless: - condition: <> + condition: <> steps: - save_cache: name: Saving node modules for root, cli, and all globbed workspace packages @@ -270,80 +298,65 @@ commands: name: Save weekly yarn cache key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-test2-deps-root-weekly-{{ checksum "cache_date" }} paths: - - ~/.yarn-<< parameters.arch >> + - ~/.yarn - install-build-setup: + verify-build-setup: description: Common commands run when setting up for build or yarn install + parameters: + executor: + type: executor + default: cy-doc steps: - - run: - name: Print working folder - command: echo $PWD + - run: pwd - run: name: print global yarn cache path command: echo $(yarn global bin) - - run: - name: print Node version - command: | - . ./scripts/load-nvm.sh - echo "nvm use default" - nvm use default - node -v - run: name: print yarn version - command: yarn -v + command: yarn versions + - unless: + condition: + # stop-only does not correctly match on windows: https://github.com/bahmutov/stop-only/issues/78 + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: Stop .only + # this will catch ".only"s in js/coffee as well + command: yarn stop-only-all - run: - name: check Node version - command: | - . ./scripts/load-nvm.sh - yarn check-node-version - - ## make sure the TERM is set to 'xterm' in node (Linux only) - ## else colors (and tests) will fail - ## See the following information - ## * http://andykdocs.de/development/Docker/Fixing+the+Docker+TERM+variable+issue - ## * https://unix.stackexchange.com/questions/43945/whats-the-difference-between-various-term-variables - - run: - name: Check terminal - command: | - . ./scripts/load-nvm.sh - yarn check-terminal - - run: - name: Stop .only - command: | - . ./scripts/load-nvm.sh - yarn stop-only-all - - run: - # Deps needed by circle-cache.js, before we "yarn" or unpack cached node_modules - name: Cache Helper Deps - working_directory: ~/ - command: npm i globby@11.0.4 fs-extra@10.0.0 minimist@1.2.5 fast-json-stable-stringify@2.1.0 + name: Check terminal variables + ## make sure the TERM is set to 'xterm' in node (Linux only) + ## else colors (and tests) will fail + ## See the following information + ## * http://andykdocs.de/development/Docker/Fixing+the+Docker+TERM+variable+issue + ## * https://unix.stackexchange.com/questions/43945/whats-the-difference-between-various-term-variables + command: yarn check-terminal install-required-node: # https://discuss.circleci.com/t/switch-nodejs-version-on-machine-executor-solved/26675/2 - description: Install Node version - parameters: - version: - type: string - default: "" + description: Install Node version matching .node-version steps: - run: - name: Install NVM + Node - # TODO: determine why we get the missing .nvmrc file error + name: Install Node command: | - export NODE_VERSION=<> - export NODE_VERSION=${NODE_VERSION:-$(cat .node-version)} - echo "Installing Node $NODE_VERSION" - echo $NODE_VERSION > .node-version - cp .node-version .nvmrc - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash - . ./scripts/load-nvm.sh - echo "before nvm install" - nvm install $NODE_VERSION - echo "before nvm use" - nvm use $NODE_VERSION - echo "before nvm alias default" - nvm alias default $NODE_VERSION - node --version + node_version=$(cat .node-version) + [ -s "${HOME}/.nvm/nvm.sh" ] && \. "${HOME}/.nvm/nvm.sh" # This loads nvm + if ! type nvm > /dev/null; then + echo "Installing NVM" + curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.0/install.sh | bash + [ -s "${HOME}/.nvm/nvm.sh" ] && \. "${HOME}/.nvm/nvm.sh" # This loads nvm + fi + echo "Installing Node $node_version" + nvm install ${node_version} + echo "Using Node $node_version" + nvm use ${node_version} + [[ $PLATFORM != 'windows' ]] && nvm alias default ${node_version} || sleep 2s + echo "Installing Yarn" + npm install yarn -g # ensure yarn is installed with the correct node engine + yarn check-node-version + - run: + name: Check Node + command: yarn check-node-version install-chrome: description: Install Google Chrome @@ -427,7 +440,6 @@ commands: - run: command: | cmd=$([[ <> == 'true' ]] && echo 'yarn percy exec --parallel -- --') || true - CYPRESS_KONFIG_ENV=production \ CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \ PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_ID \ @@ -590,7 +602,7 @@ commands: name: "Cloning test project: <>" command: | git clone --depth 1 --no-single-branch https://github.com/cypress-io/<>.git /tmp/<> - cd /tmp/<> && (git checkout $(node ./scripts/get-next-version) || true) + cd /tmp/<> && (git checkout $(node ./scripts/get-next-version.js) || true) - when: condition: <> steps: @@ -871,58 +883,48 @@ commands: path: /tmp/<>/cypress/videos - store-npm-logs - wait-on-circle-jobs: - description: Polls certain Circle CI jobs until they finish - parameters: - job-names: - description: comma separated list of circle ci job names to wait for - type: string - steps: - - run: - name: "Waiting on Circle CI jobs: <>" - command: node ./scripts/wait-on-circle-jobs.js --job-names="<>" build-binary: steps: - run: - name: Check environment variables before code sign (if on Mac) + name: Check environment variables before code sign (if on Mac/Windows) # NOTE - # our Mac code sign works via electron-builder + # our code sign works via electron-builder # by default, electron-builder will NOT sign app built in a pull request # even our internal one (!) # Usually this is not a problem, since we only build and test binary # built on "develop" and "master" branches - # but if you need to really build and sign a Mac binary in a PR + # but if you need to really build and sign a binary in a PR # set variable CSC_FOR_PULL_REQUEST=true command: | set -e - if [[ "$OSTYPE" == "darwin"* ]]; then + NEEDS_CODE_SIGNING=`node -p 'process.platform === "win32" || process.platform === "darwin"'` + if [[ "$NEEDS_CODE_SIGNING" == "true" ]]; then + echo "Checking for required environment variables..." if [ -z "$CSC_LINK" ]; then echo "Need to provide environment variable CSC_LINK" - echo "with base64 encoded certificate .p12 file" + echo "with base64 encoded certificate .p12 file" exit 1 fi if [ -z "$CSC_KEY_PASSWORD" ]; then echo "Need to provide environment variable CSC_KEY_PASSWORD" - echo "with password for unlocking certificate .p12 file" + echo "with password for unlocking certificate .p12 file" exit 1 fi + echo "Succeeded." else - echo "Not Mac platform, skipping code sign setup" + echo "Not code signing for this platform" fi - - install-required-node - run: environment: DEBUG: electron-builder,electron-osx-sign* # notarization on Mac can take a while no_output_timeout: "45m" command: | - . ./scripts/load-nvm.sh node --version yarn binary-build --platform $PLATFORM --version $(node ./scripts/get-next-version.js) - run: name: Zip the binary command: | - . ./scripts/load-nvm.sh yarn binary-zip --platform $PLATFORM - store-npm-logs - persist_to_workspace: @@ -946,6 +948,10 @@ commands: - cypress/binary-url.json build-cypress-npm-package: + parameters: + executor: + type: executor + default: cy-doc steps: - run: name: bump NPM version @@ -953,26 +959,26 @@ commands: - run: name: build NPM package command: | - . ./scripts/load-nvm.sh yarn build --scope cypress - run: command: ls -la types working_directory: cli/build - - run: - name: list NPM package contents - command: yarn workspace cypress size + - unless: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: list NPM package contents + command: yarn workspace cypress size - run: name: pack NPM package working_directory: cli/build - command: yarn pack --filename cypress.tgz + command: yarn pack --filename ../../cypress.tgz - run: name: list created NPM package - working_directory: cli/build command: ls -l - - run: cp cli/build/cypress.tgz cypress.tgz - store-npm-logs - run: pwd - - run: ls -l - persist_to_workspace: root: ~/ paths: @@ -1000,25 +1006,38 @@ jobs: ## skips ahead to the build step, otherwise installs and caches the node_modules node_modules_install: <<: *defaults - resource_class: medium+ + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium + resource_class: << parameters.resource_class >> steps: - checkout - install-required-node - - install-build-setup + - verify-build-setup: + executor: << parameters.executor >> + - persist_to_workspace: + root: ~/ + paths: + - cypress + - .nvm # mac / linux + - ProgramData/nvm # windows - caching-dependency-installer: - arch: << parameters.arch >> - is-mac: <> + only-cache-for-root-user: <> - store-npm-logs ## restores node_modules from previous step & builds if first step skipped build: <<: *defaults - resource_class: medium+ + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium+ + resource_class: << parameters.resource_class >> steps: - - checkout - - install-required-node - - install-build-setup - - unpack-dependencies + - restore_cached_workspace - run: name: Top level packages command: yarn list --depth=0 || true @@ -1029,12 +1048,9 @@ jobs: <<: *defaults steps: - restore_cached_workspace - - install-required-node - ## this will catch ".only"s in js/coffee as well - run: name: Linting ๐Ÿงน command: | - . ./scripts/load-nvm.sh git clean -df yarn lint - run: @@ -1074,16 +1090,6 @@ jobs: echo "This is an external PR, cannot access other services" circleci-agent step halt fi - - wait-on-circle-jobs: - job-names: > - cli-visual-tests, - runner-integration-tests-chrome, - runner-ct-integration-tests-chrome, - reporter-integration-tests, - run-frontend-shared-component-tests-chrome, - run-app-integration-tests-chrome, - run-launchpad-integration-tests-chrome, - run-launchpad-component-tests-chrome, - run: yarn percy build:finalize cli-visual-tests: @@ -1112,24 +1118,41 @@ jobs: unit-tests: <<: *defaults - resource_class: medium + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium + resource_class: << parameters.resource_class >> parallelism: 1 steps: - restore_cached_workspace # make sure mocha runs - run: yarn test-mocha - # test binary build code - - run: yarn test-scripts - # make sure our snapshots are compared correctly - - run: yarn test-mocha-snapshot - # make sure packages with TypeScript can be transpiled to JS - - run: yarn lerna run build-prod --stream - # run unit tests from each individual package - - run: yarn test - # run type checking for each individual package - - run: yarn lerna run types - - verify-mocha-results: - expectedResultCount: 9 + - when: + condition: + # several snapshots fails for windows due to paths. + # until these are fixed, run the tests that are working. + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: yarn test-scripts scripts/**/*spec.js + # make sure our snapshots are compared correctly + - run: yarn test-mocha-snapshot + - unless: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: yarn test-scripts + # make sure our snapshots are compared correctly + - run: yarn test-mocha-snapshot + # make sure packages with TypeScript can be transpiled to JS + - run: yarn lerna run build-prod --stream + # run unit tests from each individual package + - run: yarn test + # run type checking for each individual package + - run: yarn lerna run types + - verify-mocha-results: + expectedResultCount: 9 - store_test_results: path: /tmp/cypress # CLI tests generate HTML files with sample CLI command output @@ -1453,6 +1476,7 @@ jobs: - run: name: Run tests command: yarn workspace @cypress/webpack-dev-server test + npm-vite-dev-server: <<: *defaults steps: @@ -1529,9 +1553,6 @@ jobs: <<: *defaults steps: - restore_cached_workspace - - restore_cache: - name: Restore yarn cache - key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-npm-angular-babel-cache - run: name: Build command: yarn workspace @cypress/angular build @@ -1551,9 +1572,6 @@ jobs: resource_class: medium steps: - restore_cached_workspace - - restore_cache: - name: Restore yarn cache - key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-npm-react-babel-cache - run: name: Build command: yarn workspace @cypress/react build @@ -1597,26 +1615,19 @@ jobs: <<: *defaults steps: - restore_cached_workspace - - install-required-node: - version: "16.10" - run: name: Build + Install command: | - . ../../scripts/load-nvm.sh yarn workspace @cypress/schematic build:all - yarn policies set-version 1.19.0 - yarn add --dev @angular/cli working_directory: npm/cypress-schematic - run: name: Launch command: | - . ../../scripts/load-nvm.sh yarn launch:test working_directory: npm/cypress-schematic - run: name: Run unit tests command: | - . ../../scripts/load-nvm.sh yarn test working_directory: npm/cypress-schematic - store-npm-logs @@ -1632,16 +1643,21 @@ jobs: create-build-artifacts: <<: *defaults - resource_class: medium+ - shell: /bin/bash --login + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium+ + resource_class: << parameters.resource_class >> steps: - restore_cached_workspace - build-binary - - build-cypress-npm-package + - build-cypress-npm-package: + executor: << parameters.executor >> - run: name: Check current branch to persist artifacts command: | - if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "10.0-release" && "$CIRCLE_BRANCH" != "renovate/cypress-request-2.x" ]]; then + if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "10.0-release" && "$CIRCLE_BRANCH" != "renovate/cypress-request-2.x" && "$CIRCLE_BRANCH" != "tgriesser/fix/patch-resolutions" ]]; then echo "Not uploading artifacts or posting install comment for this branch." circleci-agent step halt fi @@ -1676,7 +1692,6 @@ jobs: - run: name: Run Kitchensink example project command: | - . ./scripts/load-nvm.sh yarn cypress:run --project /tmp/cypress-example-kitchensink - store_artifacts: path: /tmp/cypress-example-kitchensink/cypress/screenshots @@ -1684,12 +1699,13 @@ jobs: path: /tmp/cypress-example-kitchensink/cypress/videos - store-npm-logs - "test-kitchensink-against-staging": + test-kitchensink-against-staging: <<: *defaults resource_class: medium steps: - clone-repo-and-checkout-branch: repo: cypress-example-kitchensink + - install-required-node - run: name: Install prod dependencies command: yarn --production @@ -1709,7 +1725,7 @@ jobs: yarn cypress:run --project /tmp/cypress-example-kitchensink --record - store-npm-logs - "test-against-staging": + test-against-staging: <<: *defaults resource_class: medium steps: @@ -1724,7 +1740,7 @@ jobs: yarn cypress:run --project /tmp/cypress-test-tiny --record - store-npm-logs - "test-binary-and-npm-against-other-projects": + test-binary-and-npm-against-other-projects: <<: *defaults resource_class: medium steps: @@ -1761,7 +1777,7 @@ jobs: --provider circle - store-npm-logs - "test-npm-module-and-verify-binary": + test-npm-module-and-verify-binary: <<: *defaults steps: - restore_cached_workspace @@ -1957,7 +1973,7 @@ jobs: command: npx cypress run # install NPM + binary zip and run against staging API - "test-binary-against-staging": + test-binary-against-staging: <<: *defaults steps: - restore_workspace_binaries @@ -1978,7 +1994,7 @@ jobs: $(yarn bin)/cypress run --record - store-npm-logs - "test-binary-against-recipes-firefox": + test-binary-against-recipes-firefox: <<: *defaults steps: - test-binary-against-repo: @@ -2006,7 +2022,7 @@ jobs: # pull_request_id: 515 # folder: examples/fundamentals__typescript - "test-binary-against-kitchensink": + test-binary-against-kitchensink: <<: *defaults resource_class: medium steps: @@ -2022,7 +2038,7 @@ jobs: repo: cypress-test-awesome-typescript-loader browser: "electron" - "test-binary-against-kitchensink-firefox": + test-binary-against-kitchensink-firefox: <<: *defaults resource_class: medium steps: @@ -2031,7 +2047,7 @@ jobs: browser: firefox pull_request_id: 510 - "test-binary-against-kitchensink-chrome": + test-binary-against-kitchensink-chrome: <<: *defaults resource_class: medium steps: @@ -2040,7 +2056,7 @@ jobs: browser: chrome pull_request_id: 510 - "test-binary-against-todomvc-firefox": + test-binary-against-todomvc-firefox: <<: *defaults resource_class: medium steps: @@ -2048,7 +2064,7 @@ jobs: repo: cypress-example-todomvc browser: firefox - "test-binary-against-conduit-chrome": + test-binary-against-conduit-chrome: <<: *defaults resource_class: medium steps: @@ -2058,7 +2074,7 @@ jobs: command: "npm run cypress:run" wait-on: http://localhost:3000 - "test-binary-against-api-testing-firefox": + test-binary-against-api-testing-firefox: <<: *defaults steps: - test-binary-against-repo: @@ -2066,7 +2082,7 @@ jobs: browser: firefox command: "npm run cy:run" - "test-binary-against-piechopper-firefox": + test-binary-against-piechopper-firefox: <<: *defaults resource_class: medium steps: @@ -2075,7 +2091,7 @@ jobs: browser: firefox command: "npm run cypress:run" - "test-binary-against-cypress-realworld-app": + test-binary-against-cypress-realworld-app: <<: *defaults resource_class: medium+ steps: @@ -2142,8 +2158,7 @@ jobs: linux-workflow: &linux-workflow jobs: - - node_modules_install: - arch: 'linux' + - node_modules_install - build: requires: - node_modules_install @@ -2151,14 +2166,17 @@ linux-workflow: &linux-workflow requires: - build - lint: - name: Linux lint + name: linux-lint requires: - build - percy-finalize: context: test-runner:poll-circle-workflow required_env_var: PERCY_TOKEN # skips job if not defined (external PR) requires: - - build + - cli-visual-tests + - runner-integration-tests-chrome + - runner-ct-integration-tests-chrome + - reporter-integration-tests - lint-types: requires: - build @@ -2292,6 +2310,7 @@ linux-workflow: &linux-workflow requires: - build - check-ts + - npm-angular - npm-eslint-plugin-dev - npm-create-cypress-tests - npm-react @@ -2300,18 +2319,18 @@ linux-workflow: &linux-workflow - npm-design-system - npm-webpack-batteries-included-preprocessor - npm-webpack-preprocessor - # - npm-vite-dev-server + - npm-vite-dev-server - npm-webpack-dev-server - npm-cypress-schematic - - ui-components-integration-tests - - reporter-integration-tests - - Linux lint + - lint-types + - linux-lint + - percy-finalize - runner-ct-integration-tests-chrome - runner-integration-tests-firefox - - runner-integration-tests-chrome - runner-integration-tests-electron - driver-integration-tests-firefox - driver-integration-tests-chrome + - driver-integration-tests-chrome-beta - driver-integration-tests-electron - system-tests-non-root - system-tests-firefox @@ -2320,19 +2339,16 @@ linux-workflow: &linux-workflow - server-performance-tests - server-integration-tests - server-unit-tests + - test-kitchensink + - ui-components-integration-tests - unit-tests - unit-tests-release - - cli-visual-tests # various testing scenarios, like building full binary # and testing it on a real project - test-against-staging: context: test-runner:record-tests - filters: - branches: - only: - - develop - - 10.0-release + <<: *mainBuildFilters requires: - build - test-kitchensink: @@ -2340,11 +2356,7 @@ linux-workflow: &linux-workflow - build - test-kitchensink-against-staging: context: test-runner:record-tests - filters: - branches: - only: - - develop - - 10.0-release + <<: *mainBuildFilters requires: - build - create-build-artifacts: @@ -2390,53 +2402,51 @@ linux-workflow: &linux-workflow - create-build-artifacts - test-binary-and-npm-against-other-projects: context: test-runner:trigger-test-jobs - filters: - branches: - only: - - develop - - 10.0-release + <<: *mainBuildFilters requires: - create-build-artifacts - test-npm-module-and-verify-binary: - filters: - branches: - only: - - develop - - 10.0-release + <<: *mainBuildFilters requires: - create-build-artifacts - test-binary-against-staging: context: test-runner:record-tests - filters: - branches: - only: - - develop - - 10.0-release + <<: *mainBuildFilters requires: - create-build-artifacts - test-binary-against-kitchensink-chrome: - <<: *onlyMainBranches + <<: *mainBuildFilters + requires: + - create-build-artifacts # Re-enable when the cypress-example-conduit-app project is fixed. # https://github.com/cypress-io/cypress-example-conduit-app/issues/346 # - test-binary-against-conduit-chrome: - # <<: *onlyMainBranches + # <<: *mainBuildFilters + # requires: + # - create-build-artifacts - test-binary-against-recipes-firefox: - <<: *onlyMainBranches + <<: *mainBuildFilters + requires: + - create-build-artifacts - test-binary-against-kitchensink-firefox: - <<: *onlyMainBranches + <<: *mainBuildFilters + requires: + - create-build-artifacts - test-binary-against-todomvc-firefox: - <<: *onlyMainBranches + <<: *mainBuildFilters + requires: + - create-build-artifacts - test-binary-against-api-testing-firefox: - <<: *onlyMainBranches + <<: *mainBuildFilters + requires: + - create-build-artifacts - test-binary-against-piechopper-firefox: - <<: *onlyMainBranches + <<: *mainBuildFilters + requires: + - create-build-artifacts - test-binary-against-cypress-realworld-app: - filters: - branches: - only: - - develop - - 10.0-release + <<: *mainBuildFilters requires: - create-build-artifacts @@ -2445,6 +2455,7 @@ linux-workflow: &linux-workflow executor: non-root-docker-user requires: - create-build-artifacts + - test-binary-as-specific-user: name: "test binary as a root user" requires: @@ -2455,21 +2466,18 @@ mac-workflow: &mac-workflow - node_modules_install: name: darwin-node-modules-install executor: mac - arch: darwin - is-mac: true - <<: *macBuildFilters + only-cache-for-root-user: true - build: name: darwin-build executor: mac + resource_class: medium requires: - darwin-node-modules-install - <<: *macBuildFilters - lint: name: darwin-lint executor: mac - <<: *macBuildFilters requires: - darwin-build @@ -2482,21 +2490,19 @@ mac-workflow: &mac-workflow - test-runner:upload - test-runner:commit-status-checks executor: mac - <<: *macBuildFilters + resource_class: medium requires: - darwin-build - test-kitchensink: name: darwin-test-kitchensink executor: mac - <<: *macBuildFilters requires: - darwin-build - test-binary-against-kitchensink: name: darwin-test-binary-against-kitchensink executor: mac - <<: *macBuildFilters requires: - darwin-create-build-artifacts @@ -2504,11 +2510,6 @@ mac-workflow: &mac-workflow context: test-runner:record-tests name: darwin-test-binary-against-staging executor: mac - filters: - branches: - only: - - develop - - 10.0-release requires: - darwin-create-build-artifacts @@ -2516,16 +2517,54 @@ mac-workflow: &mac-workflow context: test-runner:trigger-test-jobs name: darwin-test-binary-and-npm-against-other-projects executor: mac - filters: - branches: - only: - - develop - - 10.0-release requires: - darwin-create-build-artifacts +windows-workflow: &windows-workflow + jobs: + - node_modules_install: + name: windows-node-modules-install + executor: windows + resource_class: windows.medium + only-cache-for-root-user: true + + - build: + name: windows-build + executor: windows + resource_class: windows.medium + requires: + - windows-node-modules-install + + - lint: + name: windows-lint + executor: windows + requires: + - windows-build + + - unit-tests: + name: windows-unit-tests + executor: windows + resource_class: windows.medium + requires: + - windows-build + + - create-build-artifacts: + name: windows-create-build-artifacts + executor: windows + resource_class: windows.medium + context: + - test-runner:sign-windows-binary + - test-runner:upload + - test-runner:commit-status-checks + requires: + - windows-build + workflows: linux: <<: *linux-workflow mac: <<: *mac-workflow + <<: *mac-workflow-filters + windows: + <<: *windows-workflow + <<: *windows-workflow-filters diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index ef5d7c3f4d..1567c92a9a 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -2209,12 +2209,9 @@ declare namespace Cypress { * @see https://on.cypress.io/writefile ``` cy.writeFile('path/to/message.txt', 'Hello World') - .then((text) => { - expect(text).to.equal('Hello World') // true - }) ``` */ - writeFile(filePath: string, contents: C, encoding: Encodings): Chainable + writeFile(filePath: string, contents: FileContents, encoding: Encodings): Chainable /** * Write to a file with the specified encoding and contents. * @@ -2223,12 +2220,10 @@ declare namespace Cypress { cy.writeFile('path/to/ascii.txt', 'Hello World', { flag: 'a+', encoding: 'ascii' - }).then((text) => { - expect(text).to.equal('Hello World') // true }) ``` */ - writeFile(filePath: string, contents: C, options?: Partial): Chainable + writeFile(filePath: string, contents: FileContents, options?: Partial): Chainable /** * Write to a file with the specified encoding and contents. * @@ -2238,12 +2233,10 @@ declare namespace Cypress { ``` cy.writeFile('path/to/ascii.txt', 'Hello World', 'utf8', { flag: 'a+', - }).then((text) => { - expect(text).to.equal('Hello World') // true }) ``` */ - writeFile(filePath: string, contents: C, encoding: Encodings, options?: Partial): Chainable + writeFile(filePath: string, contents: FileContents, encoding: Encodings, options?: Partial): Chainable /** * jQuery library bound to the AUT diff --git a/guides/README.md b/guides/README.md new file mode 100644 index 0000000000..4240cc4d03 --- /dev/null +++ b/guides/README.md @@ -0,0 +1,17 @@ +# Guides + +The `guides` directory contains information about specific things encountered *when contributing to the Cypress project* that fall outside the scope of `CONTRIBUTING.md`, which is more geared towards everyday development in this repo. + +For information about using Cypress for testing web applications, visit [`docs.cypress.io`](https://docs.cypress.io). + +For information related to a specific package in the monorepo, see that package's respective `README.md`. + +For general contributor information, check out [`CONTRIBUTING.md`](../CONTRIBUTING.md). + +## Table of Contents + +* [Building release artifacts](./building-release-artifacts.md) +* [Code signing](./code-signing.md) +* [Determining the next version of Cypress to be released](./next-version.md) +* [Release process](./release-process.md) +* [Testing other projects](./testing-other-projects.md) \ No newline at end of file diff --git a/guides/building-release-artifacts.md b/guides/building-release-artifacts.md new file mode 100644 index 0000000000..544cfa018e --- /dev/null +++ b/guides/building-release-artifacts.md @@ -0,0 +1,38 @@ +# Building Release Artifacts + +The `cypress` NPM package consists of two main parts: + +1. The `cypress` NPM package `.tgz` (built from [`cli`](../cli)) + * Contains the command line tool `cypress`, type definitions, and the [Module API](https://on.cypress.io/module-api). + * End users install this via NPM to the project's `node_modules`. +2. The "binary" `.zip` (built from [`packages/server`](../packages/server)) + * Contains the Electron app, `ffmpeg`, and built versions of the [`server`](../packages/server), [`desktop-gui`](../packages/desktop-gui), [`runner`](../packages/runner), [`example` project](../packages/example), and [`extension`](../packages/extension) + * Also contains all the production dependencies of the above. + * This is installed when the `cli` is installed or when `cypress install` is run, to a system cache. + +This guide has instructions for building both. + +## Building the npm package + +> :warning: Note: The steps in this section are automated in CI, and you should not need to do them yourself when going through the [release process](./release-process.md). + +Building a new npm package is two commands: + +1. Increment the version in the root `package.json` +2. `yarn build --scope cypress` + +The steps above: + +- Build the `cypress` npm package +- Transpile the code into ES5 to be compatible with the common Node versions +- Put the result into the [`cli/build`](../cli/build) folder. + +## Building the binary + +> :warning: Note: The steps in this section are automated in CI, and you should not need to do them yourself when going through the [release process](./release-process.md). + +The npm package requires a corresponding binary of the same version. In production, it will try to retrieve the binary from the Cypress CDN if it is not cached locally. + +You can build the Cypress binary locally by running `yarn binary-build`. You can use Linux to build the Cypress binary (just like it is in CI) by running `yarn binary-build` inside of `yarn docker`. + +`yarn binary-zip` can be used to zip the built binary together. \ No newline at end of file diff --git a/guides/code-signing.md b/guides/code-signing.md new file mode 100644 index 0000000000..db166d937c --- /dev/null +++ b/guides/code-signing.md @@ -0,0 +1,23 @@ +# Code Signing + +Code signing is done for the Windows and Mac distributions of Cypress when they are built in CI. + +`electron-builder` handles code signing during the `create-build-artifacts` jobs. This guide assumes that the reader is already familiar with [`electron-builder`'s Code Signing documentation](https://www.electron.build/code-signing). + +## Installing a new Mac code signing key + +Follow the directions supplied by `electron-builder`: https://www.electron.build/code-signing#travis-appveyor-and-other-ci-servers + +Set the environment variables `CSC_LINK` and `CSC_KEY_PASSWORD` in the `test-runner:sign-mac-binary` CircleCI context. + +## Installing a new Windows code signing key + +1. Obtain the private key and full certificate chain in ASCII-armored PEM format and store each in a file (`-----BEGIN PRIVATE KEY-----`, `-----BEGIN CERTIFICATE-----`) +2. Using `openssl`, convert the plaintext PEM public and private key to binary PKCS#12/PFX format and encrypt it with a real strong password. + ```shell + โžœ openssl pkcs12 -export -inkey key.pem -in cert.pem -out encrypted.pfx + Enter Export Password: + Verifying - Enter Export Password: + ``` +3. Upload the `encrypted.pfx` file to the Cypress App Google Drive and obtain a [direct download link](http://www.syncwithtech.org/p/direct-download-link-generator.html). +4. Within the `test-runner:sign-windows-binary` CircleCI context, set `CSC_LINK` to that URL and `CSC_KEY_PASSWORD` to the password. \ No newline at end of file diff --git a/guides/next-version.md b/guides/next-version.md new file mode 100644 index 0000000000..058eb3f32a --- /dev/null +++ b/guides/next-version.md @@ -0,0 +1,18 @@ +# Next Version + +When the Cypress CLI and binary are built in CI, the version number they share is determined by the script in [`/scripts/get-next-version.js`](../scripts/get-next-version.js). + +In most cases, the script will correctly determine the next version. If it needs to be overridden, the environment variable `NEXT_VERSION` can be set to the desired version (`NEXT_VERSION=1.2.3`). This is commonly desired on a release branch or when trying to force a specific major version. + +The `get-next-version.js` script follows these steps: + +1. If the environment variable `NEXT_VERSION` exists, print `NEXT_VERSION` and exit. +2. Otherwise, analyze the commits to the current branch since the last release, using semantic commit messages. Print out the calculated version. + * Only commits that touch files in `packages/*` or `cli/*` are considered. + * This is done so that commits to the `npm/` packages do not necessarily bump the CLI and binary versions. + * This project uses the [`angular` commit message style](https://gist.github.com/brianclements/841ea7bffdb01346392c/8e1f9b44d3fc7a4f2b448581071f9805f759c912). + * The prefix `fix:` will trigger a patch version bump. + * The prefix `feat:` will trigger a minor version bump. + * A commit with the footer containing `BREAKING CHANGE:` should trigger a major version bump. + +You can debug the script locally by running it using `node ./scripts/get-next-version.js`. It will analyze the commits on your current branch and print out the calculated version number. diff --git a/DEPLOY.md b/guides/release-process.md similarity index 76% rename from DEPLOY.md rename to guides/release-process.md index fb78335e11..9b4342f8cf 100644 --- a/DEPLOY.md +++ b/guides/release-process.md @@ -1,40 +1,10 @@ -# Deployment +# Release Process -These deployment procedures mainly concern the Cypress binary and `cypress` npm module. +These procedures concern the release process for the Cypress binary and `cypress` npm module. -Independent `@cypress/` packages that live inside the [`npm`](./npm) directory are automatically published to npm (with [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/)) upon being merged into master. You can read more about this in [CONTRIBUTING.md](./CONTRIBUTING.md#committing-code) +The `@cypress/`-namespaced NPM packages that live inside the [`/npm`](../npm) directory are automatically published to npm (with [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/)) upon being merged into `master`. You can read more about this in [CONTRIBUTING.md](../CONTRIBUTING.md#independent-packages-ci-workflow). -Anyone can build the binary and npm package, but you can only deploy the Cypress application and publish the npm module `cypress` if you are a member of the `cypress` npm organization. - -> :information_source: See the [publishing](#publishing) section for how to build, test and publish a -new official version of the binary and `cypress` npm package. - -## Building Locally - -### Building the npm package - -> :warning: Note: The steps in this section are automated in CI, and you should not need to do them yourself when publishing. - -Building a new npm package is very quick. - -- Increment the version in the root `package.json` -- `yarn build --scope cypress` - -The steps above: - -- Build the `cypress` npm package -- Transpile the code into ES5 to be compatible with the common Node versions -- Put the result into the [`cli/build`](./cli/build) folder. - -### Building the binary - -> :warning: Note: The steps in this section are automated in CI, and you should not need to do them yourself when publishing. - -The npm package requires a corresponding binary of the same version. In production, it will try to retrieve the binary from the Cypress CDN if it is not cached locally. - -You can build the Cypress binary locally by running `yarn binary-build`. You can use Linux to build the Cypress binary (just like it is in CI) by running `yarn binary-build` inside of `yarn docker`. - -`yarn binary-zip` can be used to zip the built binary together. +[Anyone can build the binary and npm package locally](./building-release-artifacts.md), but you can only deploy the Cypress application and publish the npm module `cypress` if you are a member of the `cypress` npm organization. ## Publishing @@ -50,10 +20,9 @@ You can build the Cypress binary locally by running `yarn binary-build`. You can ```text aws_credentials_json={"bucket":"cdn.cypress.io","folder":"desktop","key":"...","secret":"..."} ``` - - A [GitHub token](https://github.com/settings/tokens), a [CircleCI token](https://circleci.com/account/api), - and a `cypress-io` account-specific [AppVeyor token](https://ci.appveyor.com/api-keys) in `ci_json`: + - A [GitHub token](https://github.com/settings/tokens) and a [CircleCI token](https://circleci.com/account/api) in `ci_json`: ```text - ci_json={"githubToken":"...","circleToken":"...","appVeyorToken":"..."} + ci_json={"githubToken":"...","circleToken":"..."} ``` - You'll also need to put the GitHub token under its own variable and get a [ZenHub API token](https://app.zenhub.com/dashboard/tokens) for the `release-automations` step. ```text @@ -61,6 +30,11 @@ You can build the Cypress binary locally by running `yarn binary-build`. You can ZENHUB_API_TOKEN="..." ``` - The `cypress-bot` GitHub app credentials are also needed. Ask another team member who has done a deploy for those. + ```text + GITHUB_APP_CYPRESS_INSTALLATION_ID= + GITHUB_APP_ID= + GITHUB_PRIVATE_KEY= + ``` - For purging the Cloudflare cache (part of the `move-binaries` step), you'll need `CF_ZONEID` and `CF_TOKEN` set. These can be found in 1Password. If you don't have access, ask a team member who has done a deploy. ```text CF_ZONEID="..." @@ -70,16 +44,12 @@ You can build the Cypress binary locally by running `yarn binary-build`. You can ### Before Publishing a New Version -In order to publish a new `cypress` package to the npm registry, we must build and test it across multiple platforms and test projects. This makes publishing *directly* into the npm registry impossible. Instead, we have CI set up to do the following on every commit to `develop`: +In order to publish a new version of the `cypress` package to the npm registry, CI must build and test it across multiple platforms and test projects. CI is set up to do the following on every commit to `develop`: -1. Build the npm package with the new target version baked in. -2. Build the Linux/Mac binaries on CircleCI and build Windows on AppVeyor. -3. Upload the binaries and the new npm package to `cdn.cypress.io` under the "beta" folder. -4. Launch the test projects like [cypress-test-node-versions](https://github.com/cypress-io/cypress-test-node-versions) and [cypress-test-example-repos](https://github.com/cypress-io/cypress-test-example-repos) using the newly-uploaded package & binary instead of installing from the npm registry. That installation looks like this: - ```shell - export CYPRESS_INSTALL_BINARY=https://cdn.../binary///cypress.zip - npm i https://cdn.../npm///cypress.tgz - ``` +1. Build the npm package with the [next target version](./next-version.md) baked in. +2. Build the Linux, Mac & Windows binaries on CircleCI. +3. Upload the binaries and the new npm package to the AWS S3 Bucket `cdn.cypress.io` under the "beta" folder. +4. [Launch test projects](./testing-other-projects.md) using the newly-uploaded package & binary instead of installing from the npm registry. Multiple test projects are launched for each target operating system and the results are reported back to GitHub using status checks so that you can see if a change has broken real-world usage @@ -91,11 +61,11 @@ Once the `develop` branch for all test projects are reliably passing with the ne ### Steps to Publish a New Version -In the following instructions, "X.Y.Z" is used to denote the version of Cypress being published. +In the following instructions, "X.Y.Z" is used to denote the [next version of Cypress being published](./next-version.md). 1. `develop` should contain all of the changes made in `master`. However, this occasionally may not be the case. Ensure that `master` does not have any additional commits that are not on `develop` and all auto-generated pull requests designed to merge master into develop have been successfully merged. -2. If there is a new [`cypress-example-kitchensink`](https://github.com/cypress-io/cypress-example-kitchensink/releases) version, update the corresponding dependency in [`packages/example`](./packages/example) to that new version. +2. If there is a new [`cypress-example-kitchensink`](https://github.com/cypress-io/cypress-example-kitchensink/releases) version, update the corresponding dependency in [`packages/example`](../packages/example) to that new version. 3. Use the `move-binaries` script to move the binaries for `` from `beta` to the `desktop` folder for ``. This also purges the cloudflare cache for this version. ```shell @@ -110,7 +80,7 @@ In the following instructions, "X.Y.Z" is used to denote the version of Cypress ![cdn-tgz-link](https://user-images.githubusercontent.com/1157043/80608736-3791e800-8a05-11ea-8d75-e4f80128e857.png) - Publish to the npm registry straight from the URL: ```shell - npm publish https://cdn.../npm/X.Y.Z//cypress.tgz --tag dev + npm publish https://cdn.cypress.io/beta/npm/X.Y.Z//cypress.tgz --tag dev ``` 5. Double-check that the new version has been published under the `dev` tag using `npm info cypress` or [available-versions](https://github.com/bahmutov/available-versions). `latest` should still point to the previous version. Example output: @@ -157,7 +127,7 @@ In the following instructions, "X.Y.Z" is used to denote the version of Cypress 11. If needed, push out any updated changes to the links manifest to [`on.cypress.io`](https://github.com/cypress-io/cypress-services/tree/develop/packages/on). -12. If needed, deploy the updated [`cypress-example-kitchensink`][cypress-example-kitchensink] to `example.cypress.io` by following [these instructions under "Deployment"](./packages/example/README.md). +12. If needed, deploy the updated [`cypress-example-kitchensink`][cypress-example-kitchensink] to `example.cypress.io` by following [these instructions under "Deployment"](../packages/example/README.md). 13. Update the releases in [ZenHub](https://app.zenhub.com/workspaces/test-runner-5c3ea3baeb1e75374f7b0708/reports/release): - Close the current release in ZenHub. diff --git a/guides/testing-other-projects.md b/guides/testing-other-projects.md new file mode 100644 index 0000000000..16e1f34246 --- /dev/null +++ b/guides/testing-other-projects.md @@ -0,0 +1,46 @@ +# Testing other projects + +In `develop`, `master`, and any other branch configured in [`circle.yml`](../circle.yml), the Cypress binary and npm package are built and uploaded to `cdn.cypress.io`. Then, tests are run, using a variety of real-world example repositories. + +Two main strategies are used to spawn these test projects: + +1. Local CI +2. Remote CI + +## Local CI + +A number of CI jobs in `circle.yml` clone test projects and run tests as part of `cypress-io/cypress`'s CI pipeline. + +You can find a list of test projects that do this by searching for usage of the `test-binary-against-repo` step. + +Similarly to "Remote CI" test projects, Local CI test projects will attempt to check out a branch that is named after the [next version](./next-version.md) (`X.Y.Z`) if one exists in the test project git repo. + +One advantage to local CI is that it does not require creating commits to another repo. + +## Remote CI + +After the production binary and NPM package are build and uploaded in CI, [`/scripts/test-other-projects.js`](../scripts/test-other-projects.js) is run as part of the `test-other-projects` `circle.yml` step. + +This script creates commits inside of several test projects (hence "Remote CI") in order to trigger a realistic, continous-integration test of Cypress. + +For a list of the projects, see the definition of `_PROVIDERS` in [`/scripts/binary/bump.js`](../scripts/binary/bump.js). + +For each project and operating system combo in `_PROVIDERS`, the script: + +1. Creates a commit to the test project's GitHub repo using the API. [An example of such a commit.](https://github.com/cypress-io/cypress-test-tiny/commit/5b39f3f43f6b7598f0d57cffcba71a7048d1d809) + * Note the commit is specifically for `linux`, and only the `linux-tests` job runs to completion. + * If a branch exists that is named after the [next version](./next-version.md) (`X.Y.Z`), the commit will be made to that branch. + * This is useful to test a release's breaking changes or new features against an example project without having to have the project's main branch in a broken state. + * Otherwise, the default branch is used for the commit. +2. Creates a status check in this GitHub repo (`cypress-io/cypress`) and marks it `pending`. +3. Waits for the test project's CI workflow to finish running. + * Each test project is configured to use [`@cypress/commit-message-install`](https://github.com/cypress-io/commit-message-install) to configure the exact test required via the information in the commit message. + * Each test project is configured to update the `pending` CI job in `cypress-io/cypress` to a `success` when the CI workflow successfully finishes. + +These tests add coverage to the Cypress code base by: + +* Providing a super-close-to-real-world usage of Cypress (i.e. installing fresh from an NPM package and running in a bare repo using the repo's CI setup) +* Testing in a variety of environments + * Different Node.js versions + * Different operating systems + * A multitude of CI providers \ No newline at end of file diff --git a/npm/cypress-schematic/package.json b/npm/cypress-schematic/package.json index c89d7f184d..f08ee1adca 100644 --- a/npm/cypress-schematic/package.json +++ b/npm/cypress-schematic/package.json @@ -28,6 +28,7 @@ }, "devDependencies": { "@angular-devkit/schematics-cli": "^12.2.10", + "@angular/cli": "^12", "@types/chai-enzyme": "0.6.7", "@types/mocha": "8.0.3", "@types/node": "^12.11.1", diff --git a/npm/design-system/package.json b/npm/design-system/package.json index 744a717d8a..479bdb808c 100644 --- a/npm/design-system/package.json +++ b/npm/design-system/package.json @@ -75,7 +75,7 @@ "rollup-plugin-copy": "^3.4.0", "rollup-plugin-peer-deps-external": "2.2.4", "rollup-plugin-postcss": "^4.0.0", - "sass": "1.32.8", + "sass": "1.44.0", "sass-loader": "10.1.1", "style-loader": "^2.0.0", "svg-url-loader": "3.0.3", diff --git a/npm/design-system/src/css/func.scss b/npm/design-system/src/css/func.scss index 3e921dad68..1a570db164 100644 --- a/npm/design-system/src/css/func.scss +++ b/npm/design-system/src/css/func.scss @@ -7,6 +7,8 @@ * @return {String} - Updated string */ // Taken from https://gist.github.com/PuddingNL/51866d4b9f1151963fbd973bf1d66116 +@use "sass:math"; + @function str-replace($string, $search, $replace: '') { $index: str-index($string, $search); @@ -18,5 +20,5 @@ } @function change-rem-unit-to-em($number) { - @return ($number / 1rem) + 0em; + @return math.div($number, 1rem) + 0em; } \ No newline at end of file diff --git a/npm/react/cypress/component/basic/error-boundary-spec.js b/npm/react/cypress/component/basic/error-boundary-spec.js index b5a4cf0363..89eeab09e1 100644 --- a/npm/react/cypress/component/basic/error-boundary-spec.js +++ b/npm/react/cypress/component/basic/error-boundary-spec.js @@ -1,50 +1,50 @@ -/// -import { ErrorBoundary } from './error-boundary.jsx' -import React from 'react' -import { mount } from '@cypress/react' - -Cypress.on('uncaught:exception', (err, runnable) => { - return false -}) - -/* eslint-env mocha */ -describe('Error Boundary', () => { - const errorMessage = 'I crashed!' - const ChildWithoutError = () =>

Normal Child

- const ChildWithError = () => { - throw new Error(errorMessage) - } - - it('renders normal children', () => { - mount( - - - , - ) - - cy.get('h1').should('have.text', 'Normal Child') - cy.get(ErrorBoundary) - .its('state.error') - .should('not.exist') - }) - - it('on error, display fallback UI', () => { - // Error boundaries do not stop an uncaught error from propagating. - // Cypress will fail on uncaught exceptions by default, so we need to suppress that behavior. - cy.on('uncaught:exception', (err) => { - // Assert that we are only suppressing the default behavior for the error we expect. - expect(err.message.includes('I crashed!')).to.be.true - - return false - }) - - mount( - - - , - ) - - cy.get('header h1').should('contain', 'Something went wrong.') - cy.get('header h3').should('contain', 'ChildWithError failed to load') - }) -}) +/// +import { ErrorBoundary } from './error-boundary.jsx' +import React from 'react' +import { mount } from '@cypress/react' + +Cypress.on('uncaught:exception', (err, runnable) => { + return false +}) + +/* eslint-env mocha */ +describe('Error Boundary', () => { + const errorMessage = 'I crashed!' + const ChildWithoutError = () =>

Normal Child

+ const ChildWithError = () => { + throw new Error(errorMessage) + } + + it('renders normal children', () => { + mount( + + + , + ) + + cy.get('h1').should('have.text', 'Normal Child') + cy.get(ErrorBoundary) + .its('state.error') + .should('not.exist') + }) + + it('on error, display fallback UI', () => { + // Error boundaries do not stop an uncaught error from propagating. + // Cypress will fail on uncaught exceptions by default, so we need to suppress that behavior. + cy.on('uncaught:exception', (err) => { + // Assert that we are only suppressing the default behavior for the error we expect. + expect(err.message.includes('I crashed!')).to.be.true + + return false + }) + + mount( + + + , + ) + + cy.get('header h1').should('contain', 'Something went wrong.') + cy.get('header h3').should('contain', 'ChildWithError failed to load') + }) +}) diff --git a/npm/react/cypress/component/basic/error-boundary.jsx b/npm/react/cypress/component/basic/error-boundary.jsx index b7888e25e3..c844da83ab 100644 --- a/npm/react/cypress/component/basic/error-boundary.jsx +++ b/npm/react/cypress/component/basic/error-boundary.jsx @@ -1,46 +1,46 @@ -import React from 'react' - -export class ErrorBoundary extends React.Component { - constructor (props) { - super(props) - this.state = { error: null, info: '' } - } - - static getDerivedStateFromError (error) { +import React from 'react' + +export class ErrorBoundary extends React.Component { + constructor (props) { + super(props) + this.state = { error: null, info: '' } + } + + static getDerivedStateFromError (error) { console.error(error) - - return { error } - } - - componentDidCatch (error, errorInfo) { - // Catch errors in any components below and re-render with error message - this.setState({ - error, - info: errorInfo, - }) - // You can also log error messages to an error reporting service here - } - - render () { - const { name } = this.props + + return { error } + } + + componentDidCatch (error, errorInfo) { + // Catch errors in any components below and re-render with error message + this.setState({ + error, + info: errorInfo, + }) + // You can also log error messages to an error reporting service here + } + + render () { + const { name } = this.props const { error } = this.state - - if (error) { - return ( - -
-

Something went wrong.

-

{`${name} failed to load`}

-
-
-
-              {JSON.stringify(error)}
-            
-
-
- ) + + if (error) { + return ( + +
+

Something went wrong.

+

{`${name} failed to load`}

+
+
+
+              {JSON.stringify(error)}
+            
+
+
+ ) } - - return this.props.children - } -} + + return this.props.children + } +} diff --git a/npm/react/examples/sass-and-ts/package.json b/npm/react/examples/sass-and-ts/package.json index 309b69a6a9..9f66e35c91 100644 --- a/npm/react/examples/sass-and-ts/package.json +++ b/npm/react/examples/sass-and-ts/package.json @@ -15,6 +15,6 @@ "@cypress/react": "file:../../dist", "mocha-junit-reporter": "^2.0.0", "mocha-multi-reporters": "^1.5.1", - "sass": "1.32.0" + "sass": "1.44.0" } } diff --git a/npm/vue/examples/code-coverage/package.json b/npm/vue/examples/code-coverage/package.json index 6ab0544f0b..103f735eb6 100644 --- a/npm/vue/examples/code-coverage/package.json +++ b/npm/vue/examples/code-coverage/package.json @@ -22,7 +22,7 @@ "mocha-junit-reporter": "^2.0.0", "mocha-multi-reporters": "^1.5.1", "nyc": "14.1.1", - "sass": "1.32.11", + "sass": "1.44.0", "sass-loader": "7.3.1", "vue": "3.2.6", "vue-loader": "16.2.0", diff --git a/npm/webpack-dev-server/README.md b/npm/webpack-dev-server/README.md index 0cbc4099cf..2bf02d7f35 100644 --- a/npm/webpack-dev-server/README.md +++ b/npm/webpack-dev-server/README.md @@ -46,7 +46,7 @@ by calling an event `devServerEvents.emit('dev-server:compile:success')` ## Webpack -Webpack-dev-server fulfills his reponsibilities by +Webpack-dev-server fulfills his responsibilities by - Making a `webpack.config` from the users setup by changing the entrypoint to `browser.ts` - Launches the webpack dev server with `devServer.publicPath = "__cypress/src/"` and `devServer.hot = false` diff --git a/package.json b/package.json index a002fff82b..39250891ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cypress", - "version": "9.1.0", + "version": "9.1.1", "description": "Cypress.io end to end testing tool", "private": true, "scripts": { @@ -163,8 +163,6 @@ "getenv": "^1.0.0", "gift": "0.10.2", "glob": "7.1.6", - "globby": "10.0.1", - "got": "11.5.1", "graphql": "^15.5.1", "gulp": "4.0.2", "gulp-awspublish": "4.0.0", diff --git a/packages/driver/cypress/fixtures/shadow-dom-type.html b/packages/driver/cypress/fixtures/shadow-dom-type.html new file mode 100644 index 0000000000..75ff6a161b --- /dev/null +++ b/packages/driver/cypress/fixtures/shadow-dom-type.html @@ -0,0 +1,25 @@ + + + +
+ + + \ No newline at end of file diff --git a/packages/driver/cypress/integration/commands/actions/type_spec.js b/packages/driver/cypress/integration/commands/actions/type_spec.js index 99a2cacbd6..138dde3050 100644 --- a/packages/driver/cypress/integration/commands/actions/type_spec.js +++ b/packages/driver/cypress/integration/commands/actions/type_spec.js @@ -3592,5 +3592,16 @@ describe('src/cy/commands/actions/type - #type', () => { .find('input', { includeShadowDom: true }) .type('foo') }) + + // https://github.com/cypress-io/cypress/issues/17531 + it('text events propagate out of shadow root', () => { + cy.visit('fixtures/shadow-dom-type.html') + + cy + .get('test-element').shadow() + .find('input').type('asdf') + + cy.get('#result').should('have.text', 'typed') + }) }) }) diff --git a/packages/driver/cypress/integration/commands/clock_spec.js b/packages/driver/cypress/integration/commands/clock_spec.js index 44ab1cdaf5..01ade377b6 100644 --- a/packages/driver/cypress/integration/commands/clock_spec.js +++ b/packages/driver/cypress/integration/commands/clock_spec.js @@ -125,6 +125,14 @@ describe('src/cy/commands/clock', () => { }) }) + it('overwrites without crashing', () => { + Cypress.Commands.overwrite('clock', (originalCommand, ...args) => { + return originalCommand(...args) + }) + + cy.clock() + }) + context('errors', () => { it('throws if now is not a number (or options object)', (done) => { cy.on('fail', (err) => { diff --git a/packages/driver/cypress/integration/commands/files_spec.js b/packages/driver/cypress/integration/commands/files_spec.js index 85874d9f07..fb144195fa 100644 --- a/packages/driver/cypress/integration/commands/files_spec.js +++ b/packages/driver/cypress/integration/commands/files_spec.js @@ -145,6 +145,7 @@ describe('src/cy/commands/files', () => { if (attrs.name === 'readFile') { expect(log.get('state')).to.eq('pending') expect(log.get('message')).to.eq('foo.json') + expect(log.get('timeout')).to.eq(Cypress.config('defaultCommandTimeout')) } }) @@ -321,6 +322,54 @@ describe('src/cy/commands/files', () => { cy.readFile('foo.json').should('equal', 'contents') }) + + it('throws when the read timeout expires', function (done) { + Cypress.backend.callsFake(() => { + return new Cypress.Promise(() => { /* Broken promise for timeout */ }) + }) + + cy.on('fail', (err) => { + const { lastLog } = this + + assertLogLength(this.logs, 1) + expect(lastLog.get('error')).to.eq(err) + expect(lastLog.get('state')).to.eq('failed') + expect(err.message).to.eq(stripIndent`\ + \`cy.readFile("foo")\` timed out after waiting \`10ms\`. + `) + + expect(err.docsUrl).to.eq('https://on.cypress.io/readfile') + + done() + }) + + cy.readFile('foo', { timeout: 10 }) + }) + + it('uses defaultCommandTimeout config value if option not provided', { + defaultCommandTimeout: 42, + }, function (done) { + Cypress.backend.callsFake(() => { + return new Cypress.Promise(() => { /* Broken promise for timeout */ }) + }) + + cy.on('fail', (err) => { + const { lastLog } = this + + assertLogLength(this.logs, 1) + expect(lastLog.get('error')).to.eq(err) + expect(lastLog.get('state')).to.eq('failed') + expect(err.message).to.eq(stripIndent`\ + \`cy.readFile("foo")\` timed out after waiting \`42ms\`. + `) + + expect(err.docsUrl).to.eq('https://on.cypress.io/readfile') + + done() + }) + + cy.readFile('foo') + }) }) }) @@ -394,7 +443,7 @@ describe('src/cy/commands/files', () => { Cypress.backend.resolves(okResponse) cy.writeFile('foo.txt', 'contents').then((subject) => { - expect(subject).to.not.exist + expect(subject).to.eq(null) }) }) @@ -481,6 +530,7 @@ describe('src/cy/commands/files', () => { if (attrs.name === 'writeFile') { expect(log.get('state')).to.eq('pending') expect(log.get('message')).to.eq('foo.txt', 'contents') + expect(log.get('timeout')).to.eq(Cypress.config('defaultCommandTimeout')) } }) @@ -601,6 +651,54 @@ describe('src/cy/commands/files', () => { cy.writeFile('foo.txt', 'contents') }) + + it('throws when the write timeout expires', function (done) { + Cypress.backend.callsFake(() => { + return new Cypress.Promise(() => {}) + }) + + cy.on('fail', (err) => { + const { lastLog } = this + + assertLogLength(this.logs, 1) + expect(lastLog.get('error')).to.eq(err) + expect(lastLog.get('state')).to.eq('failed') + expect(err.message).to.eq(stripIndent` + \`cy.writeFile("foo.txt")\` timed out after waiting \`10ms\`. + `) + + expect(err.docsUrl).to.eq('https://on.cypress.io/writefile') + + done() + }) + + cy.writeFile('foo.txt', 'contents', { timeout: 10 }) + }) + + it('uses defaultCommandTimeout config value if option not provided', { + defaultCommandTimeout: 42, + }, function (done) { + Cypress.backend.callsFake(() => { + return new Cypress.Promise(() => { /* Broken promise for timeout */ }) + }) + + cy.on('fail', (err) => { + const { lastLog } = this + + assertLogLength(this.logs, 1) + expect(lastLog.get('error')).to.eq(err) + expect(lastLog.get('state')).to.eq('failed') + expect(err.message).to.eq(stripIndent` + \`cy.writeFile("foo.txt")\` timed out after waiting \`42ms\`. + `) + + expect(err.docsUrl).to.eq('https://on.cypress.io/writefile') + + done() + }) + + cy.writeFile('foo.txt', 'contents') + }) }) }) }) diff --git a/packages/driver/cypress/integration/commands/net_stubbing_spec.ts b/packages/driver/cypress/integration/commands/net_stubbing_spec.ts index 0fa3850db6..b826e8d5dc 100644 --- a/packages/driver/cypress/integration/commands/net_stubbing_spec.ts +++ b/packages/driver/cypress/integration/commands/net_stubbing_spec.ts @@ -3220,8 +3220,8 @@ describe('network stubbing', function () { $.get('/foo') $.get('/foo') }) - .wait('@foo.bar', { timeout: 100 }) - .wait('@foo.bar', { timeout: 100 }) + .wait('@foo.bar', { timeout: 500 }) + .wait('@foo.bar', { timeout: 500 }) }) it('can incrementally wait on requests', function () { diff --git a/packages/driver/cypress/integration/cypress/proxy-logging-spec.ts b/packages/driver/cypress/integration/cypress/proxy-logging-spec.ts index 9162100d85..8ee2208732 100644 --- a/packages/driver/cypress/integration/cypress/proxy-logging-spec.ts +++ b/packages/driver/cypress/integration/cypress/proxy-logging-spec.ts @@ -105,7 +105,7 @@ describe('Proxy Logging', () => { // @see https://github.com/cypress-io/cypress/issues/17656 it('xhr log has response body/status code', (done) => { cy.window() - .then((win) => { + .then({ timeout: 10000 }, (win) => { cy.on('log:changed', (log) => { try { expect(log.snapshots.map((v) => v.name)).to.deep.eq(['request', 'response']) diff --git a/packages/driver/src/cy/commands/clock.ts b/packages/driver/src/cy/commands/clock.ts index 9e5126275d..128634c50b 100644 --- a/packages/driver/src/cy/commands/clock.ts +++ b/packages/driver/src/cy/commands/clock.ts @@ -39,7 +39,7 @@ export default function (Commands, Cypress, cy, state) { return Commands.addAll({ type: 'utility' }, { clock (subject, now, methods, options = {}) { let userOptions = options - const ctx = this + const ctx = state('ctx') if (clock) { return clock diff --git a/packages/driver/src/cy/commands/files.ts b/packages/driver/src/cy/commands/files.ts index 276ccfa766..7bf4c2db36 100644 --- a/packages/driver/src/cy/commands/files.ts +++ b/packages/driver/src/cy/commands/files.ts @@ -1,6 +1,5 @@ // @ts-nocheck import _ from 'lodash' -import Promise from 'bluebird' import $errUtils from '../../cypress/error_utils' @@ -22,6 +21,7 @@ export default (Commands, Cypress, cy) => { // to restore the default node behavior. encoding: encoding === undefined ? 'utf8' : encoding, log: true, + timeout: Cypress.config('defaultCommandTimeout'), }) const consoleProps = {} @@ -43,21 +43,33 @@ export default (Commands, Cypress, cy) => { }) } + // We clear the default timeout so we can handle + // the timeout ourselves + cy.clearTimeout() + const verifyAssertions = () => { - return Cypress.backend('read:file', file, _.pick(options, 'encoding')) + return Cypress.backend('read:file', file, _.pick(options, 'encoding')).timeout(options.timeout) .catch((err) => { - if (err.code === 'ENOENT') { - return { - contents: null, - filePath: err.filePath, - } + if (err.name === 'TimeoutError') { + return $errUtils.throwErrByPath('files.timed_out', { + onFail: options._log, + args: { cmd: 'readFile', file, timeout: options.timeout }, + }) } - return $errUtils.throwErrByPath('files.unexpected_error', { - onFail: options._log, - args: { cmd: 'readFile', action: 'read', file, filePath: err.filePath, error: err.message }, - }) - }).then(({ contents, filePath }) => { + // Non-ENOENT errors are not retried + if (err.code !== 'ENOENT') { + return $errUtils.throwErrByPath('files.unexpected_error', { + onFail: options._log, + args: { cmd: 'readFile', action: 'read', file, filePath: err.filePath, error: err.message }, + }) + } + + return { + contents: null, + filePath: err.filePath, + } + }).then(({ filePath, contents }) => { // https://github.com/cypress-io/cypress/issues/1558 // We invoke Buffer.from() in order to transform this from an ArrayBuffer - // which socket.io uses to transfer the file over the websocket - into a @@ -110,6 +122,7 @@ export default (Commands, Cypress, cy) => { encoding: encoding === undefined ? 'utf8' : encoding, flag: userOptions.flag ? userOptions.flag : 'w', log: true, + timeout: Cypress.config('defaultCommandTimeout'), }) const consoleProps = {} @@ -117,7 +130,7 @@ export default (Commands, Cypress, cy) => { if (options.log) { options._log = Cypress.log({ message: fileName, - timeout: 0, + timeout: options.timeout, consoleProps () { return consoleProps }, @@ -142,19 +155,25 @@ export default (Commands, Cypress, cy) => { contents = JSON.stringify(contents, null, 2) } - return Cypress.backend('write:file', fileName, contents, _.pick(options, ['encoding', 'flag'])) - .then(({ contents, filePath }) => { + // We clear the default timeout so we can handle + // the timeout ourselves + cy.clearTimeout() + + return Cypress.backend('write:file', fileName, contents, _.pick(options, 'encoding', 'flag')).timeout(options.timeout) + .then(({ filePath, contents }) => { consoleProps['File Path'] = filePath consoleProps['Contents'] = contents return null - }).catch(Promise.TimeoutError, () => { - return $errUtils.throwErrByPath('files.timed_out', { - onFail: options._log, - args: { cmd: 'writeFile', file: fileName, timeout: options.timeout }, - }) }) .catch((err) => { + if (err.name === 'TimeoutError') { + return $errUtils.throwErrByPath('files.timed_out', { + onFail: options._log, + args: { cmd: 'writeFile', file: fileName, timeout: options.timeout }, + }) + } + return $errUtils.throwErrByPath('files.unexpected_error', { onFail: options._log, args: { cmd: 'writeFile', action: 'write', file: fileName, filePath: err.filePath, error: err.message }, diff --git a/packages/driver/src/cy/keyboard.ts b/packages/driver/src/cy/keyboard.ts index 0f9459a599..bf4446aeb3 100644 --- a/packages/driver/src/cy/keyboard.ts +++ b/packages/driver/src/cy/keyboard.ts @@ -960,6 +960,9 @@ export class Keyboard { ..._.omitBy( { bubbles: true, + // allow propagation out of root of shadow-dom + // https://developer.mozilla.org/en-US/docs/Web/API/Event/composed + composed: true, cancelable, key, code, diff --git a/packages/electron/README.md b/packages/electron/README.md index 1de22a9547..5adcc688a6 100644 --- a/packages/electron/README.md +++ b/packages/electron/README.md @@ -40,7 +40,6 @@ Upgrading `electron` involves more than just bumping this package's `package.jso - See [`cypress-docker-images`](https://github.com/cypress-io/cypress-docker-images/). - [ ] **Ensure that a matching Node.js version is enforced in the monorepo for local development and CI.** When Electron is upgraded, oftentimes, the bundled Node.js version that comes with Electron is updated as well. Because all unit and integration tests run in normal Node.js (not Electron's Node.js), it's important for this Node.js version to be synced with the monorepo. There are a few places where this needs to be done: - [ ] [`/.node-version`](../../.node-version) - used by `nvm` and other Node version managers - - [ ] [`/appveyor.yml`](../../appveyor.yml) - update the `nodejs_version` - [ ] [`/package.json`](../../package.json) - update `engines` - [ ] [`/scripts/run-docker-local.sh`](../../scripts/run-docker-local.sh) - update Docker image to the new matching `browsers` image - [ ] [`/circle.yml`](../../circle.yml) diff --git a/packages/frontend-shared/package.json b/packages/frontend-shared/package.json index 211b78fe85..b5f02883f2 100644 --- a/packages/frontend-shared/package.json +++ b/packages/frontend-shared/package.json @@ -12,10 +12,11 @@ "cypress:run:e2e": "echo 'no e2e in frontend-shared'", "cypress:run:ct": "cross-env TZ=America/New_York node ../../scripts/cypress run --component --project ${PWD}", "dev": "gulp dev --project ${PWD}", - "generate-shiki-theme": "node ./script/generate-shiki-theme.js" + "generate-shiki-theme": "node ./script/generate-shiki-theme.js", + "postinstall": "patch-package" }, "dependencies": { - "@toycode/markdown-it-class": "1.2.4", + "@toycode/markdown-it-class": "1.2.3", "markdown-it": "12.2.0", "shiki": "^0.9.12" }, @@ -48,6 +49,7 @@ "graphql-tag": "^2.12.5", "lodash": "^4.17.21", "modern-normalize": "1.1.0", + "patch-package": "6.4.7", "rimraf": "3.0.2", "unplugin-icons": "^0.11.4", "unplugin-vue-components": "^0.15.4", @@ -65,6 +67,11 @@ "wonka": "^4.0.15" }, "module": "es2020", + "workspaces": { + "nohoist": [ + "@toycode/markdown-it-class" + ] + }, "vite": { "optimizeDeps": { "include": [ diff --git a/patches/@toycode+markdown-it-class+1.2.4.patch b/packages/frontend-shared/patches/@toycode+markdown-it-class+1.2.4.patch similarity index 100% rename from patches/@toycode+markdown-it-class+1.2.4.patch rename to packages/frontend-shared/patches/@toycode+markdown-it-class+1.2.4.patch diff --git a/packages/frontend-shared/vite.config.ts b/packages/frontend-shared/vite.config.ts index 0ee3e21648..0f3f6cfe24 100644 --- a/packages/frontend-shared/vite.config.ts +++ b/packages/frontend-shared/vite.config.ts @@ -90,7 +90,7 @@ export const makeConfig = (config: Partial = {}, plugins: PluginOpti css: { preprocessorOptions: { scss: { - additionalData: `@use "${path.resolve(__dirname, '../reporter/src/lib/variables.scss')}" as *;`, + additionalData: `@use "file:///${path.resolve(__dirname, '../reporter/src/lib/variables.scss').replaceAll('\\', '/')}" as *;\n`, }, }, }, diff --git a/packages/https-proxy/test/helpers/certs/ca/my-root-ca.crt.pem b/packages/https-proxy/test/helpers/certs/ca/my-root-ca.crt.pem index 234babb5af..607425b571 100644 --- a/packages/https-proxy/test/helpers/certs/ca/my-root-ca.crt.pem +++ b/packages/https-proxy/test/helpers/certs/ca/my-root-ca.crt.pem @@ -1,24 +1,24 @@ ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIQxHqMbWiiVO/Qhhr4qxKQJjANBgkqhkiG9w0BAQsFADB0 -MRcwFQYDVQQDEw5DeXByZXNzUHJveHlDQTERMA8GA1UEBhMISW50ZXJuZXQxETAP -BgNVBAgTCEludGVybmV0MREwDwYDVQQHEwhJbnRlcm5ldDETMBEGA1UEChMKQ3lw -cmVzcy5pbzELMAkGA1UECxMCQ0EwHhcNMjAwMjE5MTk1MzM1WhcNMzAwMjE5MTk1 -MzM1WjB0MRcwFQYDVQQDEw5DeXByZXNzUHJveHlDQTERMA8GA1UEBhMISW50ZXJu -ZXQxETAPBgNVBAgTCEludGV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RyfZZqjUTtUFKDgqD1MUn2UvsCAePFDw6aafkfo4Kk2V69XHPP3lxEhnpu +ff0COh5p3D9SHMfAWFmj4PH0+R4H+zIfyA0F1KzO6B+cn4JSaQtF0HrWDOtz4KH5 +CwddoBTt6LSawAb1eaxn3Rk19KD7dS/3tjY2sAHMSJgbnsbxVnQhMVTBBy3Llgd3 +I6vomUuXp8rHLVz8KgfSVzU/iPJhPkxxqDdKoBvL7k+2GUcSFBkltZXDXnSP/q3F +8N6NyRta0mg/xsi5lvx0s5XeCLQpxJAzijaqelGt7mYwctNaLyO1CCPr3j0fjG+y +FsmO0zl5SGzyLe044FmFjcqnaW4= +-----END CERTIFICATE----- diff --git a/packages/https-proxy/test/helpers/certs/ca/my-root-ca.key.pem b/packages/https-proxy/test/helpers/certs/ca/my-root-ca.key.pem index f800dcaea3..8e1e262fe3 100644 --- a/packages/https-proxy/test/helpers/certs/ca/my-root-ca.key.pem +++ b/packages/https-proxy/test/helpers/certs/ca/my-root-ca.key.pem @@ -1,27 +1,27 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAyNFwBlSLadMwQG2Neve37bccPbjIWlQEexwge4xBWk9ESomI -0MVh39ONsj79DEco26H8wnZCsJpGw68DlhNRcT1CoVGm7CZyIrmO8JlZV77hMK6J -Wh1WE+W915MGkW4w9H9aGwdn2rNqnAjFxmWnhmasWOu8P0IX6AdElmhNFMilpLdR -HO2ICEZ/nddhay+ZQxwlJI4nz3edzPAffnd7rFc3NLeF6HXnq1T8fZlvgf1C0NR4 -sEA8xu3ejqSa7d1pO4m2iQgaG4bg0jBFzz4ccA0vmBGh9A+VofKc5h6XbjA9Yt/4 -4MaukovI3ISD2URNIwV9BXvjQo12bMEFdhhXZQIDAQABAoIBAFFBnYiSMQ8S6xVG -vtag4YWIcB7xY/BYyq9dxC75o3/9Tu6yE/AVzfKZUV5sakvLh1bHhtTQsU9wPW30 -pQjWrD+bwBgyR86KB+jRGGt2QVZl4Ayost8Ju8i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 +OfMc9g4SscBX69ScPfP3XQgzH1btjbf72bjbVZsNbEvJcGk1eWjJWhG7oNJfDZhe +qSi3oxwfEhri2Tl6fcJWOQQtt1QBRkPDYjY3FikCgYEAgQfnx7mKpJCTD3ZTgXGl +MTZlXUkcCLVishix53szGbEybiacpU1gIwsACZPKZMQx0Bm1vovcPNbuKIc/Vgnr +rIQ/NeWzagsnM3A/UQAQLUjJwS2C8dZoU/fTFawziYIOT3i5Htzz/H3681COlBQb +qm8xYsan3MwuN+63fqYSMOUCgYEAz521JPe91aJ2de8JZcVTF25Cb/V4rC7uHM9d +rG2iEmonJrw6im58AtngjT0IqwWCVTgNbpbH4R3OtkeAjKtDMmhIOWQNblh9yJdo +4wZPRiqfZ7Qhfrt9fbKybrC309FZuhz+DGw7uOpJ847efpT2FRGpcgHJYC5GKL5r +77OeUtkCgYB54h1MUcDE+KErG+N0IMjvaSEeXuZiWHW03tVsKXzSvpTGZpeQFYbn +rVOukS8gvzamBvu+omtmjlfsgwN/lHEAoQVuZI69ow/67A2fiPuNuP1KWZW+UrSO +OvJ1VmJKuVHarOzuLqXKnm6vCVd2FHlyzuUKG8C4ad8fTIRJk8LRlw== +-----END RSA PRIVATE KEY----- diff --git a/packages/https-proxy/test/helpers/certs/client/my-root-ca.crt.pem b/packages/https-proxy/test/helpers/certs/client/my-root-ca.crt.pem index 234babb5af..607425b571 100644 --- a/packages/https-proxy/test/helpers/certs/client/my-root-ca.crt.pem +++ b/packages/https-proxy/test/helpers/certs/client/my-root-ca.crt.pem @@ -1,24 +1,24 @@ ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIQxHqMbWiiVO/Qhhr4qxKQJjANBgkqhkiG9w0BAQsFADB0 -MRcwFQYDVQQDEw5DeXByZXNzUHJveHlDQTERMA8GA1UEBhMISW50ZXJuZXQxETAP -BgNVBAgTCEludGVybmV0MREwDwYDVQQHEwhJbnRlcm5ldDETMBEGA1UEChMKQ3lw -cmVzcy5pbzELMAkGA1UECxMCQ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wYIKwYBBQUHAwQGCCsGAQUFBwMIMBEGCWCGSAGG+EIBAQQEAwIA +9zAdBgNVHQ4EFgQUiw3dB0uxjFLp7MqHN1IHF+MHt6kwDQYJKoZIhvcNAQELBQAD +ggEBAIRyfZZqjUTtUFKDgqD1MUn2UvsCAePFDw6aafkfo4Kk2V69XHPP3lxEhnpu +ff0COh5p3D9SHMfAWFmj4PH0+R4H+zIfyA0F1KzO6B+cn4JSaQtF0HrWDOtz4KH5 +CwddoBTt6LSawAb1eaxn3Rk19KD7dS/3tjY2sAHMSJgbnsbxVnQhMVTBBy3Llgd3 +I6vomUuXp8rHLVz8KgfSVzU/iPJhPkxxqDdKoBvL7k+2GUcSFBkltZXDXnSP/q3F +8N6NyRta0mg/xsi5lvx0s5XeCLQpxJAzijaqelGt7mYwctNaLyO1CCPr3j0fjG+y +FsmO0zl5SGzyLe044FmFjcqnaW4= +-----END CERTIFICATE----- diff --git a/packages/https-proxy/test/helpers/certs/server/my-root-ca.crt.pem b/packages/https-proxy/test/helpers/certs/server/my-root-ca.crt.pem index 234babb5af..607425b571 100644 --- a/packages/https-proxy/test/helpers/certs/server/my-root-ca.crt.pem +++ b/packages/https-proxy/test/helpers/certs/server/my-root-ca.crt.pem @@ -1,24 +1,24 @@ ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIQxHqMbWiiVO/Qhhr4qxKQJjANBgkqhkiG9w0BAQsFADB0 -MRcwFQYDVQQDEw5DeXByZXNzUHJveHlDQTERMA8GA1UEBhMISW50ZXJuZXQxETAP -BgNVBAgTCEludGVybmV0MREwDwYDVQQHEwhJbnRlcm5ldDETMBEGA1UEChMKQ3lw -cmVzcy5pbzELMAkGA1UECxMCQ0EwHhcNMjAwMjE5MTk1MzM1WhcNMzAwMjE5MTk1 -MzM1WjB0MRcwFQYDVQQDEw5DeXByZXNzUHJveHlDQTERMA8GA1UEBhMISW50ZXJu -ZXQxETAPBgNVBAgTCEludGVybmV0MREwDwYDVQQHEwhJbnRlcm5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AePFDw6aafkfo4Kk2V69XHPP3lxEhnpu +ff0COh5p3D9SHMfAWFmj4PH0+R4H+zIfyA0F1KzO6B+cn4JSaQtF0HrWDOtz4KH5 +CwddoBTt6LSawAb1eaxn3Rk19KD7dS/3tjY2sAHMSJgbnsbxVnQhMVTBBy3Llgd3 +I6vomUuXp8rHLVz8KgfSVzU/iPJhPkxxqDdKoBvL7k+2GUcSFBkltZXDXnSP/q3F +8N6NyRta0mg/xsi5lvx0s5XeCLQpxJAzijaqelGt7mYwctNaLyO1CCPr3j0fjG+y +FsmO0zl5SGzyLe044FmFjcqnaW4= +-----END CERTIFICATE----- diff --git a/packages/launchpad/package.json b/packages/launchpad/package.json index 383b6194d8..0f6a96a850 100644 --- a/packages/launchpad/package.json +++ b/packages/launchpad/package.json @@ -5,7 +5,6 @@ "scripts": { "check-ts": "vue-tsc --noEmit", "build-prod-ui": "cross-env NODE_ENV=production vite build", - "postinstall": "patch-package", "clean": "rimraf dist && rimraf ./node_modules/.vite && rimraf dist-e2e && echo 'cleaned'", "clean-deps": "rimraf node_modules", "test": "yarn cypress:run:ct && yarn types", @@ -29,7 +28,6 @@ "@packages/frontend-shared": "0.0.0-development", "@percy/cypress": "^3.1.0", "@testing-library/cypress": "8.0.0", - "@toycode/markdown-it-class": "1.2.4", "@urql/core": "2.3.1", "@urql/devtools": "2.0.3", "@urql/vue": "0.4.3", @@ -74,11 +72,6 @@ "script", "src" ], - "workspaces": { - "nohoist": [ - "@toycode/markdown-it-class" - ] - }, "vite": { "optimizeDeps": { "include": [ diff --git a/packages/launchpad/patches/@toycode+markdown-it-class+1.2.4.patch b/packages/launchpad/patches/@toycode+markdown-it-class+1.2.4.patch deleted file mode 100644 index 7725923194..0000000000 --- a/packages/launchpad/patches/@toycode+markdown-it-class+1.2.4.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/@toycode/markdown-it-class/index.js b/node_modules/@toycode/markdown-it-class/index.js -index 8e8c8f4..5e2539d 100644 ---- a/node_modules/@toycode/markdown-it-class/index.js -+++ b/node_modules/@toycode/markdown-it-class/index.js -@@ -8,7 +8,7 @@ const toArray = a => (Array.isArray(a) ? a : [a]) - - function parseTokens(tokens) { - tokens.forEach(token => { -- if (/(_open$|image)/.test(token.type) && mapping[token.tag]) { -+ if (/(_open$|image|code_inline)/.test(token.type) && mapping[token.tag]) { - const orig = splitWithSpace(token.attrGet('class')) - const addition = toArray(mapping[token.tag]) - token.attrSet('class', [...orig, ...addition].join(' ')) diff --git a/packages/runner-ct/package.json b/packages/runner-ct/package.json index ac287a94aa..04e1c61b9e 100644 --- a/packages/runner-ct/package.json +++ b/packages/runner-ct/package.json @@ -34,13 +34,11 @@ "classnames": "2.3.1", "clean-webpack-plugin": "^3.0.0", "cypress-real-events": "1.4.0", - "dart-sass": "^1.25.0", "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-react": "^7.22.0", "eslint-plugin-react-hooks": "^4.2.0", "express": "^4.17.1", "fuzzysort": "^1.1.4", - "globby": "^11.0.1", "hotkeys-js": "3.8.2", "html-webpack-plugin": "^4.5.0", "koa": "^2.13.0", @@ -53,6 +51,7 @@ "react-dom": "16.8.6", "react-split-pane": "^0.1.92", "rimraf": "3.0.2", + "sass": "1.44.0", "sass-loader": "^10.0.3", "sockjs-client": "^1.5.0", "strip-ansi": "6.0.0", diff --git a/packages/runner-ct/src/app/RunnerCt.scss b/packages/runner-ct/src/app/RunnerCt.scss index 7660b7667f..b1127d262f 100644 --- a/packages/runner-ct/src/app/RunnerCt.scss +++ b/packages/runner-ct/src/app/RunnerCt.scss @@ -69,7 +69,7 @@ $resizerLineSize: 4px; } &.horizontal { - margin: -($resize-thickness / 2) 0; + margin: -($resize-thickness * 0.5) 0; height: $resize-thickness; width: 100%; cursor: row-resize; @@ -83,7 +83,7 @@ $resizerLineSize: 4px; } &.vertical { - margin: 0 -($resize-thickness / 2); + margin: 0 -($resize-thickness * 0.5); width: $resize-thickness; height: 100%; cursor: col-resize; diff --git a/packages/server/patches/tsconfig-paths+3.10.1.patch b/packages/server/patches/tsconfig-paths+3.10.1.dev.patch similarity index 100% rename from packages/server/patches/tsconfig-paths+3.10.1.patch rename to packages/server/patches/tsconfig-paths+3.10.1.dev.patch diff --git a/packages/server/test/integration/plugins_spec.js b/packages/server/test/integration/plugins_spec.js index 79cb2d6983..5aff949a34 100644 --- a/packages/server/test/integration/plugins_spec.js +++ b/packages/server/test/integration/plugins_spec.js @@ -9,7 +9,6 @@ let ctx describe('lib/plugins', () => { beforeEach(async () => { ctx = makeLegacyDataContext() - Fixtures.scaffold() Fixtures.scaffoldProject('plugin-before-browser-launch-deprecation') await Fixtures.scaffoldCommonNodeModules() ctx.actions.project.setActiveProjectForTestSetup(Fixtures.projectPath('plugin-before-browser-launch-deprecation')) diff --git a/packages/server/test/unit/plugins/index_spec.js b/packages/server/test/unit/plugins/index_spec.js index 2c78fbabc4..b1e7fdf069 100644 --- a/packages/server/test/unit/plugins/index_spec.js +++ b/packages/server/test/unit/plugins/index_spec.js @@ -1,7 +1,7 @@ require('../../spec_helper') -const _ = require('lodash') const mockedEnv = require('mocked-env') +const { omit } = require('lodash') const cp = require('child_process') const { makeLegacyDataContext } = require('../../../lib/makeDataContext') const FixturesHelper = require('@tooling/system-tests/lib/fixtures') @@ -116,7 +116,7 @@ describe.skip('lib/plugins/index', () => { execPath: systemNode, } - expect(_.omit(cp.fork.lastCall.args[2], 'env')).to.eql(options) + expect(omit(cp.fork.lastCall.args[2], 'env')).to.eql(options) }) }) @@ -134,7 +134,7 @@ describe.skip('lib/plugins/index', () => { stdio: 'pipe', } - expect(_.omit(cp.fork.lastCall.args[2], 'env')).to.eql(options) + expect(omit(cp.fork.lastCall.args[2], 'env')).to.eql(options) }) }) diff --git a/packages/socket/lib/socket.ts b/packages/socket/lib/socket.ts index 5f20e732f5..4841f14559 100644 --- a/packages/socket/lib/socket.ts +++ b/packages/socket/lib/socket.ts @@ -1,11 +1,10 @@ import fs from 'fs' +import buffer from 'buffer' import type http from 'http' import server, { Server as SocketIOBaseServer, ServerOptions, Socket } from 'socket.io' export type { Socket } -const HUNDRED_MEGABYTES = 1e8 // 100000000 - const { version } = require('socket.io-client/package.json') const clientSource = require.resolve('socket.io-client/dist/socket.io.js') @@ -16,13 +15,14 @@ type PatchedServerOptions = ServerOptions & { cookie: { name: string | boolean } class SocketIOServer extends SocketIOBaseServer { constructor (srv: http.Server, opts?: Partial) { - // in socket.io v3, they reduced down the max buffer size - // from 100mb to 1mb, so we reset it back to the previous value - // - // previous commit for reference: - // https://github.com/socketio/engine.io/blame/61b949259ed966ef6fc8bfd61f14d1a2ef06d319/lib/server.js#L29 opts = opts ?? {} - opts.maxHttpBufferSize = opts.maxHttpBufferSize ?? HUNDRED_MEGABYTES + + // the maxHttpBufferSize is used to limit the message size sent over + // the socket. Small values can be used to mitigate exposure to + // denial of service attacks; the default as of v3.0 is 1MB. + // because our server is local, we do not need to arbitrarily limit + // the message size and can use the theoretical maximum value. + opts.maxHttpBufferSize = opts.maxHttpBufferSize ?? buffer.constants.MAX_LENGTH super(srv, opts) } diff --git a/packages/socket/package.json b/packages/socket/package.json index 2765bcc50b..2f24614659 100644 --- a/packages/socket/package.json +++ b/packages/socket/package.json @@ -16,6 +16,8 @@ }, "dependencies": { "circular-json": "0.5.9", + "engine.io": "5.0.0", + "engine.io-parser": "4.0.2", "socket.io": "4.0.1", "socket.io-client": "4.0.1" }, @@ -34,6 +36,8 @@ "types": "lib/socket.ts", "workspaces": { "nohoist": [ + "engine.io", + "engine.io-parser", "socket.io", "socket.io/socket.io-parser", "socket.io-client", diff --git a/packages/web-config/package.json b/packages/web-config/package.json index 3221706de4..0952f9d28a 100644 --- a/packages/web-config/package.json +++ b/packages/web-config/package.json @@ -36,7 +36,7 @@ "node-sass-glob-importer": "5.3.2", "postcss-loader": "3.0.0", "resolve-url-loader": "3.1.0", - "sass": "1.32.0", + "sass": "1.44.0", "sass-loader": "10.1.0", "sinon-chai": "3.3.0", "webpack": "^4.44.2", diff --git a/patches/@popperjs+core+2.9.2.patch b/patches/@popperjs+core+2.9.2.dev.patch similarity index 100% rename from patches/@popperjs+core+2.9.2.patch rename to patches/@popperjs+core+2.9.2.dev.patch diff --git a/patches/@react-aria+focus+3.2.4.patch b/patches/@react-aria+focus+3.2.4.dev.patch similarity index 100% rename from patches/@react-aria+focus+3.2.4.patch rename to patches/@react-aria+focus+3.2.4.dev.patch diff --git a/patches/@types+chai+4.2.15.patch b/patches/@types+chai+4.2.15.dev.patch similarity index 100% rename from patches/@types+chai+4.2.15.patch rename to patches/@types+chai+4.2.15.dev.patch diff --git a/patches/@types+jquery+3.3.31.patch b/patches/@types+jquery+3.3.31.dev.patch similarity index 100% rename from patches/@types+jquery+3.3.31.patch rename to patches/@types+jquery+3.3.31.dev.patch diff --git a/patches/@types+mocha+8.0.3.patch b/patches/@types+mocha+8.0.3.dev.patch similarity index 100% rename from patches/@types+mocha+8.0.3.patch rename to patches/@types+mocha+8.0.3.dev.patch diff --git a/patches/react-vtree+3.0.0-beta.1.patch b/patches/react-vtree+3.0.0-beta.1.dev.patch similarity index 97% rename from patches/react-vtree+3.0.0-beta.1.patch rename to patches/react-vtree+3.0.0-beta.1.dev.patch index ca9f0df55b..616d4bbffc 100644 --- a/patches/react-vtree+3.0.0-beta.1.patch +++ b/patches/react-vtree+3.0.0-beta.1.dev.patch @@ -3,127 +3,127 @@ index 5e7f57e..5e764e9 100644 --- a/node_modules/react-vtree/dist/es/Tree.d.ts +++ b/node_modules/react-vtree/dist/es/Tree.d.ts @@ -1,6 +1,9 @@ - import React, { Component, ComponentType, PropsWithChildren, PureComponent, ReactElement, ReactNode, Ref, RefCallback, RefObject } from 'react'; - import { Align, FixedSizeList, ListChildComponentProps, ListProps, VariableSizeList } from 'react-window'; --import { DefaultTreeProps, DefaultTreeState } from './utils'; -+// import { DefaultTreeProps, DefaultTreeState } from './utils'; -+interface DefaultTreeProps {} -+interface DefaultTreeState {} -+ - export declare type NodeData = Readonly<{ - /** - * Unique ID of the current node. + import React, { Component, ComponentType, PropsWithChildren, PureComponent, ReactElement, ReactNode, Ref, RefCallback, RefObject } from 'react'; + import { Align, FixedSizeList, ListChildComponentProps, ListProps, VariableSizeList } from 'react-window'; +-import { DefaultTreeProps, DefaultTreeState } from './utils'; ++// import { DefaultTreeProps, DefaultTreeState } from './utils'; ++interface DefaultTreeProps {} ++interface DefaultTreeState {} ++ + export declare type NodeData = Readonly<{ + /** + * Unique ID of the current node. diff --git a/node_modules/react-vtree/dist/es/utils.d.ts b/node_modules/react-vtree/dist/es/utils.d.ts index bb27d60..a4f244f 100644 --- a/node_modules/react-vtree/dist/es/utils.d.ts +++ b/node_modules/react-vtree/dist/es/utils.d.ts @@ -1,41 +1,41 @@ --/// --import { FixedSizeList } from 'react-window'; --import type { NodeData, NodePublicState, NodeRecord, TreeCreatorOptions, TreeProps, TreeState, TypedListChildComponentData } from './Tree'; --export declare type Mutable = { -- -readonly [P in keyof T]: T[P]; --}; --export declare type RequestIdleCallbackHandle = any; --export declare type RequestIdleCallbackOptions = Readonly<{ -- timeout: number; --}>; --export declare type RequestIdleCallbackDeadline = Readonly<{ -- didTimeout: boolean; -- timeRemaining: () => number; --}>; --declare global { -- const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; -- const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; -- interface Window { -- requestIdleCallback: typeof requestIdleCallback; -- cancelIdleCallback: typeof cancelIdleCallback; -- } --} --export declare type DefaultTreeProps = TreeProps, FixedSizeList>; --export declare type DefaultTreeState = TreeState, FixedSizeList>; --export declare type DefaultTreeCreatorOptions = TreeCreatorOptions, DefaultTreeState>; --export declare const noop: () => void; --export declare const identity: (value: T) => T; --export declare const createBasicRecord: , TNodePublicState extends NodePublicState>(pub: TNodePublicState, parent?: NodeRecord | null) => NodeRecord; --export declare const getIdByIndex: , TNodePublicState extends NodePublicState>(index: number, { getRecordData }: Readonly<{ -- component: import("react").ComponentType & TNodePublicState & { -- treeData?: any; -- }>>; -- getRecordData: (index: number) => TNodePublicState; -- treeData: any; --}>) => string; -+// /// -+// import { FixedSizeList } from 'react-window'; -+// import type { NodeData, NodePublicState, NodeRecord, TreeCreatorOptions, TreeProps, TreeState, TypedListChildComponentData } from './Tree'; -+// export declare type Mutable = { -+// -readonly [P in keyof T]: T[P]; -+// }; -+// export declare type RequestIdleCallbackHandle = any; -+// export declare type RequestIdleCallbackOptions = Readonly<{ -+// timeout: number; -+// }>; -+// export declare type RequestIdleCallbackDeadline = Readonly<{ -+// didTimeout: boolean; -+// timeRemaining: () => number; -+// }>; -+// declare global { -+// const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; -+// const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; -+// interface Window { -+// requestIdleCallback: typeof requestIdleCallback; -+// cancelIdleCallback: typeof cancelIdleCallback; -+// } -+// } -+// export declare type DefaultTreeProps = TreeProps, FixedSizeList>; -+// export declare type DefaultTreeState = TreeState, FixedSizeList>; -+// export declare type DefaultTreeCreatorOptions = TreeCreatorOptions, DefaultTreeState>; -+// export declare const noop: () => void; -+// export declare const identity: (value: T) => T; -+// export declare const createBasicRecord: , TNodePublicState extends NodePublicState>(pub: TNodePublicState, parent?: NodeRecord | null) => NodeRecord; -+// export declare const getIdByIndex: , TNodePublicState extends NodePublicState>(index: number, { getRecordData }: Readonly<{ -+// component: import("react").ComponentType & TNodePublicState & { -+// treeData?: any; -+// }>>; -+// getRecordData: (index: number) => TNodePublicState; -+// treeData: any; -+// }>) => string; +-/// +-import { FixedSizeList } from 'react-window'; +-import type { NodeData, NodePublicState, NodeRecord, TreeCreatorOptions, TreeProps, TreeState, TypedListChildComponentData } from './Tree'; +-export declare type Mutable = { +- -readonly [P in keyof T]: T[P]; +-}; +-export declare type RequestIdleCallbackHandle = any; +-export declare type RequestIdleCallbackOptions = Readonly<{ +- timeout: number; +-}>; +-export declare type RequestIdleCallbackDeadline = Readonly<{ +- didTimeout: boolean; +- timeRemaining: () => number; +-}>; +-declare global { +- const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; +- const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; +- interface Window { +- requestIdleCallback: typeof requestIdleCallback; +- cancelIdleCallback: typeof cancelIdleCallback; +- } +-} +-export declare type DefaultTreeProps = TreeProps, FixedSizeList>; +-export declare type DefaultTreeState = TreeState, FixedSizeList>; +-export declare type DefaultTreeCreatorOptions = TreeCreatorOptions, DefaultTreeState>; +-export declare const noop: () => void; +-export declare const identity: (value: T) => T; +-export declare const createBasicRecord: , TNodePublicState extends NodePublicState>(pub: TNodePublicState, parent?: NodeRecord | null) => NodeRecord; +-export declare const getIdByIndex: , TNodePublicState extends NodePublicState>(index: number, { getRecordData }: Readonly<{ +- component: import("react").ComponentType & TNodePublicState & { +- treeData?: any; +- }>>; +- getRecordData: (index: number) => TNodePublicState; +- treeData: any; +-}>) => string; ++// /// ++// import { FixedSizeList } from 'react-window'; ++// import type { NodeData, NodePublicState, NodeRecord, TreeCreatorOptions, TreeProps, TreeState, TypedListChildComponentData } from './Tree'; ++// export declare type Mutable = { ++// -readonly [P in keyof T]: T[P]; ++// }; ++// export declare type RequestIdleCallbackHandle = any; ++// export declare type RequestIdleCallbackOptions = Readonly<{ ++// timeout: number; ++// }>; ++// export declare type RequestIdleCallbackDeadline = Readonly<{ ++// didTimeout: boolean; ++// timeRemaining: () => number; ++// }>; ++// declare global { ++// const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; ++// const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; ++// interface Window { ++// requestIdleCallback: typeof requestIdleCallback; ++// cancelIdleCallback: typeof cancelIdleCallback; ++// } ++// } ++// export declare type DefaultTreeProps = TreeProps, FixedSizeList>; ++// export declare type DefaultTreeState = TreeState, FixedSizeList>; ++// export declare type DefaultTreeCreatorOptions = TreeCreatorOptions, DefaultTreeState>; ++// export declare const noop: () => void; ++// export declare const identity: (value: T) => T; ++// export declare const createBasicRecord: , TNodePublicState extends NodePublicState>(pub: TNodePublicState, parent?: NodeRecord | null) => NodeRecord; ++// export declare const getIdByIndex: , TNodePublicState extends NodePublicState>(index: number, { getRecordData }: Readonly<{ ++// component: import("react").ComponentType & TNodePublicState & { ++// treeData?: any; ++// }>>; ++// getRecordData: (index: number) => TNodePublicState; ++// treeData: any; ++// }>) => string; diff --git a/node_modules/react-vtree/dist/lib/utils.d.ts b/node_modules/react-vtree/dist/lib/utils.d.ts index bb27d60..d5ac63c 100644 --- a/node_modules/react-vtree/dist/lib/utils.d.ts +++ b/node_modules/react-vtree/dist/lib/utils.d.ts @@ -12,14 +12,14 @@ export declare type RequestIdleCallbackDeadline = Readonly<{ - didTimeout: boolean; - timeRemaining: () => number; - }>; --declare global { -- const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; -- const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; -- interface Window { -- requestIdleCallback: typeof requestIdleCallback; -- cancelIdleCallback: typeof cancelIdleCallback; -- } --} -+// declare global { -+// const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; -+// const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; -+// interface Window { -+// requestIdleCallback: typeof requestIdleCallback; -+// cancelIdleCallback: typeof cancelIdleCallback; -+// } -+// } - export declare type DefaultTreeProps = TreeProps, FixedSizeList>; - export declare type DefaultTreeState = TreeState, FixedSizeList>; - export declare type DefaultTreeCreatorOptions = TreeCreatorOptions, DefaultTreeState>; + didTimeout: boolean; + timeRemaining: () => number; + }>; +-declare global { +- const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; +- const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; +- interface Window { +- requestIdleCallback: typeof requestIdleCallback; +- cancelIdleCallback: typeof cancelIdleCallback; +- } +-} ++// declare global { ++// const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle; ++// const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void; ++// interface Window { ++// requestIdleCallback: typeof requestIdleCallback; ++// cancelIdleCallback: typeof cancelIdleCallback; ++// } ++// } + export declare type DefaultTreeProps = TreeProps, FixedSizeList>; + export declare type DefaultTreeState = TreeState, FixedSizeList>; + export declare type DefaultTreeCreatorOptions = TreeCreatorOptions, DefaultTreeState>; \ No newline at end of file diff --git a/patches/snap-shot-core+10.2.0.patch b/patches/snap-shot-core+10.2.0.dev.patch similarity index 100% rename from patches/snap-shot-core+10.2.0.patch rename to patches/snap-shot-core+10.2.0.dev.patch diff --git a/patches/snap-shot-it+7.9.3.patch b/patches/snap-shot-it+7.9.3.dev.patch similarity index 100% rename from patches/snap-shot-it+7.9.3.patch rename to patches/snap-shot-it+7.9.3.dev.patch diff --git a/scripts/after-pack-hook.js b/scripts/after-pack-hook.js index eb41260b14..28720c55e3 100644 --- a/scripts/after-pack-hook.js +++ b/scripts/after-pack-hook.js @@ -1,7 +1,7 @@ /* eslint-disable no-console */ const fs = require('fs-extra') const { join } = require('path') -const globby = require('globby') +const glob = require('glob') const os = require('os') const path = require('path') @@ -13,9 +13,8 @@ module.exports = async function (params) { console.log(params.electronPlatformName) console.log('****************************') - const packages = await globby('packages/*/node_modules', { + const packages = glob.sync('packages/*/node_modules', { cwd: params.packager.info._appDir, - onlyFiles: false, }) const buildSubfoldersPerPlatform = { diff --git a/scripts/binary/build.ts b/scripts/binary/build.ts index e3016d95f2..3280dc8ee0 100644 --- a/scripts/binary/build.ts +++ b/scripts/binary/build.ts @@ -68,25 +68,34 @@ export async function buildCypressApp (options: BuildCypressAppOpts) { // Copy Packages: We want to copy the package.json, files, and output log('#copyAllToDist') await packages.copyAllToDist(DIST_DIR) + fs.copySync(path.join(CY_ROOT_DIR, 'patches'), path.join(DIST_DIR, 'patches')) const jsonRoot = fs.readJSONSync(path.join(CY_ROOT_DIR, 'package.json')) - fs.writeJsonSync(meta.distDir('package.json'), _.omit(jsonRoot, [ - 'scripts', + const packageJsonContents = _.omit(jsonRoot, [ 'devDependencies', 'lint-staged', 'engines', - ]), { spaces: 2 }) + 'scripts', + ]) + + fs.writeJsonSync(meta.distDir('package.json'), { + ...packageJsonContents, + scripts: { + postinstall: 'patch-package', + }, + }, { spaces: 2 }) // Copy the yarn.lock file so we have a consistent install fs.copySync(path.join(CY_ROOT_DIR, 'yarn.lock'), meta.distDir('yarn.lock')) - // replaceLocalNpmVersions + log('#replace local npm versions') const dirsSeen = await packages.replaceLocalNpmVersions(DIST_DIR) - // remove local npm dirs that aren't needed + log('#remove local npm dirs that are not needed') await packages.removeLocalNpmDirs(DIST_DIR, dirsSeen) + log('#install production dependencies') execSync('yarn --production', { cwd: DIST_DIR, stdio: 'inherit', @@ -152,7 +161,7 @@ require('./packages/server')\ log(`#testVersion ${meta.distDir()}`) await testVersion(meta.distDir(), version) - // testBuiltStaticAssets + log('#testStaticAssets') await testStaticAssets(meta.distDir()) log('#removeCyAndBinFolders') diff --git a/scripts/binary/bump.js b/scripts/binary/bump.js index 42976a8b06..d8a2886604 100644 --- a/scripts/binary/bump.js +++ b/scripts/binary/bump.js @@ -13,14 +13,6 @@ let car = null // all the projects to trigger / run / change environment variables for const _PROVIDERS = { - appVeyor: { - main: 'cypress-io/cypress', - win32: [ - 'cypress-io/cypress-test-tiny', - 'cypress-io/cypress-test-example-repos', - ], - }, - circle: { main: 'cypress-io/cypress', linux: [ @@ -35,6 +27,10 @@ const _PROVIDERS = { 'cypress-io/cypress-test-tiny', 'cypress-io/cypress-test-example-repos', ], + win32: [ + 'cypress-io/cypress-test-tiny', + 'cypress-io/cypress-test-example-repos', + ], }, } @@ -105,12 +101,6 @@ const awaitEachProjectAndProvider = function (projects, fn, filter = (val) => va } } - if (check.unemptyString(creds.appVeyorToken)) { - providers.appVeyor = { - appVeyorToken: creds.appVeyorToken, - } - } - const providerNames = Object.keys(providers) console.log('configured providers', providerNames) @@ -133,7 +123,6 @@ const awaitEachProjectAndProvider = function (projects, fn, filter = (val) => va } // do not trigger all projects if there is specific provider -// for example appVeyor should be used for Windows testing const getFilterByProvider = function (providerName, platformName) { return (val) => { if (providerName && val.provider !== providerName) { @@ -226,14 +215,6 @@ Testing new Cypress version ${version} message += '\n' message += `Circle CI build url ${process.env.CIRCLE_BUILD_URL}` } - - if (process.env.APPVEYOR) { - const slug = process.env.APPVEYOR_PROJECT_SLUG - const build = process.env.APPVEYOR_BUILD_ID - - message += '\n' - message += `AppVeyor CI ${slug} ${build}` - } } const defaultOptions = { diff --git a/scripts/binary/util/3rd-party.js b/scripts/binary/util/3rd-party.js deleted file mode 100644 index 4cb45b0f11..0000000000 --- a/scripts/binary/util/3rd-party.js +++ /dev/null @@ -1,6 +0,0 @@ -// but globby supports multiple wildcard search patterns ๐Ÿ‘ -const globby = require('globby') - -module.exports = { - globby, -} diff --git a/scripts/binary/util/packages.ts b/scripts/binary/util/packages.ts index f350ee0baa..605f24f207 100644 --- a/scripts/binary/util/packages.ts +++ b/scripts/binary/util/packages.ts @@ -1,16 +1,17 @@ import _ from 'lodash' import fs from 'fs-extra' +import util from 'util' import path from 'path' -// we wrap glob to handle EMFILE error +import glob from 'glob' import la from 'lazy-ass' import check from 'check-more-types' import execa from 'execa' import debugLib from 'debug' -import externalUtils, { globby } from './3rd-party' - const debug = debugLib('cypress:binary') +const globAsync = util.promisify(glob) + const pathToPackageJson = function (packageFolder) { la(check.unemptyString(packageFolder), 'expected package path', packageFolder) @@ -41,17 +42,13 @@ const createCLIExecutable = (command) => { const yarn = createCLIExecutable('yarn') -export const runAllBuild = _.partial(yarn, ['lerna', 'run', 'build-prod', '--ignore', 'cli']) - export const runAllCleanJs = _.partial(yarn, ['lerna', 'run', 'clean-js', '--ignore', 'cli']) export async function copyAllToDist (distDir: string) { await fs.ensureDir(distDir) const started = new Date().valueOf() - const globbed = await externalUtils.globby(['./packages/*', './npm/*'], { - onlyFiles: false, - }) + const globbed = await globAsync('./{packages,npm}/*') for (const pkg of globbed) { // copies the package to dist @@ -74,11 +71,17 @@ export async function copyAllToDist (distDir: string) { const pkgFileMasks = [].concat(json.files || []).concat(json.main || []) debug('for pkg %s have the following file masks %o', pkg, pkgFileMasks) - const foundFileRelativeToPackageFolder = await externalUtils.globby(pkgFileMasks, { - cwd: pkg, // search in the package folder - absolute: false, // and return relative file paths - followSymbolicLinks: false, // do not follow symlinks - }) + let foundFileRelativeToPackageFolder = [] + + if (pkgFileMasks.length > 0) { + const pattern = pkgFileMasks.length > 1 ? `{${pkgFileMasks.join(',')}}` : pkgFileMasks[0] + + foundFileRelativeToPackageFolder = await globAsync(pattern, { + cwd: pkg, // search in the package folder + absolute: false, // and return relative file paths + follow: false, // do not follow symlinks + }) + } console.log(`Copying ${pkg} to ${path.join(distDir, pkg)}`) @@ -101,7 +104,6 @@ export async function copyAllToDist (distDir: string) { try { // Strip out dev-dependencies & scripts for everything in /packages so we can yarn install in there await fs.writeJson(path.join(distDir, pkg, 'package.json'), _.omit(json, [ - 'scripts', 'devDependencies', 'lint-staged', 'engines', @@ -123,12 +125,13 @@ export async function copyAllToDist (distDir: string) { export const replaceLocalNpmVersions = async function (basePath: string) { const visited = new Set() - const pkgPaths = await globby('./packages/*/package.json', { cwd: basePath }) + const pkgPaths = await globAsync('./packages/*/', { cwd: basePath }) async function updatePackageJson (pkg: string) { - const pkgJsonPath = path.join(basePath, pkg) + const pkgPath = path.join(basePath, pkg) + const pkgJsonPath = path.join(basePath, pkg, 'package.json') - visited.add(pkg) + visited.add(pkgPath) const json = await fs.readJson(pkgJsonPath) const { dependencies } = json @@ -145,15 +148,18 @@ export const replaceLocalNpmVersions = async function (basePath: string) { const pkgName = depName.startsWith('@cypress/') ? depName.split('/')[1] : depName - json.dependencies[depName] = `file:${path.join(basePath, 'npm', pkgName)}` + const localPkgPath = path.join(basePath, 'npm', pkgName) + + json.dependencies[depName] = `file:${localPkgPath}` shouldWriteFile = true - if (!visited.has(depName)) { - await updatePackageJson(`./npm/${pkgName}/package.json`) + if (!visited.has(localPkgPath)) { + await updatePackageJson(`./npm/${pkgName}`) } shouldWriteFile = true } + if (shouldWriteFile) { await fs.writeJson(pkgJsonPath, json, { spaces: 2 }) } @@ -166,9 +172,8 @@ export const replaceLocalNpmVersions = async function (basePath: string) { } export async function removeLocalNpmDirs (distPath: string, except: string[]) { - const toRemove = await globby(`${distPath}/npm/*`, { - ignore: except.map((e) => path.join(distPath, e).replace('/package.json', '')), - onlyDirectories: true, + const toRemove = await globAsync(`${distPath}/npm/*/`, { + ignore: except, }) for (const dir of toRemove) { diff --git a/scripts/binary/util/testStaticAssets.js b/scripts/binary/util/testStaticAssets.js index 530e489356..b0d6b885e7 100644 --- a/scripts/binary/util/testStaticAssets.js +++ b/scripts/binary/util/testStaticAssets.js @@ -47,6 +47,34 @@ const testStaticAssets = async (buildResourcePath) => { ['-ms-', 20], ], }), + testPackageStaticAssets({ + assetGlob: `${buildResourcePath}/packages/socket/node_modules/socket.io-parser/dist/binary.js`, + badStrings: [ + 'pack.data = _deconstructPacket(packetData, buffers);', + ], + goodStrings: [ + 'pack.data = _deconstructPacket(packetData, buffers, [], new WeakMap());', + ], + }), + testPackageStaticAssets({ + assetGlob: `${buildResourcePath}/packages/socket/node_modules/engine.io-parser/lib/encodePacket.browser.js`, + badStrings: [ + 'return callback(data instanceof ArrayBuffer ? data : data.buffer);', + ], + goodStrings: [ + 'This extra check is made because the "instanceof ArrayBuffer" check does not work', + 'return callback((data instanceof ArrayBuffer || isArrayBuffer(data)) ? data : data.buffer);', + ], + }), + testPackageStaticAssets({ + assetGlob: `${buildResourcePath}/node_modules/winston/lib/winston/common.js`, + badStrings: [ + `if (target.padLevels) {`, + ], + goodStrings: [ + `if (target.hasOwnProperty('padLevels') && target.padLevels) {`, + ], + }), ]) } diff --git a/scripts/binary/util/upload.js b/scripts/binary/util/upload.js index 2d974c9620..2d0d24d675 100644 --- a/scripts/binary/util/upload.js +++ b/scripts/binary/util/upload.js @@ -29,10 +29,6 @@ const formHashFromEnvironment = function () { return `circle-${env.CIRCLE_BRANCH}-${env.CIRCLE_SHA1}` } - if (env.APPVEYOR) { - return `appveyor-${env.APPVEYOR_REPO_BRANCH}-${env.APPVEYOR_REPO_COMMIT}` - } - throw new Error('Do not know how to form unique build hash on this CI') } diff --git a/scripts/check-node-version.js b/scripts/check-node-version.js index 73cbe89e85..e0ca324b7c 100644 --- a/scripts/check-node-version.js +++ b/scripts/check-node-version.js @@ -1,29 +1,3 @@ -const os = require('os') -const assert = require('assert') - -// TODO make this check a 3rd party little tool - -const isWindows = () => { - return os.platform() === 'win32' -} - -// if we're windows + in appveyor... -if (isWindows() && process.env.APPVEYOR) { - // check to ensure that the cpuArch + nodeArch are in sync - const cpuArch = process.env.Platform - const nodeArch = os.arch() - - const getErrMsg = (expectedArch) => { - return `Appveyor CPU arch is set to: '${cpuArch}' but the node version that is being used is running: '${nodeArch}'. Expected it to equal: '${expectedArch}'` - } - - assert.equal( - os.arch(), - 'x64', - getErrMsg('x64'), - ) -} - // we want to ensure we are building using the same major version // as the one specified in ../.node-version file const read = require('fs').readFileSync @@ -45,3 +19,6 @@ if (nodeVersionNeeded[0] !== nodeVersion[0]) { /* eslint-enable no-console */ process.exit(1) } + +// eslint-disable-next-line no-console +console.log('โœ… current Node version of %s matches the version specified in the .node-version file', process.versions.node) diff --git a/scripts/circle-cache.js b/scripts/circle-cache.js index ca0277fd24..71be0e42da 100644 --- a/scripts/circle-cache.js +++ b/scripts/circle-cache.js @@ -1,11 +1,12 @@ /* eslint-disable no-console */ -const globby = require('globby') +const glob = require('glob') const path = require('path') const fsExtra = require('fs-extra') const minimist = require('minimist') const crypto = require('crypto') const fs = require('fs') const stringify = require('fast-json-stable-stringify') + const rootPackageJson = require('../package.json') const opts = minimist(process.argv.slice(2)) @@ -21,9 +22,11 @@ async function circleCache () { } } -const BASE_DIR = path.join(__dirname, '..') -const CACHE_DIR = path.join(BASE_DIR, 'globbed_node_modules') -const p = (str) => path.join(BASE_DIR, str) +// On Windows, both the forward slash (/) and backward slash (\) are accepted as path segment separators +// using forward slashes to match the returned globbed file path separators +const BASE_DIR = path.join(__dirname, '..').replaceAll(/\\/g, '/') +const CACHE_DIR = `${BASE_DIR}/globbed_node_modules` +const p = (str) => `${BASE_DIR}/${str}` const workspacePaths = rootPackageJson.workspaces.packages const packageGlobs = workspacePaths.filter((s) => s.endsWith('/*')) @@ -32,17 +35,12 @@ const packageGlobs = workspacePaths.filter((s) => s.endsWith('/*')) // Otherwise, adding/editing a patch will not invalidate the CI cache we have for the yarn install async function cacheKey () { const yarnLocks = [p('yarn.lock')] - const patchFiles = await globby(p('**/*.patch'), { - ignore: ['**/node_modules/**', '**/*_node_modules/**'], - }) - // TODO: base on workspaces or lerna - const packageJsons = await globby([ - p('package.json'), - ...workspacePaths.map((dir) => p(`${dir}/package.json`)), - ], { + const patchFiles = glob.sync(p('**/*.patch'), { ignore: ['**/node_modules/**', '**/*_node_modules/**'], }) + const packageJsons = glob.sync(`${BASE_DIR}/{.,${workspacePaths.join(',')}}/package.json`) + // Concat the stable stringify of all of the package.json dependencies that make up const hashedPackageDeps = packageJsons.sort().map((abs) => require(abs)).map( ({ name, dependencies, devDependencies, peerDependencies }) => { @@ -64,10 +62,7 @@ async function cacheKey () { // Need to dynamically unpack and re-assemble all of the node_modules directories // https://discuss.circleci.com/t/dynamic-or-programmatic-caching-of-directories/1455 async function prepareCircleCache () { - const paths = await globby( - packageGlobs.map((dir) => p(`${dir}/node_modules`)), - { onlyDirectories: true }, - ) + const paths = glob.sync(p(`{${packageGlobs.join(',')}}/node_modules/`)) await Promise.all( paths.map(async (src) => { @@ -84,10 +79,11 @@ async function prepareCircleCache () { } async function unpackCircleCache () { - const paths = await globby( - p(`globbed_node_modules/*/*`), - { onlyDirectories: true }, - ) + const paths = glob.sync(p('globbed_node_modules/*/*/')) + + if (paths.length === 0) { + throw new Error('Should have found globbed node_modules to unpack') + } await Promise.all( paths.map(async (src) => { diff --git a/scripts/get-next-version.js b/scripts/get-next-version.js index c60347db96..b389a28dc7 100644 --- a/scripts/get-next-version.js +++ b/scripts/get-next-version.js @@ -1,5 +1,7 @@ /* eslint-disable no-console */ +// See ../guides/next-version.md for documentation. + const semver = require('semver') const Bluebird = require('bluebird') const bumpCb = require('conventional-recommended-bump') diff --git a/scripts/load-nvm.sh b/scripts/load-nvm.sh deleted file mode 100755 index d2259dfb81..0000000000 --- a/scripts/load-nvm.sh +++ /dev/null @@ -1,11 +0,0 @@ -# loads previously installed NVM -# USE: -# - run: -# name: check Node version -# command: | -# . ./scripts/load-nvm.sh -# yarn check-node-version - -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -export NODE_VERSION=$(cat .node-version) diff --git a/scripts/test-other-projects.js b/scripts/test-other-projects.js index d2e1676dc4..c93a81cbdc 100644 --- a/scripts/test-other-projects.js +++ b/scripts/test-other-projects.js @@ -9,6 +9,8 @@ const { getInstallJson } = require('@cypress/commit-message-install') /* eslint-disable no-console */ +// See ../guides/testing-other-projects.md for documentation. + const { npm, binary } = getNameAndBinary(process.argv) la(is.unemptyString(npm), 'missing npm url') @@ -112,17 +114,6 @@ const getStatusAndMessage = (projectRepoName) => { ` } - if (process.env.APPVEYOR) { - const account = process.env.APPVEYOR_ACCOUNT_NAME - const slug = process.env.APPVEYOR_PROJECT_SLUG - const build = process.env.APPVEYOR_BUILD_NUMBER - - message += '\n' - message += stripIndent` - AppVeyor: ${account}/${slug} ${build} - ` - } - console.log('commit message:') console.log(message) diff --git a/scripts/unit/binary/util/packages-spec.js b/scripts/unit/binary/util/packages-spec.js index 3b3cbf7a06..6bb51f7ae8 100644 --- a/scripts/unit/binary/util/packages-spec.js +++ b/scripts/unit/binary/util/packages-spec.js @@ -15,7 +15,6 @@ const { expect } = chai const packages = require('../../../binary/util/packages') const { transformRequires, rewritePackageNames } = require('../../../binary/util/transform-requires') const { testPackageStaticAssets } = require('../../../binary/util/testStaticAssets') -const externalUtils = require('../../../binary/util/3rd-party') global.beforeEach(() => { mockfs.restore() @@ -41,19 +40,6 @@ describe('packages', () => { }, }) - const globbyStub = sinon.stub(externalUtils, 'globby') - - globbyStub - .withArgs(['./packages/*', './npm/*']) - .resolves(['./packages/coffee']) - - globbyStub - .withArgs(['lib', 'src/main.js']) - .resolves([ - 'lib/foo.js', - 'src/main.js', - ]) - const destinationFolder = os.tmpdir() debug('destination folder %s', destinationFolder) @@ -112,18 +98,6 @@ describe('transformRequires', () => { }, }) - sinon.stub(externalUtils, 'globby') - .withArgs([ - 'build/linux/Cypress/resources/app/packages/**/*.js', - 'build/linux/Cypress/resources/app/npm/**/*.js', - ]) - .resolves([ - 'build/linux/Cypress/resources/app/packages/foo/src/main.js', - 'build/linux/Cypress/resources/app/packages/foo/lib/foo.js', - 'build/linux/Cypress/resources/app/packages/bar/src/main.js', - 'build/linux/Cypress/resources/app/packages/bar/lib/foo.js', - ]) - // should return number of transformed requires await expect(transformRequires(buildRoot)).to.eventually.eq(2) @@ -161,18 +135,6 @@ describe('transformRequires', () => { }, }) - sinon.stub(externalUtils, 'globby') - .withArgs([ - 'build/linux/Cypress/resources/app/packages/**/*.js', - 'build/linux/Cypress/resources/app/npm/**/*.js', - ]) - .resolves([ - 'build/linux/Cypress/resources/app/packages/foo/src/main.js', - 'build/linux/Cypress/resources/app/packages/foo/lib/foo.js', - 'build/linux/Cypress/resources/app/packages/bar/src/main.js', - 'build/linux/Cypress/resources/app/packages/bar/lib/foo.js', - ]) - await transformRequires(buildRoot) snapshot(getFs()) @@ -323,7 +285,7 @@ const getFs = () => { let nextDepth = null if (d !== null) { - if (d === -1) { + if (d < 0) { nextDepth = d + 1 } else if (!(d > cwd.length) && key === cwd[d]) { key = 'foo' @@ -345,5 +307,8 @@ const getFs = () => { })) } - return recurse({ root: mockfs.getMockRoot() }, -1).root + // ignore C:// when on windows + const depth = process.env.PLATFORM === 'windows' ? -2 : -1 + + return recurse({ root: mockfs.getMockRoot() }, depth).root } diff --git a/scripts/utils.js b/scripts/utils.js index 4f4294eebf..655d38d9b6 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -68,9 +68,7 @@ const shorten = (s) => { * Grabs the full commit SHA and its short version from CI environment variables */ const getShortCommit = () => { - const sha = - process.env.APPVEYOR_REPO_COMMIT || - process.env.CIRCLE_SHA1 + const sha = process.env.CIRCLE_SHA1 if (sha) { return { @@ -87,10 +85,6 @@ const getCIName = () => { if (process.env.CIRCLECI) { return 'Circle' } - - if (process.env.APPVEYOR) { - return 'AppVeyor' - } } /** @@ -101,17 +95,6 @@ const getCIBuildUrl = () => { // https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables return process.env.CIRCLE_BUILD_URL } - - if (process.env.APPVEYOR) { - // https://www.appveyor.com/docs/environment-variables/ - // there is no single url, but we can form one - // looks like this - // https://ci.appveyor.com/project/cypress-io/cypress/builds/25882716/job/7iv75s2vjt5w4usf - return `${process.env.APPVEYOR_URL}/project/${ - process.env.APPVEYOR_ACCOUNT_NAME}/${process.env.APPVEYOR_PROJECT_SLUG - }/builds/${process.env.APPVEYOR_BUILD_ID - }/job/${process.env.APPVEYOR_JOB_ID}` - } } const seconds = (s) => s * 1000 diff --git a/scripts/wait-on-circle-jobs.js b/scripts/wait-on-circle-jobs.js deleted file mode 100644 index 8669a026d6..0000000000 --- a/scripts/wait-on-circle-jobs.js +++ /dev/null @@ -1,215 +0,0 @@ -/* eslint-disable no-console */ - -const _ = require('lodash') -const minimist = require('minimist') -const Promise = require('bluebird') -const retry = require('bluebird-retry') -const got = require('got') -// always print the debug logs -const debug = require('debug')('*') - -const { seconds, minutes } = require('./utils') - -// we expect CircleCI to set the current polling job name -const jobName = process.env.CIRCLE_JOB || 'wait-on-circle-jobs' - -const workflowId = process.env.CIRCLE_WORKFLOW_ID - -const getAuth = () => `${process.env.CIRCLE_TOKEN}:` - -const verifyCI = () => { - if (!process.env.CIRCLE_TOKEN) { - console.error('Cannot find CIRCLE_TOKEN') - process.exit(1) - } - - if (!process.env.CIRCLE_WORKFLOW_ID) { - console.error('Cannot find CIRCLE_WORKFLOW_ID') - process.exit(1) - } -} - -/* eslint-disable-next-line no-unused-vars */ -const getWorkflow = async (workflowId) => { - const auth = getAuth() - const url = `https://${auth}@circleci.com/api/v2/workflow/${workflowId}` - const response = await got(url).json() - - // returns something like - // { - // pipeline_id: '5b937e8b-6138-41ad-b8d0-1c1969c4dad1', - // id: '566ffe9a-62d4-45cd-9a27-9882139e0121', - // name: 'linux', - // project_slug: 'gh/cypress-io/cypress', - // status: 'failed', - // started_by: '45ae8c6a-4686-4e71-a078-fb7a3b9d9e59', - // pipeline_number: 12461, - // created_at: '2020-07-20T19:45:41Z', - // stopped_at: '2020-07-20T20:06:54Z' - // } - - return response -} - -/** - * Job status - * - blocked (has not run yet) - * - running (currently running) - * - failed | success -*/ -const getJobStatus = async (workflowId) => { - const auth = getAuth() - // typo at https://circleci.com/docs/2.0/api-intro/ - // to retrieve all jobs, the url is "/workflow/:id/job" - const url = `https://${auth}@circleci.com/api/v2/workflow/${workflowId}/job` - const response = await got(url).json() - - // returns something like - // { - // next_page_token: null, - // items: [ - // { - // dependencies: [], - // job_number: 400959, - // id: '7021bcc7-90c1-47d9-bf99-c0372a4f8f49', - // started_at: '2020-07-20T19:45:46Z', - // name: 'build', - // project_slug: 'gh/cypress-io/cypress', - // status: 'success', - // type: 'build', - // stopped_at: '2020-07-20T19:50:07Z' - // } - // ] - // } - return response -} - -const waitForAllJobs = async (jobNames, workflowId) => { - let response - - try { - response = await getJobStatus(workflowId) - } catch (e) { - console.error(e) - process.exit(1) - } - - // if a job is pending, its status will be "blocked" - const blockedJobs = _.filter(response.items, { status: 'blocked' }) - const failedJobs = _.filter(response.items, { status: 'failed' }) - const runningJobs = _.filter(response.items, { status: 'running' }) - - const blockedJobNames = _.map(blockedJobs, 'name') - const runningJobNames = _.map(runningJobs, 'name') - - debug('failed jobs %o', _.map(failedJobs, 'name')) - debug('blocked jobs %o', blockedJobNames) - debug('running jobs %o', runningJobNames) - - if (!runningJobs.length || (runningJobs.length === 1 && runningJobs[0].name === jobName)) { - // there are no more jobs to run, or this is the last running job - console.log('all jobs are done, finishing this job') - - return Promise.resolve() - } - - const futureOrRunning = _.union(blockedJobs, runningJobNames) - const jobsToWaitFor = _.intersection(jobNames, futureOrRunning) - - debug('jobs to wait for %o', jobsToWaitFor) - - if (!jobsToWaitFor.length) { - console.log('No more jobs to wait for!') - - return Promise.resolve() - } - - return Promise.reject(new Error('Jobs have not finished')) -} - -const waitForJobToPass = Promise.method(async (jobName, workflow = workflowId) => { - verifyCI() - - let response - - try { - response = await getJobStatus(workflow) - } catch (e) { - console.error(e) - process.exit(1) - } - - const job = _.find(response.items, { name: jobName }) - - if (!job) { - return Promise.reject(new Error('Job not found')) - } - - const { status } = job - - if (status === 'success') { - return Promise.resolve() - } - - if (status === 'failed') { - return Promise.reject(new Error('Job failed')) - } - - await Promise.delay(seconds(30)) - - return waitForJobToPass(jobName, workflow) -}) - -const main = () => { - verifyCI() - - const args = minimist(process.argv.slice(2), { boolean: false }) - - const jobNames = _ - .chain(args['job-names']) - .split(',') - .without('true') - .map(_.trim) - .compact() - .value() - - if (!jobNames.length) { - console.error('Missing argument: --job-names') - console.error('You must pass a comma separated list of Circle CI job names to wait for.') - process.exit(1) - } - - debug('received circle jobs: %o', jobNames) - - // finished, has one failed job - // const workflowId = '566ffe9a-62d4-45cd-9a27-9882139e0121' - // pending workflow - // jobs that have not run have "status: 'blocked'" - - // getWorkflow(workflowId).then(console.log, console.error) - // getWorkflowJobs(workflowId).then(console.log, console.error) - - // https://github.com/demmer/bluebird-retry - retry(waitForAllJobs.bind(null, jobNames, workflowId), { - timeout: minutes(30), // max time for this job - interval: seconds(30), // poll intervals - max_interval: seconds(30), - }).then(() => { - console.log('all done') - }, (err) => { - console.error(err) - process.exit(1) - }) - - // getJobStatus(workflowId).then(console.log, console.error) -} - -// execute main function if called from command line -if (require.main === module) { - main() -} - -module.exports = { - minutes, - waitForJobToPass, -} diff --git a/scripts/win-appveyor-build.js b/scripts/win-appveyor-build.js deleted file mode 100755 index 9d2a6733d8..0000000000 --- a/scripts/win-appveyor-build.js +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env node - -/* eslint-disable no-console */ -// @ts-check - -// builds Windows binary on AppVeyor CI -// but only on the right branch - -const shell = require('shelljs') -const os = require('os') -const path = require('path') -const fs = require('fs') - -shell.set('-v') // verbose -shell.set('-e') // any error is fatal - -// see what variables AppVeyor provides -// https://www.appveyor.com/docs/environment-variables/ - -const isRightBranch = () => { - const branch = - process.env.APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH || - process.env.APPVEYOR_REPO_BRANCH - const shouldForceBinaryBuild = ( - process.env.APPVEYOR_REPO_COMMIT_MESSAGE || '' - ).includes('[build binary]') - - const branchesToBuildBinary = ['develop', 'remove-win-32-support', 'tgriesser/build/root-yarn-install'] - - return branchesToBuildBinary.includes(branch) || shouldForceBinaryBuild -} - -const isForkedPullRequest = () => { - const repoName = process.env.APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME - - return repoName && repoName !== 'cypress-io/cypress' -} - -const shouldBuildBinary = () => { - return isRightBranch() && !isForkedPullRequest() -} - -if (!shouldBuildBinary()) { - console.log('should not build binary') - process.exit(0) -} - -console.log('building Windows binary') -const pkgPath = path.join(__dirname, '../package.json') -const pkg = JSON.parse(fs.readFileSync(pkgPath).toString()) -const { version } = pkg -const filename = `cypress-v${version}.tgz` - -console.log('building version', version) - -shell.exec( - `node scripts/binary.js upload-npm-package --file cli/build/${filename} --version ${version}`, -) - -const arch = os.arch() - -shell.echo(`Building for win32 [${arch}]...`) - -shell.cat('npm-package-url.json') -shell.exec(`yarn binary-build --platform windows --version ${version}`) - -// make sure we are not including dev dependencies accidentally -// TODO how to get the server package folder? -const serverPackageFolder = path.join(os.tmpdir(), 'cypress-build', os.platform(), 'dist') - -shell.echo(`Checking prod and dev dependencies in ${serverPackageFolder}`) -shell.exec('yarn list --prod --depth 0 || true') -shell.exec('yarn list --prod --depth 0 || true', { - cwd: serverPackageFolder, -}) - -const result = shell.exec('yarn list --dev --depth 0 || true', { - cwd: serverPackageFolder, -}) - -if (result.stdout.includes('nodemon')) { - console.error('Hmm, server package includes dev dependency "coveralls"') - console.error( - 'which means somehow we are including dev dependencies in the output bundle', - ) - - console.error('see https://github.com/cypress-io/cypress/issues/2896') - process.exit(1) -} - -/** - * Returns true if we are building a pull request - */ -const isPullRequest = () => { - return Boolean(process.env.APPVEYOR_PULL_REQUEST_NUMBER) -} - -if (isPullRequest()) { - console.log('This is a pull request, skipping uploading binary') -} else { - console.log('Zipping and upload binary') - - shell.exec('yarn binary-zip') - shell.ls('-l', '*.zip') - shell.exec( - `node scripts/binary.js upload-unique-binary --file cypress.zip --version ${version}`, - ) - - shell.cat('binary-url.json') - shell.exec( - 'node scripts/add-install-comment.js --npm npm-package-url.json --binary binary-url.json', - ) - - shell.exec( - 'node scripts/test-other-projects.js --npm npm-package-url.json --binary binary-url.json --provider appVeyor', - ) -} diff --git a/system-tests/lib/system-tests.ts b/system-tests/lib/system-tests.ts index 4b4662f521..0625cd7c3d 100644 --- a/system-tests/lib/system-tests.ts +++ b/system-tests/lib/system-tests.ts @@ -273,14 +273,15 @@ export const STDOUT_DURATION_IN_TABLES_RE = /(\s+?)(\d+ms|\d+:\d+:?\d+)/g const diffRe = /Difference\n-{10}\n([\s\S]*)\n-{19}\nSaved snapshot text/m const expectedAddedVideoSnapshotLines = [ 'Warning: We failed processing this video.', - 'This error will not alter the exit code.', '', + 'This error will not alter the exit code.', 'TimeoutError: operation timed out', - '[stack trace lines]', '', '', + '[stack trace lines]', ] const expectedDeletedVideoSnapshotLines = [ - '(Video)', '', + '(Video)', '- Started processing: Compressing to 32 CRF', ] +const sometimesAddedSpacingLine = '' const sometimesAddedVideoSnapshotLine = 'โ”‚ Video: false โ”‚' const sometimesDeletedVideoSnapshotLine = 'โ”‚ Video: true โ”‚' @@ -303,8 +304,8 @@ const isVideoSnapshotError = (err: Error) => { if (line.charAt(0) === '-') deleted.push(line.slice(1).trim()) } - _.pull(added, sometimesAddedVideoSnapshotLine) - _.pull(deleted, sometimesDeletedVideoSnapshotLine) + _.pull(added, sometimesAddedVideoSnapshotLine, sometimesAddedSpacingLine) + _.pull(deleted, sometimesDeletedVideoSnapshotLine, sometimesAddedSpacingLine) return _.isEqual(added, expectedAddedVideoSnapshotLines) && _.isEqual(deleted, expectedDeletedVideoSnapshotLines) } diff --git a/system-tests/projects/e2e/cypress/integration/websockets_spec.js b/system-tests/projects/e2e/cypress/integration/websockets_spec.js index d2f791086e..bd5b6ca69b 100644 --- a/system-tests/projects/e2e/cypress/integration/websockets_spec.js +++ b/system-tests/projects/e2e/cypress/integration/websockets_spec.js @@ -24,7 +24,7 @@ describe('websockets', () => { it('does not crash', () => { cy.visit('http://localhost:3038/foo') cy.log('should not crash on ECONNRESET websocket upgrade') - cy.window().then((win) => { + cy.window().then({ timeout: 10000 }, (win) => { // see https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent return Cypress.Promise.all([ shouldCloseUrlWithCode(win, 'ws://localhost:3038/websocket', 1006), diff --git a/yarn.lock b/yarn.lock index ed3d22a7fa..49b50aa6ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,12 +15,12 @@ "@angular-devkit/core" "11.2.12" rxjs "6.6.3" -"@angular-devkit/architect@^0.1202.10": - version "0.1202.10" - resolved "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1202.10.tgz#6aae8e97ea209949507443cd9c414be94d258813" - integrity sha512-/sLgtXaFsNouxub5M/bQ2sBkiMIlPubuz6QMh+pA2jia82vJ3hcRMt4AnJTXuXpVY+aew4FiG0i9nt/8HETQsw== +"@angular-devkit/architect@0.1202.13", "@angular-devkit/architect@^0.1202.10": + version "0.1202.13" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1202.13.tgz#b9b883d62f628a6b31ce071da91e268f61da00ef" + integrity sha512-LXgiidXwBgyWPqqWK4xR1/kCPQTMTzG5w+s7+LvENUZwbcdl6CKrOMjfgjo6WPr6yeq+WWQvPCD4pZ6nXRTm7A== dependencies: - "@angular-devkit/core" "12.2.10" + "@angular-devkit/core" "12.2.13" rxjs "6.6.7" "@angular-devkit/build-angular@0.1102.12": @@ -133,7 +133,7 @@ rxjs "6.6.3" source-map "0.7.3" -"@angular-devkit/core@12.2.10", "@angular-devkit/core@^12.2.10": +"@angular-devkit/core@12.2.10": version "12.2.10" resolved "https://registry.npmjs.org/@angular-devkit/core/-/core-12.2.10.tgz#3da62eceef3904f92cd3f860618b4ae513029ce2" integrity sha512-0qhmS7Qvl0hiRVTHxEC/ipFAfzYofPstw0ZITDpEMw+pgHlOZolOlnFrv8LyOXWNqlSIH5fS9D3WF7Hpm7ApYA== @@ -145,6 +145,18 @@ rxjs "6.6.7" source-map "0.7.3" +"@angular-devkit/core@12.2.13", "@angular-devkit/core@^12.2.10": + version "12.2.13" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-12.2.13.tgz#db3929d1bfce71010b37fb7c4e6c33ef80a4f35f" + integrity sha512-9csMF0p+lTvlWnutxxTZ/+pDRMIbXk/TV4MGLbcqUPPfeG3dCRwErns73xLuMTwp9qO/KCLkFqNaM6cGOoqsDA== + dependencies: + ajv "8.6.2" + ajv-formats "2.1.0" + fast-json-stable-stringify "2.1.0" + magic-string "0.25.7" + rxjs "6.6.7" + source-map "0.7.3" + "@angular-devkit/core@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-8.0.0.tgz#a0ca65d8d0f928db9288316b1f3346d21f722213" @@ -177,7 +189,7 @@ ora "5.3.0" rxjs "6.6.3" -"@angular-devkit/schematics@12.2.10", "@angular-devkit/schematics@^12.2.10": +"@angular-devkit/schematics@12.2.10": version "12.2.10" resolved "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-12.2.10.tgz#b8d4031053fd76d93caa7f33aeeb67383e37f0ab" integrity sha512-oQ2EWdkEDE+eAttHeviXsvBi85PsntQT+IffjKUZdbQU+Leuk/pKUpTeea1YosU1p4Cz3PKYF+P/Nl5Jy3B7IQ== @@ -186,6 +198,15 @@ ora "5.4.1" rxjs "6.6.7" +"@angular-devkit/schematics@12.2.13", "@angular-devkit/schematics@^12.2.10": + version "12.2.13" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-12.2.13.tgz#6464d86fa3ccd0efb5ead46c793cef9ec45c7758" + integrity sha512-LQTv72R5Ma1uowMEeii2wIoDWI4bYQyZvunqPy9jRveBTjli2yVwwcOziGCVyttwlYs46bSdxThgeEvVIako2w== + dependencies: + "@angular-devkit/core" "12.2.13" + ora "5.4.1" + rxjs "6.6.7" + "@angular-devkit/schematics@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-8.0.0.tgz#53d14646c6286b0397417990fc83e3e9a6ecf233" @@ -245,6 +266,31 @@ universal-analytics "0.4.23" uuid "8.3.2" +"@angular/cli@^12": + version "12.2.13" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-12.2.13.tgz#ca586c14a6f83bb4390875be0a0fa709b9a2ae29" + integrity sha512-Yz6MuwdxxP6U2i8iRuCSNZeJxlLDPshT/joymCsFdjwSMGEH9Kk9DdvAfFYfzdHGdHbGrDdASJ4G+uALyNSLxw== + dependencies: + "@angular-devkit/architect" "0.1202.13" + "@angular-devkit/core" "12.2.13" + "@angular-devkit/schematics" "12.2.13" + "@schematics/angular" "12.2.13" + "@yarnpkg/lockfile" "1.1.0" + ansi-colors "4.1.1" + debug "4.3.2" + ini "2.0.0" + inquirer "8.1.2" + jsonc-parser "3.0.0" + npm-package-arg "8.1.5" + npm-pick-manifest "6.1.1" + open "8.2.1" + ora "5.4.1" + pacote "11.3.5" + resolve "1.20.0" + semver "7.3.5" + symbol-observable "4.0.0" + uuid "8.3.2" + "@angular/common@11.2.13": version "11.2.13" resolved "https://registry.yarnpkg.com/@angular/common/-/common-11.2.13.tgz#fedd5eda9c2c5340d8d7310bdbd4606636eb7a41" @@ -2459,7 +2505,7 @@ "@cypress/request@2.88.10", "@cypress/request@^2.88.10": version "2.88.10" - resolved "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz#b66d76b07f860d3a4b8d7a0604d020c662752cce" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.10.tgz#b66d76b07f860d3a4b8d7a0604d020c662752cce" integrity sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg== dependencies: aws-sign2 "~0.7.0" @@ -3074,6 +3120,11 @@ dependencies: prop-types "^15.7.2" +"@gar/promisify@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.2.tgz#30aa825f11d438671d585bd44e7fd564535fc210" + integrity sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw== + "@graphql-codegen/add@3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@graphql-codegen/add/-/add-3.1.0.tgz#cd02fd6d80a7f62839cb27160b62e48366a237c5" @@ -5711,10 +5762,18 @@ resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz#6c1d2c625fb6ef1b9dea85ad0a5afcbef85ef22a" integrity sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q== -"@npmcli/git@^2.0.1": - version "2.0.9" - resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.0.9.tgz#915bbfe66300e67b4da5ef765a4475ffb2ca5b6b" - integrity sha512-hTMbMryvOqGLwnmMBKs5usbPsJtyEsMsgXwJbmNrsEuQQh1LAIMDU77IoOrwkCg+NgQWl+ySlarJASwM3SutCA== +"@npmcli/fs@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.0.0.tgz#589612cfad3a6ea0feafcb901d29c63fd52db09f" + integrity sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ== + dependencies: + "@gar/promisify" "^1.0.1" + semver "^7.3.5" + +"@npmcli/git@^2.0.1", "@npmcli/git@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.1.0.tgz#2fbd77e147530247d37f325930d457b3ebe894f6" + integrity sha512-/hBFX/QG1b+N7PZBFs0bi+evgRZcK9nWBxQKZkGoXUT5hJSwl5c4d7y8/hm+NQZRPhQ67RzFaj5UM9YeyKoryw== dependencies: "@npmcli/promise-spawn" "^1.3.2" lru-cache "^6.0.0" @@ -5725,7 +5784,7 @@ semver "^7.3.5" which "^2.0.2" -"@npmcli/installed-package-contents@^1.0.5": +"@npmcli/installed-package-contents@^1.0.5", "@npmcli/installed-package-contents@^1.0.6": version "1.0.7" resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz#ab7408c6147911b970a8abe261ce512232a3f4fa" integrity sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw== @@ -5753,14 +5812,13 @@ dependencies: infer-owner "^1.0.4" -"@npmcli/run-script@^1.3.0": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-1.8.5.tgz#f250a0c5e1a08a792d775a315d0ff42fc3a51e1d" - integrity sha512-NQspusBCpTjNwNRFMtz2C5MxoxyzlbuJ4YEhxAKrIonTiirKDtatsZictx9RgamQIx6+QuHMNmPl0wQdoESs9A== +"@npmcli/run-script@^1.3.0", "@npmcli/run-script@^1.8.2": + version "1.8.6" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-1.8.6.tgz#18314802a6660b0d4baa4c3afe7f1ad39d8c28b7" + integrity sha512-e42bVZnC6VluBZBAFEr3YrdqSspG3bgilyg4nSLBJ7TRGNCzxHa92XAHxQBLYg0BmgwO4b2mf3h/l5EkEWRn3g== dependencies: "@npmcli/node-gyp" "^1.0.2" "@npmcli/promise-spawn" "^1.3.2" - infer-owner "^1.0.4" node-gyp "^7.1.0" read-package-json-fast "^2.0.1" @@ -7009,6 +7067,15 @@ "@angular-devkit/schematics" "11.2.12" jsonc-parser "3.0.0" +"@schematics/angular@12.2.13", "@schematics/angular@^12.2.10": + version "12.2.13" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-12.2.13.tgz#5bf3e7b699a42d7fd7f7aa12bbe4534e671e7201" + integrity sha512-TrigQ9TCmAedf1J5PSSSfTC+sScYrITeAUN8a9rlkjZNvff8hHVyQaiZmhqL+egKQL828mhkqpnFUDd4QsPBIw== + dependencies: + "@angular-devkit/core" "12.2.13" + "@angular-devkit/schematics" "12.2.13" + jsonc-parser "3.0.0" + "@schematics/angular@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-8.0.0.tgz#47954888fb8acbc3600235db7a46229c47fe5d9c" @@ -7017,15 +7084,6 @@ "@angular-devkit/core" "8.0.0" "@angular-devkit/schematics" "8.0.0" -"@schematics/angular@^12.2.10": - version "12.2.10" - resolved "https://registry.npmjs.org/@schematics/angular/-/angular-12.2.10.tgz#c640be969ea7588da14ee5c4d58a6a2ce63b97e6" - integrity sha512-hjOWrC/RlZ97oYWO92f5VRu6LDzPHnowDcyGDGvI9wCrfipL4Y7Is6LgFAiVZxCHdRz71MCnES1IXSj5w6UuBA== - dependencies: - "@angular-devkit/core" "12.2.10" - "@angular-devkit/schematics" "12.2.10" - jsonc-parser "3.0.0" - "@schematics/update@0.1102.12": version "0.1102.12" resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.1102.12.tgz#e9221c3bd8077baf2a4f688bdeca3ded329c356b" @@ -7166,11 +7224,6 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-2.1.1.tgz#ceff6a28a5b4867c2dd4a1ba513de278ccbe8bb1" integrity sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg== -"@sindresorhus/is@^3.0.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-3.1.2.tgz#548650de521b344e3781fbdb0ece4aa6f729afb8" - integrity sha512-JiX9vxoKMmu8Y3Zr2RVathBL1Cdu4Nt4MuNWemt1Nc06A0RAin9c5FArkhGsyMBWfCu4zj+9b+GxtjAnE4qqLQ== - "@sinonjs/commons@^1", "@sinonjs/commons@^1.2.0", "@sinonjs/commons@^1.3.0", "@sinonjs/commons@^1.4.0", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.7.2", "@sinonjs/commons@^1.8.1": version "1.8.2" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" @@ -8257,7 +8310,7 @@ dependencies: defer-to-connect "^1.0.1" -"@szmarczak/http-timer@^4.0.0", "@szmarczak/http-timer@^4.0.5": +"@szmarczak/http-timer@^4.0.0": version "4.0.5" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.5.tgz#bfbd50211e9dfa51ba07da58a14cdfd333205152" integrity sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ== @@ -8313,10 +8366,10 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== -"@toycode/markdown-it-class@1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@toycode/markdown-it-class/-/markdown-it-class-1.2.4.tgz#6d9bc162d0b980695a2e6b2622f49eb1c3f349c8" - integrity sha512-hA4gHBK8moObkOYdWTjhy1wYcYy0MJeM3JjSKbsXHRpRMvIKhk6Jm+t3bXsSScTdz/byWqQbs8YIwVYjHp+SlQ== +"@toycode/markdown-it-class@1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@toycode/markdown-it-class/-/markdown-it-class-1.2.3.tgz#272082b46d1242d2607a3aca281aae9d208fc182" + integrity sha512-9N7iI5iGzjmYpeEFE93/76SkiSZkywkIiKUxahoU4h5WDUJyruXO+Ce4o/nFkFdKQnmsTmyxhdCtXVikl67XGw== "@trysound/sax@0.1.1": version "0.1.1" @@ -10951,7 +11004,7 @@ agent-base@4, agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" -agent-base@6: +agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -14247,11 +14300,12 @@ cacache@^13.0.1: ssri "^7.0.0" unique-filename "^1.1.1" -cacache@^15.0.5: - version "15.0.6" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.6.tgz#65a8c580fda15b59150fb76bf3f3a8e45d583099" - integrity sha512-g1WYDMct/jzW+JdWEyjaX2zoBkZ6ZT9VpOyp2I/VMtDsNLffNat3kqPFfi1eDRSK9/SuKGyORDHcQMcPF8sQ/w== +cacache@^15.0.5, cacache@^15.2.0: + version "15.3.0" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" + integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== dependencies: + "@npmcli/fs" "^1.0.0" "@npmcli/move-file" "^1.0.1" chownr "^2.0.0" fs-minipass "^2.0.0" @@ -14310,11 +14364,6 @@ cacheable-lookup@^4.1.1: resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-4.3.0.tgz#86ff1cb38f648cc6aba28feffe008f808b403550" integrity sha512-PTUoCeIjj2awloqyVRUL33SjquU1Qv5xuDalYY8WAzd9NnUMUivZnGsOzVsMfg2YuMsWXaXkd/hjnsVoWc/3YA== -cacheable-lookup@^5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" - integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== - cacheable-request@^2.1.1: version "2.1.4" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" @@ -14956,7 +15005,7 @@ chokidar@3.5.1: optionalDependencies: fsevents "~2.3.1" -"chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.2.3, chokidar@^3.3.0, chokidar@^3.3.1, chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.0, chokidar@^3.5.1, chokidar@^3.5.2: +"chokidar@>=2.0.0 <4.0.0", "chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.2.3, chokidar@^3.3.0, chokidar@^3.3.1, chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.0, chokidar@^3.5.1, chokidar@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== @@ -17300,13 +17349,6 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== -dart-sass@^1.25.0: - version "1.25.0" - resolved "https://registry.yarnpkg.com/dart-sass/-/dart-sass-1.25.0.tgz#e00c0348118916e9d81cb485297184c131af1dad" - integrity sha512-syNOAstJXAmvD3RifcDk3fiPMyYE2fY8so6w9gf2/wNlKpG0zyH+oiXubEYVOy1WAWkzOc72pbAxwx+3OU4JJA== - dependencies: - chokidar ">=2.0.0 <4.0.0" - dash-ast@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dash-ast/-/dash-ast-1.0.0.tgz#12029ba5fb2f8aa6f0a861795b23c1b4b6c27d37" @@ -17518,13 +17560,6 @@ decompress-response@^5.0.0: dependencies: mimic-response "^2.0.0" -decompress-response@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" - integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - dependencies: - mimic-response "^3.1.0" - dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -18848,6 +18883,13 @@ engine.io-client@~5.0.0: ws "~7.4.2" yeast "0.1.2" +engine.io-parser@4.0.2, engine.io-parser@~4.0.0, engine.io-parser@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-4.0.2.tgz#e41d0b3fb66f7bf4a3671d2038a154024edb501e" + integrity sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg== + dependencies: + base64-arraybuffer "0.1.4" + engine.io-parser@~2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.2.1.tgz#57ce5611d9370ee94f99641b589f94c97e4f5da7" @@ -18859,12 +18901,18 @@ engine.io-parser@~2.2.0: blob "0.0.5" has-binary2 "~1.0.2" -engine.io-parser@~4.0.0, engine.io-parser@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-4.0.2.tgz#e41d0b3fb66f7bf4a3671d2038a154024edb501e" - integrity sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg== +engine.io@5.0.0, engine.io@~5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/engine.io/-/engine.io-5.0.0.tgz#470dc94a8a4907fa4d2cd1fa6611426afcee61bf" + integrity sha512-BATIdDV3H1SrE9/u2BAotvsmjJg0t1P4+vGedImSs1lkFAtQdvk4Ev1y4LDiPF7BPWgXWEG+NDY+nLvW3UrMWw== dependencies: - base64-arraybuffer "0.1.4" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~4.0.0" + ws "~7.4.2" engine.io@~3.5.0: version "3.5.0" @@ -18878,19 +18926,6 @@ engine.io@~3.5.0: engine.io-parser "~2.2.0" ws "~7.4.2" -engine.io@~5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/engine.io/-/engine.io-5.0.0.tgz#470dc94a8a4907fa4d2cd1fa6611426afcee61bf" - integrity sha512-BATIdDV3H1SrE9/u2BAotvsmjJg0t1P4+vGedImSs1lkFAtQdvk4Ev1y4LDiPF7BPWgXWEG+NDY+nLvW3UrMWw== - dependencies: - accepts "~1.3.4" - base64id "2.0.0" - cookie "~0.4.1" - cors "~2.8.5" - debug "~4.3.1" - engine.io-parser "~4.0.0" - ws "~7.4.2" - enhanced-resolve@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" @@ -22397,23 +22432,6 @@ got@11.1.0: p-cancelable "^2.0.0" responselike "^2.0.0" -got@11.5.1: - version "11.5.1" - resolved "https://registry.yarnpkg.com/got/-/got-11.5.1.tgz#bf098a270fe80b3fb88ffd5a043a59ebb0a391db" - integrity sha512-reQEZcEBMTGnujmQ+Wm97mJs/OK6INtO6HmLI+xt3+9CvnRwWjXutUvb2mqr+Ao4Lu05Rx6+udx9sOQAmExMxA== - dependencies: - "@sindresorhus/is" "^3.0.0" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.1" - decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.0" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - got@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" @@ -23553,7 +23571,7 @@ http-signature@~1.3.6: jsprim "^2.0.2" sshpk "^1.14.1" -http2-wrapper@^1.0.0-beta.4.4, http2-wrapper@^1.0.0-beta.5.0: +http2-wrapper@^1.0.0-beta.4.4: version "1.0.3" resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== @@ -23766,6 +23784,11 @@ immutable@3.7.6, immutable@~3.7.6: resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" integrity sha1-E7TTyxK++hVIKib+Gy665kAHHks= +immutable@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0.tgz#b86f78de6adef3608395efb269a91462797e2c23" + integrity sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw== + import-cwd@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9" @@ -28145,6 +28168,28 @@ make-fetch-happen@^8.0.9: socks-proxy-agent "^5.0.0" ssri "^8.0.0" +make-fetch-happen@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" + integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== + dependencies: + agentkeepalive "^4.1.3" + cacache "^15.2.0" + http-cache-semantics "^4.1.0" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^6.0.0" + minipass "^3.1.3" + minipass-collect "^1.0.2" + minipass-fetch "^1.3.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.2" + promise-retry "^2.0.1" + socks-proxy-agent "^6.0.0" + ssri "^8.0.0" + make-iterator@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" @@ -28703,11 +28748,6 @@ mimic-response@^2.0.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== -mimic-response@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" - integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -29685,7 +29725,7 @@ needle@^2.5.2: iconv-lite "^0.4.4" sax "^1.2.4" -negotiator@0.6.2: +negotiator@0.6.2, negotiator@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== @@ -30306,6 +30346,15 @@ npm-package-arg@8.1.0: semver "^7.0.0" validate-npm-package-name "^3.0.0" +npm-package-arg@8.1.5, npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.2: + version "8.1.5" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.5.tgz#3369b2d5fe8fdc674baa7f1786514ddc15466e44" + integrity sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q== + dependencies: + hosted-git-info "^4.0.1" + semver "^7.3.4" + validate-npm-package-name "^3.0.0" + "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", "npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0, npm-package-arg@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" @@ -30316,15 +30365,6 @@ npm-package-arg@8.1.0: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.2: - version "8.1.2" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.2.tgz#b868016ae7de5619e729993fbd8d11dc3c52ab62" - integrity sha512-6Eem455JsSMJY6Kpd3EyWE+n5hC+g9bSyHr9K9U2zqZb7+02+hObQ2c0+8iDk/mNF+8r1MhY44WypKJAkySIYA== - dependencies: - hosted-git-info "^4.0.1" - semver "^7.3.4" - validate-npm-package-name "^3.0.0" - npm-packlist@^1.1.12, npm-packlist@^1.4.4, npm-packlist@^1.4.8: version "1.4.8" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" @@ -30353,16 +30393,7 @@ npm-pick-manifest@6.1.0: npm-package-arg "^8.0.0" semver "^7.0.0" -npm-pick-manifest@^3.0.0, npm-pick-manifest@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" - integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== - dependencies: - figgy-pudding "^3.5.1" - npm-package-arg "^6.0.0" - semver "^5.4.1" - -npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.1: +npm-pick-manifest@6.1.1, npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz#7b5484ca2c908565f43b7f27644f36bb816f5148" integrity sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA== @@ -30372,6 +30403,15 @@ npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.1: npm-package-arg "^8.1.2" semver "^7.3.4" +npm-pick-manifest@^3.0.0, npm-pick-manifest@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" + integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== + dependencies: + figgy-pudding "^3.5.1" + npm-package-arg "^6.0.0" + semver "^5.4.1" + npm-profile@^4.0.2, npm-profile@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-4.0.4.tgz#28ee94390e936df6d084263ee2061336a6a1581b" @@ -30400,6 +30440,18 @@ npm-registry-client@^8.6.0: optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" +npm-registry-fetch@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-11.0.0.tgz#68c1bb810c46542760d62a6a965f85a702d43a76" + integrity sha512-jmlgSxoDNuhAtxUIG6pVwwtz840i994dL14FoNVZisrmZW5kWd63IUTNv1m/hyRSGSqWjCUp/YZlS1BJyNp9XA== + dependencies: + make-fetch-happen "^9.0.1" + minipass "^3.1.3" + minipass-fetch "^1.3.0" + minipass-json-stream "^1.0.1" + minizlib "^2.0.0" + npm-package-arg "^8.0.0" + npm-registry-fetch@^4.0.0, npm-registry-fetch@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.7.tgz#57951bf6541e0246b34c9f9a38ab73607c9449d7" @@ -30926,6 +30978,15 @@ open@7.4.0: is-docker "^2.0.0" is-wsl "^2.1.1" +open@8.2.1, open@^8.0.9: + version "8.2.1" + resolved "https://registry.yarnpkg.com/open/-/open-8.2.1.tgz#82de42da0ccbf429bc12d099dad2e0975e14e8af" + integrity sha512-rXILpcQlkF/QuFez2BJDf3GsqpjGKbkUUToAIGo9A0Q6ZkoSGogZJulrUdwRkrAsoQvoZsrjCYt8+zblOk7JQQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + open@^6.3.0: version "6.4.0" resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" @@ -30941,15 +31002,6 @@ open@^7.0.2, open@^7.0.3, open@^7.4.2: is-docker "^2.0.0" is-wsl "^2.1.1" -open@^8.0.9: - version "8.2.1" - resolved "https://registry.yarnpkg.com/open/-/open-8.2.1.tgz#82de42da0ccbf429bc12d099dad2e0975e14e8af" - integrity sha512-rXILpcQlkF/QuFez2BJDf3GsqpjGKbkUUToAIGo9A0Q6ZkoSGogZJulrUdwRkrAsoQvoZsrjCYt8+zblOk7JQQ== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - opener@^1.4.1, opener@^1.4.2, opener@^1.5.1, opener@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" @@ -31453,6 +31505,31 @@ pacote@11.2.4: ssri "^8.0.0" tar "^6.1.0" +pacote@11.3.5: + version "11.3.5" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-11.3.5.tgz#73cf1fc3772b533f575e39efa96c50be8c3dc9d2" + integrity sha512-fT375Yczn4zi+6Hkk2TBe1x1sP8FgFsEIZ2/iWaXY2r/NkhDJfxbcn5paz1+RTFCyNf+dPnaoBDJoAxXSU8Bkg== + dependencies: + "@npmcli/git" "^2.1.0" + "@npmcli/installed-package-contents" "^1.0.6" + "@npmcli/promise-spawn" "^1.2.0" + "@npmcli/run-script" "^1.8.2" + cacache "^15.0.5" + chownr "^2.0.0" + fs-minipass "^2.1.0" + infer-owner "^1.0.4" + minipass "^3.1.3" + mkdirp "^1.0.3" + npm-package-arg "^8.0.1" + npm-packlist "^2.1.4" + npm-pick-manifest "^6.0.0" + npm-registry-fetch "^11.0.0" + promise-retry "^2.0.1" + read-package-json-fast "^2.0.1" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.1.0" + pacote@^9.1.0, pacote@^9.5.12, pacote@^9.5.3: version "9.5.12" resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.12.tgz#1e11dd7a8d736bcc36b375a9804d41bb0377bf66" @@ -36022,12 +36099,7 @@ resolve@1.19.0: is-core-module "^2.1.0" path-parse "^1.0.6" -resolve@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-0.6.3.tgz#dd957982e7e736debdf53b58a4dd91754575dd46" - integrity sha1-3ZV5gufnNt699TtYpN2RdUV13UY= - -resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.8.1: +resolve@1.20.0, resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.8.1: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -36035,6 +36107,11 @@ resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1 is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-0.6.3.tgz#dd957982e7e736debdf53b58a4dd91754575dd46" + integrity sha1-3ZV5gufnNt699TtYpN2RdUV13UY= + responselike@1.0.2, responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -36498,13 +36575,6 @@ sass-lookup@^3.0.0: dependencies: commander "^2.16.0" -sass@1.32.0: - version "1.32.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.0.tgz#10101a026c13080b14e2b374d4e15ee24400a4d3" - integrity sha512-fhyqEbMIycQA4blrz/C0pYhv2o4x2y6FYYAH0CshBw3DXh5D5wyERgxw0ptdau1orc/GhNrhF7DFN2etyOCEng== - dependencies: - chokidar ">=2.0.0 <4.0.0" - sass@1.32.6: version "1.32.6" resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.6.tgz#e3646c8325cd97ff75a8a15226007f3ccd221393" @@ -36512,12 +36582,13 @@ sass@1.32.6: dependencies: chokidar ">=2.0.0 <4.0.0" -sass@1.32.8: - version "1.32.8" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.8.tgz#f16a9abd8dc530add8834e506878a2808c037bdc" - integrity sha512-Sl6mIeGpzjIUZqvKnKETfMf0iDAswD9TNlv13A7aAF3XZlRPMq4VvJWBC2N2DXbp94MQVdNSFG6LfF/iOXrPHQ== +sass@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.44.0.tgz#619aa0a2275c097f9af5e6b8fe8a95e3056430fb" + integrity sha512-0hLREbHFXGQqls/K8X+koeP+ogFRPF4ZqetVB19b7Cst9Er8cOR0rc6RU7MaI4W1JmUShd1BPgPoeqmmgMMYFw== dependencies: - chokidar ">=2.0.0 <4.0.0" + chokidar ">=3.0.0 <4.0.0" + immutable "^4.0.0" sax@1.2.1: version "1.2.1" @@ -37767,7 +37838,16 @@ socks-proxy-agent@^5.0.0: debug "4" socks "^2.3.3" -socks@^2.3.3: +socks-proxy-agent@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz#e664e8f1aaf4e1fb3df945f09e3d94f911137f87" + integrity sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew== + dependencies: + agent-base "^6.0.2" + debug "^4.3.1" + socks "^2.6.1" + +socks@^2.3.3, socks@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" integrity sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==