-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include typescript definitions 856 #979
Conversation
cli/package.json
Outdated
@@ -18,6 +18,7 @@ | |||
"lint": "bin-up eslint --fix *.js bin/* lib/*.js lib/**/*.js test/*.js test/**/*.js", | |||
"prebuild": "npm run test-dependencies && node ./scripts/start-build.js", | |||
"build": "node ./scripts/build.js", | |||
"postbuild": "cp index.d.ts build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this just be in start-build.js
? no reason to add it here
Add the missing RegExp definition for the url params of the route function. Also allow to call the route with the options params.
I noticed the The typings included here aren't perfect (ex: I'm happy to see type definitions move to the source repo and be official. I'm not sure how I feel about this move though. In my project I don't locally install Cypress (against warnings) because it increases the size of In any case, I'm interested in contributing to type definitions. |
@NicholasBoll we just had a new PR land that fixes some of the issues you documented. #1010 Not sure what you mean by "if the workspace is cleared Cypress has to download, unzip, install" We cache everything in our own CI to specifically avoid this. Not sure which provider you are using. Also this sounds like a huge PITA if you're not using node_modules to control the version of Cypress in CI. We're releasing quite frequently these days. How are you doing that? And how can you also synchronize that version with other developers? It's likely possible that you could check cypress in as a devDependency, but tell it not to download the binary -- and we could likely add a new command line flag to the CLI that points it at a binary at a different location. Unfortunately, you'd have to add the no download flag every time during As a sidenote, we have discussed allowing users to download a non electron version of Cypress that runs strictly in node with no GUI - but that would mostly just affect CI. Likely you'd still want to use the desktop app locally. |
I'm using Jenkins with Docker (from https://github.com/blacklabelops/jenkins). It isn't hard to keep up - just build a new image, upload and upgrade the swarm. Also the official download prompts upgrades so it isn't hard for developers to keep up-to-date. The best way to ensure consistent builds a clean directory with a fresh > cypress@1.1.2 postinstall {PATH_TO_PROJECT}/node_modules/cypress
> node index.js --exec install
Installing Cypress (version: 1.1.2)
✔ Downloaded Cypress
✔ Unzipped Cypress
✔ Finished Installation {PATH_TO_PROJECT}/node_modules/cypress/dist/Cypress.app
You can now open Cypress by running: node_modules/.bin/cypress open I'm curious to know how that could be cached (maybe symlink the I think it would be fine for a env variable to point to a binary for the I think a local install with an optional global binary would be ideal. |
@types/cypress
definition file into NPM repoindex.d.ts
tocypress
package by specifying it in the CLI package.json file as"types": "index.d.ts"