Skip to content

Commit d548a9b

Browse files
icd2k3jschrader-nr
andauthored
fix: type definitions (#123)
Co-authored-by: Justin Schrader <[email protected]>
1 parent b4c539a commit d548a9b

File tree

4 files changed

+680
-705
lines changed

4 files changed

+680
-705
lines changed

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-breadcrumbs-hoc",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "small, flexible, higher order component for rendering breadcrumbs with react-router 4.x",
55
"repository": "icd2k3/react-router-breadcrumbs-hoc",
66
"main": "dist/cjs/index.js",
@@ -9,10 +9,10 @@
99
"types": "dist/index.d.ts",
1010
"scripts": {
1111
"prepublishOnly": "npm run build && pinst --disable",
12-
"build": "rollup -c",
12+
"build": "rollup -c && yarn types",
1313
"test": "jest",
1414
"test-build": "sh ./scripts/test-build.sh",
15-
"types": "tsc -p tsconfig.json",
15+
"types": "tsc -p tsconfig.json --declaration --emitDeclarationOnly",
1616
"lint": "eslint ./src/**",
1717
"postpublish": "pinst --enable",
1818
"prepare": "husky install"
@@ -24,18 +24,18 @@
2424
"react-router": ">=5"
2525
},
2626
"devDependencies": {
27-
"@babel/cli": "^7.14.3",
28-
"@babel/core": "^7.14.3",
29-
"@babel/plugin-transform-runtime": "^7.14.3",
30-
"@babel/preset-env": "^7.14.4",
31-
"@babel/preset-react": "^7.13.13",
32-
"@babel/preset-typescript": "^7.13.0",
27+
"@babel/cli": "^7.14.5",
28+
"@babel/core": "^7.14.5",
29+
"@babel/plugin-transform-runtime": "^7.14.5",
30+
"@babel/preset-env": "^7.14.5",
31+
"@babel/preset-react": "^7.14.5",
32+
"@babel/preset-typescript": "^7.14.5",
3333
"@commitlint/cli": "^12.1.4",
3434
"@commitlint/config-conventional": "^12.1.4",
3535
"@rollup/plugin-babel": "^5.3.0",
3636
"@rollup/plugin-typescript": "^8.2.1",
37-
"@types/react": "^17.0.9",
38-
"@types/react-dom": "^17.0.6",
37+
"@types/react": "^17.0.11",
38+
"@types/react-dom": "^17.0.7",
3939
"@types/react-router": "^5.1.15",
4040
"@typescript-eslint/eslint-plugin": "^4.26.1",
4141
"@typescript-eslint/parser": "^4.26.1",

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const external = Object.keys(pkg.peerDependencies).concat(/@babel\/runtime/);
1010
const extensions = ['.js', '.tsx'];
1111

1212
const sharedPlugins = [
13-
typescript(),
13+
typescript({ tsconfig: './tsconfig.json' }),
1414
babel({
1515
babelHelpers: 'runtime',
1616
exclude: 'node_modules/**',

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"allowJs": true,
34
"esModuleInterop": true,
45
"forceConsistentCasingInFileNames": true,
56
"jsx": "react",

0 commit comments

Comments
 (0)