From 38637405dfac7bf3ba709c73b39db7ef51c5cdc3 Mon Sep 17 00:00:00 2001 From: Thom Wright Date: Tue, 31 Oct 2017 14:12:22 +0000 Subject: [PATCH] Include index.d.ts in the published npm package index.d.ts needs to be in the files list in order to be published. Without it, client packages aren't able to use the Typescript types. --- packages/grpc-native-core/package.json | 5 +++-- packages/grpc-native-core/templates/package.json.template | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index 3704c591..227c4a08 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -16,7 +16,7 @@ } ], "directories": { - "lib": "src/node/src" + "lib": "src" }, "scripts": { "build": "./node_modules/.bin/node-pre-gyp build", @@ -53,6 +53,7 @@ "README.md", "deps/grpc/etc/", "index.js", + "index.d.ts", "src/*.js", "ext/*.{cc,h}", "deps/grpc/include/grpc/**/*.h", @@ -66,7 +67,7 @@ "binding.gyp" ], "main": "index.js", - "typings": "src/index.d.ts", + "typings": "index.d.ts", "license": "Apache-2.0", "jshintConfig": { "bitwise": true, diff --git a/packages/grpc-native-core/templates/package.json.template b/packages/grpc-native-core/templates/package.json.template index 4a119737..a4eb88f7 100644 --- a/packages/grpc-native-core/templates/package.json.template +++ b/packages/grpc-native-core/templates/package.json.template @@ -18,7 +18,7 @@ } ], "directories": { - "lib": "src/node/src" + "lib": "src" }, "scripts": { "build": "./node_modules/.bin/node-pre-gyp build", @@ -55,6 +55,7 @@ "README.md", "deps/grpc/etc/", "index.js", + "index.d.ts", "src/*.js", "ext/*.{cc,h}", "deps/grpc/include/grpc/**/*.h", @@ -68,7 +69,7 @@ "binding.gyp" ], "main": "index.js", - "typings": "src/index.d.ts", + "typings": "index.d.ts", "license": "Apache-2.0", "jshintConfig": { "bitwise": true,