Skip to content

Commit

Permalink
fix: move types condition to the front (#26630)
Browse files Browse the repository at this point in the history
* fix: move `types` condition to the front

* chore: update changelog

* optimize deps for vite

* update config

* try optimizeDeps.include

* missing dep

---------

Co-authored-by: Lachlan Miller <[email protected]>
  • Loading branch information
Andarist and lmiller1990 authored May 11, 2023
1 parent 7630cae commit 3335e4b
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 17 deletions.
4 changes: 4 additions & 0 deletions cli/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
**/__snapshots__
/build

# do not lint package.json, it incorrect re-orders the `exports`
# https://github.com/cypress-io/cypress/pull/26630
package.json

# cli/types is linted by tslint/dtslint
/types

Expand Down
9 changes: 9 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 12.12.1

_Released 05/14/2023 (PENDING)_

**Bugfixes:**

- Moved `types` condition to the front of `package.json#exports` since keys there are meant to be order-sensitive. Fixed in [#26630](https://github.com/cypress-io/cypress/pull/26630).

## 12.12.0

_Released 05/09/2023_
Expand All @@ -12,6 +20,7 @@ _Released 05/09/2023_
- Fixed an issue in Electron where devtools gets out of sync with the DOM occasionally. Addresses [#15932](https://github.com/cypress-io/cypress/issues/15932).
- Updated the Chromium renderer process crash message to be more terse. Addressed in [#26597](https://github.com/cypress-io/cypress/pull/26597).
- Fixed an issue with `CYPRESS_DOWNLOAD_PATH_TEMPLATE` regex to allow multiple replacements. Addresses [#23670](https://github.com/cypress-io/cypress/issues/23670).
- Moved `types` condition to the front of `package.json#exports` since keys there are meant to be order-sensitive. Fixed in [#26630](https://github.com/cypress-io/cypress/pull/26630).

**Dependency Updates:**

Expand Down
32 changes: 16 additions & 16 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,47 +120,47 @@
"types": "types",
"exports": {
".": {
"types": "./types/index.d.ts",
"import": "./index.mjs",
"require": "./index.js",
"types": "./types/index.d.ts"
"require": "./index.js"
},
"./vue": {
"types": "./vue/dist/index.d.ts",
"import": "./vue/dist/cypress-vue.esm-bundler.js",
"require": "./vue/dist/cypress-vue.cjs.js",
"types": "./vue/dist/index.d.ts"
"require": "./vue/dist/cypress-vue.cjs.js"
},
"./vue2": {
"types": "./vue2/dist/index.d.ts",
"import": "./vue2/dist/cypress-vue2.esm-bundler.js",
"require": "./vue2/dist/cypress-vue2.cjs.js",
"types": "./vue2/dist/index.d.ts"
"require": "./vue2/dist/cypress-vue2.cjs.js"
},
"./package.json": {
"import": "./package.json",
"require": "./package.json"
},
"./react": {
"types": "./react/dist/index.d.ts",
"import": "./react/dist/cypress-react.esm-bundler.js",
"require": "./react/dist/cypress-react.cjs.js",
"types": "./react/dist/index.d.ts"
"require": "./react/dist/cypress-react.cjs.js"
},
"./react18": {
"types": "./react18/dist/index.d.ts",
"import": "./react18/dist/cypress-react.esm-bundler.js",
"require": "./react18/dist/cypress-react.cjs.js",
"types": "./react18/dist/index.d.ts"
"require": "./react18/dist/cypress-react.cjs.js"
},
"./mount-utils": {
"require": "./mount-utils/dist/index.js",
"types": "./mount-utils/dist/index.d.ts"
"types": "./mount-utils/dist/index.d.ts",
"require": "./mount-utils/dist/index.js"
},
"./angular": {
"types": "./angular/dist/index.d.ts",
"import": "./angular/dist/index.js",
"require": "./angular/dist/index.js",
"types": "./angular/dist/index.d.ts"
"require": "./angular/dist/index.js"
},
"./svelte": {
"types": "./svelte/dist/index.d.ts",
"import": "./svelte/dist/cypress-svelte.esm-bundler.js",
"require": "./svelte/dist/cypress-svelte.cjs.js",
"types": "./svelte/dist/index.d.ts"
"require": "./svelte/dist/cypress-selte.cjs.js"
}
},
"workspaces": {
Expand Down
18 changes: 17 additions & 1 deletion packages/app/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,23 @@ import Copy from 'rollup-plugin-copy'
import Legacy from '@vitejs/plugin-legacy'
import { resolve } from 'path'

export default makeConfig({}, {
export default makeConfig({
optimizeDeps: {
include: [
'javascript-time-ago',
'ansi-to-html',
'fuzzysort',
'@cypress-design/**',
'@cypress-design/vue-button',
'debug',
'p-defer',
'bluebird',
'events',
'@popperjs/core',
'@opentelemetry/*',
]
},
}, {
plugins: [
Layouts(),
Pages({ extensions: ['vue'] }),
Expand Down

5 comments on commit 3335e4b

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3335e4b May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.12.1/linux-arm64/develop-3335e4b49f3437f5e30fefaa0774c455d50f42d7/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3335e4b May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.12.1/linux-x64/develop-3335e4b49f3437f5e30fefaa0774c455d50f42d7/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3335e4b May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.12.1/darwin-arm64/develop-3335e4b49f3437f5e30fefaa0774c455d50f42d7/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3335e4b May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.12.1/darwin-x64/develop-3335e4b49f3437f5e30fefaa0774c455d50f42d7/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3335e4b May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.12.1/win32-x64/develop-3335e4b49f3437f5e30fefaa0774c455d50f42d7/cypress.tgz

Please sign in to comment.