diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index 958b4e09948..ae6012dd03b 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,2 +1,2 @@ # Bump this version to force CI to re-create the cache from scratch. -9-18-2025-x2 +9-22-2025-root-bundle diff --git a/.circleci/src/workflows/workflows/@main.yml b/.circleci/src/workflows/workflows/@main.yml index 87a17d9318f..8b9491a85c4 100644 --- a/.circleci/src/workflows/workflows/@main.yml +++ b/.circleci/src/workflows/workflows/@main.yml @@ -6,6 +6,7 @@ linux-x64: - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] + - equal: [ 'chore/bundle_packages', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 67267416932..eb893e383f8 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -3718,6 +3718,9 @@ workflows: - equal: - update-v8-snapshot-cache-on-develop - << pipeline.git.branch >> + - equal: + - chore/bundle_packages + - << pipeline.git.branch >> - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -3772,6 +3775,9 @@ workflows: - equal: - update-v8-snapshot-cache-on-develop - << pipeline.git.branch >> + - equal: + - chore/bundle_packages + - << pipeline.git.branch >> - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -3837,6 +3843,9 @@ workflows: - equal: - update-v8-snapshot-cache-on-develop - << pipeline.git.branch >> + - equal: + - chore/bundle_packages + - << pipeline.git.branch >> - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -4322,6 +4331,9 @@ workflows: - equal: - update-v8-snapshot-cache-on-develop - << pipeline.git.branch >> + - equal: + - chore/bundle_packages + - << pipeline.git.branch >> - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -5157,6 +5169,9 @@ workflows: - equal: - update-v8-snapshot-cache-on-develop - << pipeline.git.branch >> + - equal: + - chore/bundle_packages + - << pipeline.git.branch >> - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> diff --git a/guides/esm-migration.md b/guides/esm-migration.md index 4681bf48a03..0f58f5ac098 100644 --- a/guides/esm-migration.md +++ b/guides/esm-migration.md @@ -10,6 +10,10 @@ - Unit tests in package are written in TypeScript - Does not include scripts or system test migrations +#### Notes + +When migrating some of these projects away from the `ts-node` entry [see `@packages/scaffold-config` example](https://github.com/cypress-io/cypress/blob/v15.2.0/packages/scaffold-config/index.js), it is somewhat difficult to make separate browser/node entries as the v8-snapshot [tsconfig.json](https://github.com/cypress-io/cypress/blob/v15.2.0/tooling/v8-snapshot/tsconfig.json) is using an older style of module resolution where the `exports` key inside a package's `package.json` is not well supported. Because of this, we need to find ways to bundle code that is needed internally in the browser vs in node without them being a part of the same bundle. This is a temporary work around until we are able to get every package being able to build as an ES Module, which as that point we can re assess how the Cypress binary is being built as well as v8-snapshots, and will allow us to reconfigure this packages to export content in a more proper fashion. + #### Status ##### NPM Packages @@ -33,11 +37,11 @@ ##### Binary Packages - [ ] packages/app **PARTIAL** - low priority: frontend package -- [ ] packages/config **PARTIAL** - entry point is JS -- [ ] packages/data-context **PARTIAL** - entry point is JS +- [x] packages/config ✅ **COMPLETED** +- [x] packages/data-context ✅ **COMPLETED** - [x] packages/driver ✅ **COMPLETED** - source complete, cypress tests need migration - [x] packages/electron ✅ **COMPLETED** -- [ ] packages/error **PARTIAL** - entry point is JS +- [x] packages/error ✅ **COMPLETED** - [x] packages/eslint-config ✅ **COMPLETED** - [ ] packages/example - [ ] packages/extension @@ -54,17 +58,17 @@ - [x] packages/packherd-require ✅ **COMPLETED** - [ ] packages/proxy **PARTIAL** - entry point is JS - [x] packages/reporter ✅ **COMPLETED** -- [ ] packages/resolve-dist **PARTIAL** - entry point is JS +- [x] packages/resolve-dist ✅ **COMPLETED** - [ ] packages/rewriter **PARTIAL** - entry point is JS - [ ] packages/root - [x] packages/runner ✅ **COMPLETED** -- [ ] packages/scaffold-config **PARTIAL** - entry point is JS +- [x] packages/scaffold-config ✅ **COMPLETED** - [ ] packages/server **PARTIAL** - many source/test files in JS. highest priority - [ ] packages/socket **PARTIAL** - entry point is JS. Tests are JS - [x] packages/stderr-filtering ✅ **COMPLETED** -- [ ] packages/telemetry **PARTIAL** - entry point is JS +- [x] packages/telemetry ✅ **COMPLETED** - [ ] packages/ts **PARTIAL** - ultimate goal is removal and likely not worth the effort to convert -- [ ] packages/types **PARTIAL** - entry point is JS +- [x] packages/types ✅ **COMPLETED** - [x] packages/v8-snapshot-require - [x] packages/web-config diff --git a/packages/app/src/main.ts b/packages/app/src/main.ts index 7d5f77e0d95..27b54273237 100644 --- a/packages/app/src/main.ts +++ b/packages/app/src/main.ts @@ -13,7 +13,7 @@ import Toast, { POSITION } from 'vue-toastification' import 'vue-toastification/dist/index.css' import { createWebsocket } from './runner' import { getRunnerConfigFromWindow } from './runner/get-runner-config-from-window' -import { telemetry } from '@packages/telemetry/src/browser' +import { telemetry } from '@packages/telemetry/browser/client' // Grab the time just before loading config to include that in the cypress:app span const now = performance.now() diff --git a/packages/app/src/runner/event-manager.ts b/packages/app/src/runner/event-manager.ts index 44adea390e7..8a682069640 100644 --- a/packages/app/src/runner/event-manager.ts +++ b/packages/app/src/runner/event-manager.ts @@ -14,7 +14,7 @@ import { useStudioStore } from '../store/studio-store' import { getAutIframeModel } from '.' import { handlePausing } from './events/pausing' import { addTelemetryListeners } from './events/telemetry' -import { telemetry } from '@packages/telemetry/src/browser' +import { telemetry } from '@packages/telemetry/browser/client' import { addCaptureProtocolListeners } from './events/capture-protocol' import { getRunnerConfigFromWindow } from './get-runner-config-from-window' diff --git a/packages/app/src/runner/events/telemetry.ts b/packages/app/src/runner/events/telemetry.ts index 2a4346f9163..013d8bc132f 100644 --- a/packages/app/src/runner/events/telemetry.ts +++ b/packages/app/src/runner/events/telemetry.ts @@ -1,4 +1,4 @@ -import { telemetry } from '@packages/telemetry/src/browser' +import { telemetry } from '@packages/telemetry/browser/client' export const addTelemetryListeners = (Cypress: Cypress.Cypress) => { Cypress.on('test:before:run', (attributes, test) => { diff --git a/packages/config/.eslintignore b/packages/config/.eslintignore index d9c909f1aed..0345fd209f1 100644 --- a/packages/config/.eslintignore +++ b/packages/config/.eslintignore @@ -1,3 +1,5 @@ +**/cjs +**/esm **/dist **/*.d.ts **/package-lock.json diff --git a/packages/config/.gitignore b/packages/config/.gitignore index 6724ce3596d..929bed061c1 100644 --- a/packages/config/.gitignore +++ b/packages/config/.gitignore @@ -1 +1,2 @@ -src/**/*.js \ No newline at end of file +cjs/ +esm/ \ No newline at end of file diff --git a/packages/config/index.js b/packages/config/index.js deleted file mode 100644 index 007d57a496b..00000000000 --- a/packages/config/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if (process.env.CYPRESS_INTERNAL_ENV !== 'production') { - require('@packages/ts/registerDir')(__dirname) -} - -module.exports = require('./src') diff --git a/packages/config/package.json b/packages/config/package.json index 72f945a589b..815eb3d046a 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -3,12 +3,15 @@ "version": "0.0.0-development", "description": "Config contains the configuration types and validation function used in the cypress electron application.", "private": true, - "main": "index.js", - "browser": "src/browser.ts", + "main": "cjs/index.js", + "browser": "esm/browser.js", "scripts": { - "build-prod": "tsc || echo 'built, with errors'", - "check-ts": "tsc --noEmit && yarn -s tslint", - "clean": "rimraf --glob './src/*.js' './src/**/*.js' './src/**/**/*.js' './test/!**__fixtures__**/**/*.js' || echo 'cleaned'", + "build": "yarn build:esm && yarn build:cjs", + "build-prod": "yarn build", + "build:cjs": "rimraf cjs && tsc -p tsconfig.cjs.json", + "build:esm": "rimraf esm && tsc -p tsconfig.esm.json", + "check-ts": "tsc -p tsconfig.cjs.json --noEmit && yarn -s tslint -p tsconfig.cjs.json", + "clean": "rimraf cjs esm", "clean-deps": "rimraf node_modules", "lint": "eslint --ext .js,.ts,.json, .", "test": "yarn test-unit", @@ -45,11 +48,14 @@ "@types/mocha": "9.1.0", "babel-plugin-tester": "^10.1.0", "chai": "4.2.0", - "mocha": "7.0.1" + "mocha": "7.0.1", + "rimraf": "6.0.1" }, "files": [ - "src" + "cjs/*", + "esm/*" ], "types": "src/index.ts", + "module": "esm/index.js", "nx": {} } diff --git a/packages/config/src/ast-utils/addToCypressConfig.ts b/packages/config/src/ast-utils/addToCypressConfig.ts index 5c5a7896b4c..d0208c79d46 100644 --- a/packages/config/src/ast-utils/addToCypressConfig.ts +++ b/packages/config/src/ast-utils/addToCypressConfig.ts @@ -49,7 +49,7 @@ export async function addToCypressConfig (filePath: string, code: string, toAdd: traverse(ast, addToCypressConfigPlugin(toAdd).visitor) return print(ast).code - } catch (e) { + } catch (e: any) { debug(`Error adding properties to %s: %s`, filePath, e.stack) throw new Error(`Unable to automerge with the config file`) } @@ -125,7 +125,7 @@ export async function addTestingTypeToCypressConfig (options: AddTestingTypeToCy return { result: resultStatus, } - } catch (e) { + } catch (e: any) { return { result: 'NEEDS_MERGE', error: e, diff --git a/packages/config/src/options.ts b/packages/config/src/options.ts index 0208b42dd46..18ad3b79151 100644 --- a/packages/config/src/options.ts +++ b/packages/config/src/options.ts @@ -1,7 +1,5 @@ import os from 'os' import path from 'path' - -// @ts-ignore import pkg from '@packages/root' import type { AllCypressErrorNames } from '@packages/errors' import type { TestingType } from '@packages/types' @@ -485,7 +483,7 @@ const runtimeOptions: Array = [ // having the final config that has the e2e property flattened/compacted // we may not be able to get the value to ignore. name: 'additionalIgnorePattern', - defaultValue: (options: Record = {}) => options.testingType === 'component' ? defaultSpecPattern.e2e : [], + defaultValue: (options: Record = {}): string | any[] => options.testingType === 'component' ? defaultSpecPattern.e2e : [], validation: validate.isStringOrArrayOfStrings, isInternal: true, }, { diff --git a/packages/config/test/project/utils.spec.ts b/packages/config/test/project/utils.spec.ts index b707d6a1805..cfbaf7c7b83 100644 --- a/packages/config/test/project/utils.spec.ts +++ b/packages/config/test/project/utils.spec.ts @@ -22,6 +22,7 @@ import { setSupportFileAndFolder, mergeDefaults, } from '../../src/project/utils' +import { resetIssuedWarnings } from '../../src/browser' import path from 'node:path' const debug = Debug('test') @@ -29,6 +30,7 @@ const debug = Debug('test') describe('config/src/project/utils', () => { beforeEach(function () { delete process.env.CYPRESS_COMMERCIAL_RECOMMENDATIONS + resetIssuedWarnings() }) before(function () { diff --git a/packages/config/tsconfig.base.json b/packages/config/tsconfig.base.json new file mode 100644 index 00000000000..0e7ad96d5cf --- /dev/null +++ b/packages/config/tsconfig.base.json @@ -0,0 +1,25 @@ +{ + "include": [ + "src/*.ts" + ], + "exclude": [ + "test" + ], + "compilerOptions": { + "strict": true, + "noImplicitAny": true, + "esModuleInterop": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "allowJs": true, + "noUncheckedIndexedAccess": true, + "ignoreDeprecations": "5.0", + "importsNotUsedAsValues": "error", + "skipLibCheck": true, + "resolveJsonModule": true, + "types": [ + "mocha", + "node" + ] + } +} \ No newline at end of file diff --git a/packages/config/tsconfig.cjs.json b/packages/config/tsconfig.cjs.json new file mode 100644 index 00000000000..088d461d9d1 --- /dev/null +++ b/packages/config/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./cjs", + "target": "ES2022", + "module": "CommonJS", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/config/tsconfig.esm.json b/packages/config/tsconfig.esm.json new file mode 100644 index 00000000000..07baf4ecf98 --- /dev/null +++ b/packages/config/tsconfig.esm.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./esm", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/config/tsconfig.json b/packages/config/tsconfig.json deleted file mode 100644 index 2f41e195210..00000000000 --- a/packages/config/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../ts/tsconfig.json", - "include": [ - "src/*.ts" - ], - "exclude": [ - "test" - ], - "compilerOptions": { - "allowJs": false, - "rootDir": "src", - "noImplicitAny": true, - "noUncheckedIndexedAccess": true, - "types": ["node"], - "typeRoots": [ - "../../node_modules/@types" - ], - } -} diff --git a/packages/data-context/.gitignore b/packages/data-context/.gitignore new file mode 100644 index 00000000000..929bed061c1 --- /dev/null +++ b/packages/data-context/.gitignore @@ -0,0 +1,2 @@ +cjs/ +esm/ \ No newline at end of file diff --git a/packages/data-context/index.js b/packages/data-context/index.js deleted file mode 100644 index 643cb42256e..00000000000 --- a/packages/data-context/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if (process.env.CYPRESS_INTERNAL_ENV !== 'production') { - require('@packages/ts/register') -} - -module.exports = require('./src') diff --git a/packages/data-context/package.json b/packages/data-context/package.json index 60db922aec1..c4c184b218b 100644 --- a/packages/data-context/package.json +++ b/packages/data-context/package.json @@ -2,13 +2,16 @@ "name": "@packages/data-context", "version": "0.0.0-development", "description": "Centralized data access for the Cypress application", - "main": "index.js", - "browser": "src/index.ts", + "main": "cjs/index.js", "scripts": { - "build": "node ./scripts/build.js", - "build-prod": "tsc || echo 'built, with errors'", - "check-ts": "tsc --noEmit && yarn -s tslint", - "clean": "rimraf --glob \"./{src,test}/**/*.js\"", + "prebuild": "yarn build:schema", + "build": "yarn build:cjs && yarn build:esm", + "build-prod": "yarn build", + "build:cjs": "rimraf cjs && tsc -p tsconfig.cjs.json", + "build:esm": "rimraf esm && tsc -p tsconfig.esm.json", + "build:schema": "tsx ./scripts/build.ts", + "check-ts": "tsc -p tsconfig.cjs.json --noEmit && yarn -s tslint -p tsconfig.cjs.json", + "clean": "rimraf esm cjs", "clean-deps": "rimraf node_modules", "lint": "eslint --ext .js,.ts,.json, .", "test": "yarn test-unit", @@ -95,14 +98,19 @@ "mocha-junit-reporter": "2.2.0", "mocha-multi-reporters": "1.5.1", "nexus": "^1.2.0-next.15", + "rimraf": "6.0.1", "sinon": "13.0.2", "sinon-chai": "3.7.0", - "tslint": "^6.1.3" + "tslint": "^6.1.3", + "tsx": "4.20.5", + "typescript": "5.9.2" }, "files": [ - "src" + "cjs/*", + "esm/*" ], "types": "src/index.ts", + "module": "esm/index.js", "nx": { "targets": { "build": { diff --git a/packages/data-context/scripts/build.js b/packages/data-context/scripts/build.ts similarity index 79% rename from packages/data-context/scripts/build.js rename to packages/data-context/scripts/build.ts index 8544c797687..373582772d1 100644 --- a/packages/data-context/scripts/build.js +++ b/packages/data-context/scripts/build.ts @@ -1,7 +1,7 @@ -const fs = require('fs-extra') -const { buildSchema, introspectionFromSchema } = require('graphql') -const path = require('path') -const { minifyIntrospectionQuery } = require('@urql/introspection') +import fs from 'fs-extra' +import { buildSchema, introspectionFromSchema } from 'graphql' +import path from 'path' +import { minifyIntrospectionQuery } from '@urql/introspection' const graphQlPackageRoot = path.join(__dirname, '..', '..', 'graphql') const dataContextRoot = path.join(__dirname, '..') diff --git a/packages/data-context/src/actions/DataEmitterActions.ts b/packages/data-context/src/actions/DataEmitterActions.ts index b6f4740ea5d..22f29998f0f 100644 --- a/packages/data-context/src/actions/DataEmitterActions.ts +++ b/packages/data-context/src/actions/DataEmitterActions.ts @@ -310,7 +310,7 @@ export class DataEmitterActions extends DataEmitterEvents { [Symbol.asyncIterator] () { return iterator }, - } + } as unknown as AsyncGenerator return iterator } diff --git a/packages/data-context/src/actions/WizardActions.ts b/packages/data-context/src/actions/WizardActions.ts index 4e8f54c9113..fa45259f6b2 100644 --- a/packages/data-context/src/actions/WizardActions.ts +++ b/packages/data-context/src/actions/WizardActions.ts @@ -1,5 +1,5 @@ import type { NexusGenObjects } from '@packages/graphql/src/gen/nxs.gen' -import { detectFramework, commandsFileBody, supportFileComponent, supportFileE2E, getBundler, CT_FRAMEWORKS, resolveComponentFrameworkDefinition, detectThirdPartyCTFrameworks } from '@packages/scaffold-config' +import { detectFramework, commandsFileBody, supportFileComponent, supportFileE2E, getBundler, CT_FRAMEWORKS, resolveComponentFrameworkDefinition, detectThirdPartyCTFrameworks, componentIndexHtmlGenerator } from '@packages/scaffold-config' import assert from 'assert' import path from 'path' import Debug from 'debug' @@ -9,7 +9,6 @@ const debug = Debug('cypress:data-context:wizard-actions') import type { DataContext } from '..' import { addTestingTypeToCypressConfig, AddTestingTypeToCypressConfigOptions } from '@packages/config' -import componentIndexHtmlGenerator from '@packages/scaffold-config/src/component-index-template' export class WizardActions { constructor (private ctx: DataContext) {} diff --git a/packages/data-context/tsconfig.base.json b/packages/data-context/tsconfig.base.json new file mode 100644 index 00000000000..fe66f6aae63 --- /dev/null +++ b/packages/data-context/tsconfig.base.json @@ -0,0 +1,27 @@ +{ + "include": [ + "src" + ], + "exclude": [ + "src/gen" + ], + "compilerOptions": { + "lib": [ + "esnext" + ], + "allowJs": false, + "noImplicitAny": true, + "noUncheckedIndexedAccess": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "types": [ + "cypress", + "mocha", + "node" + ], + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "useUnknownInCatchVariables": false + } +} diff --git a/packages/data-context/tsconfig.cjs.json b/packages/data-context/tsconfig.cjs.json new file mode 100644 index 00000000000..088d461d9d1 --- /dev/null +++ b/packages/data-context/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./cjs", + "target": "ES2022", + "module": "CommonJS", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/data-context/tsconfig.esm.json b/packages/data-context/tsconfig.esm.json new file mode 100644 index 00000000000..07baf4ecf98 --- /dev/null +++ b/packages/data-context/tsconfig.esm.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./esm", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/data-context/tsconfig.json b/packages/data-context/tsconfig.json deleted file mode 100644 index bfc314d2294..00000000000 --- a/packages/data-context/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../ts/tsconfig.json", - "include": ["src"], - "exclude": [ - "script" - ], - "files": [ - "./../ts/index.d.ts" - ], - "compilerOptions": { - "lib": ["esnext"], - "allowJs": false, - "noImplicitAny": true, - "noUncheckedIndexedAccess": true, - "types": ["cypress"], - } -} diff --git a/packages/driver/src/cypress.ts b/packages/driver/src/cypress.ts index dfdf6a170c1..48d4df41a6a 100644 --- a/packages/driver/src/cypress.ts +++ b/packages/driver/src/cypress.ts @@ -48,7 +48,7 @@ import type { CachedTestState } from '@packages/types' import { DocumentDomainInjection } from '@packages/network/lib/document-domain-injection' import { setSpecContentSecurityPolicy } from './util/privileged_channel' -import { telemetry } from '@packages/telemetry/src/browser' +import { telemetry } from '@packages/telemetry/browser/client' const debug = debugFn('cypress:driver:cypress') diff --git a/packages/driver/src/main.ts b/packages/driver/src/main.ts index 35f66cbeb63..b91546b8205 100644 --- a/packages/driver/src/main.ts +++ b/packages/driver/src/main.ts @@ -4,7 +4,7 @@ import './config/bluebird' import './config/jquery' import './config/lodash' import $Cypress from './cypress' -import { telemetry } from '@packages/telemetry/src/browser' +import { telemetry } from '@packages/telemetry/browser/client' // Telemetry has already been initialized in the 'app' package // but since this is a different package we have to link up the instances. diff --git a/packages/errors/.gitignore b/packages/errors/.gitignore new file mode 100644 index 00000000000..71e8cd6fee8 --- /dev/null +++ b/packages/errors/.gitignore @@ -0,0 +1,2 @@ +cjs +esm \ No newline at end of file diff --git a/packages/errors/index.js b/packages/errors/index.js deleted file mode 100644 index 63192e85389..00000000000 --- a/packages/errors/index.js +++ /dev/null @@ -1,12 +0,0 @@ -// The errors package is always compiled in a production build, but when we're developing locally, -// there's a chance we can run into a situation where we're requiring the -// @packages/errors from the child process in a non-ts project, and we need to build this JIT. -// Otherwise the error will incorrectly be shown as "cannot find module ./src" instead of -// the actual error. Double check that we can require './src', and if not install ts-node -try { - require.resolve('./src') -} catch (e) { - require('@packages/ts/register') -} - -module.exports = require('./src') diff --git a/packages/errors/package.json b/packages/errors/package.json index 39af2a58e51..0bf80bf1d04 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -2,19 +2,25 @@ "name": "@packages/errors", "version": "0.0.0-development", "description": "Error definitions and utilities for Cypress", - "main": "index.js", - "browser": "src/index.ts", + "main": "cjs/index.js", + "module": "esm/index.js", + "browser": "esm/index.js", + "files": [ + "cjs/*", + "esm/*" + ], + "types": "src/index.ts", "scripts": { - "build": "../../scripts/run-if-ci.sh tsc || echo 'type errors'", - "build-prod": "tsc", - "check-ts": "tsc --noEmit && yarn -s tslint", - "clean": "rimraf --glob './src/*.js' './src/**/*.js' './src/**/**/*.js' './test/**/*.js' || echo 'cleaned'", - "clean-deps": "rimraf node_modules", + "build": "yarn build:esm && yarn build:cjs", + "build-prod": "yarn build", + "build:cjs": "rimraf cjs && tsc -p tsconfig.cjs.json", + "build:esm": "rimraf esm && tsc -p tsconfig.esm.json", + "check-ts": "tsc -p tsconfig.cjs.json --noEmit && yarn -s tslint -p tsconfig.cjs.json", + "clean": "rimraf cjs esm", "comparison": "node -r @packages/ts/register test/support/error-comparison-tool.ts", "lint": "eslint", "test": "yarn test-unit", "test-electron": "HTML_IMAGE_CONVERSION=1 xvfb-maybe electron --no-sandbox ./node_modules/.bin/_mocha", - "pretest-unit": "yarn clean", "test-unit": "mocha", "tslint": "tslint --config ../ts/tslint.json --project ." }, @@ -48,11 +54,6 @@ "terminal-banner": "^1.1.0", "xvfb-maybe": "^0.2.1" }, - "files": [ - "src", - "dist" - ], - "types": "src/index.ts", "lint-staged": { "**/*.{js,jsx,ts,tsx,json}": "eslint --fix" }, diff --git a/packages/errors/src/errors.ts b/packages/errors/src/errors.ts index 2f1094c4074..e6ed8a32600 100644 --- a/packages/errors/src/errors.ts +++ b/packages/errors/src/errors.ts @@ -1553,7 +1553,6 @@ export const AllCypressErrors = { }, } as const -// eslint-disable-next-line @typescript-eslint/no-unused-vars const _typeCheck: Record ErrTemplateResult> = AllCypressErrors export type AllCypressErrorObj = typeof AllCypressErrors @@ -1608,7 +1607,7 @@ export const getError = function (type: return err } -export const logWarning = function (type: Type, ...args: Parameters) { +export const logWarning = function (type: Type, ...args: Parameters): null { const err = getError(type, ...args) logError(err, 'magenta') diff --git a/packages/errors/tsconfig.json b/packages/errors/tsconfig.base.json similarity index 68% rename from packages/errors/tsconfig.json rename to packages/errors/tsconfig.base.json index 3959f1d1fc2..07531751164 100644 --- a/packages/errors/tsconfig.json +++ b/packages/errors/tsconfig.base.json @@ -1,5 +1,4 @@ { - "extends": "../ts/tsconfig.json", "include": [ "src", ], @@ -8,5 +7,8 @@ "noImplicitAny": true, "noImplicitReturns": false, "noUncheckedIndexedAccess": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "esModuleInterop": true } } diff --git a/packages/errors/tsconfig.cjs.json b/packages/errors/tsconfig.cjs.json new file mode 100644 index 00000000000..088d461d9d1 --- /dev/null +++ b/packages/errors/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./cjs", + "target": "ES2022", + "module": "CommonJS", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/errors/tsconfig.esm.json b/packages/errors/tsconfig.esm.json new file mode 100644 index 00000000000..07baf4ecf98 --- /dev/null +++ b/packages/errors/tsconfig.esm.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./esm", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Wizard.ts b/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Wizard.ts index d51060722c1..a9fef258847 100644 --- a/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Wizard.ts +++ b/packages/frontend-shared/cypress/support/mock-graphql/stubgql-Wizard.ts @@ -1,7 +1,7 @@ import type { Wizard, WizardBundler } from '../generated/test-graphql-types.gen' -import * as wizardDeps from '@packages/scaffold-config/src/dependencies' import type { MaybeResolver } from './clientTestUtils' import { testNodeId } from './clientTestUtils' +import { WIZARD_DEPENDENCY_REACT, WIZARD_DEPENDENCY_REACT_DOM, WIZARD_DEPENDENCY_TYPESCRIPT } from '@packages/scaffold-config/browser/dependencies' const testBundlerVite = { type: 'vite', @@ -34,28 +34,28 @@ const testFrameworks = [ export const stubWizard: MaybeResolver = { __typename: 'Wizard', - installDependenciesCommand: `npm install -D ${wizardDeps.WIZARD_DEPENDENCY_REACT.package} ${wizardDeps.WIZARD_DEPENDENCY_REACT_DOM.package} ${wizardDeps.WIZARD_DEPENDENCY_TYPESCRIPT.package}`, + installDependenciesCommand: `npm install -D ${WIZARD_DEPENDENCY_REACT.package} ${WIZARD_DEPENDENCY_REACT_DOM.package} ${WIZARD_DEPENDENCY_TYPESCRIPT.package}`, packagesToInstall: [ { __typename: 'WizardNpmPackage', id: 'react', satisfied: true, detectedVersion: '18.3.1', - ...wizardDeps.WIZARD_DEPENDENCY_REACT, + ...WIZARD_DEPENDENCY_REACT, }, { __typename: 'WizardNpmPackage', id: 'react-dom', satisfied: true, detectedVersion: '18.3.1', - ...wizardDeps.WIZARD_DEPENDENCY_REACT_DOM, + ...WIZARD_DEPENDENCY_REACT_DOM, }, { __typename: 'WizardNpmPackage', id: 'typescript', satisfied: false, detectedVersion: '3.9.4', - ...wizardDeps.WIZARD_DEPENDENCY_TYPESCRIPT, + ...WIZARD_DEPENDENCY_TYPESCRIPT, }, ], allBundlers, diff --git a/packages/graphql/.eslintignore b/packages/graphql/.eslintignore index a784fe25271..58065fe5c8b 100644 --- a/packages/graphql/.eslintignore +++ b/packages/graphql/.eslintignore @@ -1,2 +1,4 @@ **/tsconfig.json *.gen.ts +cjs/ +esm/ \ No newline at end of file diff --git a/packages/graphql/.gitignore b/packages/graphql/.gitignore index 6724ce3596d..929bed061c1 100644 --- a/packages/graphql/.gitignore +++ b/packages/graphql/.gitignore @@ -1 +1,2 @@ -src/**/*.js \ No newline at end of file +cjs/ +esm/ \ No newline at end of file diff --git a/packages/graphql/index.js b/packages/graphql/index.js deleted file mode 100644 index 643cb42256e..00000000000 --- a/packages/graphql/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if (process.env.CYPRESS_INTERNAL_ENV !== 'production') { - require('@packages/ts/register') -} - -module.exports = require('./src') diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 681352cc940..fc69e812458 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -2,11 +2,14 @@ "name": "@packages/graphql", "version": "0.0.0-development", "private": true, - "main": "index.js", - "browser": "src/index.ts", + "main": "cjs/index.js", "scripts": { - "build": "graphql-codegen --config graphql-codegen.yml", - "build-prod": "tsc || echo 'built, with errors'", + "prebuild": "yarn build:schema", + "build": "yarn build:cjs && yarn build:esm", + "build-prod": "yarn build", + "build:cjs": "rimraf cjs && tsc -p tsconfig.cjs.json", + "build:esm": "rimraf esm && tsc -p tsconfig.esm.json", + "build:schema": "graphql-codegen --config graphql-codegen.yml", "check-ts": "tsc --noEmit && yarn -s tslint", "clean": "rimraf --glob \"./{src,test}/**/*.js\"", "clean-deps": "rimraf node_modules", @@ -67,12 +70,16 @@ "schemas" ], "types": "src/index.ts", + "module": "esm/index.js", "nx": { "targets": { "nexus-build": { "outputs": [ "{projectRoot}/src/gen/nxs.gen.ts", "{projectRoot}/schemas/schema.graphql" + ], + "dependsOn": [ + "packages/data-context:prebuild" ] }, "build": { diff --git a/packages/graphql/src/schema.ts b/packages/graphql/src/schema.ts index 92aabda6446..b8d805110ea 100644 --- a/packages/graphql/src/schema.ts +++ b/packages/graphql/src/schema.ts @@ -23,7 +23,7 @@ export const graphqlSchema = makeSchema({ schema: path.join(__dirname, '..', 'schemas', 'schema.graphql'), }, contextType: { - module: '@packages/data-context', + module: '@packages/data-context/src/DataContext.ts', export: 'DataContext', }, mergeSchema: { diff --git a/packages/graphql/tsconfig.base.json b/packages/graphql/tsconfig.base.json new file mode 100644 index 00000000000..da9bd904906 --- /dev/null +++ b/packages/graphql/tsconfig.base.json @@ -0,0 +1,19 @@ +{ + "include": [ + "src" + ], + "compilerOptions": { + "lib": [ + "esnext" + ], + "allowJs": false, + "noImplicitAny": true, + "noUncheckedIndexedAccess": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "useUnknownInCatchVariables": false + } +} diff --git a/packages/graphql/tsconfig.cjs.json b/packages/graphql/tsconfig.cjs.json new file mode 100644 index 00000000000..088d461d9d1 --- /dev/null +++ b/packages/graphql/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./cjs", + "target": "ES2022", + "module": "CommonJS", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/graphql/tsconfig.esm.json b/packages/graphql/tsconfig.esm.json new file mode 100644 index 00000000000..07baf4ecf98 --- /dev/null +++ b/packages/graphql/tsconfig.esm.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./esm", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/graphql/tsconfig.json b/packages/graphql/tsconfig.json deleted file mode 100644 index b5aef75f955..00000000000 --- a/packages/graphql/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../ts/tsconfig.json", - "include": [ - "src/*.ts", - "src/**/*.ts" - ], - "exclude": [ - "test", - "script" - ], - "compilerOptions": { - "lib": ["esnext"], - "allowJs": false, - "noImplicitAny": true, - "noUncheckedIndexedAccess": true, - "types": [] - }, -} diff --git a/packages/launchpad/src/setup/InstallDependencies.cy.tsx b/packages/launchpad/src/setup/InstallDependencies.cy.tsx index 58f075a1ec8..e8d5e9f5088 100644 --- a/packages/launchpad/src/setup/InstallDependencies.cy.tsx +++ b/packages/launchpad/src/setup/InstallDependencies.cy.tsx @@ -2,7 +2,7 @@ import { defaultMessages } from '@cy/i18n' import InstallDependencies from './InstallDependencies.vue' import { InstallDependenciesFragmentDoc } from '../generated/graphql-test' -import * as wizardDeps from '@packages/scaffold-config/src/dependencies' +import { WIZARD_DEPENDENCY_REACT, WIZARD_DEPENDENCY_REACT_DOM, WIZARD_DEPENDENCY_TYPESCRIPT } from '@packages/scaffold-config/browser/dependencies' describe('', () => { beforeEach(function () { @@ -73,21 +73,21 @@ describe('', () => { id: 'react', satisfied: true, detectedVersion: '18.3.1', - ...wizardDeps.WIZARD_DEPENDENCY_REACT, + ...WIZARD_DEPENDENCY_REACT, }, { __typename: 'WizardNpmPackage', id: 'react-dom', satisfied: true, detectedVersion: '18.3.1', - ...wizardDeps.WIZARD_DEPENDENCY_REACT_DOM, + ...WIZARD_DEPENDENCY_REACT_DOM, }, { __typename: 'WizardNpmPackage', id: 'typescript', satisfied: true, detectedVersion: '2.0.1', - ...wizardDeps.WIZARD_DEPENDENCY_TYPESCRIPT, + ...WIZARD_DEPENDENCY_TYPESCRIPT, }, ] diff --git a/packages/launchpad/src/setup/ManualInstall.cy.tsx b/packages/launchpad/src/setup/ManualInstall.cy.tsx index 12c691ef304..844f1db73f2 100644 --- a/packages/launchpad/src/setup/ManualInstall.cy.tsx +++ b/packages/launchpad/src/setup/ManualInstall.cy.tsx @@ -1,10 +1,10 @@ import sinon from 'sinon' import { ManualInstallFragmentDoc } from '../generated/graphql-test' import ManualInstall from './ManualInstall.vue' -import * as deps from '@packages/scaffold-config/src/dependencies' // tslint:disable-next-line: no-implicit-dependencies - need to handle this import { defaultMessages } from '@cy/i18n' import { Clipboard_CopyToClipboardDocument } from '../generated/graphql' +import { WIZARD_DEPENDENCY_REACT, WIZARD_DEPENDENCY_TYPESCRIPT } from '@packages/scaffold-config/browser/dependencies' describe('', () => { it('playground', () => { @@ -18,8 +18,8 @@ describe('', () => { }) it('lists packages and can copy install command to clipboard', { viewportWidth: 800, viewportHeight: 600 }, () => { - const framework = deps.WIZARD_DEPENDENCY_REACT - const language = deps.WIZARD_DEPENDENCY_TYPESCRIPT + const framework = WIZARD_DEPENDENCY_REACT + const language = WIZARD_DEPENDENCY_TYPESCRIPT const stubCopy = sinon.stub() diff --git a/packages/proxy/lib/network-proxy.ts b/packages/proxy/lib/network-proxy.ts index b353458da63..13490b9271c 100644 --- a/packages/proxy/lib/network-proxy.ts +++ b/packages/proxy/lib/network-proxy.ts @@ -55,7 +55,7 @@ export class NetworkProxy { isVerbose: true, }) - await this.http.handleHttpRequest(req, res, span).finally(() => { + await this.http.handleHttpRequest(req, res, span || undefined).finally(() => { span?.end() }) } diff --git a/packages/resolve-dist/.gitignore b/packages/resolve-dist/.gitignore index 40dc45d0feb..eb7467f70ed 100644 --- a/packages/resolve-dist/.gitignore +++ b/packages/resolve-dist/.gitignore @@ -1 +1,2 @@ -lib/**/*.js \ No newline at end of file +esm/ +cjs/ \ No newline at end of file diff --git a/packages/resolve-dist/index.js b/packages/resolve-dist/index.js deleted file mode 100644 index bf66abc3bf7..00000000000 --- a/packages/resolve-dist/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if (process.env.CYPRESS_INTERNAL_ENV !== 'production') { - require('@packages/ts/register') -} - -module.exports = require('./lib') diff --git a/packages/resolve-dist/package.json b/packages/resolve-dist/package.json index 40c1ff9772c..bf07fa74bbf 100644 --- a/packages/resolve-dist/package.json +++ b/packages/resolve-dist/package.json @@ -2,24 +2,28 @@ "name": "@packages/resolve-dist", "version": "0.0.0-development", "private": true, - "main": "index.js", + "main": "cjs/index.js", "scripts": { - "build-prod": "tsc --project .", - "check-ts": "tsc --noEmit && yarn -s tslint", - "clean": "rimraf --glob 'lib/**/*.js'", + "build": "yarn build:cjs && yarn build:esm", + "build-prod": "yarn build", + "build:cjs": "rimraf cjs && tsc -p tsconfig.cjs.json", + "build:esm": "rimraf esm && tsc -p tsconfig.esm.json", + "check-ts": "tsc -p tsconfig.cjs.json --noEmit && yarn -s tslint -p tsconfig.cjs.json", + "clean": "rimraf cjs esm", "clean-deps": "rimraf node_modules", "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .", "tslint": "tslint --config ../ts/tslint.json --project ." }, "dependencies": { - "fs-extra": "9.1.0" - }, - "devDependencies": { - "@packages/ts": "0.0.0-development" + "fs-extra": "9.1.0", + "rimraf": "^6.0.1", + "typescript": "~5.4.5" }, "files": [ - "lib" + "cjs/*", + "esm/*" ], "types": "./lib/index.ts", + "module": "esm/index.js", "nx": {} } diff --git a/packages/resolve-dist/tsconfig.base.json b/packages/resolve-dist/tsconfig.base.json new file mode 100644 index 00000000000..e1b677af4d9 --- /dev/null +++ b/packages/resolve-dist/tsconfig.base.json @@ -0,0 +1,10 @@ +{ + "include": [ + "lib/**/*.ts" + ], + "compilerOptions": { + "allowJs": false, + "esModuleInterop": true, + "skipLibCheck": true + } +} diff --git a/packages/resolve-dist/tsconfig.cjs.json b/packages/resolve-dist/tsconfig.cjs.json new file mode 100644 index 00000000000..709d6e27fca --- /dev/null +++ b/packages/resolve-dist/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./lib", + "outDir": "./cjs", + "target": "ES2022", + "module": "CommonJS", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/resolve-dist/tsconfig.esm.json b/packages/resolve-dist/tsconfig.esm.json new file mode 100644 index 00000000000..ba419c5db3e --- /dev/null +++ b/packages/resolve-dist/tsconfig.esm.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./lib", + "outDir": "./esm", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/resolve-dist/tsconfig.json b/packages/resolve-dist/tsconfig.json deleted file mode 100644 index 2aadf1552a3..00000000000 --- a/packages/resolve-dist/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./../ts/tsconfig.json", - "include": [ - "**/*.ts" - ], - "files": [ - "./../ts/index.d.ts" - ], - "exclude": [ - "test" - ] -} diff --git a/packages/root/.gitignore b/packages/root/.gitignore new file mode 100644 index 00000000000..2e874fe711a --- /dev/null +++ b/packages/root/.gitignore @@ -0,0 +1,2 @@ +index.js +index.mjs \ No newline at end of file diff --git a/packages/root/README.md b/packages/root/README.md new file mode 100644 index 00000000000..1ffa8cbda6c --- /dev/null +++ b/packages/root/README.md @@ -0,0 +1,5 @@ +# Purpose + +Bundles the monorepo root `package.json` as an installable package, allowing `@packages/root` to be installed in any context without having a absolute reference ot the root `package.json` + +In order to accomplish this, `rollup` is used bundle the `package.json`, as packages may be interpreted in place or be installed inside the `node_modules` directory. This package builds an `index.mjs` file for packages using `vite`/ ES Modules and an `index.js` file for any CommonJS entrypoints. \ No newline at end of file diff --git a/packages/root/index.js b/packages/root/index.js deleted file mode 100644 index 24309050cc6..00000000000 --- a/packages/root/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../package.json') diff --git a/packages/root/index.ts b/packages/root/index.ts new file mode 100644 index 00000000000..8544a867cab --- /dev/null +++ b/packages/root/index.ts @@ -0,0 +1,3 @@ +import pkg from '../../package.json' + +export default pkg diff --git a/packages/root/package.json b/packages/root/package.json index da93428177f..db2605734bc 100644 --- a/packages/root/package.json +++ b/packages/root/package.json @@ -1,7 +1,20 @@ { "name": "@packages/root", "version": "0.0.0-development", - "description": "dummy package pointing at the root package", + "description": "bundles the root package.json as an installable package", "main": "index.js", + "scripts": { + "build": "yarn build:cjs && yarn build:esm", + "build:cjs": "rimraf index.js && rollup -c rollup.config.mjs -f cjs -o index.js", + "build:esm": "rimraf index.mjs && rollup -c rollup.config.mjs -f esm -o index.mjs", + "build:prod": "yarn build" + }, + "devDependencies": { + "@rollup/plugin-json": "^6.1.0", + "rimraf": "^6.0.1", + "rollup": "^4.52.0", + "typescript": "^5.6.3" + }, + "module": "index.mjs", "nx": {} } diff --git a/packages/root/rollup.config.mjs b/packages/root/rollup.config.mjs new file mode 100644 index 00000000000..654afcb8073 --- /dev/null +++ b/packages/root/rollup.config.mjs @@ -0,0 +1,7 @@ +import json from '@rollup/plugin-json' + +export default { + input: 'index.ts', + // inlines the root package.json into the bundle + plugins: [json()], +} diff --git a/packages/root/tsconfig.json b/packages/root/tsconfig.json new file mode 100644 index 00000000000..fe768884866 --- /dev/null +++ b/packages/root/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + } +} diff --git a/packages/scaffold-config/.eslintignore b/packages/scaffold-config/.eslintignore index d5857ea71fb..74d1d353027 100644 --- a/packages/scaffold-config/.eslintignore +++ b/packages/scaffold-config/.eslintignore @@ -1 +1,4 @@ **/tsconfig.json +cjs/ +esm/ +browser/ \ No newline at end of file diff --git a/packages/scaffold-config/.gitignore b/packages/scaffold-config/.gitignore index 6724ce3596d..0049f1f5cbe 100644 --- a/packages/scaffold-config/.gitignore +++ b/packages/scaffold-config/.gitignore @@ -1 +1,3 @@ -src/**/*.js \ No newline at end of file +cjs/ +esm/ +browser/ \ No newline at end of file diff --git a/packages/scaffold-config/README.md b/packages/scaffold-config/README.md index 7a51c336d2f..96c5288464a 100644 --- a/packages/scaffold-config/README.md +++ b/packages/scaffold-config/README.md @@ -29,3 +29,7 @@ The process for adding a new library/framework/bundler is as follows: 3. Add a new project with the correct `cypress.config.js` and `package.json` to [system-tests/projects](../../system-tests/projects). It should be `-configured`, which is a working example with some specs. Ensure it will run on CI by adding it to [`component_testing_spec.ts`](../../system-tests/test/component_testing_spec.ts). 4. Add another project called `-unconfigured`, which represents the project prior to having Cypress added. This will be used in step 5. 5. Add a test to [`scaffold-component-testing.cy.ts`](../launchpad/cypress/e2e/scaffold-component-testing.cy.ts) to ensure your project has the correct `cypress.config.js` generated. Use an existing test as a template. + +### Internal testing + +`@packages/config/browser/dependencies` is NOT used in the production binary and therefore doesn't need to be included when the package bundles. \ No newline at end of file diff --git a/packages/scaffold-config/index.js b/packages/scaffold-config/index.js deleted file mode 100644 index 643cb42256e..00000000000 --- a/packages/scaffold-config/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if (process.env.CYPRESS_INTERNAL_ENV !== 'production') { - require('@packages/ts/register') -} - -module.exports = require('./src') diff --git a/packages/scaffold-config/package.json b/packages/scaffold-config/package.json index 839239519c4..4bb9905cfd7 100644 --- a/packages/scaffold-config/package.json +++ b/packages/scaffold-config/package.json @@ -2,12 +2,15 @@ "name": "@packages/scaffold-config", "version": "0.0.0-development", "description": "Logic related to scaffolding new projects using launchpad", - "main": "index.js", - "browser": "src/index.ts", + "main": "cjs/index.js", "scripts": { - "build-prod": "tsc || echo 'built, with errors'", - "check-ts": "tsc --noEmit && yarn -s tslint", - "clean": "rimraf --glob './src/*.js' './src/**/*.js' './src/**/**/*.js' './test/**/*.js' || echo 'cleaned'", + "build": "yarn build:cjs && yarn build:esm && yarn build:browser", + "build-prod": "yarn build", + "build:browser": "rimraf browser && tsc -p tsconfig.browser.json", + "build:cjs": "rimraf cjs && tsc -p tsconfig.cjs.json", + "build:esm": "rimraf esm && tsc -p tsconfig.esm.json", + "check-ts": "tsc -p tsconfig.cjs.json --noEmit && yarn -s tslint -p tsconfig.cjs.json", + "clean": "rimraf esm cjs", "clean-deps": "rimraf node_modules", "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .", "test": "yarn test-unit", @@ -29,11 +32,14 @@ "@packages/ts": "0.0.0-development", "@packages/types": "0.0.0-development", "chai": "4.2.0", - "mocha": "7.0.1" + "mocha": "7.0.1", + "rimraf": "^6.0.1" }, "files": [ - "src" + "cjs/*", + "esm/*" ], "types": "src/index.ts", + "module": "esm/index.js", "nx": {} } diff --git a/packages/scaffold-config/src/component-index-template.ts b/packages/scaffold-config/src/component-index-template.ts index 46e3d0b93de..926f41d1d79 100644 --- a/packages/scaffold-config/src/component-index-template.ts +++ b/packages/scaffold-config/src/component-index-template.ts @@ -1,6 +1,6 @@ import dedent from 'dedent' -const componentIndexHtmlGenerator = (headModifier: string = '') => { +export const componentIndexHtmlGenerator = (headModifier: string = '') => { return () => { const template = dedent` @@ -23,5 +23,3 @@ const componentIndexHtmlGenerator = (headModifier: string = '') => { return template.replace(/\n {4}\n/g, '\n') } } - -export default componentIndexHtmlGenerator diff --git a/packages/scaffold-config/src/ct-detect-third-party.ts b/packages/scaffold-config/src/ct-detect-third-party.ts index 5997194a3ee..f59d84630a9 100644 --- a/packages/scaffold-config/src/ct-detect-third-party.ts +++ b/packages/scaffold-config/src/ct-detect-third-party.ts @@ -99,7 +99,7 @@ export async function detectThirdPartyCTFrameworks ( // Start at the project root and check each directory above it until we see // an indication that the current directory is the root of the repository. - await findUp(async (directory: string) => { + await findUp(async (directory: string): Promise => { fullPathGlobs = [ path.join(directory, CT_FRAMEWORK_GLOBAL_GLOB), path.join(directory, CT_FRAMEWORK_NAMESPACED_GLOB), diff --git a/packages/scaffold-config/src/frameworks.ts b/packages/scaffold-config/src/frameworks.ts index cf914d1c690..3412b1707c3 100644 --- a/packages/scaffold-config/src/frameworks.ts +++ b/packages/scaffold-config/src/frameworks.ts @@ -1,6 +1,6 @@ import fs from 'fs-extra' import * as dependencies from './dependencies' -import componentIndexHtmlGenerator from './component-index-template' +import { componentIndexHtmlGenerator } from './component-index-template' import debugLib from 'debug' import semver from 'semver' import { isThirdPartyDefinition } from './ct-detect-third-party' diff --git a/packages/scaffold-config/test/unit/component-index-template.spec.ts b/packages/scaffold-config/test/unit/component-index-template.spec.ts index 6c658b5d08c..e06b9d201dd 100644 --- a/packages/scaffold-config/test/unit/component-index-template.spec.ts +++ b/packages/scaffold-config/test/unit/component-index-template.spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai' import dedent from 'dedent' -import componentIndexHtmlGenerator from '../../src/component-index-template' +import { componentIndexHtmlGenerator } from '../../src/component-index-template' import { CT_FRAMEWORKS } from '../../src/frameworks' describe('componentIndexHtmlGenerator', () => { diff --git a/packages/scaffold-config/tsconfig.json b/packages/scaffold-config/tsconfig.base.json similarity index 59% rename from packages/scaffold-config/tsconfig.json rename to packages/scaffold-config/tsconfig.base.json index dde12ed64ec..d1a404087b5 100644 --- a/packages/scaffold-config/tsconfig.json +++ b/packages/scaffold-config/tsconfig.base.json @@ -1,6 +1,7 @@ { - "extends": "../ts/tsconfig.json", - "include": ["src"], + "include": [ + "src" + ], "exclude": [ "test", "script" @@ -9,10 +10,15 @@ "./../ts/index.d.ts" ], "compilerOptions": { - "lib": ["esnext"], + "lib": [ + "esnext" + ], "allowJs": false, "noImplicitAny": true, "noUncheckedIndexedAccess": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "skipLibCheck": true, "types": [] } } diff --git a/packages/scaffold-config/tsconfig.browser.json b/packages/scaffold-config/tsconfig.browser.json new file mode 100644 index 00000000000..88c8e2564fb --- /dev/null +++ b/packages/scaffold-config/tsconfig.browser.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.base.json", + "include": [ + "src/dependencies.ts" + ], + "compilerOptions": { + "rootDir": "./src", + "outDir": "./browser", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node", + "declaration": true, + "types": [ + "cypress" + ] + } +} \ No newline at end of file diff --git a/packages/scaffold-config/tsconfig.cjs.json b/packages/scaffold-config/tsconfig.cjs.json new file mode 100644 index 00000000000..088d461d9d1 --- /dev/null +++ b/packages/scaffold-config/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./cjs", + "target": "ES2022", + "module": "CommonJS", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/scaffold-config/tsconfig.esm.json b/packages/scaffold-config/tsconfig.esm.json new file mode 100644 index 00000000000..07baf4ecf98 --- /dev/null +++ b/packages/scaffold-config/tsconfig.esm.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./esm", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/telemetry/.gitignore b/packages/telemetry/.gitignore new file mode 100644 index 00000000000..cba40675de7 --- /dev/null +++ b/packages/telemetry/.gitignore @@ -0,0 +1,4 @@ +cjs/ +esm/ +browser/ +!src/browser \ No newline at end of file diff --git a/packages/telemetry/README.md b/packages/telemetry/README.md index c5233488ef2..24c6a2925fe 100644 --- a/packages/telemetry/README.md +++ b/packages/telemetry/README.md @@ -140,10 +140,10 @@ const { OTLPTraceExporterIPC } = require('@packages/telemetry') ### Browser -To access the browser telemetry singleton use the browser export directly. +To access the browser telemetry singleton use the browser export. ```js -import { telemetry } from '@packages/telemetry/src/browser' +import { telemetry } from '@packages/telemetry/browser/client' telemetry.init({options}) ``` @@ -151,7 +151,7 @@ telemetry.init({options}) The browser singleton is also stored on window, in some cases when the telemetry package is included in multiple packages you can use the `attach` method to retrieve and setup the singleton from the instance saved on window. ```js -import { telemetry } from '@packages/telemetry/src/browser' +import { telemetry } from '@packages/telemetry/browser/client' telemetry.attach() ``` @@ -198,7 +198,7 @@ const { telemetry } = require('@packages/telemetry') Browser: ```js -import { telemetry } from '@packages/telemetry/src/browser' +import { telemetry } from '@packages/telemetry/browser/client' ``` ### Spans diff --git a/packages/telemetry/index.js b/packages/telemetry/index.js deleted file mode 100644 index 3e040a203c8..00000000000 --- a/packages/telemetry/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if (process.env.CYPRESS_INTERNAL_ENV !== 'production') { - require('@packages/ts/register') -} - -module.exports = require('./src/node') diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index be3220a6567..7cdea2407e6 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -3,12 +3,16 @@ "version": "0.0.0-development", "description": "open telemetry wrapper used throughout the cypress monorepo to instrument the cypress app", "private": true, - "main": "dist/node.js", - "browser": "src/browser.ts", + "main": "cjs/node.js", "scripts": { - "build": "tsc", - "check-ts": "tsc --noEmit && yarn -s tslint", - "clean": "rimraf dist", + "build": "yarn build:esm && yarn build:cjs && yarn build:browser", + "build-prod": "yarn build", + "build:browser": "rimraf browser && rollup -c rollup.config.mjs", + "build:cjs": "rimraf cjs && tsc -p tsconfig.cjs.json", + "build:esm": "rimraf esm && tsc -p tsconfig.esm.json", + "check-ts": "tsc -p tsconfig.cjs.json --noEmit && yarn -s tslint -p tsconfig.cjs.json", + "clean": "rimraf esm cjs", + "clean-deps": "rimraf node_modules", "test": "yarn test-unit", "test-unit": "mocha --config ./test/.mocharc.js", "tslint": "tslint --config ../ts/tslint.json --project .", @@ -27,12 +31,18 @@ }, "devDependencies": { "@packages/ts": "0.0.0-development", - "mocha": "7.0.1" + "@rollup/plugin-typescript": "12.0.0", + "mocha": "7.0.1", + "rimraf": "6.0.1", + "rollup": "4.52.0", + "typescript": "5.6.3" }, "files": [ - "dist", - "src" + "esm", + "cjs", + "browser" ], - "types": "src/node.ts", + "types": "cjs/node.d.ts", + "module": "esm/node.js", "nx": {} } diff --git a/packages/telemetry/rollup.config.mjs b/packages/telemetry/rollup.config.mjs new file mode 100644 index 00000000000..aac2ca99ff2 --- /dev/null +++ b/packages/telemetry/rollup.config.mjs @@ -0,0 +1,21 @@ +import typescript from '@rollup/plugin-typescript' + +// inline all the values/imports from the entry point client.ts into the browser/client.js bundle +// and provides declarations for the browser/client.d.ts bundle +const config = [ + { + input: 'src/client.ts', + output: { + file: 'browser/client.js', + format: 'esm', + declaration: true, + }, + plugins: [ + typescript({ + tsconfig: 'tsconfig.browser.json', + }), + ], + }, +] + +export default config diff --git a/packages/telemetry/src/browser.ts b/packages/telemetry/src/client.ts similarity index 96% rename from packages/telemetry/src/browser.ts rename to packages/telemetry/src/client.ts index 2391c5d5da1..2062583b864 100644 --- a/packages/telemetry/src/browser.ts +++ b/packages/telemetry/src/client.ts @@ -1,6 +1,6 @@ import type { Span, Attributes } from '@opentelemetry/api' -import type { startSpanOptions, findActiveSpanOptions, contextObject } from './index' -import { Telemetry as TelemetryClass, TelemetryNoop } from './index' +import type { startSpanOptions, findActiveSpanOptions, contextObject } from './telemetry/index' +import { Telemetry as TelemetryClass, TelemetryNoop } from './telemetry/index' import { WebTracerProvider } from '@opentelemetry/sdk-trace-web' import { browserDetectorSync } from '@opentelemetry/resources' import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base' diff --git a/packages/telemetry/src/node.ts b/packages/telemetry/src/node.ts index d8132e05e5e..743771fa9b3 100644 --- a/packages/telemetry/src/node.ts +++ b/packages/telemetry/src/node.ts @@ -1,12 +1,12 @@ import type { Span } from '@opentelemetry/api' -import type { startSpanOptions, findActiveSpanOptions, contextObject } from './index' +import type { startSpanOptions, findActiveSpanOptions, contextObject } from './telemetry/index' import { envDetectorSync, hostDetectorSync, osDetectorSync, processDetectorSync, } from '@opentelemetry/resources' import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base' import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node' import { circleCiDetectorSync } from './detectors/circleCiDetectorSync' -import { enabledValues, Telemetry as TelemetryClass, TelemetryNoop } from './index' +import { enabledValues, Telemetry as TelemetryClass, TelemetryNoop } from './telemetry/index' import { OTLPTraceExporter as OTLPTraceExporterCloud } from './span-exporters/cloud-span-exporter' import { OTLPTraceExporter as OTLPTraceExporterIpc } from './span-exporters/ipc-span-exporter' diff --git a/packages/telemetry/src/index.ts b/packages/telemetry/src/telemetry/index.ts similarity index 94% rename from packages/telemetry/src/index.ts rename to packages/telemetry/src/telemetry/index.ts index 8d0c0b4bd2d..bbcdf965699 100644 --- a/packages/telemetry/src/index.ts +++ b/packages/telemetry/src/telemetry/index.ts @@ -1,8 +1,8 @@ import openTelemetry from '@opentelemetry/api' import { detectResourcesSync, Resource } from '@opentelemetry/resources' import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions' -import { OnStartSpanProcessor } from './processors/on-start-span-processor' -import { ConsoleTraceLinkExporter } from './span-exporters/console-trace-link-exporter' +import { OnStartSpanProcessor } from '../processors/on-start-span-processor' +import { ConsoleTraceLinkExporter } from '../span-exporters/console-trace-link-exporter' import type { Span, SpanOptions, Tracer, Context, Attributes } from '@opentelemetry/api' import type { BasicTracerProvider, SimpleSpanProcessor, BatchSpanProcessor, SpanExporter } from '@opentelemetry/sdk-trace-base' @@ -350,29 +350,31 @@ export class Telemetry implements TelemetryApi { * all operations. */ export class TelemetryNoop implements TelemetryApi { - startSpan () { + startSpan (arg: startSpanOptions): Span | undefined { return undefined } - getSpan () { + getSpan (name: string): Span | undefined { return undefined } - findActiveSpan () { + findActiveSpan (fn: findActiveSpanOptions): Span | undefined { return undefined } - endActiveSpanAndChildren () { + endActiveSpanAndChildren (span?: Span | undefined): void { return undefined } getActiveContextObject (): contextObject { return {} } - getResources () { + getResources (): Attributes { return {} } - shutdown () { + shutdown (): Promise { return Promise.resolve() } - getExporter () { + getExporter (): SpanExporter | undefined { + return undefined + } + setRootContext (rootContextObject?: contextObject): void { return undefined } - setRootContext () {} } diff --git a/packages/telemetry/test/browser.spec.ts b/packages/telemetry/test/browser.spec.ts index b3ecdab34fe..a4878f07ba1 100644 --- a/packages/telemetry/test/browser.spec.ts +++ b/packages/telemetry/test/browser.spec.ts @@ -3,9 +3,9 @@ global.window = {} import { expect } from 'chai' -import { telemetry } from '../src/browser' +import { telemetry } from '../src/client' -import { Telemetry as TelemetryClass } from '../src/index' +import { Telemetry as TelemetryClass } from '../src/telemetry/index' describe('telemetry is disabled', () => { describe('init', () => { diff --git a/packages/telemetry/test/index.spec.ts b/packages/telemetry/test/index.spec.ts index cea57b09691..7038472c5aa 100644 --- a/packages/telemetry/test/index.spec.ts +++ b/packages/telemetry/test/index.spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai' -import { Telemetry } from '../src' +import { Telemetry } from '../src/telemetry' import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node' import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base' diff --git a/packages/telemetry/tsconfig.base.json b/packages/telemetry/tsconfig.base.json new file mode 100644 index 00000000000..3c2b1a10f93 --- /dev/null +++ b/packages/telemetry/tsconfig.base.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "lib": [ + "esnext", + "DOM" + ], + "allowJs": false, + "noImplicitAny": true, + "noUncheckedIndexedAccess": true, + "types": [ + "cypress" + ], + "esModuleInterop": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "declaration": true + } +} diff --git a/packages/telemetry/tsconfig.browser.json b/packages/telemetry/tsconfig.browser.json new file mode 100644 index 00000000000..809e3c30977 --- /dev/null +++ b/packages/telemetry/tsconfig.browser.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.base.json", + "include": [ + "src/client.ts" + ], + "compilerOptions": { + "outDir": "./browser", + "rootDir": "./src", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "bundler" + } +} \ No newline at end of file diff --git a/packages/telemetry/tsconfig.cjs.json b/packages/telemetry/tsconfig.cjs.json new file mode 100644 index 00000000000..618894c0ec2 --- /dev/null +++ b/packages/telemetry/tsconfig.cjs.json @@ -0,0 +1,16 @@ +{ + "extends": "./tsconfig.base.json", + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "src/client.ts" + ], + "compilerOptions": { + "rootDir": "./src", + "outDir": "./cjs", + "target": "ES2022", + "module": "CommonJS", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/telemetry/tsconfig.esm.json b/packages/telemetry/tsconfig.esm.json new file mode 100644 index 00000000000..ecc02aa7c91 --- /dev/null +++ b/packages/telemetry/tsconfig.esm.json @@ -0,0 +1,16 @@ +{ + "extends": "./tsconfig.base.json", + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "src/client.ts" + ], + "compilerOptions": { + "rootDir": "./src", + "outDir": "./esm", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/telemetry/tsconfig.json b/packages/telemetry/tsconfig.json deleted file mode 100644 index 50c4b856c19..00000000000 --- a/packages/telemetry/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../ts/tsconfig.json", - "include": ["src"], - "compilerOptions": { - "outDir": "./dist", - "lib": ["esnext", "DOM"], - "allowJs": false, - "noImplicitAny": true, - "noUncheckedIndexedAccess": true, - "types": ["cypress"], - } -} diff --git a/packages/types/.gitignore b/packages/types/.gitignore index 6724ce3596d..eb7467f70ed 100644 --- a/packages/types/.gitignore +++ b/packages/types/.gitignore @@ -1 +1,2 @@ -src/**/*.js \ No newline at end of file +esm/ +cjs/ \ No newline at end of file diff --git a/packages/types/index.js b/packages/types/index.js deleted file mode 100644 index 643cb42256e..00000000000 --- a/packages/types/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if (process.env.CYPRESS_INTERNAL_ENV !== 'production') { - require('@packages/ts/register') -} - -module.exports = require('./src') diff --git a/packages/types/package.json b/packages/types/package.json index db00b711813..b6f3136a74a 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -2,12 +2,15 @@ "name": "@packages/types", "version": "0.0.0-development", "private": true, - "main": "index.js", - "browser": "src/index.ts", + "main": "cjs/index.js", + "browser": "esm/index.js", "scripts": { - "build-prod": "tsc || echo 'built, with type errors'", - "check-ts": "tsc --noEmit", - "clean": "rimraf --glob 'src/*.js' 'src/**/*.js'", + "build": "yarn build:esm && yarn build:cjs", + "build-prod": "yarn build", + "build:cjs": "rimraf cjs && tsc -p tsconfig.cjs.json", + "build:esm": "rimraf esm && tsc -p tsconfig.esm.json", + "check-ts": "tsc -p tsconfig.cjs.json --noEmit", + "clean": "rimraf cjs esm", "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .", "test": "vitest run" }, @@ -15,19 +18,23 @@ "semver": "^7.7.1" }, "devDependencies": { + "@packages/root": "0.0.0-development", "@types/node": "22.18.0", "axios": "^1.8.3", "better-sqlite3": "11.10.0", "devtools-protocol": "0.0.1459876", "express": "4.21.0", + "rimraf": "^6.0.1", "socket.io": "4.0.1", "typescript": "~5.4.5", "vitest": "^3.2.4" }, "files": [ - "src/*" + "cjs/*", + "esm/*" ], "types": "src/index.ts", + "module": "esm/index.js", "workspaces": { "nohoist": [ "devtools-protocol" diff --git a/packages/types/src/constants.ts b/packages/types/src/constants.ts index 01a62abcd84..87fe385a8c9 100644 --- a/packages/types/src/constants.ts +++ b/packages/types/src/constants.ts @@ -1,5 +1,5 @@ import semverMajor from 'semver/functions/major' -import packageInfo from '../../../package.json' +import packageInfo from '@packages/root' import type { SpecFile } from './spec' diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.base.json similarity index 51% rename from packages/types/tsconfig.json rename to packages/types/tsconfig.base.json index 1fe9fccd5ba..279d4875b7c 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.base.json @@ -1,5 +1,4 @@ { - "extends": "../ts/tsconfig.json", "include": [ "src/*.ts", "src/**/*.ts" @@ -11,13 +10,14 @@ "noUnusedLocals": false, "noUnusedParameters": false, "allowJs": true, - "types": [], "noUncheckedIndexedAccess": true, "ignoreDeprecations": "5.0", - /* - * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior - * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. - */ "importsNotUsedAsValues": "error", - }, + "skipLibCheck": true, + "resolveJsonModule": true, + "types": [ + "mocha", + "node" + ] + } } \ No newline at end of file diff --git a/packages/types/tsconfig.cjs.json b/packages/types/tsconfig.cjs.json new file mode 100644 index 00000000000..088d461d9d1 --- /dev/null +++ b/packages/types/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./cjs", + "target": "ES2022", + "module": "CommonJS", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/packages/types/tsconfig.esm.json b/packages/types/tsconfig.esm.json new file mode 100644 index 00000000000..07baf4ecf98 --- /dev/null +++ b/packages/types/tsconfig.esm.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./esm", + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node" + } +} \ No newline at end of file diff --git a/scripts/binary/build.ts b/scripts/binary/build.ts index f1de54114c9..dba934c6986 100644 --- a/scripts/binary/build.ts +++ b/scripts/binary/build.ts @@ -96,6 +96,13 @@ export async function buildCypressApp (options: BuildCypressAppOpts) { if (!keepBuild) { log('#buildPackages') + // Update the root package.json with the next app version so that it is snapshot properly + // as well as make sure @packages/root is built with the correct version + fs.writeJSONSync(path.join(CY_ROOT_DIR, 'package.json'), { + ...jsonRoot, + version, + }, { spaces: 2 }) + await execa('yarn', ['lerna', 'run', 'build', '--concurrency', '4'], { stdio: 'inherit', cwd: CY_ROOT_DIR, @@ -226,7 +233,7 @@ require('./packages/server/index.js') } export async function packageElectronApp (options: BuildCypressAppOpts) { - const { platform, version, skipSigning = false } = options + const { platform, skipSigning = false } = options log('#removeCyAndBinFolders') await del([ @@ -260,12 +267,6 @@ export async function packageElectronApp (options: BuildCypressAppOpts) { console.log(`output folder: ${outputFolder}`) - // Update the root package.json with the next app version so that it is snapshot properly - fs.writeJSONSync(path.join(CY_ROOT_DIR, 'package.json'), { - ...jsonRoot, - version, - }, { spaces: 2 }) - try { await electronBuilder.build({ publish: 'never', diff --git a/yarn.lock b/yarn.lock index 1f6f0ac2040..69c730f9369 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6325,6 +6325,13 @@ estree-walker "^1.0.1" magic-string "^0.25.5" +"@rollup/plugin-json@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-6.1.0.tgz#fbe784e29682e9bb6dee28ea75a1a83702e7b805" + integrity sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA== + dependencies: + "@rollup/pluginutils" "^5.1.0" + "@rollup/plugin-node-resolve@^11.1.1": version "11.2.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz#82aa59397a29cd4e13248b106e6a4a1880362a60" @@ -6337,6 +6344,14 @@ is-module "^1.0.0" resolve "^1.19.0" +"@rollup/plugin-typescript@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-12.0.0.tgz#e92dee7ac5a686864067e34daa5a7df1e3b82c55" + integrity sha512-w5PTCahNqP8bokY9/7DO+hjbJF7ru0yBuWM9QMNb9m+GQgwb7zYsOBbPxqdjDqYSVCgvvDprcNH2kevsev8IBg== + dependencies: + "@rollup/pluginutils" "^5.1.0" + resolve "^1.22.1" + "@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" @@ -6355,105 +6370,115 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@rollup/rollup-android-arm-eabi@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.2.tgz#292e25953d4988d3bd1af0f5ebbd5ee4d65c90b4" - integrity sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA== - -"@rollup/rollup-android-arm64@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.2.tgz#053b3def3451e6fc1a9078188f22799e868d7c59" - integrity sha512-nTeCWY83kN64oQ5MGz3CgtPx8NSOhC5lWtsjTs+8JAJNLcP3QbLCtDDgUKQc/Ro/frpMq4SHUaHN6AMltcEoLQ== - -"@rollup/rollup-darwin-arm64@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.2.tgz#98d90445282dec54fd05440305a5e8df79a91ece" - integrity sha512-HV7bW2Fb/F5KPdM/9bApunQh68YVDU8sO8BvcW9OngQVN3HHHkw99wFupuUJfGR9pYLLAjcAOA6iO+evsbBaPQ== - -"@rollup/rollup-darwin-x64@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.2.tgz#fe05f95a736423af5f9c3a59a70f41ece52a1f20" - integrity sha512-SSj8TlYV5nJixSsm/y3QXfhspSiLYP11zpfwp6G/YDXctf3Xkdnk4woJIF5VQe0of2OjzTt8EsxnJDCdHd2xMA== - -"@rollup/rollup-freebsd-arm64@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.2.tgz#41e1fbdc1f8c3dc9afb6bc1d6e3fb3104bd81eee" - integrity sha512-ZyrsG4TIT9xnOlLsSSi9w/X29tCbK1yegE49RYm3tu3wF1L/B6LVMqnEWyDB26d9Ecx9zrmXCiPmIabVuLmNSg== - -"@rollup/rollup-freebsd-x64@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.2.tgz#69131e69cb149d547abb65ef3b38fc746c940e24" - integrity sha512-pCgHFoOECwVCJ5GFq8+gR8SBKnMO+xe5UEqbemxBpCKYQddRQMgomv1104RnLSg7nNvgKy05sLsY51+OVRyiVw== - -"@rollup/rollup-linux-arm-gnueabihf@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.2.tgz#977ded91c7cf6fc0d9443bb9c0a064e45a805267" - integrity sha512-EtP8aquZ0xQg0ETFcxUbU71MZlHaw9MChwrQzatiE8U/bvi5uv/oChExXC4mWhjiqK7azGJBqU0tt5H123SzVA== - -"@rollup/rollup-linux-arm-musleabihf@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.2.tgz#dc034fc3c0f0eb5c75b6bc3eca3b0b97fd35f49a" - integrity sha512-qO7F7U3u1nfxYRPM8HqFtLd+raev2K137dsV08q/LRKRLEc7RsiDWihUnrINdsWQxPR9jqZ8DIIZ1zJJAm5PjQ== - -"@rollup/rollup-linux-arm64-gnu@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.2.tgz#5e92613768d3de3ffcabc965627dd0a59b3e7dfc" - integrity sha512-3dRaqLfcOXYsfvw5xMrxAk9Lb1f395gkoBYzSFcc/scgRFptRXL9DOaDpMiehf9CO8ZDRJW2z45b6fpU5nwjng== - -"@rollup/rollup-linux-arm64-musl@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.2.tgz#2a44f88e83d28b646591df6e50aa0a5a931833d8" - integrity sha512-fhHFTutA7SM+IrR6lIfiHskxmpmPTJUXpWIsBXpeEwNgZzZZSg/q4i6FU4J8qOGyJ0TR+wXBwx/L7Ho9z0+uDg== - -"@rollup/rollup-linux-loongarch64-gnu@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.2.tgz#bd5897e92db7fbf7dc456f61d90fff96c4651f2e" - integrity sha512-i7wfGFXu8x4+FRqPymzjD+Hyav8l95UIZ773j7J7zRYc3Xsxy2wIn4x+llpunexXe6laaO72iEjeeGyUFmjKeA== - -"@rollup/rollup-linux-ppc64-gnu@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.2.tgz#a7065025411c14ad9ec34cc1cd1414900ec2a303" - integrity sha512-B/l0dFcHVUnqcGZWKcWBSV2PF01YUt0Rvlurci5P+neqY/yMKchGU8ullZvIv5e8Y1C6wOn+U03mrDylP5q9Yw== - -"@rollup/rollup-linux-riscv64-gnu@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.2.tgz#17f9c0c675e13ef4567cfaa3730752417257ccc3" - integrity sha512-32k4ENb5ygtkMwPMucAb8MtV8olkPT03oiTxJbgkJa7lJ7dZMr0GCFJlyvy+K8iq7F/iuOr41ZdUHaOiqyR3iQ== - -"@rollup/rollup-linux-riscv64-musl@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.2.tgz#bc6ed3db2cedc1ba9c0a2183620fe2f792c3bf3f" - integrity sha512-t5B2loThlFEauloaQkZg9gxV05BYeITLvLkWOkRXogP4qHXLkWSbSHKM9S6H1schf/0YGP/qNKtiISlxvfmmZw== - -"@rollup/rollup-linux-s390x-gnu@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.2.tgz#440c4f6753274e2928e06d2a25613e5a1cf97b41" - integrity sha512-YKjekwTEKgbB7n17gmODSmJVUIvj8CX7q5442/CK80L8nqOUbMtf8b01QkG3jOqyr1rotrAnW6B/qiHwfcuWQA== - -"@rollup/rollup-linux-x64-gnu@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.2.tgz#1e936446f90b2574ea4a83b4842a762cc0a0aed3" - integrity sha512-Jj5a9RUoe5ra+MEyERkDKLwTXVu6s3aACP51nkfnK9wJTraCC8IMe3snOfALkrjTYd2G1ViE1hICj0fZ7ALBPA== - -"@rollup/rollup-linux-x64-musl@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.2.tgz#c6f304dfba1d5faf2be5d8b153ccbd8b5d6f1166" - integrity sha512-7kX69DIrBeD7yNp4A5b81izs8BqoZkCIaxQaOpumcJ1S/kmqNFjPhDu1LHeVXv0SexfHQv5cqHsxLOjETuqDuA== - -"@rollup/rollup-win32-arm64-msvc@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.2.tgz#b4ad4a79219892aac112ed1c9d1356cad0566ef5" - integrity sha512-wiJWMIpeaak/jsbaq2HMh/rzZxHVW1rU6coyeNNpMwk5isiPjSTx0a4YLSlYDwBH/WBvLz+EtsNqQScZTLJy3g== - -"@rollup/rollup-win32-ia32-msvc@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.2.tgz#b1b22eb2a9568048961e4a6f540438b4a762aa62" - integrity sha512-gBgaUDESVzMgWZhcyjfs9QFK16D8K6QZpwAaVNJxYDLHWayOta4ZMjGm/vsAEy3hvlS2GosVFlBlP9/Wb85DqQ== - -"@rollup/rollup-win32-x64-msvc@4.46.2": - version "4.46.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.2.tgz#87079f137b5fdb75da11508419aa998cc8cc3d8b" - integrity sha512-CvUo2ixeIQGtF6WvuB87XWqPQkoFAFqW+HUo/WzHwuHDvIwZCtjdWXoYCcr06iKGydiqTclC4jU/TNObC/xKZg== +"@rollup/rollup-android-arm-eabi@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.0.tgz#dfcddfa85a3cba8a0e95483b4a7255ab9e4cdf4d" + integrity sha512-VxDYCDqOaR7NXzAtvRx7G1u54d2kEHopb28YH/pKzY6y0qmogP3gG7CSiWsq9WvDFxOQMpNEyjVAHZFXfH3o/A== + +"@rollup/rollup-android-arm64@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.0.tgz#f37b4a8741a7f42d2f2921bd621e7e824a262f0c" + integrity sha512-pqDirm8koABIKvzL59YI9W9DWbRlTX7RWhN+auR8HXJxo89m4mjqbah7nJZjeKNTNYopqL+yGg+0mhCpf3xZtQ== + +"@rollup/rollup-darwin-arm64@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.0.tgz#fda8701d38d9888039c1a0e040c026daec908a3f" + integrity sha512-YCdWlY/8ltN6H78HnMsRHYlPiKvqKagBP1r+D7SSylxX+HnsgXGCmLiV3Y4nSyY9hW8qr8U9LDUx/Lo7M6MfmQ== + +"@rollup/rollup-darwin-x64@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.0.tgz#c6008839852a33a686080957d296f727af9ca80d" + integrity sha512-z4nw6y1j+OOSGzuVbSWdIp1IUks9qNw4dc7z7lWuWDKojY38VMWBlEN7F9jk5UXOkUcp97vA1N213DF+Lz8BRg== + +"@rollup/rollup-freebsd-arm64@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.0.tgz#2b3ee9028493fd58245ded2137de0bc5d6b8f1e4" + integrity sha512-Q/dv9Yvyr5rKlK8WQJZVrp5g2SOYeZUs9u/t2f9cQ2E0gJjYB/BWoedXfUT0EcDJefi2zzVfhcOj8drWCzTviw== + +"@rollup/rollup-freebsd-x64@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.0.tgz#32e1ed194ceb3e0ef204efa237c04db13dece948" + integrity sha512-kdBsLs4Uile/fbjZVvCRcKB4q64R+1mUq0Yd7oU1CMm1Av336ajIFqNFovByipciuUQjBCPMxwJhCgfG2re3rg== + +"@rollup/rollup-linux-arm-gnueabihf@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.0.tgz#e64b1b7b2744803d7f52701f8bbd2989ae399424" + integrity sha512-aL6hRwu0k7MTUESgkg7QHY6CoqPgr6gdQXRJI1/VbFlUMwsSzPGSR7sG5d+MCbYnJmJwThc2ol3nixj1fvI/zQ== + +"@rollup/rollup-linux-arm-musleabihf@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.0.tgz#cef6569f633cacd09ad89189b9a805067141e01f" + integrity sha512-BTs0M5s1EJejgIBJhCeiFo7GZZ2IXWkFGcyZhxX4+8usnIo5Mti57108vjXFIQmmJaRyDwmV59Tw64Ap1dkwMw== + +"@rollup/rollup-linux-arm64-gnu@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.0.tgz#358c20dc375f80e20048f99f46b507d6d8063fdf" + integrity sha512-uj672IVOU9m08DBGvoPKPi/J8jlVgjh12C9GmjjBxCTQc3XtVmRkRKyeHSmIKQpvJ7fIm1EJieBUcnGSzDVFyw== + +"@rollup/rollup-linux-arm64-musl@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.0.tgz#8141352ddffbf4200b464c1e1957c050f5c0842a" + integrity sha512-/+IVbeDMDCtB/HP/wiWsSzduD10SEGzIZX2945KSgZRNi4TSkjHqRJtNTVtVb8IRwhJ65ssI56krlLik+zFWkw== + +"@rollup/rollup-linux-loong64-gnu@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.0.tgz#d92ac6909a29c9f3793e12fdd826d81a0eef0966" + integrity sha512-U1vVzvSWtSMWKKrGoROPBXMh3Vwn93TA9V35PldokHGqiUbF6erSzox/5qrSMKp6SzakvyjcPiVF8yB1xKr9Pg== + +"@rollup/rollup-linux-ppc64-gnu@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.0.tgz#01aacb8e24c41fc5bed2d592c34c210e92975cd3" + integrity sha512-X/4WfuBAdQRH8cK3DYl8zC00XEE6aM472W+QCycpQJeLWVnHfkv7RyBFVaTqNUMsTgIX8ihMjCvFF9OUgeABzw== + +"@rollup/rollup-linux-riscv64-gnu@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.0.tgz#fe3224c04b005a378b22f53f3be718c6c175d782" + integrity sha512-xIRYc58HfWDBZoLmWfWXg2Sq8VCa2iJ32B7mqfWnkx5mekekl0tMe7FHpY8I72RXEcUkaWawRvl3qA55og+cwQ== + +"@rollup/rollup-linux-riscv64-musl@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.0.tgz#ff25daa05f99c77f43e4d8eef02d57c231dac6ed" + integrity sha512-mbsoUey05WJIOz8U1WzNdf+6UMYGwE3fZZnQqsM22FZ3wh1N887HT6jAOjXs6CNEK3Ntu2OBsyQDXfIjouI4dw== + +"@rollup/rollup-linux-s390x-gnu@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.0.tgz#7afac92ea34b129e1430351f615b9f6a84f6510d" + integrity sha512-qP6aP970bucEi5KKKR4AuPFd8aTx9EF6BvutvYxmZuWLJHmnq4LvBfp0U+yFDMGwJ+AIJEH5sIP+SNypauMWzg== + +"@rollup/rollup-linux-x64-gnu@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.0.tgz#214b534701614c7502603e2a083bb9f072ae8500" + integrity sha512-nmSVN+F2i1yKZ7rJNKO3G7ZzmxJgoQBQZ/6c4MuS553Grmr7WqR7LLDcYG53Z2m9409z3JLt4sCOhLdbKQ3HmA== + +"@rollup/rollup-linux-x64-musl@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.0.tgz#8bdc313319fb097795b9213782354afeb8452658" + integrity sha512-2d0qRo33G6TfQVjaMR71P+yJVGODrt5V6+T0BDYH4EMfGgdC/2HWDVjSSFw888GSzAZUwuska3+zxNUCDco6rQ== + +"@rollup/rollup-openharmony-arm64@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.0.tgz#3a6050fc85143f14039c2e8f8f6e90e9e60a392c" + integrity sha512-A1JalX4MOaFAAyGgpO7XP5khquv/7xKzLIyLmhNrbiCxWpMlnsTYr8dnsWM7sEeotNmxvSOEL7F65j0HXFcFsw== + +"@rollup/rollup-win32-arm64-msvc@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.0.tgz#7a57e55beeb598b7a27786e95142f39fff5daddb" + integrity sha512-YQugafP/rH0eOOHGjmNgDURrpYHrIX0yuojOI8bwCyXwxC9ZdTd3vYkmddPX0oHONLXu9Rb1dDmT0VNpjkzGGw== + +"@rollup/rollup-win32-ia32-msvc@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.0.tgz#a7a7a1b5d53bd3fdddf494106961c018a39f6f77" + integrity sha512-zYdUYhi3Qe2fndujBqL5FjAFzvNeLxtIqfzNEVKD1I7C37/chv1VxhscWSQHTNfjPCrBFQMnynwA3kpZpZ8w4A== + +"@rollup/rollup-win32-x64-gnu@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.0.tgz#45040d6623b0db5dd3b9ee0054708ba8b25cd787" + integrity sha512-fGk03kQylNaCOQ96HDMeT7E2n91EqvCDd3RwvT5k+xNdFCeMGnj5b5hEgTGrQuyidqSsD3zJDQ21QIaxXqTBJw== + +"@rollup/rollup-win32-x64-msvc@4.52.0": + version "4.52.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.0.tgz#79bc6c361bd80134402274e7c4a6bb36c88d50c2" + integrity sha512-6iKDCVSIUQ8jPMoIV0OytRKniaYyy5EbY/RRydmLW8ZR3cEBhxbWl5ro0rkUNe0ef6sScvhbY79HrjRm8i3vDQ== "@samverschueren/stream-to-observable@^0.3.0": version "0.3.1" @@ -27849,33 +27874,35 @@ rollup@3.29.5: optionalDependencies: fsevents "~2.3.2" -rollup@^4.20.0, rollup@^4.24.4, rollup@^4.34.9, rollup@^4.43.0: - version "4.46.2" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.46.2.tgz#09b1a45d811e26d09bed63dc3ecfb6831c16ce32" - integrity sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg== +rollup@4.52.0, rollup@^4.20.0, rollup@^4.24.4, rollup@^4.34.9, rollup@^4.43.0, rollup@^4.52.0: + version "4.52.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.52.0.tgz#5a906bf98f7c7a2c08d2b18fbfa52955552423d7" + integrity sha512-+IuescNkTJQgX7AkIDtITipZdIGcWF0pnVvZTWStiazUmcGA2ag8dfg0urest2XlXUi9kuhfQ+qmdc5Stc3z7g== dependencies: "@types/estree" "1.0.8" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.46.2" - "@rollup/rollup-android-arm64" "4.46.2" - "@rollup/rollup-darwin-arm64" "4.46.2" - "@rollup/rollup-darwin-x64" "4.46.2" - "@rollup/rollup-freebsd-arm64" "4.46.2" - "@rollup/rollup-freebsd-x64" "4.46.2" - "@rollup/rollup-linux-arm-gnueabihf" "4.46.2" - "@rollup/rollup-linux-arm-musleabihf" "4.46.2" - "@rollup/rollup-linux-arm64-gnu" "4.46.2" - "@rollup/rollup-linux-arm64-musl" "4.46.2" - "@rollup/rollup-linux-loongarch64-gnu" "4.46.2" - "@rollup/rollup-linux-ppc64-gnu" "4.46.2" - "@rollup/rollup-linux-riscv64-gnu" "4.46.2" - "@rollup/rollup-linux-riscv64-musl" "4.46.2" - "@rollup/rollup-linux-s390x-gnu" "4.46.2" - "@rollup/rollup-linux-x64-gnu" "4.46.2" - "@rollup/rollup-linux-x64-musl" "4.46.2" - "@rollup/rollup-win32-arm64-msvc" "4.46.2" - "@rollup/rollup-win32-ia32-msvc" "4.46.2" - "@rollup/rollup-win32-x64-msvc" "4.46.2" + "@rollup/rollup-android-arm-eabi" "4.52.0" + "@rollup/rollup-android-arm64" "4.52.0" + "@rollup/rollup-darwin-arm64" "4.52.0" + "@rollup/rollup-darwin-x64" "4.52.0" + "@rollup/rollup-freebsd-arm64" "4.52.0" + "@rollup/rollup-freebsd-x64" "4.52.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.52.0" + "@rollup/rollup-linux-arm-musleabihf" "4.52.0" + "@rollup/rollup-linux-arm64-gnu" "4.52.0" + "@rollup/rollup-linux-arm64-musl" "4.52.0" + "@rollup/rollup-linux-loong64-gnu" "4.52.0" + "@rollup/rollup-linux-ppc64-gnu" "4.52.0" + "@rollup/rollup-linux-riscv64-gnu" "4.52.0" + "@rollup/rollup-linux-riscv64-musl" "4.52.0" + "@rollup/rollup-linux-s390x-gnu" "4.52.0" + "@rollup/rollup-linux-x64-gnu" "4.52.0" + "@rollup/rollup-linux-x64-musl" "4.52.0" + "@rollup/rollup-openharmony-arm64" "4.52.0" + "@rollup/rollup-win32-arm64-msvc" "4.52.0" + "@rollup/rollup-win32-ia32-msvc" "4.52.0" + "@rollup/rollup-win32-x64-gnu" "4.52.0" + "@rollup/rollup-win32-x64-msvc" "4.52.0" fsevents "~2.3.2" router@^2.2.0: @@ -31200,7 +31227,12 @@ typescript@5.4.5, typescript@~5.4.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== -"typescript@>=3 < 6", typescript@^5.4.3, typescript@^5.8.2, typescript@~5.9.2: +typescript@5.6.3: + version "5.6.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" + integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== + +typescript@5.9.2, "typescript@>=3 < 6", typescript@^5.4.3, typescript@^5.6.3, typescript@^5.8.2, typescript@~5.9.2: version "5.9.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.2.tgz#d93450cddec5154a2d5cabe3b8102b83316fb2a6" integrity sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==