Skip to content

Remove need for generated version.ts and prebuild script #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
"test:e2e": "jest --runInBand --detectOpenHandles",
"test:e2e:all": "npm run test:e2e:http && npm run test:e2e:grpc && npm run test:e2e:common && npm run test:e2e:workflow",
"test:e2e:grpc": "npm run test:e2e:grpc:client && npm run test:e2e:grpc:server && npm run test:e2e:grpc:clientWithApiToken",
"test:e2e:grpc:client": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/*client.test.ts' ]",
"test:e2e:grpc:clientWithApiToken": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 DAPR_API_TOKEN=test dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/clientWithApiToken.test.ts' ]",
"test:e2e:grpc:server": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --max-body-size 10Mi --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/*server.test.ts' ]",
"test:e2e:grpc:client": "TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/*client.test.ts' ]",
"test:e2e:grpc:clientWithApiToken": "TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 DAPR_API_TOKEN=test dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/clientWithApiToken.test.ts' ]",
"test:e2e:grpc:server": "TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --max-body-size 10Mi --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/*server.test.ts' ]",
"test:e2e:http": "npm run test:e2e:http:client && npm run test:e2e:http:server && npm run test:e2e:http:actors",
"test:e2e:http:client": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/(client).test.ts' ]",
"test:e2e:http:server": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --max-body-size 10Mi --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/(server).test.ts' ]",
"test:e2e:http:actors": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/actors.test.ts' ]",
"test:e2e:http:client": "TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/(client).test.ts' ]",
"test:e2e:http:server": "TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --max-body-size 10Mi --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/(server).test.ts' ]",
"test:e2e:http:actors": "TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/actors.test.ts' ]",
"test:e2e:common": "npm run test:e2e:common:client && npm run test:e2e:common:server",
"test:e2e:common:client": "./scripts/test-e2e-common.sh client",
"test:e2e:common:server": "./scripts/test-e2e-common.sh server",
"test:e2e:workflow": "npm run prebuild && dapr run --app-id workflow-test-suite --app-protocol grpc --dapr-grpc-port 4001 --resources-path ./test/components/workflow -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/workflow/workflow.test.ts' ]",
"test:e2e:workflow": "dapr run --app-id workflow-test-suite --app-protocol grpc --dapr-grpc-port 4001 --resources-path ./test/components/workflow -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/workflow/workflow.test.ts' ]",
"test:e2e:workflow:internal": "jest test/e2e/workflow --runInBand --detectOpenHandles",
"test:e2e:workflow:durabletask": "./scripts/test-e2e-workflow.sh",
"test:unit": "jest --runInBand --detectOpenHandles",
Expand All @@ -35,8 +35,7 @@
"test:unit:errors": "NODE_ENV=test npm run test:unit 'test/unit/errors/.*\\.test\\.ts'",
"test:unit:workflow": "NODE_ENV=test npm run test:unit 'test/unit/workflow/.*\\.test\\.ts'",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"prebuild": "./scripts/prebuild.sh",
"build-ci": "npm run prebuild && ./scripts/build.sh",
"build-ci": "./scripts/build.sh",
"build": "npm install && npm run lint && ./scripts/build.sh",
"start:dev": "npm run build && nodemon --ext \".ts,.js\" --watch \"./src\" --exec \"npm run build\"",
"pretty": "prettier --list-different \"**/*.{ts,tsx,js,jsx,json,md}\"",
Expand Down
38 changes: 0 additions & 38 deletions scripts/prebuild.sh

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/test-e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ stop_dapr() {

trap stop_dapr ERR

npm run prebuild

echo "[SCRIPT] Starting Dapr instances..."

# Run Dapr with gRPC
Expand Down
3 changes: 2 additions & 1 deletion src/implementation/Client/GRPCClient/GRPCClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import { Settings } from "../../../utils/Settings.util";
import { Logger } from "../../../logger/Logger";
import GRPCClientSidecar from "./sidecar";
import DaprClient from "../DaprClient";
import { SDK_VERSION } from "../../../version";
// @ts-ignore
import { version as SDK_VERSION } from "../../../../package.json";
import communicationProtocolEnum from "../../../enum/CommunicationProtocol.enum";
import { GrpcEndpoint } from "../../../network/GrpcEndpoint";

Expand Down
3 changes: 2 additions & 1 deletion src/implementation/Client/HTTPClient/HTTPClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import { Settings } from "../../../utils/Settings.util";
import { THTTPExecuteParams } from "../../../types/http/THTTPExecuteParams.type";
import { Logger } from "../../../logger/Logger";
import HTTPClientSidecar from "./sidecar";
import { SDK_VERSION } from "../../../version";
// @ts-ignore
import { version as SDK_VERSION } from "../../../../package.json";
import * as SerializerUtil from "../../../utils/Serializer.util";
import communicationProtocolEnum from "../../../enum/CommunicationProtocol.enum";
import { HttpEndpoint } from "../../../network/HttpEndpoint";
Expand Down
Loading