This repository was archived by the owner on Oct 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
feat: Add Typescript types #72
Merged
chrisbreiding
merged 5 commits into
cypress-io:master
from
NickBolles:njb/create-typings
Apr 7, 2020
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3a54747
feat: typings
NickBolles d94cf71
fix: revert cypress version change
NickBolles 7e73403
Merge branch 'master' into njb/create-typings
NickBolles 58eb90b
make eslint plugin happy, but also don't lint types file
chrisbreiding ef43003
chore: update yarn.lock
chrisbreiding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
test/_test-output | ||
cypress/tests/e2e/compile-error.js | ||
test/fixtures | ||
*.ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as webpack from 'webpack'; | ||
import Cypress from 'cypress'; | ||
|
||
declare namespace CypressWebpackPreProcessor { | ||
export type Options = { webpackOptions: webpack.Configuration }; | ||
export type FilePreprocessor = (file: Cypress.FileObject) => string | Promise<string>; | ||
} | ||
|
||
declare module "@cypress/webpack-preprocessor" { | ||
const _default: (options: CypressWebpackPreProcessor.Options) => CypressWebpackPreProcessor.FilePreprocessor; | ||
|
||
export = _default; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -964,6 +964,11 @@ | |
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" | ||
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== | ||
|
||
"@types/eslint-visitor-keys@^1.0.0": | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" | ||
integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== | ||
|
||
"@types/events@*": | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" | ||
|
@@ -978,6 +983,11 @@ | |
"@types/minimatch" "*" | ||
"@types/node" "*" | ||
|
||
"@types/json-schema@^7.0.3": | ||
version "7.0.4" | ||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" | ||
integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== | ||
|
||
"@types/minimatch@*": | ||
version "3.0.3" | ||
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" | ||
|
@@ -1013,6 +1023,49 @@ | |
resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47" | ||
integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg== | ||
|
||
"@typescript-eslint/[email protected]": | ||
version "2.27.0" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.27.0.tgz#e479cdc4c9cf46f96b4c287755733311b0d0ba4b" | ||
integrity sha512-/my+vVHRN7zYgcp0n4z5A6HAK7bvKGBiswaM5zIlOQczsxj/aiD7RcgD+dvVFuwFaGh5+kM7XA6Q6PN0bvb1tw== | ||
dependencies: | ||
"@typescript-eslint/experimental-utils" "2.27.0" | ||
functional-red-black-tree "^1.0.1" | ||
regexpp "^3.0.0" | ||
tsutils "^3.17.1" | ||
|
||
"@typescript-eslint/[email protected]": | ||
version "2.27.0" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.27.0.tgz#801a952c10b58e486c9a0b36cf21e2aab1e9e01a" | ||
integrity sha512-vOsYzjwJlY6E0NJRXPTeCGqjv5OHgRU1kzxHKWJVPjDYGbPgLudBXjIlc+OD1hDBZ4l1DLbOc5VjofKahsu9Jw== | ||
dependencies: | ||
"@types/json-schema" "^7.0.3" | ||
"@typescript-eslint/typescript-estree" "2.27.0" | ||
eslint-scope "^5.0.0" | ||
eslint-utils "^2.0.0" | ||
|
||
"@typescript-eslint/[email protected]": | ||
version "2.27.0" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.27.0.tgz#d91664335b2c46584294e42eb4ff35838c427287" | ||
integrity sha512-HFUXZY+EdwrJXZo31DW4IS1ujQW3krzlRjBrFRrJcMDh0zCu107/nRfhk/uBasO8m0NVDbBF5WZKcIUMRO7vPg== | ||
dependencies: | ||
"@types/eslint-visitor-keys" "^1.0.0" | ||
"@typescript-eslint/experimental-utils" "2.27.0" | ||
"@typescript-eslint/typescript-estree" "2.27.0" | ||
eslint-visitor-keys "^1.1.0" | ||
|
||
"@typescript-eslint/[email protected]": | ||
version "2.27.0" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.27.0.tgz#a288e54605412da8b81f1660b56c8b2e42966ce8" | ||
integrity sha512-t2miCCJIb/FU8yArjAvxllxbTiyNqaXJag7UOpB5DVoM3+xnjeOngtqlJkLRnMtzaRcJhe3CIR9RmL40omubhg== | ||
dependencies: | ||
debug "^4.1.1" | ||
eslint-visitor-keys "^1.1.0" | ||
glob "^7.1.6" | ||
is-glob "^4.0.1" | ||
lodash "^4.17.15" | ||
semver "^6.3.0" | ||
tsutils "^3.17.1" | ||
|
||
"@webassemblyjs/[email protected]": | ||
version "1.8.5" | ||
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" | ||
|
@@ -2921,7 +2974,7 @@ debug@4, [email protected], debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: | |
dependencies: | ||
ms "^2.1.1" | ||
|
||
debuglog@*, debuglog@^1.0.1: | ||
debuglog@^1.0.1: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" | ||
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= | ||
|
@@ -3409,6 +3462,13 @@ eslint-utils@^1.4.3: | |
dependencies: | ||
eslint-visitor-keys "^1.1.0" | ||
|
||
eslint-utils@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" | ||
integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA== | ||
dependencies: | ||
eslint-visitor-keys "^1.1.0" | ||
|
||
eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: | ||
version "1.1.0" | ||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" | ||
|
@@ -4737,7 +4797,7 @@ import-lazy@^2.1.0: | |
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" | ||
integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= | ||
|
||
imurmurhash@*, imurmurhash@^0.1.4: | ||
imurmurhash@^0.1.4: | ||
version "0.1.4" | ||
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" | ||
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= | ||
|
@@ -5793,11 +5853,6 @@ lockfile@^1.0.4: | |
dependencies: | ||
signal-exit "^3.0.2" | ||
|
||
lodash._baseindexof@*: | ||
version "3.1.0" | ||
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" | ||
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw= | ||
|
||
lodash._baseuniq@~4.6.0: | ||
version "4.6.0" | ||
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" | ||
|
@@ -5806,33 +5861,11 @@ lodash._baseuniq@~4.6.0: | |
lodash._createset "~4.0.0" | ||
lodash._root "~3.0.0" | ||
|
||
lodash._bindcallback@*: | ||
version "3.0.1" | ||
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" | ||
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= | ||
|
||
lodash._cacheindexof@*: | ||
version "3.0.2" | ||
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" | ||
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI= | ||
|
||
lodash._createcache@*: | ||
version "3.1.2" | ||
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" | ||
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM= | ||
dependencies: | ||
lodash._getnative "^3.0.0" | ||
|
||
lodash._createset@~4.0.0: | ||
version "4.0.3" | ||
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" | ||
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= | ||
|
||
lodash._getnative@*, lodash._getnative@^3.0.0: | ||
version "3.9.1" | ||
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" | ||
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= | ||
|
||
lodash._root@~3.0.0: | ||
version "3.0.1" | ||
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" | ||
|
@@ -5888,11 +5921,6 @@ lodash.once@^4.1.1: | |
resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" | ||
integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= | ||
|
||
lodash.restparam@*: | ||
version "3.6.1" | ||
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" | ||
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= | ||
|
||
lodash.toarray@^4.4.0: | ||
version "4.4.0" | ||
resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" | ||
|
@@ -8138,6 +8166,11 @@ regexpp@^2.0.1: | |
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" | ||
integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== | ||
|
||
regexpp@^3.0.0: | ||
version "3.1.0" | ||
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" | ||
integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== | ||
|
||
regexpu-core@^4.6.0: | ||
version "4.6.0" | ||
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" | ||
|
@@ -9546,11 +9579,23 @@ trim-off-newlines@^1.0.0: | |
resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" | ||
integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= | ||
|
||
tslib@^1.8.1: | ||
version "1.11.1" | ||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" | ||
integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== | ||
|
||
tslib@^1.9.0: | ||
version "1.10.0" | ||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" | ||
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== | ||
|
||
tsutils@^3.17.1: | ||
version "3.17.1" | ||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" | ||
integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== | ||
dependencies: | ||
tslib "^1.8.1" | ||
|
||
[email protected]: | ||
version "0.0.0" | ||
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
index.d.ts
is not included infiles
, so it's not part of the npm package:https://unpkg.com/@cypress/webpack-preprocessor/
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.
D'oh! I'll get that fixed and a new release out right away.
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.
Fixed in
5.1.1
Uh oh!
There was an error while loading. Please reload this page.
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.
I could have sworn the types field was included by default. Main is, but types aren't I guess :(
https://docs.npmjs.com/files/package.json
Thanks @OliverJAsh and @chrisbreiding!