|
7 | 7 | "jsnext:main": "dist/react-stripe.esm.js",
|
8 | 8 | "browser:min": "dist/react-stripe.umd.min.js",
|
9 | 9 | "browser": "dist/react-stripe.umd.js",
|
| 10 | + "types": "dist/react-stripe.d.ts", |
10 | 11 | "scripts": {
|
11 | 12 | "test": "jest",
|
12 |
| - "rollup": "rollup -c", |
13 |
| - "lint": "eslint src examples", |
14 |
| - "flow": "flow", |
15 |
| - "build": "yarn run lint && yarn run flow && yarn run rollup", |
| 13 | + "lint": "eslint '{src,examples}/**/*.{ts,tsx,js}'", |
| 14 | + "lint:prettier": "prettier './**/*.js' './**/*.css' './**/*.md' --list-different", |
| 15 | + "typecheck": "tsc", |
| 16 | + "build": "yarn run clean && yarn run rollup -c", |
16 | 17 | "clean": "rimraf dist",
|
17 |
| - "prettier": "prettier './**/*.js' './**/*.css' './**/*.md' --write", |
18 |
| - "prettier-list-different": "prettier './**/*.js' './**/*.css' './**/*.md' --list-different", |
19 |
| - "prepublish": "yarn run clean && yarn run build", |
20 |
| - "publish": "npm publish --access public", |
| 18 | + "prettier:fix": "prettier './**/*.js' './**/*.css' './**/*.md' --write", |
| 19 | + "ci": "yarn run lint && yarn run lint:prettier && yarn run test && yarn run typecheck && yarn run build", |
| 20 | + "prepublish": "yarn run ci", |
21 | 21 | "doctoc": "doctoc README.md",
|
22 | 22 | "storybook": "start-storybook -p 6006 "
|
23 | 23 | },
|
|
28 | 28 | ],
|
29 | 29 | "author": "Stripe (https://www.stripe.com)",
|
30 | 30 | "license": "MIT",
|
31 |
| - "dependencies": { |
32 |
| - "prop-types": "^15.7.2" |
33 |
| - }, |
34 | 31 | "repository": {
|
35 | 32 | "type": "git",
|
36 | 33 | "url": "https://github.com/stripe/react-stripe-js.git"
|
|
40 | 37 | "src"
|
41 | 38 | ],
|
42 | 39 | "jest": {
|
| 40 | + "preset": "ts-jest/presets/js-with-ts", |
43 | 41 | "setupFilesAfterEnv": [
|
44 | 42 | "<rootDir>/test/setupJest.js"
|
45 | 43 | ]
|
46 | 44 | },
|
| 45 | + "dependencies": { |
| 46 | + "prop-types": "^15.7.2" |
| 47 | + }, |
47 | 48 | "devDependencies": {
|
48 | 49 | "@babel/cli": "^7.7.0",
|
49 | 50 | "@babel/core": "^7.7.2",
|
50 | 51 | "@babel/preset-env": "^7.7.1",
|
51 |
| - "@babel/preset-flow": "^7.0.0", |
52 | 52 | "@babel/preset-react": "^7.7.0",
|
| 53 | + "@stripe/stripe-js": "1.0.0-beta.5", |
53 | 54 | "@storybook/addon-actions": "^5.2.6",
|
54 | 55 | "@storybook/addon-links": "^5.2.6",
|
55 | 56 | "@storybook/addons": "^5.2.6",
|
| 57 | + "@storybook/preset-typescript": "^1.2.0", |
56 | 58 | "@storybook/react": "^5.2.6",
|
57 |
| - "@stripe/stripe-js": "^1.0.0-beta.3", |
| 59 | + "@types/enzyme": "^3.10.4", |
| 60 | + "@types/jest": "^25.1.1", |
| 61 | + "@types/react": "^16.9.19", |
| 62 | + "@types/react-dom": "^16.9.5", |
| 63 | + "@typescript-eslint/eslint-plugin": "^2.18.0", |
| 64 | + "@typescript-eslint/parser": "^2.18.0", |
| 65 | + "@wessberg/rollup-plugin-ts": "^1.2.15", |
58 | 66 | "babel-eslint": "^10.0.3",
|
59 | 67 | "babel-jest": "^24.9.0",
|
60 | 68 | "babel-loader": "^8.0.6",
|
61 | 69 | "enzyme": "3.10",
|
62 | 70 | "enzyme-adapter-react-16": "^1.14.0",
|
63 | 71 | "eslint": "6.6.0",
|
64 | 72 | "eslint-config-airbnb": "18.0.1",
|
65 |
| - "eslint-config-prettier": "^6.5.0", |
66 |
| - "eslint-plugin-flowtype": "^4.3.0", |
| 73 | + "eslint-config-prettier": "^6.10.0", |
67 | 74 | "eslint-plugin-import": "^2.18.2",
|
68 | 75 | "eslint-plugin-jest": "^22.6.3",
|
69 | 76 | "eslint-plugin-jsx-a11y": "^6.2.3",
|
70 |
| - "eslint-plugin-prettier": "^3.1.1", |
| 77 | + "eslint-plugin-prettier": "^3.1.2", |
71 | 78 | "eslint-plugin-react": "^7.14.3",
|
72 | 79 | "eslint-plugin-react-hooks": "^1.7.0",
|
73 |
| - "flow-bin": "^0.111.3", |
74 |
| - "jest": "^24.9.0", |
| 80 | + "fork-ts-checker-webpack-plugin": "^4.0.3", |
| 81 | + "jest": "^25.1.0", |
75 | 82 | "prettier": "^1.19.1",
|
76 | 83 | "react": "~16.9.0",
|
| 84 | + "react-docgen-typescript-loader": "^3.6.0", |
77 | 85 | "react-dom": "~16.9.0",
|
78 | 86 | "rimraf": "^2.6.2",
|
79 | 87 | "rollup": "^1.27.0",
|
80 | 88 | "rollup-plugin-babel": "^4.3.3",
|
81 | 89 | "rollup-plugin-commonjs": "^10.1.0",
|
82 | 90 | "rollup-plugin-node-resolve": "^5.2.0",
|
83 | 91 | "rollup-plugin-replace": "^2.2.0",
|
84 |
| - "rollup-plugin-terser": "^5.1.2" |
| 92 | + "rollup-plugin-terser": "^5.1.2", |
| 93 | + "ts-jest": "^25.1.0", |
| 94 | + "ts-loader": "^6.2.1", |
| 95 | + "typescript": "^3.7.5" |
85 | 96 | },
|
86 | 97 | "peerDependencies": {
|
87 | 98 | "react": "^16.8.0",
|
88 |
| - "react-dom": "^16.8.0" |
| 99 | + "react-dom": "^16.8.0", |
| 100 | + "@stripe/stripe-js": "1.0.0-beta.5" |
89 | 101 | }
|
90 | 102 | }
|
0 commit comments