Skip to content

Commit a297ce9

Browse files
committed
chore: Fix types for case-core and case-connector-proto
1 parent c614465 commit a297ce9

12 files changed

Lines changed: 60 additions & 47 deletions

File tree

package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/case-connector-proto/package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"author": "Timothy Jones <timothy.l.jones@gmail.com> (https://github.com/TimothyJones)",
66
"homepage": "https://case.contract-testing.io/docs",
77
"license": "BSD-3-Clause",
8-
"main": "dist/index.js",
8+
"main": "src/index.js",
9+
"types": "src/index.d.ts",
10+
"exports": {
11+
".": "./src/index.js"
12+
},
913
"publishConfig": {
1014
"access": "public"
1115
},
@@ -14,10 +18,10 @@
1418
"url": "git+ssh://git@github.com/case-contract-testing/case.git"
1519
},
1620
"scripts": {
17-
"build:proto": "npm run build:proto:js && npm run build:proto:ts && npm run format:fix && npm run build",
21+
"build:proto": "npm run build:proto:js && npm run build:proto:ts && npm run format:fix",
1822
"build:proto:js": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:src/grpc --grpc_out=grpc_js:src/grpc ./proto/contract_case_stream.proto",
1923
"build:proto:ts": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:src/grpc --grpc_out=grpc_js:src/grpc --plugin=protoc-gen-grpc=../../node_modules/grpc_tools_node_protoc_ts/bin/protoc-gen-ts ./proto/contract_case_stream.proto",
20-
"build": "rimraf {dist,package} && tsc --project tsconfig.build.json",
24+
"build": "attw --pack --ignore-rules named-exports || attw --pack -f json",
2125
"lint": "eslint",
2226
"lint:fix": "eslint --fix",
2327
"lint:fix:proto": "protolint --fix ./proto",
@@ -29,6 +33,7 @@
2933
"url": "https://github.com/case-contract-testing/case/issues"
3034
},
3135
"devDependencies": {
36+
"@arethetypeswrong/cli": "^0.18.2",
3237
"@contract-case/case-maintainer-config": "0.25.2",
3338
"@contract-case/eslint-config-case-maintainer": "0.25.2",
3439
"@types/google-protobuf": "^3.15.12",
@@ -38,16 +43,14 @@
3843
"prettier": "3.5.3",
3944
"rimraf": "^6.0.1",
4045
"source-map-loader": "^5.0.0",
41-
"terser-webpack-plugin": "^5.3.14",
42-
"ts-node": "^10.9.2"
46+
"terser-webpack-plugin": "^5.3.14"
4347
},
4448
"dependencies": {
4549
"@grpc/grpc-js": "^1.13.3",
4650
"@grpc/proto-loader": "^0.7.15",
4751
"google-protobuf": "^3.21.4"
4852
},
4953
"stability": "stable",
50-
"types": "build/index.d.ts",
5154
"nx": {
5255
"tasksRunnerOptions": {
5356
"default": {

packages/case-connector-proto/src/grpc/index.d.ts

Whitespace-only changes.

packages/case-connector-proto/src/grpc/proto/contract_case_stream_grpc_pb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ var ContractCaseService = exports.ContractCaseService = {
6565
},
6666
};
6767

68-
exports.ContractCaseClient = grpc.makeGenericClientConstructor(ContractCaseService);
68+
exports.ContractCaseClient = grpc.makeGenericClientConstructor(ContractCaseService, 'ContractCase');
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from './grpc/proto/contract_case_stream_pb';
2+
export * from './grpc/proto/contract_case_stream_grpc_pb';
3+
export type * from './grpc/proto/contract_case_stream_grpc_pb';
4+
export type * from './grpc/proto/contract_case_stream_pb';

packages/case-connector-proto/src/index.js

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/case-connector-proto/src/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/case-connector-proto/tsconfig.build.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/case-connector-proto/tsconfig.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/case-core/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
},
3232
"scripts": {
3333
"build": "rimraf dist && tsc --project tsconfig.build.json",
34+
"postbuild": "attw --pack",
3435
"lint": "eslint",
3536
"lint:fix": "eslint --fix",
3637
"format:base": "prettier --parser typescript \"{src,bin}/**/*.ts\"",
@@ -52,6 +53,7 @@
5253
"url": "https://github.com/case-contract-testing/case/issues"
5354
},
5455
"devDependencies": {
56+
"@arethetypeswrong/cli": "^0.18.2",
5557
"@contract-case/case-definition-dsl": "0.25.2",
5658
"@contract-case/case-maintainer-config": "0.25.2",
5759
"@contract-case/eslint-config-case-maintainer": "0.25.2",

0 commit comments

Comments
 (0)