Skip to content

Commit 8a4dcb7

Browse files
authored
build: fix sdk npm packaging (#2780)
1 parent aa20d17 commit 8a4dcb7

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
release-npm:
2323
name: Release NPM packages
2424
runs-on: ubuntu-24.04
25-
timeout-minutes: 30
25+
timeout-minutes: 60
2626
if: github.event_name != 'workflow_dispatch'
2727
steps:
2828
- name: Check out repo

packages/js-evo-sdk/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.*js\"",
3030
"test": "yarn run test:unit && yarn run test:functional",
3131
"test:unit": "mocha tests/unit/**/*.spec.mjs && karma start ./tests/karma/karma.conf.cjs --single-run",
32-
"test:functional": "mocha tests/functional/**/*.spec.mjs --exit --timeout 90000 && karma start ./tests/karma/karma.functional.conf.cjs --single-run",
33-
"prepack": "yarn build"
32+
"test:functional": "mocha tests/functional/**/*.spec.mjs --exit --timeout 90000 && karma start ./tests/karma/karma.functional.conf.cjs --single-run"
3433
},
3534
"devDependencies": {
3635
"@typescript-eslint/eslint-plugin": "^5.55.0",

packages/wasm-sdk/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
"node": ">=18.18"
2525
},
2626
"scripts": {
27-
"build:dev": "./scripts/build.sh && node ./scripts/bundle.cjs",
27+
"build": "./scripts/build.sh && node ./scripts/bundle.cjs",
2828
"build:release": "./scripts/build-optimized.sh && node ./scripts/bundle.cjs",
29-
"build": "yarn build:dev",
30-
"prepack": "yarn build:release",
3129
"test": "yarn run test:unit && yarn run test:functional",
3230
"test:unit": "mocha tests/unit/**/*.spec.mjs && karma start ./tests/karma/karma.conf.cjs --single-run",
3331
"test:functional": "mocha tests/functional/**/*.spec.mjs && karma start ./tests/karma/karma.functional.conf.cjs --single-run",

packages/wasm-sdk/scripts/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ set -euo pipefail
1010
# Get script directory
1111
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1212

13+
# If building with release profile, use the optimized build script
14+
if [ "${CARGO_BUILD_PROFILE:-}" = "release" ]; then
15+
# exec replaces the current shell process; the script will not continue after this.
16+
exec "$SCRIPT_DIR/build-optimized.sh"
17+
fi
18+
1319
# Determine optimization level based on environment
1420
OPT_LEVEL="full"
1521
if [ "${CARGO_BUILD_PROFILE:-}" = "dev" ] || [ "${CI:-}" != "true" ]; then

0 commit comments

Comments
 (0)