|
28 | 28 | "esm", |
29 | 29 | "umd", |
30 | 30 | "index.d.ts", |
31 | | - "codemods/dist" |
| 31 | + "codemods/dist", |
| 32 | + "types" |
32 | 33 | ], |
33 | 34 | "sideEffects": false, |
34 | 35 | "scripts": { |
35 | | - "build": "yarn generate-icons && concurrently --names 'commonjs,esm,umd,codemods' 'yarn build-commonjs' 'yarn build-esm' 'yarn build-umd' 'yarn build-codemods'", |
| 36 | + "build": "yarn generate-icons && concurrently --names 'commonjs,esm,umd,codemods,types' 'yarn build-commonjs' 'yarn build-esm' 'yarn build-umd' 'yarn build-codemods' 'yarn build-types'", |
36 | 37 | "build-codemods": "cd codemods && yarn build", |
37 | | - "build-commonjs": "BABEL_ENV=commonjs babel src --out-dir commonjs --ignore '**/stories','**/test'", |
38 | | - "build-esm": "BABEL_ENV=esm babel src --out-dir esm --ignore '**/stories','**/test'", |
| 38 | + "build-commonjs": "tsc --project tsconfig.commonjs.json", |
| 39 | + "build-esm": "BABEL_ENV=esm babel src --out-dir esm --ignore '**/stories','**/test','**/__tests__','**/types' --extensions '.js,.ts,.tsx'", |
39 | 40 | "build-storybook": "build-storybook", |
| 41 | + "build-types": "tsc --project tsconfig.types.json", |
40 | 42 | "build-umd": "rollup -c", |
41 | 43 | "chromatic": "npx chromatic", |
42 | 44 | "clean": "git clean -Xdf", |
|
45 | 47 | "deploy-docs": "cd docs && yarn install && yarn deploy", |
46 | 48 | "dev": "start-storybook -p 6006", |
47 | 49 | "generate-icons": "./tools/generate-icons.js", |
48 | | - "lint": "eslint \"src/**/*.js\" --cache", |
| 50 | + "lint": "eslint \"src/**/*.{js,ts,tsx}\" --cache", |
49 | 51 | "postpublish": "branch=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD); if [[ $branch == \"master\" ]]; then yarn update-docs || yarn deploy-docs; else echo \"not on main branch, skipping docs deploy\"; fi;", |
50 | | - "prepublishOnly": "rm -rf esm commonjs umd && yarn build", |
| 52 | + "prebuild": "yarn typecheck", |
| 53 | + "prepublishOnly": "rm -rf esm commonjs umd types && yarn build", |
51 | 54 | "release": "np", |
52 | 55 | "size": "size-limit", |
53 | 56 | "storybook": "start-storybook -p 6006", |
54 | 57 | "test": "yarn lint && yarn tsd && yarn jest", |
55 | 58 | "test:watch": "yarn jest --watch", |
| 59 | + "typecheck": "tsc --noEmit", |
56 | 60 | "update-docs": "cd docs && yarn add evergreen-ui@latest --exact && git add package.json yarn.lock && git show-branch --no-name HEAD | grep -E 'v[0-9]+.[0-9]+.[0-9]+' && git commit --amend --no-edit || git commit -m \"Updated doc site evergreen version\"" |
57 | 61 | }, |
58 | 62 | "engines": { |
|
61 | 65 | "dependencies": { |
62 | 66 | "@babel/runtime": "^7.1.2", |
63 | 67 | "@segment/react-tiny-virtual-list": "^2.2.1", |
64 | | - "@types/react": "^16.9.5", |
65 | 68 | "@types/react-transition-group": "^4.4.0", |
66 | 69 | "arrify": "^1.0.1", |
67 | 70 | "downshift": "^5.2.0", |
|
92 | 95 | "@babel/plugin-transform-runtime": "^7.1.0", |
93 | 96 | "@babel/preset-env": "^7.1.0", |
94 | 97 | "@babel/preset-react": "^7.0.0", |
| 98 | + "@babel/preset-typescript": "^7.18.6", |
95 | 99 | "@babel/register": "^7.0.0", |
96 | 100 | "@blueprintjs/icons": "^3.31.0", |
97 | 101 | "@faker-js/faker": "^6.1.2", |
|
100 | 104 | "@rollup/plugin-commonjs": "^15.1.0", |
101 | 105 | "@rollup/plugin-node-resolve": "^9.0.0", |
102 | 106 | "@rollup/plugin-replace": "^2.3.3", |
| 107 | + "@rollup/plugin-typescript": "^10.0.1", |
103 | 108 | "@size-limit/preset-big-lib": "^4.5.4", |
104 | 109 | "@storybook/addon-essentials": "^6.0.21", |
105 | 110 | "@storybook/addon-options": "^5.3.21", |
|
109 | 114 | "@testing-library/jest-dom": "^5.11.6", |
110 | 115 | "@testing-library/react": "13.3.0", |
111 | 116 | "@testing-library/user-event": "^13.1.9", |
| 117 | + "@types/fs-extra": "^9.0.13", |
| 118 | + "@types/fuzzaldrin-plus": "^0.6.2", |
| 119 | + "@types/humanize-plus": "1.8.0", |
| 120 | + "@types/jest": "27.4.0", |
| 121 | + "@types/lodash.debounce": "^4.0.6", |
| 122 | + "@types/lodash.differencewith": "^4.5.6", |
| 123 | + "@types/lodash.isempty": "^4.4.6", |
| 124 | + "@types/lodash.merge": "^4.6.6", |
| 125 | + "@types/lodash.uniqby": "^4.7.6", |
| 126 | + "@types/node": "^17.0.21", |
| 127 | + "@types/react-is": "17.0.3", |
| 128 | + "@types/testing-library__jest-dom": "5.14.3", |
| 129 | + "@types/tinycolor2": "^1.4.3", |
| 130 | + "@typescript-eslint/eslint-plugin": "^5.14.0", |
| 131 | + "@typescript-eslint/parser": "^5.14.0", |
112 | 132 | "babel-core": "7.0.0-bridge.0", |
113 | | - "babel-eslint": "^10.0.1", |
114 | 133 | "babel-loader": "^8.1.0", |
115 | 134 | "babel-plugin-add-react-displayname": "^0.0.5", |
116 | 135 | "camelcase": "^5.0.0", |
|
132 | 151 | "jest": "^26.4.2", |
133 | 152 | "lint-staged": "^10.0.1", |
134 | 153 | "np": "^6.3.2", |
135 | | - "prettier": "^1.14.3", |
| 154 | + "prettier": "2.8.1", |
136 | 155 | "react": "^18.2.0", |
137 | 156 | "react-dom": "^18.2.0", |
138 | 157 | "react-is": "^18.2.0", |
|
142 | 161 | "size-limit": "^4.5.0", |
143 | 162 | "starwars-names": "^1.6.0", |
144 | 163 | "tsd": "^0.19.1", |
| 164 | + "typescript": "4.9.4", |
145 | 165 | "url-loader": "^1.1.2", |
146 | 166 | "webpack": "^4.43.0", |
147 | 167 | "yarnhook": "^0.5.1" |
|
154 | 174 | "singleQuote": true, |
155 | 175 | "printWidth": 120, |
156 | 176 | "tabWidth": 2, |
157 | | - "useTabs": false |
| 177 | + "useTabs": false, |
| 178 | + "trailingComma": "none", |
| 179 | + "arrowParens": "avoid" |
158 | 180 | }, |
159 | 181 | "lint-staged": { |
160 | | - "!(codemods|docs)/**/*.js": [ |
| 182 | + "!(codemods|docs)/**/.{js,ts,tsx}": [ |
161 | 183 | "yarn lint --fix", |
162 | 184 | "prettier --write" |
163 | 185 | ], |
164 | | - "docs/**/*.{ts,tsx,js,jsx}": [ |
| 186 | + "docs/**/*.{js,ts,tsx}": [ |
165 | 187 | "yarn --cwd ./docs run lint" |
166 | 188 | ], |
167 | 189 | "*.{json,md}": [ |
|
179 | 201 | "<rootDir>/commonjs/" |
180 | 202 | ], |
181 | 203 | "collectCoverageFrom": [ |
182 | | - "src/**/*.{js,jsx}", |
| 204 | + "src/**/*.{js,ts,tsx}", |
183 | 205 | "!**/*.stories.{js,jsx}", |
184 | 206 | "!src/{constants,test,themes}/**", |
185 | 207 | "!src/icons/generated/**" |
|
0 commit comments